Lines Matching refs:ent
318 npf_tblent_t *ent;
320 while ((ent = LIST_FIRST(&t->t_list)) != NULL) {
321 thmap_del(t->t_map, &ent->te_addr, ent->te_alen);
322 LIST_REMOVE(ent, te_listent);
323 pool_cache_put(tblent_cache, ent);
331 npf_tblent_t *ent;
333 while ((ent = LIST_FIRST(&t->t_list)) != NULL) {
334 LIST_REMOVE(ent, te_listent);
335 pool_cache_put(tblent_cache, ent);
344 npf_tblent_t *ent;
359 while ((ent = LIST_FIRST(&t->t_list)) != NULL) {
360 LIST_REMOVE(ent, te_listent);
361 pool_cache_put(tblent_cache, ent);
496 table_ifaddr_insert(npf_table_t *t, const int alen, npf_tblent_t *ent)
528 t->t_elements[aidx][used] = ent;
540 npf_tblent_t *ent;
547 ent = pool_cache_get(tblent_cache, PR_WAITOK);
548 memcpy(&ent->te_addr, addr, alen);
549 ent->te_alen = alen;
550 ent->te_preflen = 0;
568 if (thmap_put(t->t_map, &ent->te_addr, alen, ent) == ent) {
569 LIST_INSERT_HEAD(&t->t_list, ent, te_listent);
578 ent->te_preflen = preflen;
581 lpm_insert(t->t_lpm, addr, alen, preflen, ent) == 0) {
582 LIST_INSERT_HEAD(&t->t_list, ent, te_listent);
594 if ((error = table_ifaddr_insert(t, alen, ent)) != 0) {
597 LIST_INSERT_HEAD(&t->t_list, ent, te_listent);
606 pool_cache_put(tblent_cache, ent);
618 npf_tblent_t *ent = NULL;
629 ent = thmap_del(t->t_map, addr, alen);
630 if (__predict_true(ent != NULL)) {
631 LIST_REMOVE(ent, te_listent);
632 LIST_INSERT_HEAD(&t->t_gc, ent, te_listent);
633 ent = NULL; // to be G/C'ed
640 ent = lpm_lookup(t->t_lpm, addr, alen);
641 if (__predict_true(ent != NULL)) {
642 LIST_REMOVE(ent, te_listent);
643 lpm_remove(t->t_lpm, &ent->te_addr,
644 ent->te_alen, ent->te_preflen);
656 ent = NULL;
660 if (ent) {
661 pool_cache_put(tblent_cache, ent);
767 npf_tblent_t *ent;
771 LIST_FOREACH(ent, &t->t_list, te_listent) {
773 error = table_ent_copyout(&ent->te_addr,
774 ent->te_alen, ent->te_preflen, ubuf, len, &off);
860 npf_tblent_t *ent;
874 while ((ent = LIST_FIRST(&t->t_gc)) != NULL) {
875 LIST_REMOVE(ent, te_listent);
876 pool_cache_put(tblent_cache, ent);