linux/net
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
..
9p
802
8021q vlan: Fix header ops passthru when doing TX VLAN offload. 2013-12-31 16:23:35 -05:00
appletalk
atm
ax25
batman-adv batman-adv: fix vlan header access 2013-12-28 14:48:40 +01:00
bluetooth Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth 2013-12-18 13:46:08 -05:00
bridge bridge: use spin_lock_bh() in br_multicast_set_hash_max 2014-01-06 16:39:47 -05:00
caif
can
ceph
core net: core: explicitly select a txq before doing l2 forwarding 2014-01-10 13:23:08 -05:00
dcb
dccp dccp: catch failed request_module call in dccp_probe init 2013-12-19 19:25:50 -05:00
decnet
dns_resolver
dsa
ethernet
hsr net/hsr: Support iproute print_opt ('ip -details ...') 2013-11-30 12:48:14 -05:00
ieee802154 net: 6lowpan: fix lowpan_header_create non-compression memcpy call 2014-01-05 20:25:24 -05:00
ipv4 ipv4: fix tunneled VM traffic over hw VXLAN/GRE GSO NIC 2014-01-02 19:06:47 -05:00
ipv6 ipv6: add link-local, sit and loopback address with INFINITY_LIFE_TIME 2014-01-09 23:07:47 -05:00
ipx
irda
iucv
key
l2tp ipv6: do not erase dst address with flow label destination 2013-12-10 22:51:00 -05:00
lapb
llc net: llc: fix use after free in llc_ui_recvmsg 2014-01-02 19:31:09 -05:00
mac80211 net: core: explicitly select a txq before doing l2 forwarding 2014-01-10 13:23:08 -05:00
mac802154
mpls
netfilter netfilter: only warn once on wrong seqadj usage 2014-01-06 14:23:17 +01:00
netlabel
netlink genetlink/pmcraid: use proper genetlink multicast API 2013-11-28 18:26:30 -05:00
netrom
nfc NFC: Fix target mode p2p link establishment 2014-01-04 03:31:32 +01:00
openvswitch
packet packet: fix send path when running with proto == 0 2013-12-09 20:09:20 -05:00
phonet
rds rds: prevent dereference of a NULL device 2013-12-27 12:33:58 -05:00
rfkill
rose net: rose: restore old recvmsg behavior 2013-12-29 22:33:17 -05:00
rxrpc
sched net: core: explicitly select a txq before doing l2 forwarding 2014-01-10 13:23:08 -05:00
sctp sctp: Remove outqueue empty state 2014-01-02 17:22:48 -05:00
sunrpc NFS client bugfixes 2013-12-05 13:05:48 -08:00
tipc tipc: correctly unlink packets from deferred packet queue 2014-01-07 16:15:24 -05:00
unix net: unix: allow bind to fail on mutex lock 2013-12-17 15:04:42 -05:00
vmw_vsock
wimax
wireless radiotap: fix bitmap-end-finding buffer overrun 2013-12-16 12:06:43 +01:00
x25
xfrm
compat.c net: clamp ->msg_namelen instead of returning an error 2013-11-29 16:12:52 -05:00
Kconfig
Makefile
nonet.c
socket.c net: clamp ->msg_namelen instead of returning an error 2013-11-29 16:12:52 -05:00
sysctl_net.c