Page MenuHomeFreeBSD

D36162.id109472.diff
No OneTemporary

D36162.id109472.diff

Index: sys/netinet6/frag6.c
===================================================================
--- sys/netinet6/frag6.c
+++ sys/netinet6/frag6.c
@@ -883,8 +883,9 @@
* IPv6 reassembling timer processing;
* if a timer expires on a reassembly queue, discard it.
*/
-void
-frag6_slowtimo(void)
+static struct callout frag6_callout;
+static void
+frag6_slowtimo(void *arg __unused)
{
VNET_ITERATOR_DECL(vnet_iter);
struct ip6qhead *head;
@@ -892,7 +893,7 @@
uint32_t bucket;
if (atomic_load_int(&frag6_nfrags) == 0)
- return;
+ goto done;
VNET_LIST_RLOCK_NOSLEEP();
VNET_FOREACH(vnet_iter) {
@@ -949,7 +950,20 @@
CURVNET_RESTORE();
}
VNET_LIST_RUNLOCK_NOSLEEP();
+done:
+ callout_reset_sbt(&frag6_callout, SBT_1MS * 500, SBT_1MS * 10,
+ frag6_slowtimo, NULL, 0);
+}
+
+static void
+frag6_slowtimo_init(void *arg __unused)
+{
+
+ callout_init(&frag6_callout, 1);
+ callout_reset_sbt(&frag6_callout, SBT_1MS * 500, SBT_1MS * 10,
+ frag6_slowtimo, NULL, 0);
}
+SYSINIT(frag6, SI_SUB_VNET_DONE, SI_ORDER_ANY, frag6_slowtimo_init, NULL);
/*
* Eventhandler to adjust limits in case nmbclusters change.
Index: sys/netinet6/in6_proto.c
===================================================================
--- sys/netinet6/in6_proto.c
+++ sys/netinet6/in6_proto.c
@@ -146,7 +146,6 @@
.pr_domain = &inet6domain,
.pr_protocol = IPPROTO_IPV6,
.pr_flags = PR_CAPATTACH,
- .pr_slowtimo = frag6_slowtimo,
.pr_drain = frag6_drain,
.pr_usrreqs = &nousrreqs,
},
Index: sys/netinet6/ip6_var.h
===================================================================
--- sys/netinet6/ip6_var.h
+++ sys/netinet6/ip6_var.h
@@ -391,7 +391,6 @@
void frag6_init(void);
void frag6_destroy(void);
int frag6_input(struct mbuf **, int *, int);
-void frag6_slowtimo(void);
void frag6_drain(void);
void rip6_init(void);

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 16, 12:07 PM (12 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15825239
Default Alt Text
D36162.id109472.diff (1 KB)

Event Timeline