Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107530610
D36162.id109472.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D36162.id109472.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D36162: frag6: use callout(9) directly instead of pr_slowtimo
Attached
Detach File
Event Timeline
Log In to Comment