alistair23-linux/net
Jarod Wilson 5ba3f7d61a net/core: fix for_each_netdev_feature
As pointed out by Nikolay and further explained by Geert, the initial
for_each_netdev_feature macro was broken, as feature would get set outside
of the block of code it was intended to run in, thus only ever working for
the first feature bit in the mask. While less pretty this way, this is
tested and confirmed functional with multiple feature bits set in
NETIF_F_UPPER_DISABLES.

[root@dell-per730-01 ~]# ethtool -K bond0 lro off
...
[  242.761394] bond0: Disabling feature 0x0000000000008000 on lower dev p5p2.
[  243.552178] bnx2x 0000:06:00.1 p5p2: using MSI-X  IRQs: sp 74  fp[0] 76 ... fp[7] 83
[  244.353978] bond0: Disabling feature 0x0000000000008000 on lower dev p5p1.
[  245.147420] bnx2x 0000:06:00.0 p5p1: using MSI-X  IRQs: sp 62  fp[0] 64 ... fp[7] 71

[root@dell-per730-01 ~]# ethtool -K bond0 gro off
...
[  251.925645] bond0: Disabling feature 0x0000000000004000 on lower dev p5p2.
[  252.713693] bnx2x 0000:06:00.1 p5p2: using MSI-X  IRQs: sp 74  fp[0] 76 ... fp[7] 83
[  253.499085] bond0: Disabling feature 0x0000000000004000 on lower dev p5p1.
[  254.290922] bnx2x 0000:06:00.0 p5p1: using MSI-X  IRQs: sp 62  fp[0] 64 ... fp[7] 71

Fixes: fd867d51f ("net/core: generic support for disabling netdev features down stack")
CC: "David S. Miller" <davem@davemloft.net>
CC: Eric Dumazet <edumazet@google.com>
CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Veaceslav Falico <vfalico@gmail.com>
CC: Andy Gospodarek <gospo@cumulusnetworks.com>
CC: Jiri Pirko <jiri@resnulli.us>
CC: Nikolay Aleksandrov <razor@blackwall.org>
CC: Michal Kubecek <mkubecek@suse.cz>
CC: Alexander Duyck <alexander.duyck@gmail.com>
CC: Geert Uytterhoeven <geert@linux-m68k.org>
CC: netdev@vger.kernel.org
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-03 11:29:57 -05:00
..
6lowpan 6lowpan: put mcast compression in an own function 2015-10-21 00:49:25 +02:00
9p
802
8021q vlan: Invoke driver vlan hooks only if device is present 2015-11-03 11:29:56 -05:00
appletalk
atm
ax25
batman-adv
bluetooth bluetooth: 6lowpan: fix NOHZ: local_softirq_pending 2015-10-27 09:53:36 +01:00
bridge bridge: vlan: Use rcu_dereference instead of rtnl_dereference 2015-11-02 16:27:39 -05:00
caif
can can: avoid using timeval for uapi 2015-10-13 17:42:34 +02:00
ceph rbd: use writefull op for object size writes 2015-10-16 16:49:01 +02:00
core net/core: fix for_each_netdev_feature 2015-11-03 11:29:57 -05:00
dcb net/dcb: make dcbnl.c explicitly non-modular 2015-10-09 07:52:27 -07:00
dccp tcp/dccp: fix ireq->pktopts race 2015-11-02 15:38:26 -05:00
decnet Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-10-17 14:28:03 +02:00
dns_resolver
dsa net: dsa: use switchdev obj for VLAN add/del ops 2015-11-01 15:56:11 -05:00
ethernet
hsr
ieee802154 net: fix percpu memory leaks 2015-11-02 22:47:14 -05:00
ipv4 net: fix percpu memory leaks 2015-11-02 22:47:14 -05:00
ipv6 net: fix percpu memory leaks 2015-11-02 22:47:14 -05:00
ipx
irda irda: precedence bug in irlmp_seq_hb_idx() 2015-10-21 07:48:26 -07:00
iucv
key af_key: fix two typos 2015-10-23 03:05:19 -07:00
l2tp
l3mdev
lapb
llc
mac80211 Here's another set of patches for the current cycle: 2015-10-22 07:28:41 -07:00
mac802154 mac802154: llsec: use kzfree 2015-10-21 00:49:24 +02:00
mpls mpls: reduce memory usage of routes 2015-10-27 19:52:59 -07:00
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-10-24 06:54:12 -07:00
netlabel
netlink Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-10-24 06:54:12 -07:00
netrom
nfc NFC: nci: non-static functions can not be inline 2015-10-28 06:44:45 +01:00
openvswitch Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-11-01 00:15:30 -04:00
packet ipv4: Pass struct net into ip_defrag and ip_check_defrag 2015-10-12 19:44:16 -07:00
phonet
rds RDS: convert bind hash table to re-sizable hashtable 2015-11-02 15:36:23 -05:00
rfkill
rose
rxrpc
sched Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-10-20 06:08:27 -07:00
sctp
sunrpc Changes for 4.3-rc5 2015-10-15 13:44:35 -07:00
switchdev switchdev: fix: pass correct obj size when deferring obj add 2015-10-30 20:23:37 +09:00
tipc tipc: link_is_bc_sndlink() can be static 2015-10-25 06:31:52 -07:00
unix af_unix: do not report POLLOUT on listeners 2015-10-25 06:37:45 -07:00
vmw_vsock VSOCK: define VSOCK_SS_LISTEN once only 2015-11-01 12:14:47 -05:00
wimax
wireless cfg80211: reg: fix reg_ignore_cell_hint return type 2015-10-16 09:15:45 +02:00
x25
xfrm Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next 2015-10-30 20:51:56 +09:00
compat.c
Kconfig
Makefile
socket.c
sysctl_net.c net: sysctl: fix a kmemleak warning 2015-10-23 06:22:08 -07:00