WSL2-Linux-Kernel/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 staging: ashmem: Fix ASHMEM_PURGE_ALL_CACHES return value 2013-10-25 06:22:39 +01:00
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 staging: Remove OOM message after input_allocate_device 2013-10-29 09:05:21 -07:00
crystalhd Staging: crystalhd: use vfree() instead of kfree() 2013-10-11 15:47:06 -07:00
cxt1e1 Staging: cxt1e1: remove space between function name and '(' 2013-10-14 09:27:14 -07:00
dgap staging: dgap: dgap_tty: Do not use 0 for pointers 2013-10-11 15:36:30 -07:00
dgnc Staging: dgnc: avoiding buffer overflow 2013-10-19 14:35:05 -07:00
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 staging: gdm724x: kzalloc should be used instead of kmalloc/memset 2013-10-27 20:34:46 -07:00
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 Staging: keucr: fix quoted string split across lines 2013-10-06 22:07:30 -07:00
line6 Staging:line6: fix line over 80 characters 2013-10-27 20:43:46 -07:00
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 staging/mt29f_spinand: fix build error when ONDIEECC not enabled 2013-10-15 12:19:48 -07:00
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 staging: octeon: drop redundant mac address check 2013-10-29 09:05:21 -07:00
octeon-usb staging: octeon-usb: use list.h for transactions 2013-10-11 15:46:00 -07:00
olpc_dcon staging/olpc_dcon: fix kconfig to fix build errors 2013-10-15 12:25:30 -07:00
ozwpan staging: ozwpan: prevent overflow in oz_cdev_write() 2013-10-30 12:24:49 -07:00
panel
phison
quickstart
rtl8187se Staging: rtl8187se: space prohibited before semicolon in r8185b_init.c 2013-10-30 09:26:44 -07:00
rtl8188eu net: core: explicitly select a txq before doing l2 forwarding 2014-01-10 13:23:08 -05:00
rtl8192e staging: rtl8192e: remove unneeded semicolons 2013-10-30 09:08:45 -07:00
rtl8192u staging: rtl8192u: use memdup_user to simplify code 2013-10-28 14:28:35 -07:00
rtl8712
rts5139 staging: rts5139: Replaced min() with min_t() in 2013-10-27 20:43:46 -07:00
sb105x Staging driver update for 3.13-rc1 2013-11-07 15:07:58 +09:00
sbe-2t3e3 Staging: sbe-2t3e3: Fix smatch warning of function definition with external linkage 2013-10-28 14:54:49 -07:00
sep staging: sep: do not use comparisons on bool tests 2013-10-28 14:32:51 -07:00
serqt_usb2
silicom
slicoss Staging: slicoss: Replace seq_printf with seq_puts 2013-10-27 07:03:19 -07:00
sm7xxfb Staging: sm7xxfb: fix line over 80 characters in sm7xxfb.c 2013-10-11 13:52:01 -07:00
speakup Staging: speakup: replacing simple_strtoul with kstrtoul 2013-10-19 14:51:06 -07:00
ste_rmi4 staging: Remove OOM message after input_allocate_device 2013-10-29 09:05:21 -07:00
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 Staging: winbond: Fix Sparse Warnings in reg.c 2013-10-29 08:43:05 -07:00
wlags49_h2 Staging driver update for 3.13-rc1 2013-11-07 15:07:58 +09:00
wlags49_h25
wlan-ng Staging: wlan-ng: changing "* dev" to "*dev" 2013-10-17 09:12:15 -07:00
xgifb Staging: xgifb: fix braces {} are not necessary for any arm of this statement 2013-10-30 09:22:05 -07:00
xillybus staging: xillybus: Use dev_* functions instead of pr_* in xillybus_core 2013-10-19 13:41:34 -07:00
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 staging: ktap: remove code from tree 2013-10-27 14:05:02 -07:00
Makefile staging: ktap: remove code from tree 2013-10-27 14:05:02 -07:00
staging.c