freebsd-nq/sys/dev/cxgbe/tom
Navdeep Parhar 000da5202e cxgbe/tom: Add a flag to indicate that the L2 table entry for an
embryonic connection has been setup and never attempt to abort a tid
before this is done.  This fixes a bad race where a listening socket is
closed when the driver is in the middle of step (b) here.  The symptom
of this were "ARP miss" errors from the driver followed by tid leaks.

A hardware-offloaded passive open works this way:

a) A SYN "hits" the TCAM entry for a server tid and the chip delivers it
to the queue associated with the server tid (say, queue A).  It waits
for a response from the driver telling it what to do.

b) The driver decides it is ok to proceed.  It adds the new tid to the
list of embryonic connections associated with the server tid and then
hands off the SYN to the kernel's syncache to make sure that the kernel
okays it too.  If it does then the driver provides an L2 table entry,
queue id (say, queue B), etc. and instructs the chip to send the SYN/ACK
response.

c) The chip delivers a status to queue B depending on how the third step
of the 3-way handshake goes.  The driver removes the tid from its list
of embryonic connections and either expands the syncache entry or
destroys the tid.  In any case all subsequent messages for the new tid
will be delivered to queue B, not queue A.  Anything running in queue B
knows that the L2 entry has long been setup and the new flag is of no
interest from here on.  If the listener is closed it will deal with
so_comp as normal.

MFC after:	1 week
2012-11-29 19:10:04 +00:00
..
t4_connect.c Minor cleanup: use bitwise ops instead of pointless wrappers around 2012-08-21 18:30:16 +00:00
t4_cpl_io.c cxgbe/tom: Add a flag to indicate that the L2 table entry for an 2012-11-29 19:10:04 +00:00
t4_ddp.c Use native FreeBSD facilities everywhere except the shared code in common/ 2012-09-13 09:10:10 +00:00
t4_listen.c cxgbe/tom: Add a flag to indicate that the L2 table entry for an 2012-11-29 19:10:04 +00:00
t4_tom_l2t.c
t4_tom_l2t.h
t4_tom.c Revert previous commit... 2012-10-10 08:36:38 +00:00
t4_tom.h cxgbe/tom: Add a flag to indicate that the L2 table entry for an 2012-11-29 19:10:04 +00:00