Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144875542
D28243.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
D28243.diff
View Options
diff --git a/sys/dev/cxgbe/tom/t4_listen.c b/sys/dev/cxgbe/tom/t4_listen.c
--- a/sys/dev/cxgbe/tom/t4_listen.c
+++ b/sys/dev/cxgbe/tom/t4_listen.c
@@ -88,7 +88,7 @@
static struct listen_ctx *listen_hash_del(struct adapter *, struct inpcb *);
static struct inpcb *release_lctx(struct adapter *, struct listen_ctx *);
-static void send_reset_synqe(struct toedev *, struct synq_entry *);
+static void send_abort_rpl_synqe(struct toedev *, struct synq_entry *, int);
static int
alloc_stid(struct adapter *sc, struct listen_ctx *lctx, int isipv6)
@@ -391,7 +391,8 @@
}
static void
-send_reset_synqe(struct toedev *tod, struct synq_entry *synqe)
+send_abort_rpl_synqe(struct toedev *tod, struct synq_entry *synqe,
+ int rst_status)
{
struct adapter *sc = tod->tod_softc;
struct wrqe *wr;
@@ -419,7 +420,7 @@
INIT_TP_WR_MIT_CPL(req, CPL_ABORT_REQ, synqe->tid);
req->rsvd0 = 0; /* don't have a snd_nxt */
req->rsvd1 = 1; /* no data sent yet */
- req->cmd = CPL_ABORT_SEND_RST;
+ req->cmd = rst_status;
t4_l2t_send(sc, wr, &sc->l2t->l2tab[synqe->params.l2t_idx]);
}
@@ -1465,6 +1466,7 @@
struct in_conninfo inc;
struct toepcb *toep;
struct epoch_tracker et;
+ int rstreason;
#ifdef INVARIANTS
unsigned int opcode = G_CPL_OPCODE(be32toh(OPCODE_TID(cpl)));
#endif
@@ -1491,7 +1493,7 @@
if (__predict_false(inp->inp_flags & INP_DROPPED)) {
reset:
- send_reset_synqe(TOEDEV(ifp), synqe);
+ send_abort_rpl_synqe(TOEDEV(ifp), synqe, CPL_ABORT_SEND_RST);
INP_WUNLOCK(inp);
NET_EPOCH_EXIT(et);
CURVNET_RESTORE();
@@ -1524,7 +1526,15 @@
so = inp->inp_socket;
KASSERT(so != NULL, ("%s: socket is NULL", __func__));
- if (!toe_syncache_expand(&inc, &to, &th, &so) || so == NULL) {
+ rstreason = toe_syncache_expand(&inc, &to, &th, &so);
+ if (rstreason < 0) {
+ free_toepcb(toep);
+ send_abort_rpl_synqe(TOEDEV(ifp), synqe, CPL_ABORT_NO_RST);
+ INP_WUNLOCK(inp);
+ NET_EPOCH_EXIT(et);
+ CURVNET_RESTORE();
+ return (0);
+ } else if (rstreason == 0 || so == NULL) {
free_toepcb(toep);
goto reset;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 14, 4:03 PM (4 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28706417
Default Alt Text
D28243.diff (2 KB)
Attached To
Mode
D28243: Handle negative return values from syncache_expand().
Attached
Detach File
Event Timeline
Log In to Comment