]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: check current configured input set when adding ntuple filters
authorJacob Keller <jacob.e.keller@intel.com>
Tue, 7 Mar 2017 23:05:23 +0000 (15:05 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 24 Mar 2017 04:13:33 +0000 (21:13 -0700)
commit610d8bdfa0c7fdd6d9526c3b965b457fe27d9494
tree4ce37cee30e9b1089a9e28f71a96aa56d89119cc
parent2803649d66f98f0f01ff9b4d0d9e6ee406e4329e
i40e: check current configured input set when adding ntuple filters

Do not assume that hardware has been programmed with the default mask,
but instead read the input set registers to determine what is currently
programmed. This ensures that all programmed filters match exactly how
the hardware will interpret them, avoiding confusion regarding filter
behavior.

This sets the initial ground-work for allowing custom input sets where
some fields are disabled. A future patch will fully implement this
feature.

Instead of using bitwise negation, we'll just explicitly check for the
correct value. The use of htonl and htons are used to silence sparse
warnings. The compiler should be able to handle the constant value and
avoid actually performing a byteswap.

Change-Id: I3d8db46cb28ea0afdaac8c5b31a2bfb90e3a4102
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.h
drivers/net/ethernet/intel/i40e/i40e_ethtool.c