All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
@ 2024-02-12  2:04 ` Takeru Hayasaka
  0 siblings, 0 replies; 30+ messages in thread
From: Takeru Hayasaka @ 2024-02-12  2:04 UTC (permalink / raw)
  To: Jesse Brandeburg, Tony Nguyen, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jonathan Corbet
  Cc: linux-doc, vladimir.oltean, linux-kernel, laforge, Marcin Szycik,
	intel-wired-lan, Takeru Hayasaka, netdev, mailhol.vincent

This is a patch that enables RSS functionality for GTP packets using ethtool.

A user can include TEID and make RSS work for GTP-U over IPv4 by doing the
following:`ethtool -N ens3 rx-flow-hash gtpu4 sde`

In addition to gtpu(4|6), we now support gtpc(4|6),gtpc(4|6)t,gtpu(4|6)e,
gtpu(4|6)u, and gtpu(4|6)d.

gtpc(4|6): Used for GTP-C in IPv4 and IPv6, where the GTP header format does
not include a TEID.
gtpc(4|6)t: Used for GTP-C in IPv4 and IPv6, with a GTP header format that
includes a TEID.
gtpu(4|6): Used for GTP-U in both IPv4 and IPv6 scenarios.
gtpu(4|6)e: Used for GTP-U with extended headers in both IPv4 and IPv6.
gtpu(4|6)u: Used when the PSC (PDU session container) in the GTP-U extended
header includes Uplink, applicable to both IPv4 and IPv6.
gtpu(4|6)d: Used when the PSC in the GTP-U extended header includes Downlink,
for both IPv4 and IPv6.

GTP generates a flow that includes an ID called TEID to identify the tunnel.
This tunnel is created for each UE (User Equipment).By performing RSS based on
this flow, it is possible to apply RSS for each communication unit from the UE.
Without this, RSS would only be effective within the range of IP addresses. For
instance, the PGW can only perform RSS within the IP range of the SGW.
Problematic from a load distribution perspective, especially if there's a bias
in the terminals connected to a particular base station.This case can be
solved by using this patch.

Signed-off-by: Takeru Hayasaka <hayatake396@gmail.com>
Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
---
v2->v3: Based on Harald-san's review, I added documentation and comments to
ethtool.h and ice.rst.
v3->v4: Based on Marcin-san's review, I added the missing code for GTPC and
GTPC_TEID, and revised the documentation and comments.
v4->v5: Based on Marcin-san's review, I fixed rename and wrong code regarding
GTPC
v5->v6: Based on Marcin-san's review, Undoing the addition of unnecessary
blank lines.Minor fixes.
v6->v7 Based on Jakub-san's review, Split the patch.
v7->v8: There are no code changes. I've resent the patch, including Marcin-san's
patch, because PatchWork did not interpret the patch correctly.Simon-san told
me. Thanks.
 include/uapi/linux/ethtool.h | 48 ++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index 06ef6b78b7de..11fc18988bc2 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -2023,6 +2023,53 @@ static inline int ethtool_validate_duplex(__u8 duplex)
 #define	IPV4_FLOW	0x10	/* hash only */
 #define	IPV6_FLOW	0x11	/* hash only */
 #define	ETHER_FLOW	0x12	/* spec only (ether_spec) */
+
+/* Used for GTP-U IPv4 and IPv6.
+ * The format of GTP packets only includes
+ * elements such as TEID and GTP version.
+ * It is primarily intended for data communication of the UE.
+ */
+#define GTPU_V4_FLOW 0x13	/* hash only */
+#define GTPU_V6_FLOW 0x14	/* hash only */
+
+/* Use for GTP-C IPv4 and v6.
+ * The format of these GTP packets does not include TEID.
+ * Primarily expected to be used for communication
+ * to create sessions for UE data communication,
+ * commonly referred to as CSR (Create Session Request).
+ */
+#define GTPC_V4_FLOW 0x15	/* hash only */
+#define GTPC_V6_FLOW 0x16	/* hash only */
+
+/* Use for GTP-C IPv4 and v6.
+ * Unlike GTPC_V4_FLOW, the format of these GTP packets includes TEID.
+ * After session creation, it becomes this packet.
+ * This is mainly used for requests to realize UE handover.
+ */
+#define GTPC_TEID_V4_FLOW 0x17	/* hash only */
+#define GTPC_TEID_V6_FLOW 0x18	/* hash only */
+
+/* Use for GTP-U and extended headers for the PSC (PDU Session Container).
+ * The format of these GTP packets includes TEID and QFI.
+ * In 5G communication using UPF (User Plane Function),
+ * data communication with this extended header is performed.
+ */
+#define GTPU_EH_V4_FLOW 0x19	/* hash only */
+#define GTPU_EH_V6_FLOW 0x1a	/* hash only */
+
+/* Use for GTP-U IPv4 and v6 PSC (PDU Session Container) extended headers.
+ * This differs from GTPU_EH_V(4|6)_FLOW in that it is distinguished by
+ * UL/DL included in the PSC.
+ * There are differences in the data included based on Downlink/Uplink,
+ * and can be used to distinguish packets.
+ * The functions described so far are useful when you want to
+ * handle communication from the mobile network in UPF, PGW, etc.
+ */
+#define GTPU_UL_V4_FLOW 0x1b	/* hash only */
+#define GTPU_UL_V6_FLOW 0x1c	/* hash only */
+#define GTPU_DL_V4_FLOW 0x1d	/* hash only */
+#define GTPU_DL_V6_FLOW 0x1e	/* hash only */
+
 /* Flag to enable additional fields in struct ethtool_rx_flow_spec */
 #define	FLOW_EXT	0x80000000
 #define	FLOW_MAC_EXT	0x40000000
@@ -2037,6 +2084,7 @@ static inline int ethtool_validate_duplex(__u8 duplex)
 #define	RXH_IP_DST	(1 << 5)
 #define	RXH_L4_B_0_1	(1 << 6) /* src port in case of TCP/UDP/SCTP */
 #define	RXH_L4_B_2_3	(1 << 7) /* dst port in case of TCP/UDP/SCTP */
+#define	RXH_GTP_TEID	(1 << 8) /* teid in case of GTP */
 #define	RXH_DISCARD	(1 << 31)
 
 #define	RX_CLS_FLOW_DISC	0xffffffffffffffffULL
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
@ 2024-02-12  2:04 ` Takeru Hayasaka
  0 siblings, 0 replies; 30+ messages in thread
From: Takeru Hayasaka @ 2024-02-12  2:04 UTC (permalink / raw)
  To: Jesse Brandeburg, Tony Nguyen, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jonathan Corbet
  Cc: intel-wired-lan, netdev, linux-doc, linux-kernel,
	mailhol.vincent, vladimir.oltean, laforge, Takeru Hayasaka,
	Marcin Szycik

This is a patch that enables RSS functionality for GTP packets using ethtool.

A user can include TEID and make RSS work for GTP-U over IPv4 by doing the
following:`ethtool -N ens3 rx-flow-hash gtpu4 sde`

In addition to gtpu(4|6), we now support gtpc(4|6),gtpc(4|6)t,gtpu(4|6)e,
gtpu(4|6)u, and gtpu(4|6)d.

gtpc(4|6): Used for GTP-C in IPv4 and IPv6, where the GTP header format does
not include a TEID.
gtpc(4|6)t: Used for GTP-C in IPv4 and IPv6, with a GTP header format that
includes a TEID.
gtpu(4|6): Used for GTP-U in both IPv4 and IPv6 scenarios.
gtpu(4|6)e: Used for GTP-U with extended headers in both IPv4 and IPv6.
gtpu(4|6)u: Used when the PSC (PDU session container) in the GTP-U extended
header includes Uplink, applicable to both IPv4 and IPv6.
gtpu(4|6)d: Used when the PSC in the GTP-U extended header includes Downlink,
for both IPv4 and IPv6.

GTP generates a flow that includes an ID called TEID to identify the tunnel.
This tunnel is created for each UE (User Equipment).By performing RSS based on
this flow, it is possible to apply RSS for each communication unit from the UE.
Without this, RSS would only be effective within the range of IP addresses. For
instance, the PGW can only perform RSS within the IP range of the SGW.
Problematic from a load distribution perspective, especially if there's a bias
in the terminals connected to a particular base station.This case can be
solved by using this patch.

Signed-off-by: Takeru Hayasaka <hayatake396@gmail.com>
Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
---
v2->v3: Based on Harald-san's review, I added documentation and comments to
ethtool.h and ice.rst.
v3->v4: Based on Marcin-san's review, I added the missing code for GTPC and
GTPC_TEID, and revised the documentation and comments.
v4->v5: Based on Marcin-san's review, I fixed rename and wrong code regarding
GTPC
v5->v6: Based on Marcin-san's review, Undoing the addition of unnecessary
blank lines.Minor fixes.
v6->v7 Based on Jakub-san's review, Split the patch.
v7->v8: There are no code changes. I've resent the patch, including Marcin-san's
patch, because PatchWork did not interpret the patch correctly.Simon-san told
me. Thanks.
 include/uapi/linux/ethtool.h | 48 ++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index 06ef6b78b7de..11fc18988bc2 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -2023,6 +2023,53 @@ static inline int ethtool_validate_duplex(__u8 duplex)
 #define	IPV4_FLOW	0x10	/* hash only */
 #define	IPV6_FLOW	0x11	/* hash only */
 #define	ETHER_FLOW	0x12	/* spec only (ether_spec) */
+
+/* Used for GTP-U IPv4 and IPv6.
+ * The format of GTP packets only includes
+ * elements such as TEID and GTP version.
+ * It is primarily intended for data communication of the UE.
+ */
+#define GTPU_V4_FLOW 0x13	/* hash only */
+#define GTPU_V6_FLOW 0x14	/* hash only */
+
+/* Use for GTP-C IPv4 and v6.
+ * The format of these GTP packets does not include TEID.
+ * Primarily expected to be used for communication
+ * to create sessions for UE data communication,
+ * commonly referred to as CSR (Create Session Request).
+ */
+#define GTPC_V4_FLOW 0x15	/* hash only */
+#define GTPC_V6_FLOW 0x16	/* hash only */
+
+/* Use for GTP-C IPv4 and v6.
+ * Unlike GTPC_V4_FLOW, the format of these GTP packets includes TEID.
+ * After session creation, it becomes this packet.
+ * This is mainly used for requests to realize UE handover.
+ */
+#define GTPC_TEID_V4_FLOW 0x17	/* hash only */
+#define GTPC_TEID_V6_FLOW 0x18	/* hash only */
+
+/* Use for GTP-U and extended headers for the PSC (PDU Session Container).
+ * The format of these GTP packets includes TEID and QFI.
+ * In 5G communication using UPF (User Plane Function),
+ * data communication with this extended header is performed.
+ */
+#define GTPU_EH_V4_FLOW 0x19	/* hash only */
+#define GTPU_EH_V6_FLOW 0x1a	/* hash only */
+
+/* Use for GTP-U IPv4 and v6 PSC (PDU Session Container) extended headers.
+ * This differs from GTPU_EH_V(4|6)_FLOW in that it is distinguished by
+ * UL/DL included in the PSC.
+ * There are differences in the data included based on Downlink/Uplink,
+ * and can be used to distinguish packets.
+ * The functions described so far are useful when you want to
+ * handle communication from the mobile network in UPF, PGW, etc.
+ */
+#define GTPU_UL_V4_FLOW 0x1b	/* hash only */
+#define GTPU_UL_V6_FLOW 0x1c	/* hash only */
+#define GTPU_DL_V4_FLOW 0x1d	/* hash only */
+#define GTPU_DL_V6_FLOW 0x1e	/* hash only */
+
 /* Flag to enable additional fields in struct ethtool_rx_flow_spec */
 #define	FLOW_EXT	0x80000000
 #define	FLOW_MAC_EXT	0x40000000
@@ -2037,6 +2084,7 @@ static inline int ethtool_validate_duplex(__u8 duplex)
 #define	RXH_IP_DST	(1 << 5)
 #define	RXH_L4_B_0_1	(1 << 6) /* src port in case of TCP/UDP/SCTP */
 #define	RXH_L4_B_2_3	(1 << 7) /* dst port in case of TCP/UDP/SCTP */
+#define	RXH_GTP_TEID	(1 << 8) /* teid in case of GTP */
 #define	RXH_DISCARD	(1 << 31)
 
 #define	RX_CLS_FLOW_DISC	0xffffffffffffffffULL
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH net-next v8 2/2] ice: Implement RSS settings for GTP using ethtool
  2024-02-12  2:04 ` Takeru Hayasaka
@ 2024-02-12  2:04   ` Takeru Hayasaka
  -1 siblings, 0 replies; 30+ messages in thread
From: Takeru Hayasaka @ 2024-02-12  2:04 UTC (permalink / raw)
  To: Jesse Brandeburg, Tony Nguyen, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jonathan Corbet
  Cc: intel-wired-lan, netdev, linux-doc, linux-kernel,
	mailhol.vincent, vladimir.oltean, laforge, Takeru Hayasaka,
	Marcin Szycik

Following the addition of new GTP RSS hash options to ethtool.h, this patch
implements the corresponding RSS settings for GTP packets in the Intel ice
driver. It enables users to configure RSS for GTP-U and GTP-C traffic over IPv4
and IPv6, utilizing the newly defined hash options.

The implementation covers the handling of gtpu(4|6), gtpc(4|6), gtpc(4|6)t,
gtpu(4|6)e, gtpu(4|6)u, and gtpu(4|6)d traffic, providing enhanced load
distribution for GTP traffic across multiple processing units.

Signed-off-by: Takeru Hayasaka <hayatake396@gmail.com>
Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
---
 .../device_drivers/ethernet/intel/ice.rst     | 21 ++++-
 drivers/net/ethernet/intel/ice/ice_ethtool.c  | 82 +++++++++++++++++++
 drivers/net/ethernet/intel/ice/ice_flow.h     | 31 +++++--
 drivers/net/ethernet/intel/ice/ice_lib.c      | 37 +++++++++
 4 files changed, 162 insertions(+), 9 deletions(-)

diff --git a/Documentation/networking/device_drivers/ethernet/intel/ice.rst b/Documentation/networking/device_drivers/ethernet/intel/ice.rst
index 5038e54586af..934752f675ba 100644
--- a/Documentation/networking/device_drivers/ethernet/intel/ice.rst
+++ b/Documentation/networking/device_drivers/ethernet/intel/ice.rst
@@ -368,15 +368,28 @@ more options for Receive Side Scaling (RSS) hash byte configuration.
   # ethtool -N <ethX> rx-flow-hash <type> <option>
 
   Where <type> is:
