Skip to contentSkip to conversation

idpf: fix offloads support for encapsulated packets

PATCH In review Madhu Chittim 3 participants 3 messages Apr 2, 2025 – Apr 21, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 idpf: fix offloads support for encapsulated packets

Split offloads into csum, tso and other offloads so that tunneled packets do not by default have all the offloads enabled.

Stateless offloads for encapsulated packets are not yet supported in firmware/software but in the driver we were setting the features same as non encapsulated features.

Fixed naming to clarify CSUM bits are being checked for Tx.

Inherit netdev features to VLAN interfaces as well.

Fixes 0fe45467a104 ("idpf: add create vport and netdev configuration")
---
 drivers/net/ethernet/intel/idpf/idpf.h     | 14 ++++--
 drivers/net/ethernet/intel/idpf/idpf_lib.c | 57 ++++++++--------------
 2 files changed, 29 insertions(+), 42 deletions(-)
drivers/net/ethernet/intel/idpf/idpf.h +10 -4
index 66544faab710..5f73a4cf5161 100644
@@ -633,10 +633,18 @@ bool idpf_is_capability_ena(struct idpf_adapter *adapter, bool all,
 	VIRTCHNL2_CAP_RX_CSUM_L4_IPV4_TCP	|\
 	VIRTCHNL2_CAP_RX_CSUM_L4_IPV4_UDP)
 
+#define IDPF_CAP_TX_CSUM_L4V4 (\
+	VIRTCHNL2_CAP_TX_CSUM_L4_IPV4_TCP	|\
+	VIRTCHNL2_CAP_TX_CSUM_L4_IPV4_UDP)
+
 #define IDPF_CAP_RX_CSUM_L4V6 (\
 	VIRTCHNL2_CAP_RX_CSUM_L4_IPV6_TCP	|\
 	VIRTCHNL2_CAP_RX_CSUM_L4_IPV6_UDP)
 
+#define IDPF_CAP_TX_CSUM_L4V6 (\
+	VIRTCHNL2_CAP_TX_CSUM_L4_IPV6_TCP	|\
+	VIRTCHNL2_CAP_TX_CSUM_L4_IPV6_UDP)
+
 #define IDPF_CAP_RX_CSUM (\
 	VIRTCHNL2_CAP_RX_CSUM_L3_IPV4		|\
 	VIRTCHNL2_CAP_RX_CSUM_L4_IPV4_TCP	|\
@@ -644,11 +652,9 @@ bool idpf_is_capability_ena(struct idpf_adapter *adapter, bool all,
 	VIRTCHNL2_CAP_RX_CSUM_L4_IPV6_TCP	|\
 	VIRTCHNL2_CAP_RX_CSUM_L4_IPV6_UDP)
 
-#define IDPF_CAP_SCTP_CSUM (\
+#define IDPF_CAP_TX_SCTP_CSUM (\
 	VIRTCHNL2_CAP_TX_CSUM_L4_IPV4_SCTP	|\
-	VIRTCHNL2_CAP_TX_CSUM_L4_IPV6_SCTP	|\
-	VIRTCHNL2_CAP_RX_CSUM_L4_IPV4_SCTP	|\
-	VIRTCHNL2_CAP_RX_CSUM_L4_IPV6_SCTP)
+	VIRTCHNL2_CAP_TX_CSUM_L4_IPV6_SCTP)
 
 #define IDPF_CAP_TUNNEL_TX_CSUM (\
 	VIRTCHNL2_CAP_TX_CSUM_L3_SINGLE_TUNNEL	|\
drivers/net/ethernet/intel/idpf/idpf_lib.c +19 -38

80 lines not on this page · raw message

Signature · 1 line
2.45.0
Tested-by on v1 1/1
#1 lore raw
Quoted 11 lines · Madhu Chittim

Split offloads into csum, tso and other offloads so that tunneled packets do not by default have all the offloads enabled.

Stateless offloads for encapsulated packets are not yet supported in firmware/software but in the driver we were setting the features same as non encapsulated features.

Fixed naming to clarify CSUM bits are being checked for Tx.

Inherit netdev features to VLAN interfaces as well.

Quoted 8 lines
Fixes 0fe45467a104 ("idpf: add create vport and netdev configuration")
---
 drivers/net/ethernet/intel/idpf/idpf.h     | 14 ++++--
 drivers/net/ethernet/intel/idpf/idpf_lib.c | 57 ++++++++--------------
 2 files changed, 29 insertions(+), 42 deletions(-)
Tested-by on v1 1/1
#2 lore raw
In reply to Madhu Chittim
Quoted 19 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Madhu Chittim
Sent: Wednesday, April 2, 2025 2:10 PM
To: [email protected]
Subject: [Intel-wired-lan] [PATCH iwl-net] idpf: fix offloads support for encapsulated packets

Split offloads into csum, tso and other offloads so that tunneled packets do not by default have all the offloads enabled.

Stateless offloads for encapsulated packets are not yet supported in firmware/software but in the driver we were setting the features same as non encapsulated features.

Fixed naming to clarify CSUM bits are being checked for Tx.

Quoted 7 lines

Inherit netdev features to VLAN interfaces as well.

Fixes 0fe45467a104 ("idpf: add create vport and netdev configuration")

---
2.45.0