* [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of IP/IPV6
@ 2026-04-28 7:06 ` Michal Swiatkowski
0 siblings, 0 replies; 23+ messages in thread
From: Michal Swiatkowski @ 2026-04-28 7:06 UTC (permalink / raw)
To: intel-wired-lan
Cc: netdev, jramaseu, anthony.l.nguyen, przemyslaw.kitszel,
aleksandr.loktionov, Michal Swiatkowski
The hardware is capable of calculating checksum for IPV6 packets with
extension header. To not drop such packets switch from IP/IPV6 checksum
to HW_CSUM.
HW_CSUM is also used in previous generation (i40e).
Previously HW_CSUM was used to indicate that hardware supports general
checksum. Drop it assuming that if the hardware supports it, it is used.
Disabling offload for E830 in case of TSO isn't needed anymore as the
check for TSO is done in Tx path just before preparation of the special
GCS descriptor.
The commit from Fixes didn't introduce a bug, it just shown that the
driver is doing sth wrong with the checksum features.
Suggested-by: Jakub Ramaseuski <jramaseu@redhat.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Fixes: 04c20a9356f2 ("net: skip offload for NETIF_F_IPV6_CSUM if ipv6 header contains extension")
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
---
drivers/net/ethernet/intel/ice/ice_main.c | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 15550216fbf0..0f2f949af536 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -3500,9 +3500,8 @@ void ice_set_netdev_features(struct net_device *netdev)
NETIF_F_RXHASH;
csumo_features = NETIF_F_RXCSUM |
- NETIF_F_IP_CSUM |
NETIF_F_SCTP_CRC |
- NETIF_F_IPV6_CSUM;
+ NETIF_F_HW_CSUM;
vlano_features = NETIF_F_HW_VLAN_CTAG_FILTER |
NETIF_F_HW_VLAN_CTAG_TX |
@@ -3564,12 +3563,6 @@ void ice_set_netdev_features(struct net_device *netdev)
/* Allow core to manage IRQs affinity */
netif_set_affinity_auto(netdev);
- /* Mutual exclusivity for TSO and GCS is enforced by the set features
- * ndo callback.
- */
- if (ice_is_feature_supported(pf, ICE_F_GCS))
- netdev->hw_features |= NETIF_F_HW_CSUM;
-
netif_set_tso_max_size(netdev, ICE_MAX_TSO_SIZE);
}
@@ -6489,18 +6482,6 @@ ice_set_features(struct net_device *netdev, netdev_features_t features)
if (changed & NETIF_F_LOOPBACK)
ret = ice_set_loopback(vsi, !!(features & NETIF_F_LOOPBACK));
- /* Due to E830 hardware limitations, TSO (NETIF_F_ALL_TSO) with GCS
- * (NETIF_F_HW_CSUM) is not supported.
- */
- if (ice_is_feature_supported(pf, ICE_F_GCS) &&
- ((features & NETIF_F_HW_CSUM) && (features & NETIF_F_ALL_TSO))) {
- if (netdev->features & NETIF_F_HW_CSUM)
- dev_err(ice_pf_to_dev(pf), "To enable TSO, you must first disable HW checksum.\n");
- else
- dev_err(ice_pf_to_dev(pf), "To enable HW checksum, you must first disable TSO.\n");
- return -EIO;
- }
-
return ret;
}
--
2.49.0
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [Intel-wired-lan] [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of IP/IPV6
2026-04-28 7:06 ` Michal Swiatkowski
@ 2026-04-28 8:34 ` Loktionov, Aleksandr
-1 siblings, 0 replies; 23+ messages in thread
From: Loktionov, Aleksandr @ 2026-04-28 8:34 UTC (permalink / raw)
To: Michal Swiatkowski, intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, jramaseu@redhat.com, Nguyen, Anthony L,
Kitszel, Przemyslaw
> -----Original Message-----
> From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Sent: Tuesday, April 28, 2026 9:07 AM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; jramaseu@redhat.com; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>; Loktionov, Aleksandr
> <aleksandr.loktionov@intel.com>; Michal Swiatkowski
> <michal.swiatkowski@linux.intel.com>
> Subject: [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of
> IP/IPV6
>
> The hardware is capable of calculating checksum for IPV6 packets with
> extension header. To not drop such packets switch from IP/IPV6
> checksum to HW_CSUM.
I'd recommend "To not drop" -> "To avoid dropping"
>
> HW_CSUM is also used in previous generation (i40e).
>
> Previously HW_CSUM was used to indicate that hardware supports general
> checksum. Drop it assuming that if the hardware supports it, it is
> used.
>
> Disabling offload for E830 in case of TSO isn't needed anymore as the
> check for TSO is done in Tx path just before preparation of the
> special GCS descriptor.
>
> The commit from Fixes didn't introduce a bug, it just shown that the
> driver is doing sth wrong with the checksum features.
>
Except commit message nits
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> Suggested-by: Jakub Ramaseuski <jramaseu@redhat.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Fixes: 04c20a9356f2 ("net: skip offload for NETIF_F_IPV6_CSUM if ipv6
> header contains extension")
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 21 +--------------------
> 1 file changed, 1 insertion(+), 20 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c
> b/drivers/net/ethernet/intel/ice/ice_main.c
> index 15550216fbf0..0f2f949af536 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -3500,9 +3500,8 @@ void ice_set_netdev_features(struct net_device
> *netdev)
> NETIF_F_RXHASH;
>
> csumo_features = NETIF_F_RXCSUM |
> - NETIF_F_IP_CSUM |
> NETIF_F_SCTP_CRC |
> - NETIF_F_IPV6_CSUM;
> + NETIF_F_HW_CSUM;
>
> vlano_features = NETIF_F_HW_VLAN_CTAG_FILTER |
> NETIF_F_HW_VLAN_CTAG_TX |
> @@ -3564,12 +3563,6 @@ void ice_set_netdev_features(struct net_device
> *netdev)
> /* Allow core to manage IRQs affinity */
> netif_set_affinity_auto(netdev);
>
> - /* Mutual exclusivity for TSO and GCS is enforced by the set
> features
> - * ndo callback.
> - */
> - if (ice_is_feature_supported(pf, ICE_F_GCS))
> - netdev->hw_features |= NETIF_F_HW_CSUM;
> -
> netif_set_tso_max_size(netdev, ICE_MAX_TSO_SIZE); }
>
> @@ -6489,18 +6482,6 @@ ice_set_features(struct net_device *netdev,
> netdev_features_t features)
> if (changed & NETIF_F_LOOPBACK)
> ret = ice_set_loopback(vsi, !!(features &
> NETIF_F_LOOPBACK));
>
> - /* Due to E830 hardware limitations, TSO (NETIF_F_ALL_TSO) with
> GCS
> - * (NETIF_F_HW_CSUM) is not supported.
> - */
> - if (ice_is_feature_supported(pf, ICE_F_GCS) &&
> - ((features & NETIF_F_HW_CSUM) && (features &
> NETIF_F_ALL_TSO))) {
> - if (netdev->features & NETIF_F_HW_CSUM)
> - dev_err(ice_pf_to_dev(pf), "To enable TSO, you
> must first disable HW checksum.\n");
> - else
> - dev_err(ice_pf_to_dev(pf), "To enable HW
> checksum, you must first disable TSO.\n");
> - return -EIO;
> - }
> -
> return ret;
> }
>
> --
> 2.49.0
^ permalink raw reply [flat|nested] 23+ messages in thread* RE: [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of IP/IPV6
@ 2026-04-28 8:34 ` Loktionov, Aleksandr
0 siblings, 0 replies; 23+ messages in thread
From: Loktionov, Aleksandr @ 2026-04-28 8:34 UTC (permalink / raw)
To: Michal Swiatkowski, intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, jramaseu@redhat.com, Nguyen, Anthony L,
Kitszel, Przemyslaw
> -----Original Message-----
> From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Sent: Tuesday, April 28, 2026 9:07 AM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; jramaseu@redhat.com; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>; Loktionov, Aleksandr
> <aleksandr.loktionov@intel.com>; Michal Swiatkowski
> <michal.swiatkowski@linux.intel.com>
> Subject: [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of
> IP/IPV6
>
> The hardware is capable of calculating checksum for IPV6 packets with
> extension header. To not drop such packets switch from IP/IPV6
> checksum to HW_CSUM.
I'd recommend "To not drop" -> "To avoid dropping"
>
> HW_CSUM is also used in previous generation (i40e).
>
> Previously HW_CSUM was used to indicate that hardware supports general
> checksum. Drop it assuming that if the hardware supports it, it is
> used.
>
> Disabling offload for E830 in case of TSO isn't needed anymore as the
> check for TSO is done in Tx path just before preparation of the
> special GCS descriptor.
>
> The commit from Fixes didn't introduce a bug, it just shown that the
> driver is doing sth wrong with the checksum features.
>
Except commit message nits
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> Suggested-by: Jakub Ramaseuski <jramaseu@redhat.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Fixes: 04c20a9356f2 ("net: skip offload for NETIF_F_IPV6_CSUM if ipv6
> header contains extension")
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 21 +--------------------
> 1 file changed, 1 insertion(+), 20 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c
> b/drivers/net/ethernet/intel/ice/ice_main.c
> index 15550216fbf0..0f2f949af536 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -3500,9 +3500,8 @@ void ice_set_netdev_features(struct net_device
> *netdev)
> NETIF_F_RXHASH;
>
> csumo_features = NETIF_F_RXCSUM |
> - NETIF_F_IP_CSUM |
> NETIF_F_SCTP_CRC |
> - NETIF_F_IPV6_CSUM;
> + NETIF_F_HW_CSUM;
>
> vlano_features = NETIF_F_HW_VLAN_CTAG_FILTER |
> NETIF_F_HW_VLAN_CTAG_TX |
> @@ -3564,12 +3563,6 @@ void ice_set_netdev_features(struct net_device
> *netdev)
> /* Allow core to manage IRQs affinity */
> netif_set_affinity_auto(netdev);
>
> - /* Mutual exclusivity for TSO and GCS is enforced by the set
> features
> - * ndo callback.
> - */
> - if (ice_is_feature_supported(pf, ICE_F_GCS))
> - netdev->hw_features |= NETIF_F_HW_CSUM;
> -
> netif_set_tso_max_size(netdev, ICE_MAX_TSO_SIZE); }
>
> @@ -6489,18 +6482,6 @@ ice_set_features(struct net_device *netdev,
> netdev_features_t features)
> if (changed & NETIF_F_LOOPBACK)
> ret = ice_set_loopback(vsi, !!(features &
> NETIF_F_LOOPBACK));
>
> - /* Due to E830 hardware limitations, TSO (NETIF_F_ALL_TSO) with
> GCS
> - * (NETIF_F_HW_CSUM) is not supported.
> - */
> - if (ice_is_feature_supported(pf, ICE_F_GCS) &&
> - ((features & NETIF_F_HW_CSUM) && (features &
> NETIF_F_ALL_TSO))) {
> - if (netdev->features & NETIF_F_HW_CSUM)
> - dev_err(ice_pf_to_dev(pf), "To enable TSO, you
> must first disable HW checksum.\n");
> - else
> - dev_err(ice_pf_to_dev(pf), "To enable HW
> checksum, you must first disable TSO.\n");
> - return -EIO;
> - }
> -
> return ret;
> }
>
> --
> 2.49.0
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of IP/IPV6
2026-04-28 7:06 ` Michal Swiatkowski
@ 2026-04-30 15:29 ` Simon Horman
-1 siblings, 0 replies; 23+ messages in thread
From: Simon Horman @ 2026-04-30 15:29 UTC (permalink / raw)
To: michal.swiatkowski
Cc: 'Simon Horman', intel-wired-lan, netdev, jramaseu,
anthony.l.nguyen, przemyslaw.kitszel, aleksandr.loktionov
From: 'Simon Horman' <horms@kernel.org>
This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
Full review at: https://sashiko.dev
---
ice: use NETIF_F_HW_CSUM instead of IP/IPV6
This commit replaces the IP and IPV6 checksum offload flags with HW_CSUM
in the ice driver to allow hardware checksumming for IPv6 packets with
extension headers. It also removes the mutual exclusivity check between
TSO and GCS.
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> index 5f92377d4dfc..33f252a6a22f 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -3491,9 +3491,8 @@ void ice_set_netdev_features(struct net_device *netdev)
> NETIF_F_RXHASH;
>
> csumo_features = NETIF_F_RXCSUM |
> - NETIF_F_IP_CSUM |
> NETIF_F_SCTP_CRC |
> - NETIF_F_IPV6_CSUM;
> + NETIF_F_HW_CSUM;
By advertising NETIF_F_HW_CSUM, the network stack assumes the driver can handle
checksums for any protocol and passes non-IP packets (e.g., from AF_PACKET
injected frames) to the driver with CHECKSUM_PARTIAL.
Since ice_tx_csum() strictly parses the L3 header and expects IPv4 or IPv6,
returning -1 for other protocols, will this regression cause non-IP packets to
be silently dropped instead of falling back to software checksums in the kernel?
Additionally, skb_csum_hwoffload_help() relies on NETIF_F_IPV6_CSUM to
safely fall back to software checksums when IPv6 extension headers are
present.
Does using NETIF_F_HW_CSUM bypass this safeguard, potentially causing
legacy hardware (like E810) or E830 without GCS descriptors to compute
incorrect pseudo-headers and silently corrupt IPv6 packets with extension
headers?
Finally, for protocols other than TCP, UDP, or SCTP, the driver falls back to
calling skb_checksum_help(skb) in the default case of ice_tx_csum().
However, the driver appears to ignore the return value of skb_checksum_help().
If skb_checksum_help() fails (e.g., due to -ENOMEM during pskb_expand_head()),
could this result in the packet being transmitted with an uncomputed checksum?
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of IP/IPV6
@ 2026-04-30 15:29 ` Simon Horman
0 siblings, 0 replies; 23+ messages in thread
From: Simon Horman @ 2026-04-30 15:29 UTC (permalink / raw)
To: michal.swiatkowski
Cc: 'Simon Horman', intel-wired-lan, netdev, jramaseu,
anthony.l.nguyen, przemyslaw.kitszel, aleksandr.loktionov
From: 'Simon Horman' <horms@kernel.org>
This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
Full review at: https://sashiko.dev
---
ice: use NETIF_F_HW_CSUM instead of IP/IPV6
This commit replaces the IP and IPV6 checksum offload flags with HW_CSUM
in the ice driver to allow hardware checksumming for IPv6 packets with
extension headers. It also removes the mutual exclusivity check between
TSO and GCS.
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> index 5f92377d4dfc..33f252a6a22f 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -3491,9 +3491,8 @@ void ice_set_netdev_features(struct net_device *netdev)
> NETIF_F_RXHASH;
>
> csumo_features = NETIF_F_RXCSUM |
> - NETIF_F_IP_CSUM |
> NETIF_F_SCTP_CRC |
> - NETIF_F_IPV6_CSUM;
> + NETIF_F_HW_CSUM;
By advertising NETIF_F_HW_CSUM, the network stack assumes the driver can handle
checksums for any protocol and passes non-IP packets (e.g., from AF_PACKET
injected frames) to the driver with CHECKSUM_PARTIAL.
Since ice_tx_csum() strictly parses the L3 header and expects IPv4 or IPv6,
returning -1 for other protocols, will this regression cause non-IP packets to
be silently dropped instead of falling back to software checksums in the kernel?
Additionally, skb_csum_hwoffload_help() relies on NETIF_F_IPV6_CSUM to
safely fall back to software checksums when IPv6 extension headers are
present.
Does using NETIF_F_HW_CSUM bypass this safeguard, potentially causing
legacy hardware (like E810) or E830 without GCS descriptors to compute
incorrect pseudo-headers and silently corrupt IPv6 packets with extension
headers?
Finally, for protocols other than TCP, UDP, or SCTP, the driver falls back to
calling skb_checksum_help(skb) in the default case of ice_tx_csum().
However, the driver appears to ignore the return value of skb_checksum_help().
If skb_checksum_help() fails (e.g., due to -ENOMEM during pskb_expand_head()),
could this result in the packet being transmitted with an uncomputed checksum?
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of IP/IPV6
2026-04-30 15:29 ` Simon Horman
@ 2026-04-30 16:21 ` Simon Horman
-1 siblings, 0 replies; 23+ messages in thread
From: Simon Horman @ 2026-04-30 16:21 UTC (permalink / raw)
To: michal.swiatkowski
Cc: intel-wired-lan, netdev, jramaseu, anthony.l.nguyen,
przemyslaw.kitszel, aleksandr.loktionov
On Thu, Apr 30, 2026 at 04:29:49PM +0100, Simon Horman wrote:
> From: 'Simon Horman' <horms@kernel.org>
>
> This is an AI-generated review of your patch. The human sending this
> email has considered the AI review valid, or at least plausible.
> Full review at: https://sashiko.dev
Sorry, the email I am responding to was supposed to come with
some commentary - it seems my method for adding it is broken :(
So I'm adding it below (as best as I can remember what it was).
> ---
> ice: use NETIF_F_HW_CSUM instead of IP/IPV6
>
> This commit replaces the IP and IPV6 checksum offload flags with HW_CSUM
> in the ice driver to allow hardware checksumming for IPv6 packets with
> extension headers. It also removes the mutual exclusivity check between
> TSO and GCS.
>
> > diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> > index 5f92377d4dfc..33f252a6a22f 100644
> > --- a/drivers/net/ethernet/intel/ice/ice_main.c
> > +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> > @@ -3491,9 +3491,8 @@ void ice_set_netdev_features(struct net_device *netdev)
> > NETIF_F_RXHASH;
> >
> > csumo_features = NETIF_F_RXCSUM |
> > - NETIF_F_IP_CSUM |
> > NETIF_F_SCTP_CRC |
> > - NETIF_F_IPV6_CSUM;
> > + NETIF_F_HW_CSUM;
>
> By advertising NETIF_F_HW_CSUM, the network stack assumes the driver can handle
> checksums for any protocol and passes non-IP packets (e.g., from AF_PACKET
> injected frames) to the driver with CHECKSUM_PARTIAL.
>
> Since ice_tx_csum() strictly parses the L3 header and expects IPv4 or IPv6,
> returning -1 for other protocols, will this regression cause non-IP packets to
> be silently dropped instead of falling back to software checksums in the kernel?
The problem above seems to be a legitimate concern, if a corner case.
It seems to also exist in i40e.
> Additionally, skb_csum_hwoffload_help() relies on NETIF_F_IPV6_CSUM to
> safely fall back to software checksums when IPv6 extension headers are
> present.
>
> Does using NETIF_F_HW_CSUM bypass this safeguard, potentially causing
> legacy hardware (like E810) or E830 without GCS descriptors to compute
> incorrect pseudo-headers and silently corrupt IPv6 packets with extension
> headers?
The issue above seems to be a false positive as the ice driver
doesn't rely on the behaviour described. Rather ice_tx_csum()
uses ipv6_skip_exthdr() to correctly handle extension headers.
>
> Finally, for protocols other than TCP, UDP, or SCTP, the driver falls back to
> calling skb_checksum_help(skb) in the default case of ice_tx_csum().
>
> However, the driver appears to ignore the return value of skb_checksum_help().
>
> If skb_checksum_help() fails (e.g., due to -ENOMEM during pskb_expand_head()),
> could this result in the packet being transmitted with an uncomputed checksum?
The problem above seems real to me, but it also seems to be pre-existing.
So I don't think it should delay progress of this patch.
If it is a problem, it also seems to be present in i40e.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of IP/IPV6
@ 2026-04-30 16:21 ` Simon Horman
0 siblings, 0 replies; 23+ messages in thread
From: Simon Horman @ 2026-04-30 16:21 UTC (permalink / raw)
To: michal.swiatkowski
Cc: intel-wired-lan, netdev, jramaseu, anthony.l.nguyen,
przemyslaw.kitszel, aleksandr.loktionov
On Thu, Apr 30, 2026 at 04:29:49PM +0100, Simon Horman wrote:
> From: 'Simon Horman' <horms@kernel.org>
>
> This is an AI-generated review of your patch. The human sending this
> email has considered the AI review valid, or at least plausible.
> Full review at: https://sashiko.dev
Sorry, the email I am responding to was supposed to come with
some commentary - it seems my method for adding it is broken :(
So I'm adding it below (as best as I can remember what it was).
> ---
> ice: use NETIF_F_HW_CSUM instead of IP/IPV6
>
> This commit replaces the IP and IPV6 checksum offload flags with HW_CSUM
> in the ice driver to allow hardware checksumming for IPv6 packets with
> extension headers. It also removes the mutual exclusivity check between
> TSO and GCS.
>
> > diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> > index 5f92377d4dfc..33f252a6a22f 100644
> > --- a/drivers/net/ethernet/intel/ice/ice_main.c
> > +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> > @@ -3491,9 +3491,8 @@ void ice_set_netdev_features(struct net_device *netdev)
> > NETIF_F_RXHASH;
> >
> > csumo_features = NETIF_F_RXCSUM |
> > - NETIF_F_IP_CSUM |
> > NETIF_F_SCTP_CRC |
> > - NETIF_F_IPV6_CSUM;
> > + NETIF_F_HW_CSUM;
>
> By advertising NETIF_F_HW_CSUM, the network stack assumes the driver can handle
> checksums for any protocol and passes non-IP packets (e.g., from AF_PACKET
> injected frames) to the driver with CHECKSUM_PARTIAL.
>
> Since ice_tx_csum() strictly parses the L3 header and expects IPv4 or IPv6,
> returning -1 for other protocols, will this regression cause non-IP packets to
> be silently dropped instead of falling back to software checksums in the kernel?
The problem above seems to be a legitimate concern, if a corner case.
It seems to also exist in i40e.
> Additionally, skb_csum_hwoffload_help() relies on NETIF_F_IPV6_CSUM to
> safely fall back to software checksums when IPv6 extension headers are
> present.
>
> Does using NETIF_F_HW_CSUM bypass this safeguard, potentially causing
> legacy hardware (like E810) or E830 without GCS descriptors to compute
> incorrect pseudo-headers and silently corrupt IPv6 packets with extension
> headers?
The issue above seems to be a false positive as the ice driver
doesn't rely on the behaviour described. Rather ice_tx_csum()
uses ipv6_skip_exthdr() to correctly handle extension headers.
>
> Finally, for protocols other than TCP, UDP, or SCTP, the driver falls back to
> calling skb_checksum_help(skb) in the default case of ice_tx_csum().
>
> However, the driver appears to ignore the return value of skb_checksum_help().
>
> If skb_checksum_help() fails (e.g., due to -ENOMEM during pskb_expand_head()),
> could this result in the packet being transmitted with an uncomputed checksum?
The problem above seems real to me, but it also seems to be pre-existing.
So I don't think it should delay progress of this patch.
If it is a problem, it also seems to be present in i40e.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of IP/IPV6
2026-04-30 16:21 ` Simon Horman
@ 2026-05-04 8:09 ` Michal Swiatkowski
-1 siblings, 0 replies; 23+ messages in thread
From: Michal Swiatkowski @ 2026-05-04 8:09 UTC (permalink / raw)
To: Simon Horman
Cc: michal.swiatkowski, intel-wired-lan, netdev, jramaseu,
anthony.l.nguyen, przemyslaw.kitszel, aleksandr.loktionov
On Thu, Apr 30, 2026 at 05:21:49PM +0100, Simon Horman wrote:
> On Thu, Apr 30, 2026 at 04:29:49PM +0100, Simon Horman wrote:
> > From: 'Simon Horman' <horms@kernel.org>
> >
> > This is an AI-generated review of your patch. The human sending this
> > email has considered the AI review valid, or at least plausible.
> > Full review at: https://sashiko.dev
>
> Sorry, the email I am responding to was supposed to come with
> some commentary - it seems my method for adding it is broken :(
> So I'm adding it below (as best as I can remember what it was).
>
Thanks for adding the comments.
> > ---
> > ice: use NETIF_F_HW_CSUM instead of IP/IPV6
> >
> > This commit replaces the IP and IPV6 checksum offload flags with HW_CSUM
> > in the ice driver to allow hardware checksumming for IPv6 packets with
> > extension headers. It also removes the mutual exclusivity check between
> > TSO and GCS.
> >
> > > diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> > > index 5f92377d4dfc..33f252a6a22f 100644
> > > --- a/drivers/net/ethernet/intel/ice/ice_main.c
> > > +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> > > @@ -3491,9 +3491,8 @@ void ice_set_netdev_features(struct net_device *netdev)
> > > NETIF_F_RXHASH;
> > >
> > > csumo_features = NETIF_F_RXCSUM |
> > > - NETIF_F_IP_CSUM |
> > > NETIF_F_SCTP_CRC |
> > > - NETIF_F_IPV6_CSUM;
> > > + NETIF_F_HW_CSUM;
> >
> > By advertising NETIF_F_HW_CSUM, the network stack assumes the driver can handle
> > checksums for any protocol and passes non-IP packets (e.g., from AF_PACKET
> > injected frames) to the driver with CHECKSUM_PARTIAL.
> >
> > Since ice_tx_csum() strictly parses the L3 header and expects IPv4 or IPv6,
> > returning -1 for other protocols, will this regression cause non-IP packets to
> > be silently dropped instead of falling back to software checksums in the kernel?
>
> The problem above seems to be a legitimate concern, if a corner case.
> It seems to also exist in i40e.
>
I think there is a lack of skb_checksum_help() before one error return
from ice_tx_csum(). I will add it.
> > Additionally, skb_csum_hwoffload_help() relies on NETIF_F_IPV6_CSUM to
> > safely fall back to software checksums when IPv6 extension headers are
> > present.
> >
> > Does using NETIF_F_HW_CSUM bypass this safeguard, potentially causing
> > legacy hardware (like E810) or E830 without GCS descriptors to compute
> > incorrect pseudo-headers and silently corrupt IPv6 packets with extension
> > headers?
>
> The issue above seems to be a false positive as the ice driver
> doesn't rely on the behaviour described. Rather ice_tx_csum()
> uses ipv6_skip_exthdr() to correctly handle extension headers.
>
Yeah, righ.
> >
> > Finally, for protocols other than TCP, UDP, or SCTP, the driver falls back to
> > calling skb_checksum_help(skb) in the default case of ice_tx_csum().
> >
> > However, the driver appears to ignore the return value of skb_checksum_help().
> >
> > If skb_checksum_help() fails (e.g., due to -ENOMEM during pskb_expand_head()),
> > could this result in the packet being transmitted with an uncomputed checksum?
>
> The problem above seems real to me, but it also seems to be pre-existing.
> So I don't think it should delay progress of this patch.
>
> If it is a problem, it also seems to be present in i40e.
idpf, igbe too. It should return error in such case and drop the packet.
What do you think, should I add the patch for that here or send it separately?
To be honest I prefer sending it separately as this is in already exsisting
code and touch more than one driver.
Thanks
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of IP/IPV6
@ 2026-05-04 8:09 ` Michal Swiatkowski
0 siblings, 0 replies; 23+ messages in thread
From: Michal Swiatkowski @ 2026-05-04 8:09 UTC (permalink / raw)
To: Simon Horman
Cc: michal.swiatkowski, intel-wired-lan, netdev, jramaseu,
anthony.l.nguyen, przemyslaw.kitszel, aleksandr.loktionov
On Thu, Apr 30, 2026 at 05:21:49PM +0100, Simon Horman wrote:
> On Thu, Apr 30, 2026 at 04:29:49PM +0100, Simon Horman wrote:
> > From: 'Simon Horman' <horms@kernel.org>
> >
> > This is an AI-generated review of your patch. The human sending this
> > email has considered the AI review valid, or at least plausible.
> > Full review at: https://sashiko.dev
>
> Sorry, the email I am responding to was supposed to come with
> some commentary - it seems my method for adding it is broken :(
> So I'm adding it below (as best as I can remember what it was).
>
Thanks for adding the comments.
> > ---
> > ice: use NETIF_F_HW_CSUM instead of IP/IPV6
> >
> > This commit replaces the IP and IPV6 checksum offload flags with HW_CSUM
> > in the ice driver to allow hardware checksumming for IPv6 packets with
> > extension headers. It also removes the mutual exclusivity check between
> > TSO and GCS.
> >
> > > diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> > > index 5f92377d4dfc..33f252a6a22f 100644
> > > --- a/drivers/net/ethernet/intel/ice/ice_main.c
> > > +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> > > @@ -3491,9 +3491,8 @@ void ice_set_netdev_features(struct net_device *netdev)
> > > NETIF_F_RXHASH;
> > >
> > > csumo_features = NETIF_F_RXCSUM |
> > > - NETIF_F_IP_CSUM |
> > > NETIF_F_SCTP_CRC |
> > > - NETIF_F_IPV6_CSUM;
> > > + NETIF_F_HW_CSUM;
> >
> > By advertising NETIF_F_HW_CSUM, the network stack assumes the driver can handle
> > checksums for any protocol and passes non-IP packets (e.g., from AF_PACKET
> > injected frames) to the driver with CHECKSUM_PARTIAL.
> >
> > Since ice_tx_csum() strictly parses the L3 header and expects IPv4 or IPv6,
> > returning -1 for other protocols, will this regression cause non-IP packets to
> > be silently dropped instead of falling back to software checksums in the kernel?
>
> The problem above seems to be a legitimate concern, if a corner case.
> It seems to also exist in i40e.
>
I think there is a lack of skb_checksum_help() before one error return
from ice_tx_csum(). I will add it.
> > Additionally, skb_csum_hwoffload_help() relies on NETIF_F_IPV6_CSUM to
> > safely fall back to software checksums when IPv6 extension headers are
> > present.
> >
> > Does using NETIF_F_HW_CSUM bypass this safeguard, potentially causing
> > legacy hardware (like E810) or E830 without GCS descriptors to compute
> > incorrect pseudo-headers and silently corrupt IPv6 packets with extension
> > headers?
>
> The issue above seems to be a false positive as the ice driver
> doesn't rely on the behaviour described. Rather ice_tx_csum()
> uses ipv6_skip_exthdr() to correctly handle extension headers.
>
Yeah, righ.
> >
> > Finally, for protocols other than TCP, UDP, or SCTP, the driver falls back to
> > calling skb_checksum_help(skb) in the default case of ice_tx_csum().
> >
> > However, the driver appears to ignore the return value of skb_checksum_help().
> >
> > If skb_checksum_help() fails (e.g., due to -ENOMEM during pskb_expand_head()),
> > could this result in the packet being transmitted with an uncomputed checksum?
>
> The problem above seems real to me, but it also seems to be pre-existing.
> So I don't think it should delay progress of this patch.
>
> If it is a problem, it also seems to be present in i40e.
idpf, igbe too. It should return error in such case and drop the packet.
What do you think, should I add the patch for that here or send it separately?
To be honest I prefer sending it separately as this is in already exsisting
code and touch more than one driver.
Thanks
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of IP/IPV6
2026-04-28 7:06 ` Michal Swiatkowski
` (2 preceding siblings ...)
(?)
@ 2026-05-04 23:53 ` Jacob Keller
2026-05-05 4:35 ` Michal Swiatkowski
-1 siblings, 1 reply; 23+ messages in thread
From: Jacob Keller @ 2026-05-04 23:53 UTC (permalink / raw)
To: Michal Swiatkowski, intel-wired-lan
Cc: netdev, jramaseu, anthony.l.nguyen, przemyslaw.kitszel,
aleksandr.loktionov
On 4/28/2026 12:06 AM, Michal Swiatkowski wrote:
> The hardware is capable of calculating checksum for IPV6 packets with
> extension header. To not drop such packets switch from IP/IPV6 checksum
> to HW_CSUM.
>
> HW_CSUM is also used in previous generation (i40e).
>
> Previously HW_CSUM was used to indicate that hardware supports general
> checksum. Drop it assuming that if the hardware supports it, it is used.
>
> Disabling offload for E830 in case of TSO isn't needed anymore as the
> check for TSO is done in Tx path just before preparation of the special
> GCS descriptor.
>
> The commit from Fixes didn't introduce a bug, it just shown that the
> driver is doing sth wrong with the checksum features.
>
> Suggested-by: Jakub Ramaseuski <jramaseu@redhat.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Fixes: 04c20a9356f2 ("net: skip offload for NETIF_F_IPV6_CSUM if ipv6 header contains extension")
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> ---
Am I correct in thinking that this supersedes (really, properly fixes)
the patch "ice: enable NETIF_F_HW_CSUM for GSO packets" at
https://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260310150557.1138437-1-jramaseu@redhat.com/
?
Thanks,
Jake
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [Intel-wired-lan] [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of IP/IPV6
2026-05-04 23:53 ` [Intel-wired-lan] " Jacob Keller
@ 2026-05-05 4:35 ` Michal Swiatkowski
2026-05-05 5:16 ` Jacob Keller
0 siblings, 1 reply; 23+ messages in thread
From: Michal Swiatkowski @ 2026-05-05 4:35 UTC (permalink / raw)
To: Jacob Keller
Cc: Michal Swiatkowski, intel-wired-lan, netdev, jramaseu,
anthony.l.nguyen, przemyslaw.kitszel, aleksandr.loktionov
On Mon, May 04, 2026 at 04:53:12PM -0700, Jacob Keller wrote:
> On 4/28/2026 12:06 AM, Michal Swiatkowski wrote:
> > The hardware is capable of calculating checksum for IPV6 packets with
> > extension header. To not drop such packets switch from IP/IPV6 checksum
> > to HW_CSUM.
> >
> > HW_CSUM is also used in previous generation (i40e).
> >
> > Previously HW_CSUM was used to indicate that hardware supports general
> > checksum. Drop it assuming that if the hardware supports it, it is used.
> >
> > Disabling offload for E830 in case of TSO isn't needed anymore as the
> > check for TSO is done in Tx path just before preparation of the special
> > GCS descriptor.
> >
> > The commit from Fixes didn't introduce a bug, it just shown that the
> > driver is doing sth wrong with the checksum features.
> >
> > Suggested-by: Jakub Ramaseuski <jramaseu@redhat.com>
> > Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> > Fixes: 04c20a9356f2 ("net: skip offload for NETIF_F_IPV6_CSUM if ipv6 header contains extension")
> > Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> > ---
> Am I correct in thinking that this supersedes (really, properly fixes)
> the patch "ice: enable NETIF_F_HW_CSUM for GSO packets" at
> https://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260310150557.1138437-1-jramaseu@redhat.com/
> ?
>
> Thanks,
> Jake
Yes, exactly. I think I linked it in cover letter, but maybe I should do
it also here.
Thanks
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [Intel-wired-lan] [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of IP/IPV6
2026-05-05 4:35 ` Michal Swiatkowski
@ 2026-05-05 5:16 ` Jacob Keller
0 siblings, 0 replies; 23+ messages in thread
From: Jacob Keller @ 2026-05-05 5:16 UTC (permalink / raw)
To: Michal Swiatkowski
Cc: intel-wired-lan, netdev, jramaseu, anthony.l.nguyen,
przemyslaw.kitszel, aleksandr.loktionov
On 5/4/2026 9:35 PM, Michal Swiatkowski wrote:
> On Mon, May 04, 2026 at 04:53:12PM -0700, Jacob Keller wrote:
>> On 4/28/2026 12:06 AM, Michal Swiatkowski wrote:
>>> The hardware is capable of calculating checksum for IPV6 packets with
>>> extension header. To not drop such packets switch from IP/IPV6 checksum
>>> to HW_CSUM.
>>>
>>> HW_CSUM is also used in previous generation (i40e).
>>>
>>> Previously HW_CSUM was used to indicate that hardware supports general
>>> checksum. Drop it assuming that if the hardware supports it, it is used.
>>>
>>> Disabling offload for E830 in case of TSO isn't needed anymore as the
>>> check for TSO is done in Tx path just before preparation of the special
>>> GCS descriptor.
>>>
>>> The commit from Fixes didn't introduce a bug, it just shown that the
>>> driver is doing sth wrong with the checksum features.
>>>
>>> Suggested-by: Jakub Ramaseuski <jramaseu@redhat.com>
>>> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
>>> Fixes: 04c20a9356f2 ("net: skip offload for NETIF_F_IPV6_CSUM if ipv6 header contains extension")
>>> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
>>> ---
>> Am I correct in thinking that this supersedes (really, properly fixes)
>> the patch "ice: enable NETIF_F_HW_CSUM for GSO packets" at
>> https://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260310150557.1138437-1-jramaseu@redhat.com/
>> ?
>>
>> Thanks,
>> Jake
>
> Yes, exactly. I think I linked it in cover letter, but maybe I should do
> it also here.
>
> Thanks
I think its fine, I just wanted to make sure I was correct in marking
that patch as rejected in patchwork.
Thanks,
Jake
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of IP/IPV6
2026-04-28 7:06 ` Michal Swiatkowski
@ 2026-05-26 22:10 ` Nowlin, Alexander
-1 siblings, 0 replies; 23+ messages in thread
From: Nowlin, Alexander @ 2026-05-26 22:10 UTC (permalink / raw)
To: Michal Swiatkowski, intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, jramaseu@redhat.com, Nguyen, Anthony L,
Kitszel, Przemyslaw, Loktionov, Aleksandr
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Michal Swiatkowski
> Sent: Tuesday, April 28, 2026 12:07 AM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; jramaseu@redhat.com; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw <przemyslaw.kitszel@intel.com>; Loktionov,
> Aleksandr <aleksandr.loktionov@intel.com>; Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of IP/IPV6
>
> The hardware is capable of calculating checksum for IPV6 packets with extension header. To not drop
> such packets switch from IP/IPV6 checksum to HW_CSUM.
>
> HW_CSUM is also used in previous generation (i40e).
>
> Previously HW_CSUM was used to indicate that hardware supports general checksum. Drop it assuming
> that if the hardware supports it, it is used.
>
> Disabling offload for E830 in case of TSO isn't needed anymore as the check for TSO is done in Tx path
> just before preparation of the special GCS descriptor.
>
> The commit from Fixes didn't introduce a bug, it just shown that the driver is doing sth wrong with the
> checksum features.
>
> Suggested-by: Jakub Ramaseuski <jramaseu@redhat.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Fixes: 04c20a9356f2 ("net: skip offload for NETIF_F_IPV6_CSUM if ipv6 header contains extension")
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 21 +--------------------
> 1 file changed, 1 insertion(+), 20 deletions(-)
Tested-by: Alexander Nowlin <alexander.nowlin@intel.com>
^ permalink raw reply [flat|nested] 23+ messages in thread* RE: [Intel-wired-lan] [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of IP/IPV6
@ 2026-05-26 22:10 ` Nowlin, Alexander
0 siblings, 0 replies; 23+ messages in thread
From: Nowlin, Alexander @ 2026-05-26 22:10 UTC (permalink / raw)
To: Michal Swiatkowski, intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, jramaseu@redhat.com, Nguyen, Anthony L,
Kitszel, Przemyslaw, Loktionov, Aleksandr
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Michal Swiatkowski
> Sent: Tuesday, April 28, 2026 12:07 AM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; jramaseu@redhat.com; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw <przemyslaw.kitszel@intel.com>; Loktionov,
> Aleksandr <aleksandr.loktionov@intel.com>; Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of IP/IPV6
>
> The hardware is capable of calculating checksum for IPV6 packets with extension header. To not drop
> such packets switch from IP/IPV6 checksum to HW_CSUM.
>
> HW_CSUM is also used in previous generation (i40e).
>
> Previously HW_CSUM was used to indicate that hardware supports general checksum. Drop it assuming
> that if the hardware supports it, it is used.
>
> Disabling offload for E830 in case of TSO isn't needed anymore as the check for TSO is done in Tx path
> just before preparation of the special GCS descriptor.
>
> The commit from Fixes didn't introduce a bug, it just shown that the driver is doing sth wrong with the
> checksum features.
>
> Suggested-by: Jakub Ramaseuski <jramaseu@redhat.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Fixes: 04c20a9356f2 ("net: skip offload for NETIF_F_IPV6_CSUM if ipv6 header contains extension")
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 21 +--------------------
> 1 file changed, 1 insertion(+), 20 deletions(-)
Tested-by: Alexander Nowlin <alexander.nowlin@intel.com>
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of IP/IPV6
2026-04-28 7:06 ` Michal Swiatkowski
@ 2026-05-28 8:52 ` Loktionov, Aleksandr
-1 siblings, 0 replies; 23+ messages in thread
From: Loktionov, Aleksandr @ 2026-05-28 8:52 UTC (permalink / raw)
To: Michal Swiatkowski, intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, jramaseu@redhat.com, Nguyen, Anthony L,
Kitszel, Przemyslaw
> -----Original Message-----
> From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Sent: Tuesday, April 28, 2026 9:07 AM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; jramaseu@redhat.com; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>; Loktionov, Aleksandr
> <aleksandr.loktionov@intel.com>; Michal Swiatkowski
> <michal.swiatkowski@linux.intel.com>
> Subject: [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of
> IP/IPV6
>
> The hardware is capable of calculating checksum for IPV6 packets with
> extension header. To not drop such packets switch from IP/IPV6
> checksum to HW_CSUM.
>
> HW_CSUM is also used in previous generation (i40e).
>
> Previously HW_CSUM was used to indicate that hardware supports general
> checksum. Drop it assuming that if the hardware supports it, it is
> used.
>
> Disabling offload for E830 in case of TSO isn't needed anymore as the
> check for TSO is done in Tx path just before preparation of the
> special GCS descriptor.
>
> The commit from Fixes didn't introduce a bug, it just shown that the
> driver is doing sth wrong with the checksum features.
>
> Suggested-by: Jakub Ramaseuski <jramaseu@redhat.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Fixes: 04c20a9356f2 ("net: skip offload for NETIF_F_IPV6_CSUM if ipv6
> header contains extension")
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 21 +--------------------
> 1 file changed, 1 insertion(+), 20 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c
> b/drivers/net/ethernet/intel/ice/ice_main.c
> index 15550216fbf0..0f2f949af536 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -3500,9 +3500,8 @@ void ice_set_netdev_features(struct net_device
> *netdev)
> NETIF_F_RXHASH;
>
> csumo_features = NETIF_F_RXCSUM |
> - NETIF_F_IP_CSUM |
> NETIF_F_SCTP_CRC |
> - NETIF_F_IPV6_CSUM;
> + NETIF_F_HW_CSUM;
>
> vlano_features = NETIF_F_HW_VLAN_CTAG_FILTER |
> NETIF_F_HW_VLAN_CTAG_TX |
> @@ -3564,12 +3563,6 @@ void ice_set_netdev_features(struct net_device
> *netdev)
> /* Allow core to manage IRQs affinity */
> netif_set_affinity_auto(netdev);
>
> - /* Mutual exclusivity for TSO and GCS is enforced by the set
> features
> - * ndo callback.
> - */
> - if (ice_is_feature_supported(pf, ICE_F_GCS))
> - netdev->hw_features |= NETIF_F_HW_CSUM;
> -
> netif_set_tso_max_size(netdev, ICE_MAX_TSO_SIZE); }
>
> @@ -6489,18 +6482,6 @@ ice_set_features(struct net_device *netdev,
> netdev_features_t features)
> if (changed & NETIF_F_LOOPBACK)
> ret = ice_set_loopback(vsi, !!(features &
> NETIF_F_LOOPBACK));
>
> - /* Due to E830 hardware limitations, TSO (NETIF_F_ALL_TSO) with
> GCS
> - * (NETIF_F_HW_CSUM) is not supported.
> - */
> - if (ice_is_feature_supported(pf, ICE_F_GCS) &&
> - ((features & NETIF_F_HW_CSUM) && (features &
> NETIF_F_ALL_TSO))) {
> - if (netdev->features & NETIF_F_HW_CSUM)
> - dev_err(ice_pf_to_dev(pf), "To enable TSO, you
> must first disable HW checksum.\n");
> - else
> - dev_err(ice_pf_to_dev(pf), "To enable HW
> checksum, you must first disable TSO.\n");
> - return -EIO;
> - }
> -
> return ret;
> }
>
> --
> 2.49.0
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
^ permalink raw reply [flat|nested] 23+ messages in thread* RE: [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of IP/IPV6
@ 2026-05-28 8:52 ` Loktionov, Aleksandr
0 siblings, 0 replies; 23+ messages in thread
From: Loktionov, Aleksandr @ 2026-05-28 8:52 UTC (permalink / raw)
To: Michal Swiatkowski, intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, jramaseu@redhat.com, Nguyen, Anthony L,
Kitszel, Przemyslaw
> -----Original Message-----
> From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Sent: Tuesday, April 28, 2026 9:07 AM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; jramaseu@redhat.com; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>; Loktionov, Aleksandr
> <aleksandr.loktionov@intel.com>; Michal Swiatkowski
> <michal.swiatkowski@linux.intel.com>
> Subject: [PATCH iwl-net v1 2/2] ice: use NETIF_F_HW_CSUM instead of
> IP/IPV6
>
> The hardware is capable of calculating checksum for IPV6 packets with
> extension header. To not drop such packets switch from IP/IPV6
> checksum to HW_CSUM.
>
> HW_CSUM is also used in previous generation (i40e).
>
> Previously HW_CSUM was used to indicate that hardware supports general
> checksum. Drop it assuming that if the hardware supports it, it is
> used.
>
> Disabling offload for E830 in case of TSO isn't needed anymore as the
> check for TSO is done in Tx path just before preparation of the
> special GCS descriptor.
>
> The commit from Fixes didn't introduce a bug, it just shown that the
> driver is doing sth wrong with the checksum features.
>
> Suggested-by: Jakub Ramaseuski <jramaseu@redhat.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Fixes: 04c20a9356f2 ("net: skip offload for NETIF_F_IPV6_CSUM if ipv6
> header contains extension")
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 21 +--------------------
> 1 file changed, 1 insertion(+), 20 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c
> b/drivers/net/ethernet/intel/ice/ice_main.c
> index 15550216fbf0..0f2f949af536 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -3500,9 +3500,8 @@ void ice_set_netdev_features(struct net_device
> *netdev)
> NETIF_F_RXHASH;
>
> csumo_features = NETIF_F_RXCSUM |
> - NETIF_F_IP_CSUM |
> NETIF_F_SCTP_CRC |
> - NETIF_F_IPV6_CSUM;
> + NETIF_F_HW_CSUM;
>
> vlano_features = NETIF_F_HW_VLAN_CTAG_FILTER |
> NETIF_F_HW_VLAN_CTAG_TX |
> @@ -3564,12 +3563,6 @@ void ice_set_netdev_features(struct net_device
> *netdev)
> /* Allow core to manage IRQs affinity */
> netif_set_affinity_auto(netdev);
>
> - /* Mutual exclusivity for TSO and GCS is enforced by the set
> features
> - * ndo callback.
> - */
> - if (ice_is_feature_supported(pf, ICE_F_GCS))
> - netdev->hw_features |= NETIF_F_HW_CSUM;
> -
> netif_set_tso_max_size(netdev, ICE_MAX_TSO_SIZE); }
>
> @@ -6489,18 +6482,6 @@ ice_set_features(struct net_device *netdev,
> netdev_features_t features)
> if (changed & NETIF_F_LOOPBACK)
> ret = ice_set_loopback(vsi, !!(features &
> NETIF_F_LOOPBACK));
>
> - /* Due to E830 hardware limitations, TSO (NETIF_F_ALL_TSO) with
> GCS
> - * (NETIF_F_HW_CSUM) is not supported.
> - */
> - if (ice_is_feature_supported(pf, ICE_F_GCS) &&
> - ((features & NETIF_F_HW_CSUM) && (features &
> NETIF_F_ALL_TSO))) {
> - if (netdev->features & NETIF_F_HW_CSUM)
> - dev_err(ice_pf_to_dev(pf), "To enable TSO, you
> must first disable HW checksum.\n");
> - else
> - dev_err(ice_pf_to_dev(pf), "To enable HW
> checksum, you must first disable TSO.\n");
> - return -EIO;
> - }
> -
> return ret;
> }
>
> --
> 2.49.0
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
^ permalink raw reply [flat|nested] 23+ messages in thread