Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/frag6.c
Show First 20 Lines • Show All 877 Lines • ▼ Show 20 Lines | dropfrag2: | ||||||||||
*mp = NULL; | *mp = NULL; | ||||||||||
return (IPPROTO_DONE); | return (IPPROTO_DONE); | ||||||||||
} | } | ||||||||||
/* | /* | ||||||||||
* IPv6 reassembling timer processing; | * IPv6 reassembling timer processing; | ||||||||||
* if a timer expires on a reassembly queue, discard it. | * if a timer expires on a reassembly queue, discard it. | ||||||||||
*/ | */ | ||||||||||
struct callout frag6_callout; | |||||||||||
void | void | ||||||||||
frag6_slowtimo(void) | frag6_slowtimo(void *arg __unused) | ||||||||||
{ | { | ||||||||||
VNET_ITERATOR_DECL(vnet_iter); | VNET_ITERATOR_DECL(vnet_iter); | ||||||||||
struct ip6qhead *head; | struct ip6qhead *head; | ||||||||||
struct ip6q *q6, *q6tmp; | struct ip6q *q6, *q6tmp; | ||||||||||
uint32_t bucket; | uint32_t bucket; | ||||||||||
if (atomic_load_int(&frag6_nfrags) == 0) | if (atomic_load_int(&frag6_nfrags) == 0) | ||||||||||
return; | goto done; | ||||||||||
VNET_LIST_RLOCK_NOSLEEP(); | VNET_LIST_RLOCK_NOSLEEP(); | ||||||||||
VNET_FOREACH(vnet_iter) { | VNET_FOREACH(vnet_iter) { | ||||||||||
CURVNET_SET(vnet_iter); | CURVNET_SET(vnet_iter); | ||||||||||
for (bucket = 0; bucket < IP6REASS_NHASH; bucket++) { | for (bucket = 0; bucket < IP6REASS_NHASH; bucket++) { | ||||||||||
if (V_ip6qb[bucket].count == 0) | if (V_ip6qb[bucket].count == 0) | ||||||||||
continue; | continue; | ||||||||||
IP6QB_LOCK(bucket); | IP6QB_LOCK(bucket); | ||||||||||
Show All 40 Lines | while (V_ip6_maxfragpackets >= 0 && | ||||||||||
frag6_freef(q6, bucket); | frag6_freef(q6, bucket); | ||||||||||
} | } | ||||||||||
IP6QB_UNLOCK(bucket); | IP6QB_UNLOCK(bucket); | ||||||||||
bucket = (bucket + 1) % IP6REASS_NHASH; | bucket = (bucket + 1) % IP6REASS_NHASH; | ||||||||||
} | } | ||||||||||
CURVNET_RESTORE(); | CURVNET_RESTORE(); | ||||||||||
} | } | ||||||||||
VNET_LIST_RUNLOCK_NOSLEEP(); | VNET_LIST_RUNLOCK_NOSLEEP(); | ||||||||||
done: | |||||||||||
callout_reset(&frag6_callout, hz / 2, frag6_slowtimo, NULL); | |||||||||||
melifaroUnsubmitted Not Done Inline Actions
melifaro: | |||||||||||
} | } | ||||||||||
/* | /* | ||||||||||
* Eventhandler to adjust limits in case nmbclusters change. | * Eventhandler to adjust limits in case nmbclusters change. | ||||||||||
*/ | */ | ||||||||||
static void | static void | ||||||||||
frag6_change(void *tag) | frag6_change(void *tag) | ||||||||||
{ | { | ||||||||||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |