linux/net/core
Keller, Jacob E d4ab428627 ethtool: correctly ensure {GS}CHANNELS doesn't conflict with GS{RXFH}
Ethernet drivers implementing both {GS}RXFH and {GS}CHANNELS ethtool ops
incorrectly allow SCHANNELS when it would conflict with the settings
from SRXFH. This occurs because it is not possible for drivers to
understand whether their Rx flow indirection table has been configured
or is in the default state. In addition, drivers currently behave in
various ways when increasing the number of Rx channels.

Some drivers will always destroy the Rx flow indirection table when this
occurs, whether it has been set by the user or not. Other drivers will
attempt to preserve the table even if the user has never modified it
from the default driver settings. Neither of these situation is
desirable because it leads to unexpected behavior or loss of user
configuration.

The correct behavior is to simply return -EINVAL when SCHANNELS would
conflict with the current Rx flow table settings. However, it should
only do so if the current settings were modified by the user. If we
required that the new settings never conflict with the current (default)
Rx flow settings, we would force users to first reduce their Rx flow
settings and then reduce the number of Rx channels.

This patch proposes a solution implemented in net/core/ethtool.c which
ensures that all drivers behave correctly. It checks whether the RXFH
table has been configured to non-default settings, and stores this
information in a private netdev flag. When the number of channels is
requested to change, it first ensures that the current Rx flow table is
not going to assign flows to now disabled channels.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-16 15:19:49 -05:00
..
datagram.c
dev.c net: bulk free SKBs that were delay free'ed due to IRQ context 2016-02-11 11:59:09 -05:00
dev_addr_lists.c
dev_ioctl.c
drop_monitor.c
dst.c
ethtool.c ethtool: correctly ensure {GS}CHANNELS doesn't conflict with GS{RXFH} 2016-02-16 15:19:49 -05:00
fib_rules.c
filter.c soreuseport: Prep for fast reuseport TCP socket selection 2016-02-11 03:54:15 -05:00
flow.c
flow_dissector.c
gen_estimator.c
gen_stats.c
link_watch.c
lwtunnel.c
Makefile
neighbour.c
net-procfs.c
net-sysfs.c
net-sysfs.h
net-traces.c
net_namespace.c
netclassid_cgroup.c
netevent.c
netpoll.c
netprio_cgroup.c
pktgen.c
ptp_classifier.c
request_sock.c
rtnetlink.c net: Add support for filtering link dump by master device and kind 2016-02-11 04:18:26 -05:00
scm.c
secure_seq.c
skbuff.c net: bulk free SKBs that were delay free'ed due to IRQ context 2016-02-11 11:59:09 -05:00
sock.c soreuseport: Prep for fast reuseport TCP socket selection 2016-02-11 03:54:15 -05:00
sock_diag.c
sock_reuseport.c
stream.c
sysctl_net_core.c
timestamping.c
tso.c
utils.c