linux/drivers/net
Eric Dumazet 5ee31c6898 bonding: Fix corrupted queue_mapping
In the transmit path of the bonding driver, skb->cb is used to
stash the skb->queue_mapping so that the bonding device can set its
own queue mapping.  This value becomes corrupted since the skb->cb is
also used in __dev_xmit_skb.

When transmitting through bonding driver, bond_select_queue is
called from dev_queue_xmit.  In bond_select_queue the original
skb->queue_mapping is copied into skb->cb (via bond_queue_mapping)
and skb->queue_mapping is overwritten with the bond driver queue.

Subsequently in dev_queue_xmit, __dev_xmit_skb is called which writes
the packet length into skb->cb, thereby overwriting the stashed
queue mappping.  In bond_dev_queue_xmit (called from hard_start_xmit),
the queue mapping for the skb is set to the stashed value which is now
the skb length and hence is an invalid queue for the slave device.

If we want to save skb->queue_mapping into skb->cb[], best place is to
add a field in struct qdisc_skb_cb, to make sure it wont conflict with
other layers (eg : Qdiscc, Infiniband...)

This patchs also makes sure (struct qdisc_skb_cb)->data is aligned on 8
bytes :

netem qdisc for example assumes it can store an u64 in it, without
misalignment penalty.

Note : we only have 20 bytes left in (struct qdisc_skb_cb)->data[].
The largest user is CHOKe and it fills it.

Based on a previous patch from Tom Herbert.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Tom Herbert <therbert@google.com>
Cc: John Fastabend <john.r.fastabend@intel.com>
Cc: Roland Dreier <roland@kernel.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-12 15:29:21 -07:00
..
appletalk Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
arcnet arcnet: rimi: Fix device name in debug output 2012-04-17 22:22:43 -04:00
bonding bonding: Fix corrupted queue_mapping 2012-06-12 15:29:21 -07:00
caif caif: include linux/io.h 2012-04-21 15:28:47 -04:00
can can: cc770: Fix likely misuse of | for & 2012-06-03 18:59:21 +02:00
cris net:removed the unused variable 2012-04-03 13:09:18 +02:00
dsa
ethernet tilegx network driver: initial support 2012-06-11 17:01:26 -07:00
fddi
hamradio Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
hippi hippi: fix printk format in rrunner.c 2012-04-16 23:48:38 -04:00
hyperv net/hyperv: Use wait_event on outstanding sends during device removal 2012-06-04 13:50:38 -04:00
irda Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-05-22 19:22:50 -07:00
phy netdev: fix drivers/net/phy/ kernel-doc warnings 2012-06-08 22:20:58 -07:00
plip Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ppp ppp: avoid false drop_monitor false positives 2012-05-19 02:32:30 -04:00
slip Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
team team: add per-port option for enabling/disabling ports 2012-04-21 16:26:33 -04:00
usb net: sierra_net: device IDs for Aircard 320U++ 2012-06-06 10:40:32 -07:00
vmxnet3
wan Staging tree pull request for 3.5-rc1 2012-05-22 16:34:21 -07:00
wimax skb: Add inline helper for getting the skb end offset from head 2012-05-06 13:13:19 -04:00
wireless iwlwifi: disable the buggy chain extension feature in HW 2012-06-08 13:47:07 -04:00
xen-netback xen/netback: Calculate the number of SKB slots required correctly 2012-05-24 16:22:53 -04:00
dummy.c dummy: fix rcu_sched self-detected stalls 2012-06-11 01:12:04 -07:00
eql.c eql: dont rely on HZ=100 2012-03-27 22:45:26 -04:00
ifb.c
Kconfig tokenring: delete all remaining driver support 2012-05-15 20:23:16 -04:00
LICENSE.SRC
loopback.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
macvlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-16 22:17:37 -04:00
macvtap.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-16 22:17:37 -04:00
Makefile tokenring: delete all remaining driver support 2012-05-15 20:23:16 -04:00
mdio.c
mii.c
netconsole.c
rionet.c rionet: fix page allocation order of rionet_active 2012-04-01 23:17:16 -04:00
sb1000.c
Space.c drivers/net: delete all code/drivers depending on CONFIG_MCA 2012-05-17 16:37:41 -04:00
sungem_phy.c
tun.c drivers/net: Convert compare_ether_addr to ether_addr_equal 2012-05-10 23:33:01 -04:00
veth.c
virtio_net.c virtio-net: fix a race on 32bit arches 2012-06-10 20:23:20 -07:00
xen-netfront.c xen: do not disable netfront in dom0 2012-05-22 16:50:28 -04:00