]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r243680, r243681.
authornp <np@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 6 Dec 2012 18:23:23 +0000 (18:23 +0000)
committernp <np@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 6 Dec 2012 18:23:23 +0000 (18:23 +0000)
commit3ca2ec717407be07f7a2e1b355bb94336ef9352b
tree3d9ea0bd9f115808a3eccc63c8e1fd8843a58820
parentd3874d0b78ca7c60753decd2883797982ba2deeb
MFC r243680, r243681.

r243680:
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.

r243681:
cxgbe/tom: Handle the case where the chip falls out of DDP mode by
itself.  The hole in the receive sequence space corresponds to the
number of bytes placed directly up to that point.

Submittey by:

git-svn-id: svn://svn.freebsd.org/base/stable/9@243952 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/cxgbe/tom/t4_cpl_io.c
sys/dev/cxgbe/tom/t4_ddp.c
sys/dev/cxgbe/tom/t4_listen.c
sys/dev/cxgbe/tom/t4_tom.h