linux/drivers/net/ethernet/intel/ixgbe
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
..
Makefile ixgbe: update date to 2013 2013-02-05 01:44:13 -08:00
ixgbe.h ixgbe: enable l2 forwarding acceleration for macvlans 2013-11-07 19:11:41 -05:00
ixgbe_82598.c ixgbe: add support for quad-port x520 adapter 2013-07-31 02:26:15 -07:00
ixgbe_82599.c ixgbe: add 1Gbps support for QSFP+ 2013-08-29 03:24:00 -07:00
ixgbe_common.c ixgbe: Check return value on eeprom reads 2013-08-29 02:45:38 -07:00
ixgbe_common.h ixgbe: Check return value on eeprom reads 2013-08-29 02:45:38 -07:00
ixgbe_dcb.c IXGBE: Set the SW prio_tc values at initialization to the HW setting. 2013-05-21 03:14:21 -07:00
ixgbe_dcb.h IXGBE: Set the SW prio_tc values at initialization to the HW setting. 2013-05-21 03:14:21 -07:00
ixgbe_dcb_82598.c ixgbe: Fix Tx Hang issue with lldpad on 82598EB 2013-07-28 13:17:17 -07:00
ixgbe_dcb_82598.h ixgbe: update date to 2013 2013-02-05 01:44:13 -08:00
ixgbe_dcb_82599.c ixgbe: update date to 2013 2013-02-05 01:44:13 -08:00
ixgbe_dcb_82599.h IXGBE: Set the SW prio_tc values at initialization to the HW setting. 2013-05-21 03:14:21 -07:00
ixgbe_dcb_nl.c IXGBE: Set the SW prio_tc values at initialization to the HW setting. 2013-05-21 03:14:21 -07:00
ixgbe_debugfs.c ixgbe: update date to 2013 2013-02-05 01:44:13 -08:00
ixgbe_ethtool.c ixgbe: fix rx-usecs range checks for BQL 2013-10-24 07:03:12 -07:00
ixgbe_fcoe.c drivers: net: Remove remaining alloc/OOM messages 2013-02-08 17:44:39 -05:00
ixgbe_fcoe.h ixgbe: update date to 2013 2013-02-05 01:44:13 -08:00
ixgbe_lib.c ixgbe: enable l2 forwarding acceleration for macvlans 2013-11-07 19:11:41 -05:00
ixgbe_main.c net: core: explicitly select a txq before doing l2 forwarding 2014-01-10 13:23:08 -05:00
ixgbe_mbx.c ixgbe: update date to 2013 2013-02-05 01:44:13 -08:00
ixgbe_mbx.h ixgbe: update date to 2013 2013-02-05 01:44:13 -08:00
ixgbe_phy.c ixgbe: Make ixgbe_identify_qsfp_module_generic static 2013-11-30 00:21:47 -08:00
ixgbe_phy.h ixgbe: Make ixgbe_identify_qsfp_module_generic static 2013-11-30 00:21:47 -08:00
ixgbe_ptp.c ixgbe: fix lockdep annotation issue for ptp's work item 2013-07-31 01:00:57 -07:00
ixgbe_sriov.c ixgbe: fix for unused variable warning with certain config 2013-12-17 22:52:40 -08:00
ixgbe_sriov.h ixgbe: update date to 2013 2013-02-05 01:44:13 -08:00
ixgbe_sysfs.c ixgbe: update date to 2013 2013-02-05 01:44:13 -08:00
ixgbe_type.h ixgbe: ethtool DCB registers dump for 82599 and x540 2013-10-01 12:49:49 -04:00
ixgbe_x540.c ixgbe: Cleanup the use of tabs and spaces 2013-10-01 12:49:49 -04:00