-    tcp4  signifying TCP over IPv4
-    udp4  signifying UDP over IPv4
-    tcp6  signifying TCP over IPv6
-    udp6  signifying UDP over IPv6
+    tcp4    signifying TCP over IPv4
+    udp4    signifying UDP over IPv4
+    gtpc4   signifying GTP-C over IPv4
+    gtpc4t  signifying GTP-C (include TEID) over IPv4
+    gtpu4   signifying GTP-U over IPV4
+    gtpu4e  signifying GTP-U and Extension Header over IPV4
+    gtpu4u  signifying GTP-U PSC Uplink over IPV4
+    gtpu4d  signifying GTP-U PSC Downlink over IPV4
+    tcp6    signifying TCP over IPv6
+    udp6    signifying UDP over IPv6
+    gtpc6   signifying GTP-C over IPv6
+    gtpc6t  signifying GTP-C (include TEID) over IPv6
+    gtpu6   signifying GTP-U over IPV6
+    gtpu6e  signifying GTP-U and Extension Header over IPV6
+    gtpu6u  signifying GTP-U PSC Uplink over IPV6
+    gtpu6d  signifying GTP-U PSC Downlink over IPV6
   And <option> is one or more of:
     s     Hash on the IP source address of the Rx packet.
     d     Hash on the IP destination address of the Rx packet.
     f     Hash on bytes 0 and 1 of the Layer 4 header of the Rx packet.
     n     Hash on bytes 2 and 3 of the Layer 4 header of the Rx packet.
+    e     Hash on GTP Packet on TEID (4bytes) of the Rx packet.
 
 
 Accelerated Receive Flow Steering (aRFS)
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
index a19b06f18e40..d0e05032f464 100644
--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
@@ -2486,6 +2486,24 @@ static u32 ice_parse_hdrs(struct ethtool_rxnfc *nfc)
 	case SCTP_V4_FLOW:
 		hdrs |= ICE_FLOW_SEG_HDR_SCTP | ICE_FLOW_SEG_HDR_IPV4;
 		break;
+	case GTPU_V4_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_IPV4;
+		break;
+	case GTPC_V4_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPC | ICE_FLOW_SEG_HDR_IPV4;
+		break;
+	case GTPC_TEID_V4_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPC_TEID | ICE_FLOW_SEG_HDR_IPV4;
+		break;
+	case GTPU_EH_V4_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPU_EH | ICE_FLOW_SEG_HDR_IPV4;
+		break;
+	case GTPU_UL_V4_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPU_UP | ICE_FLOW_SEG_HDR_IPV4;
+		break;
+	case GTPU_DL_V4_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPU_DWN | ICE_FLOW_SEG_HDR_IPV4;
+		break;
 	case TCP_V6_FLOW:
 		hdrs |= ICE_FLOW_SEG_HDR_TCP | ICE_FLOW_SEG_HDR_IPV6;
 		break;
@@ -2495,6 +2513,24 @@ static u32 ice_parse_hdrs(struct ethtool_rxnfc *nfc)
 	case SCTP_V6_FLOW:
 		hdrs |= ICE_FLOW_SEG_HDR_SCTP | ICE_FLOW_SEG_HDR_IPV6;
 		break;
+	case GTPU_V6_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_IPV6;
+		break;
+	case GTPC_V6_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPC | ICE_FLOW_SEG_HDR_IPV6;
+		break;
+	case GTPC_TEID_V6_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPC_TEID | ICE_FLOW_SEG_HDR_IPV6;
+		break;
+	case GTPU_EH_V6_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPU_EH | ICE_FLOW_SEG_HDR_IPV6;
+		break;
+	case GTPU_UL_V6_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPU_UP | ICE_FLOW_SEG_HDR_IPV6;
+		break;
+	case GTPU_DL_V6_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPU_DWN | ICE_FLOW_SEG_HDR_IPV6;
+		break;
 	default:
 		break;
 	}
@@ -2518,6 +2554,12 @@ static u64 ice_parse_hash_flds(struct ethtool_rxnfc *nfc, bool symm)
 		case TCP_V4_FLOW:
 		case UDP_V4_FLOW:
 		case SCTP_V4_FLOW:
+		case GTPU_V4_FLOW:
+		case GTPC_V4_FLOW:
+		case GTPC_TEID_V4_FLOW:
+		case GTPU_EH_V4_FLOW:
+		case GTPU_UL_V4_FLOW:
+		case GTPU_DL_V4_FLOW:
 			if (nfc->data & RXH_IP_SRC)
 				hfld |= ICE_FLOW_HASH_FLD_IPV4_SA;
 			if (nfc->data & RXH_IP_DST)
@@ -2526,6 +2568,12 @@ static u64 ice_parse_hash_flds(struct ethtool_rxnfc *nfc, bool symm)
 		case TCP_V6_FLOW:
 		case UDP_V6_FLOW:
 		case SCTP_V6_FLOW:
+		case GTPU_V6_FLOW:
+		case GTPC_V6_FLOW:
+		case GTPC_TEID_V6_FLOW:
+		case GTPU_EH_V6_FLOW:
+		case GTPU_UL_V6_FLOW:
+		case GTPU_DL_V6_FLOW:
 			if (nfc->data & RXH_IP_SRC)
 				hfld |= ICE_FLOW_HASH_FLD_IPV6_SA;
 			if (nfc->data & RXH_IP_DST)
@@ -2564,6 +2612,33 @@ static u64 ice_parse_hash_flds(struct ethtool_rxnfc *nfc, bool symm)
 		}
 	}
 
+	if (nfc->data & RXH_GTP_TEID) {
+		switch (nfc->flow_type) {
+		case GTPC_TEID_V4_FLOW:
+		case GTPC_TEID_V6_FLOW:
+			hfld |= ICE_FLOW_HASH_FLD_GTPC_TEID;
+			break;
+		case GTPU_V4_FLOW:
+		case GTPU_V6_FLOW:
+			hfld |= ICE_FLOW_HASH_FLD_GTPU_IP_TEID;
+			break;
+		case GTPU_EH_V4_FLOW:
+		case GTPU_EH_V6_FLOW:
+			hfld |= ICE_FLOW_HASH_FLD_GTPU_EH_TEID;
+			break;
+		case GTPU_UL_V4_FLOW:
+		case GTPU_UL_V6_FLOW:
+			hfld |= ICE_FLOW_HASH_FLD_GTPU_UP_TEID;
+			break;
+		case GTPU_DL_V4_FLOW:
+		case GTPU_DL_V6_FLOW:
+			hfld |= ICE_FLOW_HASH_FLD_GTPU_DWN_TEID;
+			break;
+		default:
+			break;
+		}
+	}
+
 	return hfld;
 }
 
@@ -2676,6 +2751,13 @@ ice_get_rss_hash_opt(struct ice_vsi *vsi, struct ethtool_rxnfc *nfc)
 	    hash_flds & ICE_FLOW_HASH_FLD_UDP_DST_PORT ||
 	    hash_flds & ICE_FLOW_HASH_FLD_SCTP_DST_PORT)
 		nfc->data |= (u64)RXH_L4_B_2_3;
