* Expire and purge (old|all) entries in the tcp_hostcache. Runs * periodically from the callout. */
| 714 | * periodically from the callout. |
| 715 | */ |
| 716 | static void |
| 717 | tcp_hc_purge(void *arg) |
| 718 | { |
| 719 | CURVNET_SET((struct vnet *) arg); |
| 720 | int all = 0; |
| 721 | |
| 722 | if (V_tcp_hostcache.purgeall) { |
| 723 | all = 1; |
| 724 | V_tcp_hostcache.purgeall = 0; |
| 725 | } |
| 726 | |
| 727 | tcp_hc_purge_internal(all); |
| 728 | |
| 729 | callout_reset(&V_tcp_hc_callout, V_tcp_hostcache.prune * hz, |
| 730 | tcp_hc_purge, arg); |
| 731 | CURVNET_RESTORE(); |
| 732 | } |
| 733 | |
| 734 | /* |
| 735 | * Expire and purge all entries in hostcache immediately. |
nothing calls this directly
no test coverage detected