[Intel-wired-lan] [PATCH net-next v2 1/3] ice: report hash type such as L2/L3/L4
Brelinski, TonyX
tonyx.brelinski at intel.com
Tue Mar 9 23:42:57 UTC 2021
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of
> Jesse Brandeburg
> Sent: Tuesday, February 23, 2021 3:47 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH net-next v2 1/3] ice: report hash type such
> as L2/L3/L4
>
> The hardware is reporting the type of the hash used for RSS as a PTYPE field
> in the receive descriptor. Use this value to set the skb packet hash type by
> extending the hash type table to cover all 10-bits of possible values (requiring
> some variables to be changed from u8 to u16), and then use that table to
> convert to one of the possible values in enum pkt_hash_types.
>
> While we're here, remove the unused ptype struct value, which makes table
> init easier for the zero entries, and use ranged initializer to remove a bunch
> of code (works with gcc and clang).
>
> Without this change, the kernel will recalculate the hash in software, which
> can consume extra CPU cycles.
>
> Signed-off-by: Kiran Patil <kiran.patil at intel.com>
> Co-developed-by: Jesse Brandeburg <jesse.brandeburg at intel.com>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg at intel.com>
> ---
> v2: [IWL] updated the initializer of the ptype table to remove PTYPE
>
> NOTE: this patch generates an expected checkpatch error due to the tricky
> structure initializer macro.
> ---
> .../net/ethernet/intel/ice/ice_lan_tx_rx.h | 147 ++++--------------
> drivers/net/ethernet/intel/ice/ice_txrx.c | 2 +-
> drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 23 ++-
> drivers/net/ethernet/intel/ice/ice_txrx_lib.h | 2 +-
> drivers/net/ethernet/intel/ice/ice_xsk.c | 2 +-
> 5 files changed, 50 insertions(+), 126 deletions(-)
Tested-by: Tony Brelinski <tonyx.brelinski at intel.com> A Contingent Worker at Intel
More information about the Intel-wired-lan
mailing list