alistair23-linux/drivers/net/ethernet/broadcom
Jason Wang f663dd9aaf net: core: explicitly select a txq before doing l2 forwarding
Currently, the tx queue were selected implicitly in ndo_dfwd_start_xmit(). The
will cause several issues:

- NETIF_F_LLTX were removed for macvlan, so txq lock were done for macvlan
  instead of lower device which misses the necessary txq synchronization for
  lower device such as txq stopping or frozen required by dev watchdog or
  control path.
- dev_hard_start_xmit() was called with NULL txq which bypasses the net device
  watchdog.
- dev_hard_start_xmit() does not check txq everywhere which will lead a crash
  when tso is disabled for lower device.

Fix this by explicitly introducing a new param for .ndo_select_queue() for just
selecting queues in the case of l2 forwarding offload. netdev_pick_tx() was also
extended to accept this parameter and dev_queue_xmit_accel() was used to do l2
forwarding transmission.

With this fixes, NETIF_F_LLTX could be preserved for macvlan and there's no need
to check txq against NULL in dev_hard_start_xmit(). Also there's no need to keep
a dedicated ndo_dfwd_start_xmit() and we can just reuse the code of
dev_queue_xmit() to do the transmission.

In the future, it was also required for macvtap l2 forwarding support since it
provides a necessary synchronization method.

Cc: John Fastabend <john.r.fastabend@intel.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: e1000-devel@lists.sourceforge.net
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-10 13:23:08 -05:00
..
bnx2x net: core: explicitly select a txq before doing l2 forwarding 2014-01-10 13:23:08 -05:00
b44.c Merge branch 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 07:55:21 +09:00
b44.h b44: add 64 bit stats 2012-07-18 09:29:43 -07:00
bcm63xx_enet.c bcm63xx_enet: remove deprecated IRQF_DISABLED 2013-09-11 16:09:58 -04:00
bcm63xx_enet.h bcm63xx_enet: add support Broadcom BCM6345 Ethernet 2013-06-13 17:22:08 -07:00
bgmac.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-11-04 13:48:30 -05:00
bgmac.h bgmac: implement unaligned addressing for DMA rings that support it 2013-09-16 21:30:59 -04:00
bnx2.c net: bnx2: remove unnecessary pci_set_drvdata() 2013-10-18 00:03:29 -04:00
bnx2.h bnx2: Update version to 2.2.4 2013-08-07 10:44:08 -07:00
bnx2_fw.h
cnic.c net:drivers/net: Miscellaneous conversions to ETH_ALEN 2013-10-02 17:04:45 -04:00
cnic.h cnic: Eliminate local copy of pfid. 2013-09-04 00:27:26 -04:00
cnic_defs.h cnic: Update version to 2.5.17 and copyright year. 2013-07-29 22:03:07 -07:00
cnic_if.h broadcom: Remove extern from function prototypes 2013-09-24 10:09:27 -04:00
Kconfig Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2013-08-12 14:45:06 -04:00
Makefile bgmac: driver for GBit MAC core on BCMA bus 2013-01-09 23:37:03 -08:00
sb1250-mac.c net: ethernet: use platform_{get,set}_drvdata() 2013-05-25 21:27:58 -07:00
tg3.c tg3: Expand 4g_overflow_test workaround to skb fragments of any size. 2013-12-27 12:51:44 -05:00
tg3.h tg3: Add support for new 577xx device ids 2013-09-21 14:04:52 -04:00