svn commit: r243098 - stable/9/sys/dev/cxgbe/tom
Navdeep Parhar
np at FreeBSD.org
Thu Nov 15 19:45:05 UTC 2012
Author: np
Date: Thu Nov 15 19:45:04 2012
New Revision: 243098
URL: http://svnweb.freebsd.org/changeset/base/243098
Log:
MFC r242666, r242671.
r242666:
Remove the tid from the software table (and bump down the in-use
counter) when the syncache doesn't want the driver to reply to an
incoming SYN. This fixes a harmless bug where tids_in_use would
go out of sync with the hardware counter.
r242671:
Make sure the inp hasn't been dropped before trying to access its socket
and tcpcb.
Modified:
stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c
stable/9/sys/dev/cxgbe/tom/t4_listen.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/dev/ (props changed)
Modified: stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c
==============================================================================
--- stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c Thu Nov 15 19:27:11 2012 (r243097)
+++ stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c Thu Nov 15 19:45:04 2012 (r243098)
@@ -982,7 +982,6 @@ do_abort_req(struct sge_iq *iq, const st
struct sge_wrq *ofld_txq = toep->ofld_txq;
struct inpcb *inp;
struct tcpcb *tp;
- struct socket *so;
#ifdef INVARIANTS
unsigned int opcode = G_CPL_OPCODE(be32toh(OPCODE_TID(cpl)));
#endif
@@ -1008,7 +1007,6 @@ do_abort_req(struct sge_iq *iq, const st
INP_WLOCK(inp);
tp = intotcpcb(inp);
- so = inp->inp_socket;
CTR6(KTR_CXGBE,
"%s: tid %d (%s), toep_flags 0x%x, inp_flags 0x%x, status %d",
@@ -1026,10 +1024,16 @@ do_abort_req(struct sge_iq *iq, const st
}
toep->flags |= TPF_ABORT_SHUTDOWN;
- so_error_set(so, abort_status_to_errno(tp, cpl->status));
- tp = tcp_close(tp);
- if (tp == NULL)
- INP_WLOCK(inp); /* re-acquire */
+ if ((inp->inp_flags & (INP_DROPPED | INP_TIMEWAIT)) == 0) {
+ struct socket *so = inp->inp_socket;
+
+ if (so != NULL)
+ so_error_set(so, abort_status_to_errno(tp,
+ cpl->status));
+ tp = tcp_close(tp);
+ if (tp == NULL)
+ INP_WLOCK(inp); /* re-acquire */
+ }
final_cpl_received(toep);
done:
Modified: stable/9/sys/dev/cxgbe/tom/t4_listen.c
==============================================================================
--- stable/9/sys/dev/cxgbe/tom/t4_listen.c Thu Nov 15 19:27:11 2012 (r243097)
+++ stable/9/sys/dev/cxgbe/tom/t4_listen.c Thu Nov 15 19:45:04 2012 (r243098)
@@ -1202,6 +1202,7 @@ do_pass_accept_req(struct sge_iq *iq, co
if (m)
m->m_pkthdr.rcvif = ifp;
+ remove_tid(sc, synqe->tid);
release_synqe(synqe); /* about to exit function */
free(wr, M_CXGBE);
REJECT_PASS_ACCEPT();
More information about the svn-src-stable-9
mailing list