Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147277825
D54011.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D54011.diff
View Options
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -34,6 +34,7 @@
#include "opt_sctp.h"
#include <sys/param.h>
+#include <sys/ck.h>
#include <sys/eventhandler.h>
#include <sys/kernel.h>
#include <sys/lock.h>
@@ -136,7 +137,7 @@
struct divcb {
union {
- SLIST_ENTRY(divcb) dcb_next;
+ CK_SLIST_ENTRY(divcb) dcb_next;
intptr_t dcb_bound;
#define DCB_UNBOUND ((intptr_t)-1)
};
@@ -146,7 +147,7 @@
struct epoch_context dcb_epochctx;
};
-SLIST_HEAD(divhashhead, divcb);
+CK_SLIST_HEAD(divhashhead, divcb);
VNET_DEFINE_STATIC(struct divhashhead, divhash[DIVHASHSIZE]) = {};
#define V_divhash VNET(divhash)
@@ -272,7 +273,7 @@
}
/* Put packet on socket queue, if any */
- SLIST_FOREACH(dcb, &V_divhash[DIVHASH(nport)], dcb_next)
+ CK_SLIST_FOREACH(dcb, &V_divhash[DIVHASH(nport)], dcb_next)
if (dcb->dcb_port == nport)
break;
@@ -600,7 +601,7 @@
so->so_pcb = NULL;
DIVERT_LOCK();
if (dcb->dcb_bound != DCB_UNBOUND)
- SLIST_REMOVE(&V_divhash[DCBHASH(dcb)], dcb, divcb, dcb_next);
+ CK_SLIST_REMOVE(&V_divhash[DCBHASH(dcb)], dcb, divcb, dcb_next);
V_dcb_count--;
V_dcb_gencnt++;
DIVERT_UNLOCK();
@@ -619,16 +620,16 @@
return EINVAL;
port = ((struct sockaddr_in *)nam)->sin_port;
DIVERT_LOCK();
- SLIST_FOREACH(dcb, &V_divhash[DIVHASH(port)], dcb_next)
+ CK_SLIST_FOREACH(dcb, &V_divhash[DIVHASH(port)], dcb_next)
if (dcb->dcb_port == port) {
DIVERT_UNLOCK();
return (EADDRINUSE);
}
dcb = so->so_pcb;
if (dcb->dcb_bound != DCB_UNBOUND)
- SLIST_REMOVE(&V_divhash[DCBHASH(dcb)], dcb, divcb, dcb_next);
+ CK_SLIST_REMOVE(&V_divhash[DCBHASH(dcb)], dcb, divcb, dcb_next);
dcb->dcb_port = port;
- SLIST_INSERT_HEAD(&V_divhash[DIVHASH(port)], dcb, dcb_next);
+ CK_SLIST_INSERT_HEAD(&V_divhash[DIVHASH(port)], dcb, dcb_next);
DIVERT_UNLOCK();
return (0);
@@ -667,7 +668,7 @@
DIVERT_LOCK();
for (int i = 0; i < DIVHASHSIZE; i++)
- SLIST_FOREACH(dcb, &V_divhash[i], dcb_next) {
+ CK_SLIST_FOREACH(dcb, &V_divhash[i], dcb_next) {
if (dcb->dcb_gencnt <= xig.xig_gen) {
struct xinpcb xi;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 10, 3:37 PM (13 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29457463
Default Alt Text
D54011.diff (2 KB)
Attached To
Mode
D54011: ipdivert: Use CK_SLISTs for the divcb hash table
Attached
Detach File
Event Timeline
Log In to Comment