+
+	if (hash_flds & ICE_FLOW_HASH_FLD_GTPC_TEID ||
+	    hash_flds & ICE_FLOW_HASH_FLD_GTPU_IP_TEID ||
+	    hash_flds & ICE_FLOW_HASH_FLD_GTPU_EH_TEID ||
+	    hash_flds & ICE_FLOW_HASH_FLD_GTPU_UP_TEID ||
+	    hash_flds & ICE_FLOW_HASH_FLD_GTPU_DWN_TEID)
+		nfc->data |= (u64)RXH_GTP_TEID;
 }
 
 /**
diff --git a/drivers/net/ethernet/intel/ice/ice_flow.h b/drivers/net/ethernet/intel/ice/ice_flow.h
index ff82915ab497..2fd2e0cb483d 100644
--- a/drivers/net/ethernet/intel/ice/ice_flow.h
+++ b/drivers/net/ethernet/intel/ice/ice_flow.h
@@ -37,13 +37,13 @@
 #define ICE_HASH_SCTP_IPV4	(ICE_FLOW_HASH_IPV4 | ICE_FLOW_HASH_SCTP_PORT)
 #define ICE_HASH_SCTP_IPV6	(ICE_FLOW_HASH_IPV6 | ICE_FLOW_HASH_SCTP_PORT)
 
-#define ICE_FLOW_HASH_GTP_TEID \
+#define ICE_FLOW_HASH_GTP_C_TEID \
 	(BIT_ULL(ICE_FLOW_FIELD_IDX_GTPC_TEID))
 
-#define ICE_FLOW_HASH_GTP_IPV4_TEID \
-	(ICE_FLOW_HASH_IPV4 | ICE_FLOW_HASH_GTP_TEID)
-#define ICE_FLOW_HASH_GTP_IPV6_TEID \
-	(ICE_FLOW_HASH_IPV6 | ICE_FLOW_HASH_GTP_TEID)
+#define ICE_FLOW_HASH_GTP_C_IPV4_TEID \
+	(ICE_FLOW_HASH_IPV4 | ICE_FLOW_HASH_GTP_C_TEID)
+#define ICE_FLOW_HASH_GTP_C_IPV6_TEID \
+	(ICE_FLOW_HASH_IPV6 | ICE_FLOW_HASH_GTP_C_TEID)
 
 #define ICE_FLOW_HASH_GTP_U_TEID \
 	(BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_IP_TEID))
@@ -66,6 +66,20 @@
 	(ICE_FLOW_HASH_IPV6 | ICE_FLOW_HASH_GTP_U_EH_TEID | \
 	 ICE_FLOW_HASH_GTP_U_EH_QFI)
 
+#define ICE_FLOW_HASH_GTP_U_UP \
+	(BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_UP_TEID))
+#define ICE_FLOW_HASH_GTP_U_DWN \
+	(BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_DWN_TEID))
+
+#define ICE_FLOW_HASH_GTP_U_IPV4_UP \
+	(ICE_FLOW_HASH_IPV4 | ICE_FLOW_HASH_GTP_U_UP)
+#define ICE_FLOW_HASH_GTP_U_IPV6_UP \
+	(ICE_FLOW_HASH_IPV6 | ICE_FLOW_HASH_GTP_U_UP)
+#define ICE_FLOW_HASH_GTP_U_IPV4_DWN \
+	(ICE_FLOW_HASH_IPV4 | ICE_FLOW_HASH_GTP_U_DWN)
+#define ICE_FLOW_HASH_GTP_U_IPV6_DWN \
+	(ICE_FLOW_HASH_IPV6 | ICE_FLOW_HASH_GTP_U_DWN)
+
 #define ICE_FLOW_HASH_PPPOE_SESS_ID \
 	(BIT_ULL(ICE_FLOW_FIELD_IDX_PPPOE_SESS_ID))
 
@@ -242,6 +256,13 @@ enum ice_flow_field {
 #define ICE_FLOW_HASH_FLD_SCTP_DST_PORT	\
 	BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)
 
+#define ICE_FLOW_HASH_FLD_GTPC_TEID	BIT_ULL(ICE_FLOW_FIELD_IDX_GTPC_TEID)
+#define ICE_FLOW_HASH_FLD_GTPU_IP_TEID BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_IP_TEID)
+#define ICE_FLOW_HASH_FLD_GTPU_EH_TEID BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_EH_TEID)
+#define ICE_FLOW_HASH_FLD_GTPU_UP_TEID BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_UP_TEID)
+#define ICE_FLOW_HASH_FLD_GTPU_DWN_TEID \
+	BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_DWN_TEID)
+
 /* Flow headers and fields for AVF support */
 enum ice_flow_avf_hdr_field {
 	/* Values 0 - 28 are reserved for future use */
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index 9be724291ef8..3c4282019570 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -1618,6 +1618,25 @@ static const struct ice_rss_hash_cfg default_rss_cfgs[] = {
 	 */
 	{ICE_FLOW_SEG_HDR_SCTP | ICE_FLOW_SEG_HDR_IPV4,
 		ICE_HASH_SCTP_IPV4, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpc4 with input set IPv4 src/dst */
+	{ICE_FLOW_SEG_HDR_GTPC | ICE_FLOW_SEG_HDR_IPV4,
+		ICE_FLOW_HASH_IPV4, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpc4t with input set IPv4 src/dst */
+	{ICE_FLOW_SEG_HDR_GTPC_TEID | ICE_FLOW_SEG_HDR_IPV4,
+		ICE_FLOW_HASH_GTP_C_IPV4_TEID, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpu4 with input set IPv4 src/dst */
+	{ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_IPV4,
+		ICE_FLOW_HASH_GTP_U_IPV4_TEID, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpu4e with input set IPv4 src/dst */
+	{ICE_FLOW_SEG_HDR_GTPU_EH | ICE_FLOW_SEG_HDR_IPV4,
+		ICE_FLOW_HASH_GTP_U_IPV4_EH, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpu4u with input set IPv4 src/dst */
+	{ ICE_FLOW_SEG_HDR_GTPU_UP | ICE_FLOW_SEG_HDR_IPV4,
+		ICE_FLOW_HASH_GTP_U_IPV4_UP, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpu4d with input set IPv4 src/dst */
+	{ICE_FLOW_SEG_HDR_GTPU_DWN | ICE_FLOW_SEG_HDR_IPV4,
+		ICE_FLOW_HASH_GTP_U_IPV4_DWN, ICE_RSS_OUTER_HEADERS, false},
+
 	/* configure RSS for tcp6 with input set IPv6 src/dst, TCP src/dst */
 	{ICE_FLOW_SEG_HDR_TCP | ICE_FLOW_SEG_HDR_IPV6,
 				ICE_HASH_TCP_IPV6,  ICE_RSS_ANY_HEADERS, false},
@@ -1632,6 +1651,24 @@ static const struct ice_rss_hash_cfg default_rss_cfgs[] = {
 	/* configure RSS for IPSEC ESP SPI with input set MAC_IPV4_SPI */
 	{ICE_FLOW_SEG_HDR_ESP,
 		ICE_FLOW_HASH_ESP_SPI, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpc6 with input set IPv6 src/dst */
+	{ICE_FLOW_SEG_HDR_GTPC | ICE_FLOW_SEG_HDR_IPV6,
+		ICE_FLOW_HASH_IPV6, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpc6t with input set IPv6 src/dst */
+	{ICE_FLOW_SEG_HDR_GTPC_TEID | ICE_FLOW_SEG_HDR_IPV6,
+		ICE_FLOW_HASH_GTP_C_IPV6_TEID, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpu6 with input set IPv6 src/dst */
+	{ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_IPV6,
+		ICE_FLOW_HASH_GTP_U_IPV6_TEID, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpu6e with input set IPv6 src/dst */
+	{ICE_FLOW_SEG_HDR_GTPU_EH | ICE_FLOW_SEG_HDR_IPV6,
+		ICE_FLOW_HASH_GTP_U_IPV6_EH, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpu6u with input set IPv6 src/dst */
+	{ ICE_FLOW_SEG_HDR_GTPU_UP | ICE_FLOW_SEG_HDR_IPV6,
+		ICE_FLOW_HASH_GTP_U_IPV6_UP, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpu6d with input set IPv6 src/dst */
+	{ICE_FLOW_SEG_HDR_GTPU_DWN | ICE_FLOW_SEG_HDR_IPV6,
+		ICE_FLOW_HASH_GTP_U_IPV6_DWN, ICE_RSS_OUTER_HEADERS, false},
 };
 
 /**
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Intel-wired-lan] [PATCH net-next v8 2/2] ice: Implement RSS settings for GTP using ethtool
@ 2024-02-12  2:04   ` Takeru Hayasaka
  0 siblings, 0 replies; 30+ messages in thread
From: Takeru Hayasaka @ 2024-02-12  2:04 UTC (permalink / raw)
  To: Jesse Brandeburg, Tony Nguyen, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jonathan Corbet
  Cc: linux-doc, vladimir.oltean, linux-kernel, laforge, Marcin Szycik,
	intel-wired-lan, Takeru Hayasaka, netdev, mailhol.vincent

Following the addition of new GTP RSS hash options to ethtool.h, this patch
implements the corresponding RSS settings for GTP packets in the Intel ice
driver. It enables users to configure RSS for GTP-U and GTP-C traffic over IPv4
and IPv6, utilizing the newly defined hash options.

The implementation covers the handling of gtpu(4|6), gtpc(4|6), gtpc(4|6)t,
gtpu(4|6)e, gtpu(4|6)u, and gtpu(4|6)d traffic, providing enhanced load
distribution for GTP traffic across multiple processing units.

Signed-off-by: Takeru Hayasaka <hayatake396@gmail.com>
Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
---
 .../device_drivers/ethernet/intel/ice.rst     | 21 ++++-
 drivers/net/ethernet/intel/ice/ice_ethtool.c  | 82 +++++++++++++++++++
 drivers/net/ethernet/intel/ice/ice_flow.h     | 31 +++++--
 drivers/net/ethernet/intel/ice/ice_lib.c      | 37 +++++++++
 4 files changed, 162 insertions(+), 9 deletions(-)

diff --git a/Documentation/networking/device_drivers/ethernet/intel/ice.rst b/Documentation/networking/device_drivers/ethernet/intel/ice.rst
index 5038e54586af..934752f675ba 100644
--- a/Documentation/networking/device_drivers/ethernet/intel/ice.rst
+++ b/Documentation/networking/device_drivers/ethernet/intel/ice.rst
@@ -368,15 +368,28 @@ more options for Receive Side Scaling (RSS) hash byte configuration.
   # ethtool -N <ethX> rx-flow-hash <type> <option>
 
   Where <type> is:
-    tcp4  signifying TCP over IPv4
-    udp4  signifying UDP over IPv4
-    tcp6  signifying TCP over IPv6
-    udp6  signifying UDP over IPv6
+    tcp4    signifying TCP over IPv4
+    udp4    signifying UDP over IPv4
+    gtpc4   signifying GTP-C over IPv4
+    gtpc4t  signifying GTP-C (include TEID) over IPv4
+    gtpu4   signifying GTP-U over IPV4
+    gtpu4e  signifying GTP-U and Extension Header over IPV4
+    gtpu4u  signifying GTP-U PSC Uplink over IPV4
+    gtpu4d  signifying GTP-U PSC Downlink over IPV4
+    tcp6    signifying TCP over IPv6
+    udp6    signifying UDP over IPv6
+    gtpc6   signifying GTP-C over IPv6
+    gtpc6t  signifying GTP-C (include TEID) over IPv6
+    gtpu6   signifying GTP-U over IPV6
+    gtpu6e  signifying GTP-U and Extension Header over IPV6
+    gtpu6u  signifying GTP-U PSC Uplink over IPV6
+    gtpu6d  signifying GTP-U PSC Downlink over IPV6
   And <option> is one or more of:
     s     Hash on the IP source address of the Rx packet.
     d     Hash on the IP destination address of the Rx packet.
     f     Hash on bytes 0 and 1 of the Layer 4 header of the Rx packet.
     n     Hash on bytes 2 and 3 of the Layer 4 header of the Rx packet.
+    e     Hash on GTP Packet on TEID (4bytes) of the Rx packet.
 
 
 Accelerated Receive Flow Steering (aRFS)
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
index a19b06f18e40..d0e05032f464 100644
--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
@@ -2486,6 +2486,24 @@ static u32 ice_parse_hdrs(struct ethtool_rxnfc *nfc)
 	case SCTP_V4_FLOW:
 		hdrs |= ICE_FLOW_SEG_HDR_SCTP | ICE_FLOW_SEG_HDR_IPV4;
 		break;
+	case GTPU_V4_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_IPV4;
+		break;
+	case GTPC_V4_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPC | ICE_FLOW_SEG_HDR_IPV4;
+		break;
+	case GTPC_TEID_V4_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPC_TEID | ICE_FLOW_SEG_HDR_IPV4;
+		break;
+	case GTPU_EH_V4_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPU_EH | ICE_FLOW_SEG_HDR_IPV4;
+		break;
+	case GTPU_UL_V4_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPU_UP | ICE_FLOW_SEG_HDR_IPV4;
+		break;
+	case GTPU_DL_V4_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPU_DWN | ICE_FLOW_SEG_HDR_IPV4;
+		break;
 	case TCP_V6_FLOW:
 		hdrs |= ICE_FLOW_SEG_HDR_TCP | ICE_FLOW_SEG_HDR_IPV6;
 		break;
@@ -2495,6 +2513,24 @@ static u32 ice_parse_hdrs(struct ethtool_rxnfc *nfc)
 	case SCTP_V6_FLOW:
 		hdrs |= ICE_FLOW_SEG_HDR_SCTP | ICE_FLOW_SEG_HDR_IPV6;
 		break;
+	case GTPU_V6_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_IPV6;
+		break;
+	case GTPC_V6_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPC | ICE_FLOW_SEG_HDR_IPV6;
+		break;
+	case GTPC_TEID_V6_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPC_TEID | ICE_FLOW_SEG_HDR_IPV6;
+		break;
+	case GTPU_EH_V6_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPU_EH | ICE_FLOW_SEG_HDR_IPV6;
+		break;
+	case GTPU_UL_V6_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPU_UP | ICE_FLOW_SEG_HDR_IPV6;
+		break;
+	case GTPU_DL_V6_FLOW:
+		hdrs |= ICE_FLOW_SEG_HDR_GTPU_DWN | ICE_FLOW_SEG_HDR_IPV6;
+		break;
 	default:
 		break;
 	}
@@ -2518,6 +2554,12 @@ static u64 ice_parse_hash_flds(struct ethtool_rxnfc *nfc, bool symm)
 		case TCP_V4_FLOW:
 		case UDP_V4_FLOW:
 		case SCTP_V4_FLOW:
+		case GTPU_V4_FLOW:
+		case GTPC_V4_FLOW:
+		case GTPC_TEID_V4_FLOW:
+		case GTPU_EH_V4_FLOW:
+		case GTPU_UL_V4_FLOW:
+		case GTPU_DL_V4_FLOW:
 			if (nfc->data & RXH_IP_SRC)
 				hfld |= ICE_FLOW_HASH_FLD_IPV4_SA;
 			if (nfc->data & RXH_IP_DST)
@@ -2526,6 +2568,12 @@ static u64 ice_parse_hash_flds(struct ethtool_rxnfc *nfc, bool symm)
 		case TCP_V6_FLOW:
 		case UDP_V6_FLOW:
 		case SCTP_V6_FLOW:
+		case GTPU_V6_FLOW:
+		case GTPC_V6_FLOW:
+		case GTPC_TEID_V6_FLOW:
+		case GTPU_EH_V6_FLOW:
+		case GTPU_UL_V6_FLOW:
+		case GTPU_DL_V6_FLOW:
 			if (nfc->data & RXH_IP_SRC)
 				hfld |= ICE_FLOW_HASH_FLD_IPV6_SA;
 			if (nfc->data & RXH_IP_DST)
@@ -2564,6 +2612,33 @@ static u64 ice_parse_hash_flds(struct ethtool_rxnfc *nfc, bool symm)
 		}
 	}
 
+	if (nfc->data & RXH_GTP_TEID) {
+		switch (nfc->flow_type) {
+		case GTPC_TEID_V4_FLOW:
+		case GTPC_TEID_V6_FLOW:
+			hfld |= ICE_FLOW_HASH_FLD_GTPC_TEID;
+			break;
+		case GTPU_V4_FLOW:
+		case GTPU_V6_FLOW:
+			hfld |= ICE_FLOW_HASH_FLD_GTPU_IP_TEID;
+			break;
+		case GTPU_EH_V4_FLOW:
+		case GTPU_EH_V6_FLOW:
+			hfld |= ICE_FLOW_HASH_FLD_GTPU_EH_TEID;
+			break;
+		case GTPU_UL_V4_FLOW:
+		case GTPU_UL_V6_FLOW:
+			hfld |= ICE_FLOW_HASH_FLD_GTPU_UP_TEID;
+			break;
+		case GTPU_DL_V4_FLOW:
+		case GTPU_DL_V6_FLOW:
+			hfld |= ICE_FLOW_HASH_FLD_GTPU_DWN_TEID;
+			break;
+		default:
+			break;
+		}
+	}
+
 	return hfld;
 }
 
@@ -2676,6 +2751,13 @@ ice_get_rss_hash_opt(struct ice_vsi *vsi, struct ethtool_rxnfc *nfc)
 	    hash_flds & ICE_FLOW_HASH_FLD_UDP_DST_PORT ||
 	    hash_flds & ICE_FLOW_HASH_FLD_SCTP_DST_PORT)
 		nfc->data |= (u64)RXH_L4_B_2_3;
+
+	if (hash_flds & ICE_FLOW_HASH_FLD_GTPC_TEID ||
+	    hash_flds & ICE_FLOW_HASH_FLD_GTPU_IP_TEID ||
+	    hash_flds & ICE_FLOW_HASH_FLD_GTPU_EH_TEID ||
+	    hash_flds & ICE_FLOW_HASH_FLD_GTPU_UP_TEID ||
+	    hash_flds & ICE_FLOW_HASH_FLD_GTPU_DWN_TEID)
+		nfc->data |= (u64)RXH_GTP_TEID;
 }
 
 /**
diff --git a/drivers/net/ethernet/intel/ice/ice_flow.h b/drivers/net/ethernet/intel/ice/ice_flow.h
index ff82915ab497..2fd2e0cb483d 100644
--- a/drivers/net/ethernet/intel/ice/ice_flow.h
+++ b/drivers/net/ethernet/intel/ice/ice_flow.h
@@ -37,13 +37,13 @@
 #define ICE_HASH_SCTP_IPV4	(ICE_FLOW_HASH_IPV4 | ICE_FLOW_HASH_SCTP_PORT)
 #define ICE_HASH_SCTP_IPV6	(ICE_FLOW_HASH_IPV6 | ICE_FLOW_HASH_SCTP_PORT)
 
-#define ICE_FLOW_HASH_GTP_TEID \
+#define ICE_FLOW_HASH_GTP_C_TEID \
 	(BIT_ULL(ICE_FLOW_FIELD_IDX_GTPC_TEID))
 
-#define ICE_FLOW_HASH_GTP_IPV4_TEID \
-	(ICE_FLOW_HASH_IPV4 | ICE_FLOW_HASH_GTP_TEID)
-#define ICE_FLOW_HASH_GTP_IPV6_TEID \
-	(ICE_FLOW_HASH_IPV6 | ICE_FLOW_HASH_GTP_TEID)
+#define ICE_FLOW_HASH_GTP_C_IPV4_TEID \
+	(ICE_FLOW_HASH_IPV4 | ICE_FLOW_HASH_GTP_C_TEID)
+#define ICE_FLOW_HASH_GTP_C_IPV6_TEID \
+	(ICE_FLOW_HASH_IPV6 | ICE_FLOW_HASH_GTP_C_TEID)
 
 #define ICE_FLOW_HASH_GTP_U_TEID \
 	(BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_IP_TEID))
@@ -66,6 +66,20 @@
 	(ICE_FLOW_HASH_IPV6 | ICE_FLOW_HASH_GTP_U_EH_TEID | \
 	 ICE_FLOW_HASH_GTP_U_EH_QFI)
 
+#define ICE_FLOW_HASH_GTP_U_UP \
+	(BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_UP_TEID))
+#define ICE_FLOW_HASH_GTP_U_DWN \
+	(BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_DWN_TEID))
+
+#define ICE_FLOW_HASH_GTP_U_IPV4_UP \
+	(ICE_FLOW_HASH_IPV4 | ICE_FLOW_HASH_GTP_U_UP)
+#define ICE_FLOW_HASH_GTP_U_IPV6_UP \
+	(ICE_FLOW_HASH_IPV6 | ICE_FLOW_HASH_GTP_U_UP)
+#define ICE_FLOW_HASH_GTP_U_IPV4_DWN \
+	(ICE_FLOW_HASH_IPV4 | ICE_FLOW_HASH_GTP_U_DWN)
+#define ICE_FLOW_HASH_GTP_U_IPV6_DWN \
+	(ICE_FLOW_HASH_IPV6 | ICE_FLOW_HASH_GTP_U_DWN)
+
 #define ICE_FLOW_HASH_PPPOE_SESS_ID \
 	(BIT_ULL(ICE_FLOW_FIELD_IDX_PPPOE_SESS_ID))
 
@@ -242,6 +256,13 @@ enum ice_flow_field {
 #define ICE_FLOW_HASH_FLD_SCTP_DST_PORT	\
 	BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)
 
+#define ICE_FLOW_HASH_FLD_GTPC_TEID	BIT_ULL(ICE_FLOW_FIELD_IDX_GTPC_TEID)
+#define ICE_FLOW_HASH_FLD_GTPU_IP_TEID BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_IP_TEID)
+#define ICE_FLOW_HASH_FLD_GTPU_EH_TEID BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_EH_TEID)
+#define ICE_FLOW_HASH_FLD_GTPU_UP_TEID BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_UP_TEID)
+#define ICE_FLOW_HASH_FLD_GTPU_DWN_TEID \
+	BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_DWN_TEID)
+
 /* Flow headers and fields for AVF support */
 enum ice_flow_avf_hdr_field {
 	/* Values 0 - 28 are reserved for future use */
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index 9be724291ef8..3c4282019570 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -1618,6 +1618,25 @@ static const struct ice_rss_hash_cfg default_rss_cfgs[] = {
 	 */
 	{ICE_FLOW_SEG_HDR_SCTP | ICE_FLOW_SEG_HDR_IPV4,
 		ICE_HASH_SCTP_IPV4, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpc4 with input set IPv4 src/dst */
+	{ICE_FLOW_SEG_HDR_GTPC | ICE_FLOW_SEG_HDR_IPV4,
+		ICE_FLOW_HASH_IPV4, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpc4t with input set IPv4 src/dst */
+	{ICE_FLOW_SEG_HDR_GTPC_TEID | ICE_FLOW_SEG_HDR_IPV4,
+		ICE_FLOW_HASH_GTP_C_IPV4_TEID, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpu4 with input set IPv4 src/dst */
+	{ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_IPV4,
+		ICE_FLOW_HASH_GTP_U_IPV4_TEID, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpu4e with input set IPv4 src/dst */
+	{ICE_FLOW_SEG_HDR_GTPU_EH | ICE_FLOW_SEG_HDR_IPV4,
+		ICE_FLOW_HASH_GTP_U_IPV4_EH, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpu4u with input set IPv4 src/dst */
+	{ ICE_FLOW_SEG_HDR_GTPU_UP | ICE_FLOW_SEG_HDR_IPV4,
+		ICE_FLOW_HASH_GTP_U_IPV4_UP, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpu4d with input set IPv4 src/dst */
+	{ICE_FLOW_SEG_HDR_GTPU_DWN | ICE_FLOW_SEG_HDR_IPV4,
+		ICE_FLOW_HASH_GTP_U_IPV4_DWN, ICE_RSS_OUTER_HEADERS, false},
+
 	/* configure RSS for tcp6 with input set IPv6 src/dst, TCP src/dst */
 	{ICE_FLOW_SEG_HDR_TCP | ICE_FLOW_SEG_HDR_IPV6,
 				ICE_HASH_TCP_IPV6,  ICE_RSS_ANY_HEADERS, false},
@@ -1632,6 +1651,24 @@ static const struct ice_rss_hash_cfg default_rss_cfgs[] = {
 	/* configure RSS for IPSEC ESP SPI with input set MAC_IPV4_SPI */
 	{ICE_FLOW_SEG_HDR_ESP,
 		ICE_FLOW_HASH_ESP_SPI, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpc6 with input set IPv6 src/dst */
+	{ICE_FLOW_SEG_HDR_GTPC | ICE_FLOW_SEG_HDR_IPV6,
+		ICE_FLOW_HASH_IPV6, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpc6t with input set IPv6 src/dst */
+	{ICE_FLOW_SEG_HDR_GTPC_TEID | ICE_FLOW_SEG_HDR_IPV6,
+		ICE_FLOW_HASH_GTP_C_IPV6_TEID, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpu6 with input set IPv6 src/dst */
+	{ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_IPV6,
+		ICE_FLOW_HASH_GTP_U_IPV6_TEID, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpu6e with input set IPv6 src/dst */
+	{ICE_FLOW_SEG_HDR_GTPU_EH | ICE_FLOW_SEG_HDR_IPV6,
+		ICE_FLOW_HASH_GTP_U_IPV6_EH, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpu6u with input set IPv6 src/dst */
+	{ ICE_FLOW_SEG_HDR_GTPU_UP | ICE_FLOW_SEG_HDR_IPV6,
+		ICE_FLOW_HASH_GTP_U_IPV6_UP, ICE_RSS_OUTER_HEADERS, false},
+	/* configure RSS for gtpu6d with input set IPv6 src/dst */
+	{ICE_FLOW_SEG_HDR_GTPU_DWN | ICE_FLOW_SEG_HDR_IPV6,
+		ICE_FLOW_HASH_GTP_U_IPV6_DWN, ICE_RSS_OUTER_HEADERS, false},
 };
 
 /**
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
  2024-02-12  2:04 ` Takeru Hayasaka
@ 2024-02-15  8:44   ` Takeru Hayasaka
  -1 siblings, 0 replies; 30+ messages in thread
From: Takeru Hayasaka @ 2024-02-15  8:44 UTC (permalink / raw)
  To: Jesse Brandeburg, Tony Nguyen, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jonathan Corbet
  Cc: intel-wired-lan, netdev, linux-doc, linux-kernel,
	mailhol.vincent, vladimir.oltean, laforge, Marcin Szycik

Hi Jakub-san

As previously advised, the patch has been divided.
I apologize for the inconvenience, but I would appreciate it if you
could take the time to review the patch.
I understand you may be busy, but your confirmation would be greatly
appreciated.

Thanks
Takeru

2024年2月12日(月) 11:04 Takeru Hayasaka <hayatake396@gmail.com>:
>
> This is a patch that enables RSS functionality for GTP packets using ethtool.
>
> A user can include TEID and make RSS work for GTP-U over IPv4 by doing the
> following:`ethtool -N ens3 rx-flow-hash gtpu4 sde`
>
> In addition to gtpu(4|6), we now support gtpc(4|6),gtpc(4|6)t,gtpu(4|6)e,
> gtpu(4|6)u, and gtpu(4|6)d.
>
> gtpc(4|6): Used for GTP-C in IPv4 and IPv6, where the GTP header format does
> not include a TEID.
> gtpc(4|6)t: Used for GTP-C in IPv4 and IPv6, with a GTP header format that
> includes a TEID.
> gtpu(4|6): Used for GTP-U in both IPv4 and IPv6 scenarios.
> gtpu(4|6)e: Used for GTP-U with extended headers in both IPv4 and IPv6.
> gtpu(4|6)u: Used when the PSC (PDU session container) in the GTP-U extended
> header includes Uplink, applicable to both IPv4 and IPv6.
> gtpu(4|6)d: Used when the PSC in the GTP-U extended header includes Downlink,
> for both IPv4 and IPv6.
>
> GTP generates a flow that includes an ID called TEID to identify the tunnel.
> This tunnel is created for each UE (User Equipment).By performing RSS based on
> this flow, it is possible to apply RSS for each communication unit from the UE.
> Without this, RSS would only be effective within the range of IP addresses. For
> instance, the PGW can only perform RSS within the IP range of the SGW.
> Problematic from a load distribution perspective, especially if there's a bias
> in the terminals connected to a particular base station.This case can be
> solved by using this patch.
>
> Signed-off-by: Takeru Hayasaka <hayatake396@gmail.com>
> Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
> ---
> v2->v3: Based on Harald-san's review, I added documentation and comments to
> ethtool.h and ice.rst.
> v3->v4: Based on Marcin-san's review, I added the missing code for GTPC and
> GTPC_TEID, and revised the documentation and comments.
> v4->v5: Based on Marcin-san's review, I fixed rename and wrong code regarding
> GTPC
> v5->v6: Based on Marcin-san's review, Undoing the addition of unnecessary
> blank lines.Minor fixes.
> v6->v7 Based on Jakub-san's review, Split the patch.
> v7->v8: There are no code changes. I've resent the patch, including Marcin-san's
> patch, because PatchWork did not interpret the patch correctly.Simon-san told
> me. Thanks.
>  include/uapi/linux/ethtool.h | 48 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 48 insertions(+)
>
> diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
> index 06ef6b78b7de..11fc18988bc2 100644
> --- a/include/uapi/linux/ethtool.h
> +++ b/include/uapi/linux/ethtool.h
> @@ -2023,6 +2023,53 @@ static inline int ethtool_validate_duplex(__u8 duplex)
>  #define        IPV4_FLOW       0x10    /* hash only */
>  #define        IPV6_FLOW       0x11    /* hash only */
>  #define        ETHER_FLOW      0x12    /* spec only (ether_spec) */
> +
> +/* Used for GTP-U IPv4 and IPv6.
> + * The format of GTP packets only includes
> + * elements such as TEID and GTP version.
> + * It is primarily intended for data communication of the UE.
> + */
> +#define GTPU_V4_FLOW 0x13      /* hash only */
> +#define GTPU_V6_FLOW 0x14      /* hash only */
> +
> +/* Use for GTP-C IPv4 and v6.
> + * The format of these GTP packets does not include TEID.
> + * Primarily expected to be used for communication
> + * to create sessions for UE data communication,
> + * commonly referred to as CSR (Create Session Request).
> + */
> +#define GTPC_V4_FLOW 0x15      /* hash only */
> +#define GTPC_V6_FLOW 0x16      /* hash only */
> +
> +/* Use for GTP-C IPv4 and v6.
> + * Unlike GTPC_V4_FLOW, the format of these GTP packets includes TEID.
> + * After session creation, it becomes this packet.
> + * This is mainly used for requests to realize UE handover.
> + */
> +#define GTPC_TEID_V4_FLOW 0x17 /* hash only */
> +#define GTPC_TEID_V6_FLOW 0x18 /* hash only */
> +
> +/* Use for GTP-U and extended headers for the PSC (PDU Session Container).
> + * The format of these GTP packets includes TEID and QFI.
> + * In 5G communication using UPF (User Plane Function),
> + * data communication with this extended header is performed.
> + */
> +#define GTPU_EH_V4_FLOW 0x19   /* hash only */
> +#define GTPU_EH_V6_FLOW 0x1a   /* hash only */
> +
> +/* Use for GTP-U IPv4 and v6 PSC (PDU Session Container) extended headers.
> + * This differs from GTPU_EH_V(4|6)_FLOW in that it is distinguished by
> + * UL/DL included in the PSC.
> + * There are differences in the data included based on Downlink/Uplink,
> + * and can be used to distinguish packets.
> + * The functions described so far are useful when you want to
> + * handle communication from the mobile network in UPF, PGW, etc.
> + */
> +#define GTPU_UL_V4_FLOW 0x1b   /* hash only */
> +#define GTPU_UL_V6_FLOW 0x1c   /* hash only */
> +#define GTPU_DL_V4_FLOW 0x1d   /* hash only */
> +#define GTPU_DL_V6_FLOW 0x1e   /* hash only */
> +
>  /* Flag to enable additional fields in struct ethtool_rx_flow_spec */
>  #define        FLOW_EXT        0x80000000
>  #define        FLOW_MAC_EXT    0x40000000
> @@ -2037,6 +2084,7 @@ static inline int ethtool_validate_duplex(__u8 duplex)
>  #define        RXH_IP_DST      (1 << 5)
>  #define        RXH_L4_B_0_1    (1 << 6) /* src port in case of TCP/UDP/SCTP */
>  #define        RXH_L4_B_2_3    (1 << 7) /* dst port in case of TCP/UDP/SCTP */
> +#define        RXH_GTP_TEID    (1 << 8) /* teid in case of GTP */
>  #define        RXH_DISCARD     (1 << 31)
>
>  #define        RX_CLS_FLOW_DISC        0xffffffffffffffffULL
> --
> 2.34.1
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
@ 2024-02-15  8:44   ` Takeru Hayasaka
  0 siblings, 0 replies; 30+ messages in thread
From: Takeru Hayasaka @ 2024-02-15  8:44 UTC (permalink / raw)
  To: Jesse Brandeburg, Tony Nguyen, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jonathan Corbet
  Cc: linux-doc, vladimir.oltean, linux-kernel, laforge, Marcin Szycik,
	intel-wired-lan, netdev, mailhol.vincent

Hi Jakub-san

As previously advised, the patch has been divided.
I apologize for the inconvenience, but I would appreciate it if you
could take the time to review the patch.
I understand you may be busy, but your confirmation would be greatly
appreciated.

Thanks
Takeru

2024年2月12日(月) 11:04 Takeru Hayasaka <hayatake396@gmail.com>:
>
> This is a patch that enables RSS functionality for GTP packets using ethtool.
>
> A user can include TEID and make RSS work for GTP-U over IPv4 by doing the
> following:`ethtool -N ens3 rx-flow-hash gtpu4 sde`
>
> In addition to gtpu(4|6), we now support gtpc(4|6),gtpc(4|6)t,gtpu(4|6)e,
> gtpu(4|6)u, and gtpu(4|6)d.
>
> gtpc(4|6): Used for GTP-C in IPv4 and IPv6, where the GTP header format does
> not include a TEID.
> gtpc(4|6)t: Used for GTP-C in IPv4 and IPv6, with a GTP header format that
> includes a TEID.
> gtpu(4|6): Used for GTP-U in both IPv4 and IPv6 scenarios.
> gtpu(4|6)e: Used for GTP-U with extended headers in both IPv4 and IPv6.
> gtpu(4|6)u: Used when the PSC (PDU session container) in the GTP-U extended
> header includes Uplink, applicable to both IPv4 and IPv6.
> gtpu(4|6)d: Used when the PSC in the GTP-U extended header includes Downlink,
> for both IPv4 and IPv6.
>
> GTP generates a flow that includes an ID called TEID to identify the tunnel.
> This tunnel is created for each UE (User Equipment).By performing RSS based on
> this flow, it is possible to apply RSS for each communication unit from the UE.
> Without this, RSS would only be effective within the range of IP addresses. For
> instance, the PGW can only perform RSS within the IP range of the SGW.
> Problematic from a load distribution perspective, especially if there's a bias
> in the terminals connected to a particular base station.This case can be
> solved by using this patch.
>
> Signed-off-by: Takeru Hayasaka <hayatake396@gmail.com>
> Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
> ---
> v2->v3: Based on Harald-san's review, I added documentation and comments to
> ethtool.h and ice.rst.
> v3->v4: Based on Marcin-san's review, I added the missing code for GTPC and
> GTPC_TEID, and revised the documentation and comments.
> v4->v5: Based on Marcin-san's review, I fixed rename and wrong code regarding
> GTPC
> v5->v6: Based on Marcin-san's review, Undoing the addition of unnecessary
> blank lines.Minor fixes.
> v6->v7 Based on Jakub-san's review, Split the patch.
> v7->v8: There are no code changes. I've resent the patch, including Marcin-san's
> patch, because PatchWork did not interpret the patch correctly.Simon-san told
> me. Thanks.
>  include/uapi/linux/ethtool.h | 48 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 48 insertions(+)
>
> diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
> index 06ef6b78b7de..11fc18988bc2 100644
> --- a/include/uapi/linux/ethtool.h
> +++ b/include/uapi/linux/ethtool.h
> @@ -2023,6 +2023,53 @@ static inline int ethtool_validate_duplex(__u8 duplex)
>  #define        IPV4_FLOW       0x10    /* hash only */
>  #define        IPV6_FLOW       0x11    /* hash only */
>  #define        ETHER_FLOW      0x12    /* spec only (ether_spec) */
> +
> +/* Used for GTP-U IPv4 and IPv6.
> + * The format of GTP packets only includes
> + * elements such as TEID and GTP version.
> + * It is primarily intended for data communication of the UE.
> + */
> +#define GTPU_V4_FLOW 0x13      /* hash only */
> +#define GTPU_V6_FLOW 0x14      /* hash only */
> +
> +/* Use for GTP-C IPv4 and v6.
> + * The format of these GTP packets does not include TEID.
> + * Primarily expected to be used for communication
> + * to create sessions for UE data communication,
> + * commonly referred to as CSR (Create Session Request).
> + */
> +#define GTPC_V4_FLOW 0x15      /* hash only */
> +#define GTPC_V6_FLOW 0x16      /* hash only */
> +
> +/* Use for GTP-C IPv4 and v6.
> + * Unlike GTPC_V4_FLOW, the format of these GTP packets includes TEID.
> + * After session creation, it becomes this packet.
> + * This is mainly used for requests to realize UE handover.
> + */
> +#define GTPC_TEID_V4_FLOW 0x17 /* hash only */
> +#define GTPC_TEID_V6_FLOW 0x18 /* hash only */
> +
> +/* Use for GTP-U and extended headers for the PSC (PDU Session Container).
> + * The format of these GTP packets includes TEID and QFI.
> + * In 5G communication using UPF (User Plane Function),
> + * data communication with this extended header is performed.
> + */
> +#define GTPU_EH_V4_FLOW 0x19   /* hash only */
> +#define GTPU_EH_V6_FLOW 0x1a   /* hash only */
> +
> +/* Use for GTP-U IPv4 and v6 PSC (PDU Session Container) extended headers.
> + * This differs from GTPU_EH_V(4|6)_FLOW in that it is distinguished by
> + * UL/DL included in the PSC.
> + * There are differences in the data included based on Downlink/Uplink,
> + * and can be used to distinguish packets.
> + * The functions described so far are useful when you want to
> + * handle communication from the mobile network in UPF, PGW, etc.
> + */
> +#define GTPU_UL_V4_FLOW 0x1b   /* hash only */
> +#define GTPU_UL_V6_FLOW 0x1c   /* hash only */
> +#define GTPU_DL_V4_FLOW 0x1d   /* hash only */
> +#define GTPU_DL_V6_FLOW 0x1e   /* hash only */
> +
>  /* Flag to enable additional fields in struct ethtool_rx_flow_spec */
>  #define        FLOW_EXT        0x80000000
>  #define        FLOW_MAC_EXT    0x40000000
> @@ -2037,6 +2084,7 @@ static inline int ethtool_validate_duplex(__u8 duplex)
>  #define        RXH_IP_DST      (1 << 5)
>  #define        RXH_L4_B_0_1    (1 << 6) /* src port in case of TCP/UDP/SCTP */
>  #define        RXH_L4_B_2_3    (1 << 7) /* dst port in case of TCP/UDP/SCTP */
> +#define        RXH_GTP_TEID    (1 << 8) /* teid in case of GTP */
>  #define        RXH_DISCARD     (1 << 31)
>
>  #define        RX_CLS_FLOW_DISC        0xffffffffffffffffULL
> --
> 2.34.1
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
  2024-02-15  8:44   ` [Intel-wired-lan] " Takeru Hayasaka
@ 2024-02-15 10:26     ` Paolo Abeni
  -1 siblings, 0 replies; 30+ messages in thread
From: Paolo Abeni @ 2024-02-15 10:26 UTC (permalink / raw)
  To: Takeru Hayasaka, Jesse Brandeburg, Tony Nguyen, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Jonathan Corbet
  Cc: linux-doc, vladimir.oltean, linux-kernel, laforge, Marcin Szycik,
	intel-wired-lan, netdev, mailhol.vincent

Hi,

On Thu, 2024-02-15 at 17:44 +0900, Takeru Hayasaka wrote:
> As previously advised, the patch has been divided.
> I apologize for the inconvenience, but I would appreciate it if you
> could take the time to review the patch.
> I understand you may be busy, but your confirmation would be greatly
> appreciated.

The series LGTM. I *think* the series should go first in the intel
tree, so it can be tested on the relevant H/W. @Tony: do you agree?

Thanks,

Paolo


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
@ 2024-02-15 10:26     ` Paolo Abeni
  0 siblings, 0 replies; 30+ messages in thread
From: Paolo Abeni @ 2024-02-15 10:26 UTC (permalink / raw)
  To: Takeru Hayasaka, Jesse Brandeburg, Tony Nguyen, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Jonathan Corbet
  Cc: intel-wired-lan, netdev, linux-doc, linux-kernel,
	mailhol.vincent, vladimir.oltean, laforge, Marcin Szycik

Hi,

On Thu, 2024-02-15 at 17:44 +0900, Takeru Hayasaka wrote:
> As previously advised, the patch has been divided.
> I apologize for the inconvenience, but I would appreciate it if you
> could take the time to review the patch.
> I understand you may be busy, but your confirmation would be greatly
> appreciated.

The series LGTM. I *think* the series should go first in the intel
tree, so it can be tested on the relevant H/W. @Tony: do you agree?

Thanks,

Paolo


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
  2024-02-15 10:26     ` Paolo Abeni
@ 2024-02-15 15:56       ` anthony.l.nguyen
  -1 siblings, 0 replies; 30+ messages in thread
From: anthony.l.nguyen @ 2024-02-15 15:56 UTC (permalink / raw)
  To: Paolo Abeni, Takeru Hayasaka, Jesse Brandeburg, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Jonathan Corbet, intel-wired-lan,
	netdev, linux-doc, linux-kernel, mailhol.vincent,
	vladimir.oltean, laforge, Marcin Szycik



On 2/15/24 2:26 AM, Paolo Abeni <pabeni@redhat.com> wrote:
> Hi,
> 
> On Thu, 2024-02-15 at 17:44 +0900, Takeru Hayasaka wrote:
> > As previously advised, the patch has been divided.
> > I apologize for the inconvenience, but I would appreciate it if you
> > could take the time to review the patch.
> > I understand you may be busy, but your confirmation would be greatly
> > appreciated.
> 
> The series LGTM. I *think* the series should go first in the intel
> tree, so it can be tested on the relevant H/W. @Tony: do you agree?

I agree. I think it would make sense for this to go through IWL.

Thanks,
Tony

> Thanks,
> 
> Paolo
> 
> 

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
@ 2024-02-15 15:56       ` anthony.l.nguyen
  0 siblings, 0 replies; 30+ messages in thread
From: anthony.l.nguyen @ 2024-02-15 15:56 UTC (permalink / raw)
  To: Paolo Abeni, Takeru Hayasaka, Jesse Brandeburg, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Jonathan Corbet, intel-wired-lan,
	netdev, linux-doc, linux-kernel, mailhol.vincent,
	vladimir.oltean, laforge, Marcin Szycik



On 2/15/24 2:26 AM, Paolo Abeni <pabeni@redhat.com> wrote:
> Hi,
> 
> On Thu, 2024-02-15 at 17:44 +0900, Takeru Hayasaka wrote:
> > As previously advised, the patch has been divided.
> > I apologize for the inconvenience, but I would appreciate it if you
> > could take the time to review the patch.
> > I understand you may be busy, but your confirmation would be greatly
> > appreciated.
> 
> The series LGTM. I *think* the series should go first in the intel
> tree, so it can be tested on the relevant H/W. @Tony: do you agree?

I agree. I think it would make sense for this to go through IWL.

Thanks,
Tony

> Thanks,
> 
> Paolo
> 
> 

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
  2024-02-15 15:56       ` anthony.l.nguyen
@ 2024-02-16 14:14         ` Takeru Hayasaka
  -1 siblings, 0 replies; 30+ messages in thread
From: Takeru Hayasaka @ 2024-02-16 14:14 UTC (permalink / raw)
  To: anthony.l.nguyen
  Cc: Jonathan Corbet, netdev, linux-doc, Jesse Brandeburg, laforge,
	linux-kernel, Eric Dumazet, Marcin Szycik, intel-wired-lan,
	vladimir.oltean, Jakub Kicinski, Paolo Abeni, David S. Miller,
	mailhol.vincent

Hi Tony-san and Paolo-san!

> > The series LGTM. I *think* the series should go first in the intel

Thank you both for picking up on the topic!

> I agree. I think it would make sense for this to go through IWL.

I understand. So, it means that it will go through the IWL branch and
then through net-next.
Is there any assistance I can provide to facilitate this process?

Thanks,
Takeru

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
@ 2024-02-16 14:14         ` Takeru Hayasaka
  0 siblings, 0 replies; 30+ messages in thread
From: Takeru Hayasaka @ 2024-02-16 14:14 UTC (permalink / raw)
  To: anthony.l.nguyen
  Cc: Paolo Abeni, Jesse Brandeburg, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Jonathan Corbet, intel-wired-lan, netdev,
	linux-doc, linux-kernel, mailhol.vincent, vladimir.oltean,
	laforge, Marcin Szycik

Hi Tony-san and Paolo-san!

> > The series LGTM. I *think* the series should go first in the intel

Thank you both for picking up on the topic!

> I agree. I think it would make sense for this to go through IWL.

I understand. So, it means that it will go through the IWL branch and
then through net-next.
Is there any assistance I can provide to facilitate this process?

Thanks,
Takeru

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
  2024-02-16 14:14         ` Takeru Hayasaka
@ 2024-02-16 21:14           ` Tony Nguyen
  -1 siblings, 0 replies; 30+ messages in thread
From: Tony Nguyen @ 2024-02-16 21:14 UTC (permalink / raw)
  To: Takeru Hayasaka
  Cc: Paolo Abeni, Jesse Brandeburg, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Jonathan Corbet, intel-wired-lan, netdev,
	linux-doc, linux-kernel, mailhol.vincent, vladimir.oltean,
	laforge, Marcin Szycik

On 2/16/2024 6:14 AM, Takeru Hayasaka wrote:
> Hi Tony-san and Paolo-san!
> 
>>> The series LGTM. I *think* the series should go first in the intel
> 
> Thank you both for picking up on the topic!
> 
>> I agree. I think it would make sense for this to go through IWL.
> 
> I understand. So, it means that it will go through the IWL branch and
> then through net-next.

Yes, it will go through next-queue/dev-queue and then to net-next
https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git/

> Is there any assistance I can provide to facilitate this process?

Everything is good for now. If we have issues or questions we will reach 
out to you.

Thanks,
Tony

> Thanks,
> Takeru

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
@ 2024-02-16 21:14           ` Tony Nguyen
  0 siblings, 0 replies; 30+ messages in thread
From: Tony Nguyen @ 2024-02-16 21:14 UTC (permalink / raw)
  To: Takeru Hayasaka
  Cc: Jonathan Corbet, netdev, linux-doc, Jesse Brandeburg, laforge,
	linux-kernel, Eric Dumazet, Marcin Szycik, intel-wired-lan,
	vladimir.oltean, Jakub Kicinski, Paolo Abeni, David S. Miller,
	mailhol.vincent

On 2/16/2024 6:14 AM, Takeru Hayasaka wrote:
> Hi Tony-san and Paolo-san!
> 
>>> The series LGTM. I *think* the series should go first in the intel
> 
> Thank you both for picking up on the topic!
> 
>> I agree. I think it would make sense for this to go through IWL.
> 
> I understand. So, it means that it will go through the IWL branch and
> then through net-next.

Yes, it will go through next-queue/dev-queue and then to net-next
https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git/

> Is there any assistance I can provide to facilitate this process?

Everything is good for now. If we have issues or questions we will reach 
out to you.

Thanks,
Tony

> Thanks,
> Takeru

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
  2024-02-16 21:14           ` [Intel-wired-lan] " Tony Nguyen
@ 2024-02-17  6:18             ` Takeru Hayasaka
  -1 siblings, 0 replies; 30+ messages in thread
From: Takeru Hayasaka @ 2024-02-17  6:18 UTC (permalink / raw)
  To: Tony Nguyen
  Cc: Paolo Abeni, Jesse Brandeburg, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Jonathan Corbet, intel-wired-lan, netdev,
	linux-doc, linux-kernel, mailhol.vincent, vladimir.oltean,
	laforge, Marcin Szycik

Hi Tony-san

Thanks for your reply!
> Everything is good for now. If we have issues or questions we will reach
> out to you.

Okay. Let me know if there's anything I can help with:)

Thanks
Takeru

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
@ 2024-02-17  6:18             ` Takeru Hayasaka
  0 siblings, 0 replies; 30+ messages in thread
From: Takeru Hayasaka @ 2024-02-17  6:18 UTC (permalink / raw)
  To: Tony Nguyen
  Cc: Jonathan Corbet, netdev, linux-doc, Jesse Brandeburg, laforge,
	linux-kernel, Eric Dumazet, Marcin Szycik, intel-wired-lan,
	vladimir.oltean, Jakub Kicinski, Paolo Abeni, David S. Miller,
	mailhol.vincent

Hi Tony-san

Thanks for your reply!
> Everything is good for now. If we have issues or questions we will reach
> out to you.

Okay. Let me know if there's anything I can help with:)

Thanks
Takeru

^ permalink raw reply	[flat|nested] 30+ messages in thread

* RE: [Intel-wired-lan] [PATCH net-next v8 2/2] ice: Implement RSS settings for GTP using ethtool
  2024-02-12  2:04   ` [Intel-wired-lan] " Takeru Hayasaka
@ 2024-03-01  7:40     ` Pucha, HimasekharX Reddy
  -1 siblings, 0 replies; 30+ messages in thread
From: Pucha, HimasekharX Reddy @ 2024-03-01  7:40 UTC (permalink / raw)
  To: Takeru Hayasaka, Brandeburg, Jesse, Nguyen, Anthony L,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Jonathan Corbet
  Cc: linux-doc, vladimir.oltean, linux-kernel, laforge, Marcin Szycik,
	intel-wired-lan, netdev, mailhol.vincent

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Takeru Hayasaka
> Sent: Monday, February 12, 2024 7:34 AM
> To: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; David S. Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Jonathan Corbet <corbet@lwn.net>
> Cc: linux-doc@vger.kernel.org; vladimir.oltean@nxp.com; linux-kernel@vger.kernel.org; laforge@gnumonks.org; Marcin Szycik <marcin.szycik@linux.intel.com>; intel-wired-lan@lists.osuosl.org; Takeru Hayasaka <hayatake396@gmail.com>; netdev@vger.kernel.org; mailhol.vincent@wanadoo.fr
> Subject: [Intel-wired-lan] [PATCH net-next v8 2/2] ice: Implement RSS settings for GTP using ethtool
>
> Following the addition of new GTP RSS hash options to ethtool.h, this patch
> implements the corresponding RSS settings for GTP packets in the Intel ice
> driver. It enables users to configure RSS for GTP-U and GTP-C traffic over IPv4
> and IPv6, utilizing the newly defined hash options.
>
> The implementation covers the handling of gtpu(4|6), gtpc(4|6), gtpc(4|6)t,
> gtpu(4|6)e, gtpu(4|6)u, and gtpu(4|6)d traffic, providing enhanced load
> distribution for GTP traffic across multiple processing units.
>
> Signed-off-by: Takeru Hayasaka <hayatake396@gmail.com>
> Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
> ---
>  .../device_drivers/ethernet/intel/ice.rst     | 21 ++++-
>  drivers/net/ethernet/intel/ice/ice_ethtool.c  | 82 +++++++++++++++++++
>  drivers/net/ethernet/intel/ice/ice_flow.h     | 31 +++++--
>  drivers/net/ethernet/intel/ice/ice_lib.c      | 37 +++++++++
>  4 files changed, 162 insertions(+), 9 deletions(-)
>

Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [Intel-wired-lan] [PATCH net-next v8 2/2] ice: Implement RSS settings for GTP using ethtool
@ 2024-03-01  7:40     ` Pucha, HimasekharX Reddy
  0 siblings, 0 replies; 30+ messages in thread
From: Pucha, HimasekharX Reddy @ 2024-03-01  7:40 UTC (permalink / raw)
  To: Takeru Hayasaka, Brandeburg, Jesse, Nguyen, Anthony L,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Jonathan Corbet
  Cc: linux-doc, vladimir.oltean, linux-kernel, laforge, Marcin Szycik,
	intel-wired-lan, netdev, mailhol.vincent

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Takeru Hayasaka
> Sent: Monday, February 12, 2024 7:34 AM
> To: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; David S. Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Jonathan Corbet <corbet@lwn.net>
> Cc: linux-doc@vger.kernel.org; vladimir.oltean@nxp.com; linux-kernel@vger.kernel.org; laforge@gnumonks.org; Marcin Szycik <marcin.szycik@linux.intel.com>; intel-wired-lan@lists.osuosl.org; Takeru Hayasaka <hayatake396@gmail.com>; netdev@vger.kernel.org; mailhol.vincent@wanadoo.fr
> Subject: [Intel-wired-lan] [PATCH net-next v8 2/2] ice: Implement RSS settings for GTP using ethtool
>
> Following the addition of new GTP RSS hash options to ethtool.h, this patch
> implements the corresponding RSS settings for GTP packets in the Intel ice
> driver. It enables users to configure RSS for GTP-U and GTP-C traffic over IPv4
> and IPv6, utilizing the newly defined hash options.
>
> The implementation covers the handling of gtpu(4|6), gtpc(4|6), gtpc(4|6)t,
> gtpu(4|6)e, gtpu(4|6)u, and gtpu(4|6)d traffic, providing enhanced load
> distribution for GTP traffic across multiple processing units.
>
> Signed-off-by: Takeru Hayasaka <hayatake396@gmail.com>
> Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
> ---
>  .../device_drivers/ethernet/intel/ice.rst     | 21 ++++-
>  drivers/net/ethernet/intel/ice/ice_ethtool.c  | 82 +++++++++++++++++++
>  drivers/net/ethernet/intel/ice/ice_flow.h     | 31 +++++--
>  drivers/net/ethernet/intel/ice/ice_lib.c      | 37 +++++++++
>  4 files changed, 162 insertions(+), 9 deletions(-)
>

Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
  2024-02-12  2:04 ` Takeru Hayasaka
@ 2024-03-01 18:01   ` Pucha, HimasekharX Reddy
  -1 siblings, 0 replies; 30+ messages in thread
From: Pucha, HimasekharX Reddy @ 2024-03-01 18:01 UTC (permalink / raw)
  To: Takeru Hayasaka, Brandeburg, Jesse, Nguyen, Anthony L,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Jonathan Corbet
  Cc: linux-doc, vladimir.oltean, linux-kernel, laforge, Marcin Szycik,
	intel-wired-lan, netdev, mailhol.vincent

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Takeru Hayasaka
> Sent: Monday, February 12, 2024 7:34 AM
> To: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; David S. Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Jonathan Corbet <corbet@lwn.net>
> Cc: linux-doc@vger.kernel.org; vladimir.oltean@nxp.com; linux-kernel@vger.kernel.org; laforge@gnumonks.org; Marcin Szycik <marcin.szycik@linux.intel.com>; intel-wired-lan@lists.osuosl.org; Takeru Hayasaka <hayatake396@gmail.com>; netdev@vger.kernel.org; mailhol.vincent@wanadoo.fr
> Subject: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
>
> This is a patch that enables RSS functionality for GTP packets using ethtool.
>
>A user can include TEID and make RSS work for GTP-U over IPv4 by doing the
>following:`ethtool -N ens3 rx-flow-hash gtpu4 sde`
>
> In addition to gtpu(4|6), we now support gtpc(4|6),gtpc(4|6)t,gtpu(4|6)e,
> gtpu(4|6)u, and gtpu(4|6)d.
>
> gtpc(4|6): Used for GTP-C in IPv4 and IPv6, where the GTP header format does
> not include a TEID.
> gtpc(4|6)t: Used for GTP-C in IPv4 and IPv6, with a GTP header format that
> includes a TEID.
> gtpu(4|6): Used for GTP-U in both IPv4 and IPv6 scenarios.
> gtpu(4|6)e: Used for GTP-U with extended headers in both IPv4 and IPv6.
> gtpu(4|6)u: Used when the PSC (PDU session container) in the GTP-U extended
> header includes Uplink, applicable to both IPv4 and IPv6.
> gtpu(4|6)d: Used when the PSC in the GTP-U extended header includes Downlink,
> for both IPv4 and IPv6.
>
> GTP generates a flow that includes an ID called TEID to identify the tunnel.
> This tunnel is created for each UE (User Equipment).By performing RSS based on
> this flow, it is possible to apply RSS for each communication unit from the UE.
> Without this, RSS would only be effective within the range of IP addresses. For
> instance, the PGW can only perform RSS within the IP range of the SGW.
> Problematic from a load distribution perspective, especially if there's a bias
> in the terminals connected to a particular base station.This case can be
> solved by using this patch.
>
> Signed-off-by: Takeru Hayasaka <hayatake396@gmail.com>
> Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
> ---
> v2->v3: Based on Harald-san's review, I added documentation and comments to
> ethtool.h and ice.rst.
> v3->v4: Based on Marcin-san's review, I added the missing code for GTPC and
> GTPC_TEID, and revised the documentation and comments.
> v4->v5: Based on Marcin-san's review, I fixed rename and wrong code regarding
> GTPC
> v5->v6: Based on Marcin-san's review, Undoing the addition of unnecessary
> blank lines.Minor fixes.
> v6->v7 Based on Jakub-san's review, Split the patch.
> v7->v8: There are no code changes. I've resent the patch, including Marcin-san's
> patch, because PatchWork did not interpret the patch correctly.Simon-san told
> me. Thanks.
 > include/uapi/linux/ethtool.h | 48 ++++++++++++++++++++++++++++++++++++
 > 1 file changed, 48 insertions(+)
>

Hi Takeru Hayasaka,

Functionality wise its working fine. But the ethtool part (tab complete doesn't show GTP) 

Please find below logs.

[root@os-delivery ~]# ethtool -N eth4 rx-flow-hash
ah4    ah6    esp4   esp6   ether  sctp4  sctp6  tcp4   tcp6   udp4   udp6
[root@os-delivery ~]# ethtool -N eth4 rx-flow-hash
ah4    ah6    esp4   esp6   ether  sctp4  sctp6  tcp4   tcp6   udp4   udp6
[root@os-delivery ~]# ethtool -N eth4 rx-flow-hash gtpu6e sdfn
[root@os-delivery ~]# ethtool -N eth4 rx-flow-hash gtpu6u sdfn
[root@os-delivery ~]# ethtool -N eth4 rx-flow-hash gtpu4u sdfn
[root@os-delivery ~]# ethtool -N eth4 rx-flow-hash gtpu4d sdfn
[root@os-delivery ~]# ethtool -N eth4 rx-flow-hash gtpu6d sdfn



^ permalink raw reply	[flat|nested] 30+ messages in thread

* RE: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
@ 2024-03-01 18:01   ` Pucha, HimasekharX Reddy
  0 siblings, 0 replies; 30+ messages in thread
From: Pucha, HimasekharX Reddy @ 2024-03-01 18:01 UTC (permalink / raw)
  To: Takeru Hayasaka, Brandeburg, Jesse, Nguyen, Anthony L,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Jonathan Corbet
  Cc: linux-doc, vladimir.oltean, linux-kernel, laforge, Marcin Szycik,
	intel-wired-lan, netdev, mailhol.vincent

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Takeru Hayasaka
> Sent: Monday, February 12, 2024 7:34 AM
> To: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; David S. Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Jonathan Corbet <corbet@lwn.net>
> Cc: linux-doc@vger.kernel.org; vladimir.oltean@nxp.com; linux-kernel@vger.kernel.org; laforge@gnumonks.org; Marcin Szycik <marcin.szycik@linux.intel.com>; intel-wired-lan@lists.osuosl.org; Takeru Hayasaka <hayatake396@gmail.com>; netdev@vger.kernel.org; mailhol.vincent@wanadoo.fr
> Subject: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
>
> This is a patch that enables RSS functionality for GTP packets using ethtool.
>
>A user can include TEID and make RSS work for GTP-U over IPv4 by doing the
>following:`ethtool -N ens3 rx-flow-hash gtpu4 sde`
>
> In addition to gtpu(4|6), we now support gtpc(4|6),gtpc(4|6)t,gtpu(4|6)e,
> gtpu(4|6)u, and gtpu(4|6)d.
>
> gtpc(4|6): Used for GTP-C in IPv4 and IPv6, where the GTP header format does
> not include a TEID.
> gtpc(4|6)t: Used for GTP-C in IPv4 and IPv6, with a GTP header format that
> includes a TEID.
> gtpu(4|6): Used for GTP-U in both IPv4 and IPv6 scenarios.
> gtpu(4|6)e: Used for GTP-U with extended headers in both IPv4 and IPv6.
> gtpu(4|6)u: Used when the PSC (PDU session container) in the GTP-U extended
> header includes Uplink, applicable to both IPv4 and IPv6.
> gtpu(4|6)d: Used when the PSC in the GTP-U extended header includes Downlink,
> for both IPv4 and IPv6.
>
> GTP generates a flow that includes an ID called TEID to identify the tunnel.
> This tunnel is created for each UE (User Equipment).By performing RSS based on
> this flow, it is possible to apply RSS for each communication unit from the UE.
> Without this, RSS would only be effective within the range of IP addresses. For
> instance, the PGW can only perform RSS within the IP range of the SGW.
> Problematic from a load distribution perspective, especially if there's a bias
> in the terminals connected to a particular base station.This case can be
> solved by using this patch.
>
> Signed-off-by: Takeru Hayasaka <hayatake396@gmail.com>
> Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
> ---
> v2->v3: Based on Harald-san's review, I added documentation and comments to
> ethtool.h and ice.rst.
> v3->v4: Based on Marcin-san's review, I added the missing code for GTPC and
> GTPC_TEID, and revised the documentation and comments.
> v4->v5: Based on Marcin-san's review, I fixed rename and wrong code regarding
> GTPC
> v5->v6: Based on Marcin-san's review, Undoing the addition of unnecessary
> blank lines.Minor fixes.
> v6->v7 Based on Jakub-san's review, Split the patch.
> v7->v8: There are no code changes. I've resent the patch, including Marcin-san's
> patch, because PatchWork did not interpret the patch correctly.Simon-san told
> me. Thanks.
 > include/uapi/linux/ethtool.h | 48 ++++++++++++++++++++++++++++++++++++
 > 1 file changed, 48 insertions(+)
>

Hi Takeru Hayasaka,

Functionality wise its working fine. But the ethtool part (tab complete doesn't show GTP) 

Please find below logs.

[root@os-delivery ~]# ethtool -N eth4 rx-flow-hash
ah4    ah6    esp4   esp6   ether  sctp4  sctp6  tcp4   tcp6   udp4   udp6
[root@os-delivery ~]# ethtool -N eth4 rx-flow-hash
ah4    ah6    esp4   esp6   ether  sctp4  sctp6  tcp4   tcp6   udp4   udp6
[root@os-delivery ~]# ethtool -N eth4 rx-flow-hash gtpu6e sdfn
[root@os-delivery ~]# ethtool -N eth4 rx-flow-hash gtpu6u sdfn
[root@os-delivery ~]# ethtool -N eth4 rx-flow-hash gtpu4u sdfn
[root@os-delivery ~]# ethtool -N eth4 rx-flow-hash gtpu4d sdfn
[root@os-delivery ~]# ethtool -N eth4 rx-flow-hash gtpu6d sdfn



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
  2024-03-01 18:01   ` Pucha, HimasekharX Reddy
@ 2024-03-05  3:42     ` Takeru Hayasaka
  -1 siblings, 0 replies; 30+ messages in thread
From: Takeru Hayasaka @ 2024-03-05  3:42 UTC (permalink / raw)
  To: Pucha, HimasekharX Reddy
  Cc: Brandeburg, Jesse, Nguyen, Anthony L, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Jonathan Corbet,
	linux-doc, vladimir.oltean, linux-kernel, laforge, Marcin Szycik,
	intel-wired-lan, netdev, mailhol.vincent

Hi Himasekhar Reddy-san

> Functionality wise its working fine. But the ethtool part (tab complete doesn't show GTP)

I forgot to add the tab completion feature! Thank you for the good
points. I've added it again in this version's patch.
https://lore.kernel.org/all/20240305033555.524741-1-hayatake396@gmail.com/

Takeru

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
@ 2024-03-05  3:42     ` Takeru Hayasaka
  0 siblings, 0 replies; 30+ messages in thread
From: Takeru Hayasaka @ 2024-03-05  3:42 UTC (permalink / raw)
  To: Pucha, HimasekharX Reddy
  Cc: Jonathan Corbet, vladimir.oltean, linux-doc, laforge,
	linux-kernel, Eric Dumazet, Marcin Szycik, Nguyen, Anthony L,
	intel-wired-lan, Jakub Kicinski, netdev, Paolo Abeni,
	David S. Miller, mailhol.vincent

Hi Himasekhar Reddy-san

> Functionality wise its working fine. But the ethtool part (tab complete doesn't show GTP)

I forgot to add the tab completion feature! Thank you for the good
points. I've added it again in this version's patch.
https://lore.kernel.org/all/20240305033555.524741-1-hayatake396@gmail.com/

Takeru

^ permalink raw reply	[flat|nested] 30+ messages in thread

* RE: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
  2024-03-05  3:42     ` Takeru Hayasaka
@ 2024-03-05  4:28       ` Pucha, HimasekharX Reddy
  -1 siblings, 0 replies; 30+ messages in thread
From: Pucha, HimasekharX Reddy @ 2024-03-05  4:28 UTC (permalink / raw)
  To: Takeru Hayasaka
  Cc: Brandeburg, Jesse, Nguyen, Anthony L, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Jonathan Corbet,
	linux-doc, vladimir.oltean, linux-kernel, laforge, Marcin Szycik,
	intel-wired-lan, netdev, mailhol.vincent

>-----Original Message-----
> From: Takeru Hayasaka <hayatake396@gmail.com> 
> Sent: Tuesday, March 5, 2024 9:12 AM
> To: Pucha, HimasekharX Reddy <himasekharx.reddy.pucha@intel.com>
> Cc: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; David S. Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Jonathan Corbet <corbet@lwn.net>; linux-doc@vger.kernel.org; vladimir.oltean@nxp.com; linux-kernel@vger.kernel.org; laforge@gnumonks.org; Marcin Szycik <marcin.szycik@linux.intel.com>; intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; mailhol.vincent@wanadoo.fr
> Subject: Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
>
> Hi Himasekhar Reddy-san
>
> > Functionality wise its working fine. But the ethtool part (tab complete doesn't show GTP)
>
> I forgot to add the tab completion feature! Thank you for the good
> points. I've added it again in this version's patch.
> https://lore.kernel.org/all/20240305033555.524741-1-hayatake396@gmail.com/
>
> Takeru
>

After added the above v4 patch able to to see tab completion for flow-type but not rx-flow-hash. Please find below logs.

# ethtool -N eth4 rx-flow-hash
ah4    ah6    esp4   esp6   ether  sctp4  sctp6  tcp4   tcp6   udp4   udp6
# ethtool -N eth4 rx-flow-hash
ah4    ah6    esp4   esp6   ether  sctp4  sctp6  tcp4   tcp6   udp4   udp6
# ethtool -N eth4 flow-type
ah4     esp4    ether   gtpc4t  gtpc6t  gtpu4d  gtpu4u  gtpu6d  gtpu6u  ip6     sctp6   tcp6    udp6
ah6     esp6    gtpc4   gtpc6   gtpu4   gtpu4e  gtpu6   gtpu6e  ip4     sctp4   tcp4    udp4


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
@ 2024-03-05  4:28       ` Pucha, HimasekharX Reddy
  0 siblings, 0 replies; 30+ messages in thread
From: Pucha, HimasekharX Reddy @ 2024-03-05  4:28 UTC (permalink / raw)
  To: Takeru Hayasaka
  Cc: Jonathan Corbet, vladimir.oltean, linux-doc, laforge,
	linux-kernel, Eric Dumazet, Marcin Szycik, Nguyen, Anthony L,
	intel-wired-lan, Jakub Kicinski, netdev, Paolo Abeni,
	David S. Miller, mailhol.vincent

>-----Original Message-----
> From: Takeru Hayasaka <hayatake396@gmail.com> 
> Sent: Tuesday, March 5, 2024 9:12 AM
> To: Pucha, HimasekharX Reddy <himasekharx.reddy.pucha@intel.com>
> Cc: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; David S. Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Jonathan Corbet <corbet@lwn.net>; linux-doc@vger.kernel.org; vladimir.oltean@nxp.com; linux-kernel@vger.kernel.org; laforge@gnumonks.org; Marcin Szycik <marcin.szycik@linux.intel.com>; intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; mailhol.vincent@wanadoo.fr
> Subject: Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
>
> Hi Himasekhar Reddy-san
>
> > Functionality wise its working fine. But the ethtool part (tab complete doesn't show GTP)
>
> I forgot to add the tab completion feature! Thank you for the good
> points. I've added it again in this version's patch.
> https://lore.kernel.org/all/20240305033555.524741-1-hayatake396@gmail.com/
>
> Takeru
>

After added the above v4 patch able to to see tab completion for flow-type but not rx-flow-hash. Please find below logs.

# ethtool -N eth4 rx-flow-hash
ah4    ah6    esp4   esp6   ether  sctp4  sctp6  tcp4   tcp6   udp4   udp6
# ethtool -N eth4 rx-flow-hash
ah4    ah6    esp4   esp6   ether  sctp4  sctp6  tcp4   tcp6   udp4   udp6
# ethtool -N eth4 flow-type
ah4     esp4    ether   gtpc4t  gtpc6t  gtpu4d  gtpu4u  gtpu6d  gtpu6u  ip6     sctp6   tcp6    udp6
ah6     esp6    gtpc4   gtpc6   gtpu4   gtpu4e  gtpu6   gtpu6e  ip4     sctp4   tcp4    udp4


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
  2024-03-05  4:28       ` Pucha, HimasekharX Reddy
@ 2024-03-05  7:47         ` Takeru Hayasaka
  -1 siblings, 0 replies; 30+ messages in thread
From: Takeru Hayasaka @ 2024-03-05  7:47 UTC (permalink / raw)
  To: Pucha, HimasekharX Reddy
  Cc: Brandeburg, Jesse, Nguyen, Anthony L, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Jonathan Corbet,
	linux-doc, vladimir.oltean, linux-kernel, laforge, Marcin Szycik,
	intel-wired-lan, netdev, mailhol.vincent

Hi Himasekhar Reddy-san

> After added the above v4 patch able to to see tab completion for flow-type but not rx-flow-hash. Please find below logs.

Sorry. I submitted a code with the conditions reversed. I have
resubmitted it, so could you please check it again?
https://lore.kernel.org/all/20240305074350.533622-1-hayatake396@gmail.com/

Takeru

2024年3月5日(火) 13:28 Pucha, HimasekharX Reddy <himasekharx.reddy.pucha@intel.com>:
>
> >-----Original Message-----
> > From: Takeru Hayasaka <hayatake396@gmail.com>
> > Sent: Tuesday, March 5, 2024 9:12 AM
> > To: Pucha, HimasekharX Reddy <himasekharx.reddy.pucha@intel.com>
> > Cc: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; David S. Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Jonathan Corbet <corbet@lwn.net>; linux-doc@vger.kernel.org; vladimir.oltean@nxp.com; linux-kernel@vger.kernel.org; laforge@gnumonks.org; Marcin Szycik <marcin.szycik@linux.intel.com>; intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; mailhol.vincent@wanadoo.fr
> > Subject: Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
> >
> > Hi Himasekhar Reddy-san
> >
> > > Functionality wise its working fine. But the ethtool part (tab complete doesn't show GTP)
> >
> > I forgot to add the tab completion feature! Thank you for the good
> > points. I've added it again in this version's patch.
> > https://lore.kernel.org/all/20240305033555.524741-1-hayatake396@gmail.com/
> >
> > Takeru
> >
>
> After added the above v4 patch able to to see tab completion for flow-type but not rx-flow-hash. Please find below logs.
>
> # ethtool -N eth4 rx-flow-hash
> ah4    ah6    esp4   esp6   ether  sctp4  sctp6  tcp4   tcp6   udp4   udp6
> # ethtool -N eth4 rx-flow-hash
> ah4    ah6    esp4   esp6   ether  sctp4  sctp6  tcp4   tcp6   udp4   udp6
> # ethtool -N eth4 flow-type
> ah4     esp4    ether   gtpc4t  gtpc6t  gtpu4d  gtpu4u  gtpu6d  gtpu6u  ip6     sctp6   tcp6    udp6
> ah6     esp6    gtpc4   gtpc6   gtpu4   gtpu4e  gtpu6   gtpu6e  ip4     sctp4   tcp4    udp4
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
@ 2024-03-05  7:47         ` Takeru Hayasaka
  0 siblings, 0 replies; 30+ messages in thread
From: Takeru Hayasaka @ 2024-03-05  7:47 UTC (permalink / raw)
  To: Pucha, HimasekharX Reddy
  Cc: Jonathan Corbet, vladimir.oltean, linux-doc, laforge,
	linux-kernel, Eric Dumazet, Marcin Szycik, Nguyen, Anthony L,
	intel-wired-lan, Jakub Kicinski, netdev, Paolo Abeni,
	David S. Miller, mailhol.vincent

Hi Himasekhar Reddy-san

> After added the above v4 patch able to to see tab completion for flow-type but not rx-flow-hash. Please find below logs.

Sorry. I submitted a code with the conditions reversed. I have
resubmitted it, so could you please check it again?
https://lore.kernel.org/all/20240305074350.533622-1-hayatake396@gmail.com/

Takeru

2024年3月5日(火) 13:28 Pucha, HimasekharX Reddy <himasekharx.reddy.pucha@intel.com>:
>
> >-----Original Message-----
> > From: Takeru Hayasaka <hayatake396@gmail.com>
> > Sent: Tuesday, March 5, 2024 9:12 AM
> > To: Pucha, HimasekharX Reddy <himasekharx.reddy.pucha@intel.com>
> > Cc: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; David S. Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Jonathan Corbet <corbet@lwn.net>; linux-doc@vger.kernel.org; vladimir.oltean@nxp.com; linux-kernel@vger.kernel.org; laforge@gnumonks.org; Marcin Szycik <marcin.szycik@linux.intel.com>; intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; mailhol.vincent@wanadoo.fr
> > Subject: Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
> >
> > Hi Himasekhar Reddy-san
> >
> > > Functionality wise its working fine. But the ethtool part (tab complete doesn't show GTP)
> >
> > I forgot to add the tab completion feature! Thank you for the good
> > points. I've added it again in this version's patch.
> > https://lore.kernel.org/all/20240305033555.524741-1-hayatake396@gmail.com/
> >
> > Takeru
> >
>
> After added the above v4 patch able to to see tab completion for flow-type but not rx-flow-hash. Please find below logs.
>
> # ethtool -N eth4 rx-flow-hash
> ah4    ah6    esp4   esp6   ether  sctp4  sctp6  tcp4   tcp6   udp4   udp6
> # ethtool -N eth4 rx-flow-hash
> ah4    ah6    esp4   esp6   ether  sctp4  sctp6  tcp4   tcp6   udp4   udp6
> # ethtool -N eth4 flow-type
> ah4     esp4    ether   gtpc4t  gtpc6t  gtpu4d  gtpu4u  gtpu6d  gtpu6u  ip6     sctp6   tcp6    udp6
> ah6     esp6    gtpc4   gtpc6   gtpu4   gtpu4e  gtpu6   gtpu6e  ip4     sctp4   tcp4    udp4
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* RE: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
  2024-03-05  7:47         ` Takeru Hayasaka
@ 2024-03-05  9:31           ` Pucha, HimasekharX Reddy
  -1 siblings, 0 replies; 30+ messages in thread
From: Pucha, HimasekharX Reddy @ 2024-03-05  9:31 UTC (permalink / raw)
  To: Takeru Hayasaka
  Cc: Brandeburg, Jesse, Nguyen, Anthony L, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Jonathan Corbet,
	linux-doc, vladimir.oltean, linux-kernel, laforge, Marcin Szycik,
	intel-wired-lan, netdev, mailhol.vincent

>-----Original Message-----
> From: Takeru Hayasaka <hayatake396@gmail.com> 
> Sent: Tuesday, March 5, 2024 1:18 PM
> To: Pucha, HimasekharX Reddy <himasekharx.reddy.pucha@intel.com>
> Cc: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; David S. Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Jonathan Corbet <corbet@lwn.net>; linux-doc@vger.kernel.org; vladimir.oltean@nxp.com; linux-kernel@vger.kernel.org; laforge@gnumonks.org; Marcin Szycik <marcin.szycik@linux.intel.com>; intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; mailhol.vincent@wanadoo.fr
> Subject: Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
>
> Hi Himasekhar Reddy-san
>
> > After added the above v4 patch able to to see tab completion for flow-type but not rx-flow-hash. Please find below logs.
>
> Sorry. I submitted a code with the conditions reversed. I have
> resubmitted it, so could you please check it again?
> https://lore.kernel.org/all/20240305074350.533622-1-hayatake396@gmail.com/
>
> Takeru
>
Hi Takeru,

Its working fine with V5 patch.

# ./ethtool -N eth4 flow-type
ah4    ah6    esp4   esp6   ether  ip4    ip6    sctp4  sctp6  tcp4   tcp6   udp4   udp6
# ./ethtool -N eth4 rx-flow-hash
ah4     esp4    ether   gtpc4t  gtpc6t  gtpu4d  gtpu4u  gtpu6d  gtpu6u  sctp6   tcp6    udp6
ah6     esp6    gtpc4   gtpc6   gtpu4   gtpu4e  gtpu6   gtpu6e  sctp4   tcp4    udp4
# ./ethtool -N eth4 rx-flow-hash gtpc6t
d  e  f  m  n  r  s  t  v
# ./ethtool -N eth4 rx-flow-hash gtpc6t
d  e  f  m  n  r  s  t  v
# ./ethtool -N eth4 rx-flow-hash gtpc6t sde
# ./ethtool -N eth4 rx-flow-hash gtpc6t stv


> 2024年3月5日(火) 13:28 Pucha, HimasekharX Reddy <himasekharx.reddy.pucha@intel.com>:
>
> >-----Original Message-----
> > From: Takeru Hayasaka <hayatake396@gmail.com>
> > Sent: Tuesday, March 5, 2024 9:12 AM
> > To: Pucha, HimasekharX Reddy <himasekharx.reddy.pucha@intel.com>
> > Cc: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; David S. Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Jonathan Corbet <corbet@lwn.net>; linux-doc@vger.kernel.org; vladimir.oltean@nxp.com; linux-kernel@vger.kernel.org; laforge@gnumonks.org; Marcin Szycik <marcin.szycik@linux.intel.com>; intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; mailhol.vincent@wanadoo.fr
> > Subject: Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
> >
> > Hi Himasekhar Reddy-san
> >
> > > Functionality wise its working fine. But the ethtool part (tab complete doesn't show GTP)
> >
> > I forgot to add the tab completion feature! Thank you for the good
> > points. I've added it again in this version's patch.
> > https://lore.kernel.org/all/20240305033555.524741-1-hayatake396@gmail.com/
> >
> > Takeru
> >
>
> After added the above v4 patch able to to see tab completion for flow-type but not rx-flow-hash. Please find below logs.
>
> # ethtool -N eth4 rx-flow-hash
> ah4    ah6    esp4   esp6   ether  sctp4  sctp6  tcp4   tcp6   udp4   udp6
> # ethtool -N eth4 rx-flow-hash
> ah4    ah6    esp4   esp6   ether  sctp4  sctp6  tcp4   tcp6   udp4   udp6
> # ethtool -N eth4 flow-type
> ah4     esp4    ether   gtpc4t  gtpc6t  gtpu4d  gtpu4u  gtpu6d  gtpu6u  ip6     sctp6   tcp6    udp6
> ah6     esp6    gtpc4   gtpc6   gtpu4   gtpu4e  gtpu6   gtpu6e  ip4     sctp4   tcp4    udp4
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
@ 2024-03-05  9:31           ` Pucha, HimasekharX Reddy
  0 siblings, 0 replies; 30+ messages in thread
From: Pucha, HimasekharX Reddy @ 2024-03-05  9:31 UTC (permalink / raw)
  To: Takeru Hayasaka
  Cc: Jonathan Corbet, vladimir.oltean, linux-doc, laforge,
	linux-kernel, Eric Dumazet, Marcin Szycik, Nguyen, Anthony L,
	intel-wired-lan, Jakub Kicinski, netdev, Paolo Abeni,
	David S. Miller, mailhol.vincent

>-----Original Message-----
> From: Takeru Hayasaka <hayatake396@gmail.com> 
> Sent: Tuesday, March 5, 2024 1:18 PM
> To: Pucha, HimasekharX Reddy <himasekharx.reddy.pucha@intel.com>
> Cc: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; David S. Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Jonathan Corbet <corbet@lwn.net>; linux-doc@vger.kernel.org; vladimir.oltean@nxp.com; linux-kernel@vger.kernel.org; laforge@gnumonks.org; Marcin Szycik <marcin.szycik@linux.intel.com>; intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; mailhol.vincent@wanadoo.fr
> Subject: Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
>
> Hi Himasekhar Reddy-san
>
> > After added the above v4 patch able to to see tab completion for flow-type but not rx-flow-hash. Please find below logs.
>
> Sorry. I submitted a code with the conditions reversed. I have
> resubmitted it, so could you please check it again?
> https://lore.kernel.org/all/20240305074350.533622-1-hayatake396@gmail.com/
>
> Takeru
>
Hi Takeru,

Its working fine with V5 patch.

# ./ethtool -N eth4 flow-type
ah4    ah6    esp4   esp6   ether  ip4    ip6    sctp4  sctp6  tcp4   tcp6   udp4   udp6
# ./ethtool -N eth4 rx-flow-hash
ah4     esp4    ether   gtpc4t  gtpc6t  gtpu4d  gtpu4u  gtpu6d  gtpu6u  sctp6   tcp6    udp6
ah6     esp6    gtpc4   gtpc6   gtpu4   gtpu4e  gtpu6   gtpu6e  sctp4   tcp4    udp4
# ./ethtool -N eth4 rx-flow-hash gtpc6t
d  e  f  m  n  r  s  t  v
# ./ethtool -N eth4 rx-flow-hash gtpc6t
d  e  f  m  n  r  s  t  v
# ./ethtool -N eth4 rx-flow-hash gtpc6t sde
# ./ethtool -N eth4 rx-flow-hash gtpc6t stv


> 2024年3月5日(火) 13:28 Pucha, HimasekharX Reddy <himasekharx.reddy.pucha@intel.com>:
>
> >-----Original Message-----
> > From: Takeru Hayasaka <hayatake396@gmail.com>
> > Sent: Tuesday, March 5, 2024 9:12 AM
> > To: Pucha, HimasekharX Reddy <himasekharx.reddy.pucha@intel.com>
> > Cc: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; David S. Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Jonathan Corbet <corbet@lwn.net>; linux-doc@vger.kernel.org; vladimir.oltean@nxp.com; linux-kernel@vger.kernel.org; laforge@gnumonks.org; Marcin Szycik <marcin.szycik@linux.intel.com>; intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; mailhol.vincent@wanadoo.fr
> > Subject: Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
> >
> > Hi Himasekhar Reddy-san
> >
> > > Functionality wise its working fine. But the ethtool part (tab complete doesn't show GTP)
> >
> > I forgot to add the tab completion feature! Thank you for the good
> > points. I've added it again in this version's patch.
> > https://lore.kernel.org/all/20240305033555.524741-1-hayatake396@gmail.com/
> >
> > Takeru
> >
>
> After added the above v4 patch able to to see tab completion for flow-type but not rx-flow-hash. Please find below logs.
>
> # ethtool -N eth4 rx-flow-hash
> ah4    ah6    esp4   esp6   ether  sctp4  sctp6  tcp4   tcp6   udp4   udp6
> # ethtool -N eth4 rx-flow-hash
> ah4    ah6    esp4   esp6   ether  sctp4  sctp6  tcp4   tcp6   udp4   udp6
> # ethtool -N eth4 flow-type
> ah4     esp4    ether   gtpc4t  gtpc6t  gtpu4d  gtpu4u  gtpu6d  gtpu6u  ip6     sctp6   tcp6    udp6
> ah6     esp6    gtpc4   gtpc6   gtpu4   gtpu4e  gtpu6   gtpu6e  ip4     sctp4   tcp4    udp4
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* RE: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
  2024-02-12  2:04 ` Takeru Hayasaka
@ 2024-03-05 14:49   ` Pucha, HimasekharX Reddy
  -1 siblings, 0 replies; 30+ messages in thread
From: Pucha, HimasekharX Reddy @ 2024-03-05 14:49 UTC (permalink / raw)
  To: Takeru Hayasaka, Brandeburg, Jesse, Nguyen, Anthony L,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Jonathan Corbet
  Cc: linux-doc, vladimir.oltean, linux-kernel, laforge, Marcin Szycik,
	intel-wired-lan, netdev, mailhol.vincent

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Takeru Hayasaka
> Sent: Monday, February 12, 2024 7:34 AM
> To: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; David S. Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Jonathan Corbet <corbet@lwn.net>
> Cc: linux-doc@vger.kernel.org; vladimir.oltean@nxp.com; linux-kernel@vger.kernel.org; laforge@gnumonks.org; Marcin Szycik <marcin.szycik@linux.intel.com>; intel-wired-lan@lists.osuosl.org; Takeru Hayasaka <hayatake396@gmail.com>; netdev@vger.kernel.org; mailhol.vincent@wanadoo.fr
> Subject: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
>
> This is a patch that enables RSS functionality for GTP packets using ethtool.
>
> A user can include TEID and make RSS work for GTP-U over IPv4 by doing the
> following:`ethtool -N ens3 rx-flow-hash gtpu4 sde`
>
> In addition to gtpu(4|6), we now support gtpc(4|6),gtpc(4|6)t,gtpu(4|6)e,
> gtpu(4|6)u, and gtpu(4|6)d.
>
> gtpc(4|6): Used for GTP-C in IPv4 and IPv6, where the GTP header format does
> not include a TEID.
> gtpc(4|6)t: Used for GTP-C in IPv4 and IPv6, with a GTP header format that
> includes a TEID.
> gtpu(4|6): Used for GTP-U in both IPv4 and IPv6 scenarios.
> gtpu(4|6)e: Used for GTP-U with extended headers in both IPv4 and IPv6.
> gtpu(4|6)u: Used when the PSC (PDU session container) in the GTP-U extended
> header includes Uplink, applicable to both IPv4 and IPv6.
> gtpu(4|6)d: Used when the PSC in the GTP-U extended header includes Downlink,
> for both IPv4 and IPv6.
>
> GTP generates a flow that includes an ID called TEID to identify the tunnel.
> This tunnel is created for each UE (User Equipment).By performing RSS based on
> this flow, it is possible to apply RSS for each communication unit from the UE.
> Without this, RSS would only be effective within the range of IP addresses. For
> instance, the PGW can only perform RSS within the IP range of the SGW.
> Problematic from a load distribution perspective, especially if there's a bias
> in the terminals connected to a particular base station.This case can be
> solved by using this patch.
>
> Signed-off-by: Takeru Hayasaka <hayatake396@gmail.com>
> Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
> ---
> v2->v3: Based on Harald-san's review, I added documentation and comments to
> ethtool.h and ice.rst.
> v3->v4: Based on Marcin-san's review, I added the missing code for GTPC and
> GTPC_TEID, and revised the documentation and comments.
> v4->v5: Based on Marcin-san's review, I fixed rename and wrong code regarding
> GTPC
> v5->v6: Based on Marcin-san's review, Undoing the addition of unnecessary
> blank lines.Minor fixes.
> v6->v7 Based on Jakub-san's review, Split the patch.
> v7->v8: There are no code changes. I've resent the patch, including Marcin-san's
> patch, because PatchWork did not interpret the patch correctly.Simon-san told
> me. Thanks.
> include/uapi/linux/ethtool.h | 48 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 48 insertions(+)
>

Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
@ 2024-03-05 14:49   ` Pucha, HimasekharX Reddy
  0 siblings, 0 replies; 30+ messages in thread
From: Pucha, HimasekharX Reddy @ 2024-03-05 14:49 UTC (permalink / raw)
  To: Takeru Hayasaka, Brandeburg, Jesse, Nguyen, Anthony L,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Jonathan Corbet
  Cc: linux-doc, vladimir.oltean, linux-kernel, laforge, Marcin Szycik,
	intel-wired-lan, netdev, mailhol.vincent

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Takeru Hayasaka
> Sent: Monday, February 12, 2024 7:34 AM
> To: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; David S. Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Jonathan Corbet <corbet@lwn.net>
> Cc: linux-doc@vger.kernel.org; vladimir.oltean@nxp.com; linux-kernel@vger.kernel.org; laforge@gnumonks.org; Marcin Szycik <marcin.szycik@linux.intel.com>; intel-wired-lan@lists.osuosl.org; Takeru Hayasaka <hayatake396@gmail.com>; netdev@vger.kernel.org; mailhol.vincent@wanadoo.fr
> Subject: [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h
>
> This is a patch that enables RSS functionality for GTP packets using ethtool.
>
> A user can include TEID and make RSS work for GTP-U over IPv4 by doing the
> following:`ethtool -N ens3 rx-flow-hash gtpu4 sde`
>
> In addition to gtpu(4|6), we now support gtpc(4|6),gtpc(4|6)t,gtpu(4|6)e,
> gtpu(4|6)u, and gtpu(4|6)d.
>
> gtpc(4|6): Used for GTP-C in IPv4 and IPv6, where the GTP header format does
> not include a TEID.
> gtpc(4|6)t: Used for GTP-C in IPv4 and IPv6, with a GTP header format that
> includes a TEID.
> gtpu(4|6): Used for GTP-U in both IPv4 and IPv6 scenarios.
> gtpu(4|6)e: Used for GTP-U with extended headers in both IPv4 and IPv6.
> gtpu(4|6)u: Used when the PSC (PDU session container) in the GTP-U extended
> header includes Uplink, applicable to both IPv4 and IPv6.
> gtpu(4|6)d: Used when the PSC in the GTP-U extended header includes Downlink,
> for both IPv4 and IPv6.
>
> GTP generates a flow that includes an ID called TEID to identify the tunnel.
> This tunnel is created for each UE (User Equipment).By performing RSS based on
> this flow, it is possible to apply RSS for each communication unit from the UE.
> Without this, RSS would only be effective within the range of IP addresses. For
> instance, the PGW can only perform RSS within the IP range of the SGW.
> Problematic from a load distribution perspective, especially if there's a bias
> in the terminals connected to a particular base station.This case can be
> solved by using this patch.
>
> Signed-off-by: Takeru Hayasaka <hayatake396@gmail.com>
> Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
> ---
> v2->v3: Based on Harald-san's review, I added documentation and comments to
> ethtool.h and ice.rst.
> v3->v4: Based on Marcin-san's review, I added the missing code for GTPC and
> GTPC_TEID, and revised the documentation and comments.
> v4->v5: Based on Marcin-san's review, I fixed rename and wrong code regarding
> GTPC
> v5->v6: Based on Marcin-san's review, Undoing the addition of unnecessary
> blank lines.Minor fixes.
> v6->v7 Based on Jakub-san's review, Split the patch.
> v7->v8: There are no code changes. I've resent the patch, including Marcin-san's
> patch, because PatchWork did not interpret the patch correctly.Simon-san told
> me. Thanks.
> include/uapi/linux/ethtool.h | 48 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 48 insertions(+)
>

Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2024-03-05 14:49 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-12  2:04 [Intel-wired-lan] [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h Takeru Hayasaka
2024-02-12  2:04 ` Takeru Hayasaka
2024-02-12  2:04 ` [PATCH net-next v8 2/2] ice: Implement RSS settings for GTP using ethtool Takeru Hayasaka
2024-02-12  2:04   ` [Intel-wired-lan] " Takeru Hayasaka
2024-03-01  7:40   ` Pucha, HimasekharX Reddy
2024-03-01  7:40     ` Pucha, HimasekharX Reddy
2024-02-15  8:44 ` [PATCH net-next v8 1/2] ethtool: Add GTP RSS hash options to ethtool.h Takeru Hayasaka
2024-02-15  8:44   ` [Intel-wired-lan] " Takeru Hayasaka
2024-02-15 10:26   ` Paolo Abeni
2024-02-15 10:26     ` Paolo Abeni
2024-02-15 15:56     ` [Intel-wired-lan] " anthony.l.nguyen
2024-02-15 15:56       ` anthony.l.nguyen
2024-02-16 14:14       ` [Intel-wired-lan] " Takeru Hayasaka
2024-02-16 14:14         ` Takeru Hayasaka
2024-02-16 21:14         ` Tony Nguyen
2024-02-16 21:14           ` [Intel-wired-lan] " Tony Nguyen
2024-02-17  6:18           ` Takeru Hayasaka
2024-02-17  6:18             ` [Intel-wired-lan] " Takeru Hayasaka
2024-03-01 18:01 ` Pucha, HimasekharX Reddy
2024-03-01 18:01   ` Pucha, HimasekharX Reddy
2024-03-05  3:42   ` Takeru Hayasaka
2024-03-05  3:42     ` Takeru Hayasaka
2024-03-05  4:28     ` Pucha, HimasekharX Reddy
2024-03-05  4:28       ` Pucha, HimasekharX Reddy
2024-03-05  7:47       ` Takeru Hayasaka
2024-03-05  7:47         ` Takeru Hayasaka
2024-03-05  9:31         ` Pucha, HimasekharX Reddy
2024-03-05  9:31           ` Pucha, HimasekharX Reddy
2024-03-05 14:49 ` Pucha, HimasekharX Reddy
2024-03-05 14:49   ` Pucha, HimasekharX Reddy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.