alistair23-linux/include
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
..
acpi Merge branches 'acpica', 'acpi-video' and 'acpi-fan' 2016-01-21 00:41:59 +01:00
asm-generic Merge branch 'akpm' (patches from Andrew) 2016-01-21 12:32:08 -08:00
clocksource
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-01-22 11:58:43 -08:00
drm drm/atomic-helper: Export framebuffer_changed() 2016-01-20 08:55:43 +08:00
dt-bindings ARM: SoC driver updates for v4.5 2016-01-20 18:42:30 -08:00
keys Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity into next 2015-12-26 16:06:53 +11:00
kvm
linux ethtool: correctly ensure {GS}CHANNELS doesn't conflict with GS{RXFH} 2016-02-16 15:19:49 -05:00
math-emu
media [media] media-entitiy: add a function to create multiple links 2016-01-11 12:19:26 -02:00
memory
misc
net net: ip_tunnel: remove 'csum_help' argument to iptunnel_handle_offloads 2016-02-12 05:52:16 -05:00
pcmcia
ras
rdma IB/mlx4: Enable send of RoCE QP1 packets with IP/UDP headers 2016-01-19 15:35:01 -05:00
rxrpc
scsi Initial roundup of 4.5 merge window patches 2016-01-23 18:45:06 -08:00
soc ARM: SoC driver updates for v4.5 2016-01-20 18:42:30 -08:00
sound ALSA: timer: Introduce disconnect op to snd_timer_instance 2016-01-21 17:51:42 +01:00
target Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2016-01-20 17:20:53 -08:00
trace sunvnet: Add support for perf LDC event tracing 2016-02-07 14:13:05 -05:00
uapi ethtool: make validate_speed accept all speeds between 0 and INT_MAX 2016-02-11 11:55:38 -05:00
video omapdss: remove CONFIG_OMAP2_DSS_VENC from omapdss.h 2015-12-29 11:07:46 +02:00
xen Merge branch 'for-4.5/drivers' of git://git.kernel.dk/linux-block 2016-01-21 18:19:38 -08:00
Kbuild