OpenCloudOS-Kernel/drivers/net/cxgb3
Roland Dreier 47fd23fe8e cxgb3: Keep LRO off if disabled when interface is down
I have a system with a Chelsio adapter (driven by cxgb3) whose ports are
part of a Linux bridge.  Recently I updated the kernel and discovered
that things stopped working because cxgb3 was doing LRO on packets that
were passed into the bridge code for forwarding.  (Incidentally, this
problem manifested itself in a strange way that made debugging a bit
interesting -- for some reason, the skb_warn_if_lro() check in bridge
didn't trigger and these LROed packets were forwarded out a forcedeth
interface, and caused the forcedeth transmit path to get stuck)

This is because cxgb3 has no way of keeping state for the LRO flag until
the interface is brought up, so if the bridging code disables LRO while
the interface is down, then cxgb3_up() will just reenable LRO, and on my
Debian system at least, the init scripts add interfaces to a bridge
before bringing the interfaces up.

Fix this by keeping track of each interface's LRO state in cxgb3 so that
when bridge disables LRO, it stays disabled in cxgb3_up() when the
interface is brought up.  I did this by changing the rx_csum_offload
flag into a pair of bit flags; the effect of this on the rx_eth() fast
path is miniscule enough that it should be fine (eg on x86, a cmpb
instruction becomes a testb instruction).

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-11 00:19:36 -08:00
..
Makefile Add support for the latest 1G/10G Chelsio adapter, T3. 2007-02-05 16:58:46 -05:00
adapter.h cxgb3: Keep LRO off if disabled when interface is down 2009-01-11 00:19:36 -08:00
ael1002.c cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
common.h cxgb3: untie strict FW matching 2008-12-16 01:51:47 -08:00
cxgb3_ctl_defs.h cxgb3: add control to access embedded images 2008-12-26 01:16:39 -08:00
cxgb3_defs.h cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
cxgb3_ioctl.h cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
cxgb3_main.c cxgb3: Keep LRO off if disabled when interface is down 2009-01-11 00:19:36 -08:00
cxgb3_offload.c cxgb3: add control to access embedded images 2008-12-26 01:16:39 -08:00
cxgb3_offload.h cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
firmware_exports.h cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
l2t.c cxgb3: Fix kernel crash caused by uninitialized l2t_entry.arpq 2008-10-22 06:22:14 -04:00
l2t.h cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
mc5.c cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
regs.h cxgb3: More flexible support for PHY interrupts. 2008-10-08 17:39:00 -07:00
sge.c cxgb3: Keep LRO off if disabled when interface is down 2009-01-11 00:19:36 -08:00
sge_defs.h cxgb3 - Set the CQ_ERR bit in CQ contexts. 2007-10-10 16:51:05 -07:00
t3_cpl.h cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
t3_hw.c cxgb3: untie strict FW matching 2008-12-16 01:51:47 -08:00
t3cdev.h cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00
version.h cxgb3: Add multiple Tx queue support. 2008-12-16 01:09:39 -08:00
vsc8211.c drivers/net/cxgb3: comment out dead code 2008-12-25 23:59:28 -08:00
xgmac.c cxgb3: extend copyrights to 2008 2008-10-13 18:47:30 -07:00