1
0
Fork 0
alistair23-linux/drivers/net/ethernet/intel
Jacob Keller faa16e0f38 i40e: correctly honor the mask fields for ETHTOOL_SRXCLSRLINS
The current implementation of .set_rxnfc does not properly read the mask
field for filter entries. This results in incorrect driver behavior, as
we do not reject filters which have masks set to ignore some fields. The
current implementation simply assumes that every part of the tuple or
"input set" is specified. This results in filters not behaving as
expected, and not working correctly.

As a first step in supporting some partial filters, add code which
checks the mask fields and rejects any filters which do not have an
acceptable mask. For now, we just assume that all fields must be set.

This will get the driver one step towards allowing some partial filters.
At a minimum, the ethtool commands which previously installed filters
that would not function will now return a non-zero exit code indicating
failure instead.

We should now be meeting the minimum requirements of the .set_rxnfc API,
by ensuring that all filters we program have a valid mask value for each
field.

Finally, add code to report the mask correctly so that the ethtool
command properly reports the mask to the user.

Note that the typecast to (__be16) when checking source and destination
port masks is required because the ~ bitwise negation operator does not
correctly handle variables other than integer size.

Change-Id: Ia020149e07c87aa3fcec7b2283621b887ef0546f
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2017-03-23 21:13:33 -07:00
..
e1000 e1000: use new API ethtool_{get|set}_link_ksettings 2017-03-21 15:27:58 -07:00
e1000e e1000e: use new API ethtool_{get|set}_link_ksettings 2017-03-21 15:31:30 -07:00
fm10k mqprio: Modify mqprio to pass user parameters via ndo_setup_tc. 2017-03-15 15:20:27 -07:00
i40e i40e: correctly honor the mask fields for ETHTOOL_SRXCLSRLINS 2017-03-23 21:13:33 -07:00
i40evf i40evf: use new api ethtool_{get|set}_link_ksettings 2017-03-20 16:43:30 -07:00
igb igb: use new API ethtool_{get|set}_link_ksettings 2017-03-21 15:42:19 -07:00
igbvf igbvf: use new API ethtool_{get|set}_link_ksettings 2017-03-21 15:51:39 -07:00
ixgb ixgb: use new API ethtool_{get|set}_link_ksettings 2017-03-21 15:53:19 -07:00
ixgbe igb/ixgbe: Fix typo in igb_build_skb and/or ixgbe_build_skb code comment 2017-03-17 12:55:55 -07:00
ixgbevf ixgbevf: get rid of custom busy polling code 2017-02-03 17:17:53 -05:00
Kconfig ptp_clock: Allow for it to be optional 2016-11-16 09:26:34 +01:00
Makefile fm10k: Add skeletal frame for Intel(R) FM10000 Ethernet Switch Host Interface Driver 2014-09-23 03:59:13 -07:00
e100.c drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00