* * Performs generic cleanup routines and frees lle. * * Called for non-linked entries, with callouts and * other AF-specific cleanups performed. * * @lle must be passed WLOCK'ed * * Returns the number of held packets, if any, that were dropped. */
| 448 | * Returns the number of held packets, if any, that were dropped. |
| 449 | */ |
| 450 | size_t |
| 451 | llentry_free(struct llentry *lle) |
| 452 | { |
| 453 | size_t pkts_dropped; |
| 454 | |
| 455 | LLE_WLOCK_ASSERT(lle); |
| 456 | |
| 457 | KASSERT((lle->la_flags & LLE_LINKED) == 0, ("freeing linked lle")); |
| 458 | |
| 459 | pkts_dropped = lltable_drop_entry_queue(lle); |
| 460 | |
| 461 | /* cancel timer */ |
| 462 | if (callout_stop(&lle->lle_timer) > 0) |
| 463 | LLE_REMREF(lle); |
| 464 | LLE_FREE_LOCKED(lle); |
| 465 | |
| 466 | return (pkts_dropped); |
| 467 | } |
| 468 | |
| 469 | /* |
| 470 | * Free all entries from given table and free itself. |
no test coverage detected