diff mbox series

[net-next,v1] ice: enable parsing IPSEC SPI headers for RSS

Message ID 20220114233718.67841-1-jesse.brandeburg@intel.com
State Superseded
Delegated to: Anthony Nguyen
Headers show
Series [net-next,v1] ice: enable parsing IPSEC SPI headers for RSS | expand

Commit Message

Jesse Brandeburg Jan. 14, 2022, 11:37 p.m. UTC
The COMMS package can enable the hardware parser to recognize IPSEC
frames with ESP header and SPI identifier.  If this package is available
and configured for loading in /lib/firmware, then the driver will
succeed in enabling this protocol type for RSS.

This in turn allows the hardware to hash over the SPI and use it to pick
a consistent receive queue for the same secure flow. Without this all
traffic is steered to the same queue for multiple traffic threads from
the same IP address.

If the package is not available, adding this type will fail, but the
failure is ignored on purpose as it has no negative affect.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_lib.c | 6 ++++++
 1 file changed, 6 insertions(+)


base-commit: 61a0b1ca2485ddfe549cde9eccd93b06b53188e8

Comments

G, GurucharanX Feb. 7, 2022, 8:06 p.m. UTC | #1
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Jesse Brandeburg
> Sent: Saturday, January 15, 2022 5:07 AM
> To: intel-wired-lan@lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH net-next v1] ice: enable parsing IPSEC SPI
> headers for RSS
> 
> The COMMS package can enable the hardware parser to recognize IPSEC
> frames with ESP header and SPI identifier.  If this package is available and
> configured for loading in /lib/firmware, then the driver will succeed in
> enabling this protocol type for RSS.
> 
> This in turn allows the hardware to hash over the SPI and use it to pick a
> consistent receive queue for the same secure flow. Without this all traffic is
> steered to the same queue for multiple traffic threads from the same IP
> address.
> 
> If the package is not available, adding this type will fail, but the failure is
> ignored on purpose as it has no negative affect.
> 
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_lib.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 

Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index 4e9efd49c149..662493d1002b 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -1686,6 +1686,12 @@  static void ice_vsi_set_rss_flow_fld(struct ice_vsi *vsi)
 	if (status)
 		dev_dbg(dev, "ice_add_rss_cfg failed for sctp6 flow, vsi = %d, error = %d\n",
 			vsi_num, status);
+
+	status = ice_add_rss_cfg(hw, vsi_handle, ICE_FLOW_HASH_ESP_SPI,
+				 ICE_FLOW_SEG_HDR_ESP);
+	if (status)
+		dev_dbg(dev, "ice_add_rss_cfg failed for esp/spi flow, vsi = %d, error = %d\n",
+			vsi_num, status);
 }
 
 /**