]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: fix reported mask for ntuple filters
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 27 Dec 2017 13:26:33 +0000 (08:26 -0500)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 26 Jan 2018 21:23:43 +0000 (13:23 -0800)
commit606a90378b30f9b326159565658ce047a62f1317
treebba0fe4d140f5b0139c94f25ce4e4e012f9fa8c2
parent9e721d62c2e0261a45106fffaae950de42848161
i40e: fix reported mask for ntuple filters

In commit 610d8bdfa0c7 ("i40e: check current configured input set when
adding ntuple filters") some code was added to report the input set
mask for a given filter when reporting it to the user.

This code is necessary so that the reported filter correctly displays
that it is or is not masking certain fields.

Unfortunately the code was incorrect. Development error accidentally
swapped the mask values for the IPv4 addresses with the L4 port numbers.
The port numbers are only 16bits wide while IPv4 addresses are 32 bits.
Unfortunately we assigned only 16 bits to the IPv4 address masks.
Additionally we assigned 32bit value 0xFFFFFFF to the TCP port numbers.
This second part does not matter as the value would be truncated to
16bits regardless, but it is unnecessary.

Fix the reported masks to properly report that the entire field is
masked.

Fixes: 610d8bdfa0c7 ("i40e: check current configured input set when adding ntuple filters")
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>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c