[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <IA1PR11MB6241C8E2FA0B9517BAF68E8A8B61A@IA1PR11MB6241.namprd11.prod.outlook.com>
Date: Fri, 30 May 2025 06:57:03 +0000
From: "Rinitha, SX" <sx.rinitha@...el.com>
To: "Keller, Jacob E" <jacob.e.keller@...el.com>, Intel Wired LAN
<intel-wired-lan@...ts.osuosl.org>, "Nguyen, Anthony L"
<anthony.l.nguyen@...el.com>, netdev <netdev@...r.kernel.org>
CC: "Keller, Jacob E" <jacob.e.keller@...el.com>, "Kitszel, Przemyslaw"
<przemyslaw.kitszel@...el.com>, Simon Horman <horms@...nel.org>, "Loktionov,
Aleksandr" <aleksandr.loktionov@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-next v2 2/2] net: intel: move RSS
packet classifier types to libie
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of Jacob Keller
> Sent: 06 May 2025 01:44
> To: Intel Wired LAN <intel-wired-lan@...ts.osuosl.org>; Nguyen, Anthony L <anthony.l.nguyen@...el.com>; netdev <netdev@...r.kernel.org>
> Cc: Keller, Jacob E <jacob.e.keller@...el.com>; Kitszel, Przemyslaw <przemyslaw.kitszel@...el.com>; Simon Horman <horms@...nel.org>; Loktionov, Aleksandr <aleksandr.loktionov@...el.com>
> Subject: [Intel-wired-lan] [PATCH iwl-next v2 2/2] net: intel: move RSS packet classifier types to libie
>
> The Intel i40e, iavf, and ice drivers all include a definition of the packet classifier filter types used to program RSS hash enable bits. For i40e, these bits are used for both the PF and VF to configure the PFQF_HENA and VFQF_HENA registers.
>
> For ice and iAVF, these bits are used to communicate the desired hash enable filter over virtchnl via its struct virtchnl_rss_hashena. The virtchnl.h header makes no mention of where the bit definitions reside.
>
> Maintaining a separate copy of these bits across three drivers is cumbersome. Move the definition to libie as a new pctype.h header file.
> Each driver can include this, and drop its own definition.
>
> The ice implementation also defined a ICE_AVF_FLOW_FIELD_INVALID, intending to use this to indicate when there were no hash enable bits set. This is confusing, since the enumeration is using bit positions. A value of 0
*should* indicate the first bit. Instead, rewrite the code that uses ICE_AVF_FLOW_FIELD_INVALID to just check if the avf_hash is zero. From context this should be clear that we're checking if none of the bits are set.
>
> The values are kept as bit positions instead of encoding the BIT_ULL directly into their value. While most users will simply use BIT_ULL immediately, i40e uses the macros both with BIT_ULL and test_bit/set_bit calls.
>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
> Reviewed-by: Simon Horman <horms@...nel.org>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@...el.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_txrx.h | 35 +++++------
> drivers/net/ethernet/intel/i40e/i40e_type.h | 32 ----------
> drivers/net/ethernet/intel/iavf/iavf_txrx.h | 36 ++++++------
> drivers/net/ethernet/intel/iavf/iavf_type.h | 32 ----------
> drivers/net/ethernet/intel/ice/ice_flow.h | 64 ++++++--------------
> include/linux/avf/virtchnl.h | 1 +
> include/linux/net/intel/libie/pctype.h | 41 +++++++++++++
> drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 81 +++++++++++++-------------
> drivers/net/ethernet/intel/i40e/i40e_main.c | 23 ++++----
> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 25 ++++----
> drivers/net/ethernet/intel/ice/ice_flow.c | 45 +++++++-------
> 11 files changed, 185 insertions(+), 230 deletions(-)
>
Tested-by: Rinitha S <sx.rinitha@...el.com> (A Contingent worker at Intel)
Powered by blists - more mailing lists