Page MenuHomeFreeBSD

D22483.id65636.diff
No OneTemporary

D22483.id65636.diff

Index: head/sys/dev/cxgbe/tom/t4_connect.c
===================================================================
--- head/sys/dev/cxgbe/tom/t4_connect.c
+++ head/sys/dev/cxgbe/tom/t4_connect.c
@@ -237,6 +237,7 @@
struct tcpcb *tp = intotcpcb(inp);
int reason;
struct offload_settings settings;
+ struct epoch_tracker et;
uint16_t vid = 0xfff, pcp = 0;
INP_WLOCK_ASSERT(inp);
@@ -371,7 +372,9 @@
}
offload_socket(so, toep);
+ NET_EPOCH_ENTER(et);
rc = t4_l2t_send(sc, wr, toep->l2te);
+ NET_EPOCH_EXIT(et);
if (rc == 0) {
toep->flags |= TPF_CPL_PENDING;
return (0);
Index: head/sys/dev/cxgbe/tom/t4_listen.c
===================================================================
--- head/sys/dev/cxgbe/tom/t4_listen.c
+++ head/sys/dev/cxgbe/tom/t4_listen.c
@@ -1235,8 +1235,11 @@
* SYN must be directed to an IP6 address on this ifnet. This
* is more restrictive than in6_localip.
*/
- if (!in6_ifhasaddr(ifp, &inc.inc6_laddr))
+ NET_EPOCH_ENTER(et);
+ if (!in6_ifhasaddr(ifp, &inc.inc6_laddr)) {
+ NET_EPOCH_EXIT(et);
REJECT_PASS_ACCEPT_REQ(true);
+ }
ntids = 2;
} else {
@@ -1249,23 +1252,26 @@
* SYN must be directed to an IP address on this ifnet. This
* is more restrictive than in_localip.
*/
- if (!in_ifhasaddr(ifp, inc.inc_laddr))
+ NET_EPOCH_ENTER(et);
+ if (!in_ifhasaddr(ifp, inc.inc_laddr)) {
+ NET_EPOCH_EXIT(et);
REJECT_PASS_ACCEPT_REQ(true);
+ }
ntids = 1;
}
e = get_l2te_for_nexthop(pi, ifp, &inc);
- if (e == NULL)
+ if (e == NULL) {
+ NET_EPOCH_EXIT(et);
REJECT_PASS_ACCEPT_REQ(true);
+ }
/* Don't offload if the 4-tuple is already in use */
- NET_EPOCH_ENTER(et); /* for 4-tuple check */
if (toe_4tuple_check(&inc, &th, ifp) != 0) {
NET_EPOCH_EXIT(et);
REJECT_PASS_ACCEPT_REQ(false);
}
- NET_EPOCH_EXIT(et);
inp = lctx->inp; /* listening socket, not owned by TOE */
INP_WLOCK(inp);
@@ -1273,6 +1279,7 @@
/* Don't offload if the listening socket has closed */
if (__predict_false(inp->inp_flags & INP_DROPPED)) {
INP_WUNLOCK(inp);
+ NET_EPOCH_EXIT(et);
REJECT_PASS_ACCEPT_REQ(false);
}
so = inp->inp_socket;
@@ -1282,12 +1289,14 @@
rw_runlock(&sc->policy_lock);
if (!settings.offload) {
INP_WUNLOCK(inp);
+ NET_EPOCH_EXIT(et);
REJECT_PASS_ACCEPT_REQ(true); /* Rejected by COP. */
}
synqe = alloc_synqe(sc, lctx, M_NOWAIT);
if (synqe == NULL) {
INP_WUNLOCK(inp);
+ NET_EPOCH_EXIT(et);
REJECT_PASS_ACCEPT_REQ(true);
}
atomic_store_int(&synqe->ok_to_respond, 0);
@@ -1318,15 +1327,19 @@
remove_tid(sc, tid, ntids);
m = synqe->syn;
synqe->syn = NULL;
+ NET_EPOCH_EXIT(et);
REJECT_PASS_ACCEPT_REQ(true);
}
CTR6(KTR_CXGBE,
"%s: stid %u, tid %u, synqe %p, opt0 %#016lx, opt2 %#08x",
__func__, stid, tid, synqe, be64toh(opt0), be32toh(opt2));
- } else
+ } else {
+ NET_EPOCH_EXIT(et);
REJECT_PASS_ACCEPT_REQ(false);
+ }
+ NET_EPOCH_EXIT(et);
CURVNET_RESTORE();
return (0);
reject:

File Metadata

Mime Type
text/plain
Expires
Wed, Mar 25, 6:31 AM (11 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30304508
Default Alt Text
D22483.id65636.diff (2 KB)

Event Timeline