cxgbe tom: Update rcv_nxt for a FIN after handle_ddp_close().
For TCP DDP, handle_ddp_close() needs to see the pre-FIN rcv_nxt to determine how much data was placed in the local buffer before the FIN was received. The changes ind59f1c49e2
broke this by updating rcv_nxt before calling handle_ddp_close(). Fixes:d59f1c49e2
cxgbe tom: Permit rcv_nxt mismatches on FIN for iSCSI connections on T6. Sponsored by: Chelsio Communications
This commit is contained in:
parent
1ecbc1d8e9
commit
5dbf8c1588
@ -1374,6 +1374,16 @@ do_peer_close(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m)
|
||||
if (toep->flags & TPF_ABORT_SHUTDOWN)
|
||||
goto done;
|
||||
|
||||
so = inp->inp_socket;
|
||||
socantrcvmore(so);
|
||||
if (ulp_mode(toep) == ULP_MODE_TCPDDP) {
|
||||
DDP_LOCK(toep);
|
||||
if (__predict_false(toep->ddp.flags &
|
||||
(DDP_BUF0_ACTIVE | DDP_BUF1_ACTIVE)))
|
||||
handle_ddp_close(toep, tp, cpl->rcv_nxt);
|
||||
DDP_UNLOCK(toep);
|
||||
}
|
||||
|
||||
if (ulp_mode(toep) == ULP_MODE_RDMA ||
|
||||
(ulp_mode(toep) == ULP_MODE_ISCSI && chip_id(sc) >= CHELSIO_T6)) {
|
||||
/*
|
||||
@ -1390,16 +1400,6 @@ do_peer_close(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m)
|
||||
|
||||
tp->rcv_nxt = be32toh(cpl->rcv_nxt);
|
||||
|
||||
so = inp->inp_socket;
|
||||
socantrcvmore(so);
|
||||
if (ulp_mode(toep) == ULP_MODE_TCPDDP) {
|
||||
DDP_LOCK(toep);
|
||||
if (__predict_false(toep->ddp.flags &
|
||||
(DDP_BUF0_ACTIVE | DDP_BUF1_ACTIVE)))
|
||||
handle_ddp_close(toep, tp, cpl->rcv_nxt);
|
||||
DDP_UNLOCK(toep);
|
||||
}
|
||||
|
||||
switch (tp->t_state) {
|
||||
case TCPS_SYN_RECEIVED:
|
||||
tp->t_starttime = ticks;
|
||||
|
@ -700,7 +700,8 @@ handle_ddp_close(struct toepcb *toep, struct tcpcb *tp, __be32 rcv_nxt)
|
||||
INP_WLOCK_ASSERT(toep->inp);
|
||||
DDP_ASSERT_LOCKED(toep);
|
||||
|
||||
len = be32toh(rcv_nxt) - tp->rcv_nxt;
|
||||
/* - 1 is to ignore the byte for FIN */
|
||||
len = be32toh(rcv_nxt) - tp->rcv_nxt - 1;
|
||||
tp->rcv_nxt += len;
|
||||
|
||||
while (toep->ddp.active_count > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user