Page MenuHomeFreeBSD

D22483.1794503947.diff
No OneTemporary

Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None

D22483.1794503947.diff

Index: sys/dev/cxgbe/tom/t4_connect.c
===================================================================
--- sys/dev/cxgbe/tom/t4_connect.c
+++ 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);
@@ -369,7 +370,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: sys/dev/cxgbe/tom/t4_listen.c
===================================================================
--- sys/dev/cxgbe/tom/t4_listen.c
+++ sys/dev/cxgbe/tom/t4_listen.c
@@ -1217,8 +1217,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 {
@@ -1231,23 +1234,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);
@@ -1255,6 +1261,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;
@@ -1264,12 +1271,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);
@@ -1300,15 +1309,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
Thu, Nov 12, 5:19 PM (10 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41680130
Default Alt Text
D22483.1794503947.diff (2 KB)

Event Timeline