| 362 | } |
| 363 | |
| 364 | static void |
| 365 | vlan_freehash(struct ifvlantrunk *trunk) |
| 366 | { |
| 367 | #ifdef INVARIANTS |
| 368 | int i; |
| 369 | |
| 370 | KASSERT(trunk->hwidth > 0, ("%s: hwidth not positive", __func__)); |
| 371 | for (i = 0; i < (1 << trunk->hwidth); i++) |
| 372 | KASSERT(CK_SLIST_EMPTY(&trunk->hash[i]), |
| 373 | ("%s: hash table not empty", __func__)); |
| 374 | #endif |
| 375 | free(trunk->hash, M_VLAN); |
| 376 | trunk->hash = NULL; |
| 377 | trunk->hwidth = trunk->hmask = 0; |
| 378 | } |
| 379 | |
| 380 | static int |
| 381 | vlan_inshash(struct ifvlantrunk *trunk, struct ifvlan *ifv) |