linux/drivers/staging
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
..
android
bcm net: core: explicitly select a txq before doing l2 forwarding 2014-01-10 13:23:08 -05:00
btmtk_usb Staging: btmtk_usb: Add hdev parameter to hdev->send driver callback 2013-11-25 12:15:58 -08:00
ced1401
comedi staging: comedi: drivers: fix return value of comedi_load_firmware() 2013-12-17 13:05:53 -08:00
cptm1217
crystalhd
cxt1e1
dgap
dgnc
dgrp
dwc2 Merge branch 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 07:55:21 +09:00
echo
et131x PCI changes for the v3.13 merge window: 2013-11-14 14:02:00 +09:00
frontier
ft1000 staging: ft1000: fix use of potentially uninitialized variable 2013-11-25 09:25:18 -08:00
fwserial
gdm72xx
gdm724x
goldfish
iio staging:iio:mag:hmc5843 fix incorrect endianness of channel as a result of missuse of the IIO_ST macro. 2013-12-17 20:32:52 +00:00
imx-drm imx-drm: imx-drm-core: improve safety of imx_drm_add_crtc() 2013-12-17 17:12:55 -08:00
keucr
line6
lustre staging/lustre/ptlrpc: fix ptlrpc_stop_pinger logic 2013-11-25 12:52:45 -08:00
media Staging: go7007: fix up some remaining go->dev issues 2013-11-25 09:29:32 -08:00
mt29f_spinand
netlogic net: core: explicitly select a txq before doing l2 forwarding 2014-01-10 13:23:08 -05:00
nvec staging: nvec: potential NULL dereference on error path 2013-11-25 09:14:29 -08:00
octeon
octeon-usb
olpc_dcon
ozwpan
panel
phison
quickstart
rtl8187se
rtl8188eu net: core: explicitly select a txq before doing l2 forwarding 2014-01-10 13:23:08 -05:00
rtl8192e
rtl8192u
rtl8712
rts5139
sb105x Staging driver update for 3.13-rc1 2013-11-07 15:07:58 +09:00
sbe-2t3e3
sep
serqt_usb2
silicom
slicoss
sm7xxfb
speakup
ste_rmi4
tidspbridge Staging: TIDSPBRIDGE: Use vm_iomap_memory for mmap-ing instead of remap_pfn_range 2013-12-03 09:42:45 -08:00
usbip
vme
vt6655 Staging: vt6655-6: potential NULL dereference in hostap_disable_hostapd() 2013-11-25 09:14:29 -08:00
vt6656 staging: vt6656: [BUG] Fix for TX USB resets from vendors driver. 2013-11-25 09:14:29 -08:00
winbond
wlags49_h2 Staging driver update for 3.13-rc1 2013-11-07 15:07:58 +09:00
wlags49_h25
wlan-ng
xgifb
xillybus
zram Staging: zram: Fix memory leak by refcount mismatch 2013-11-25 09:14:29 -08:00
zsmalloc staging: zsmalloc: Ensure handle is never 0 on success 2013-11-25 12:52:45 -08:00
Kconfig
Makefile
staging.c