ice: stop counting UDP csum mismatch as rx_errors
Subsystems (3)
PATCH 1/1 ice: stop counting UDP csum mismatch as rx_errors
From: Jesse Brandeburg <[email protected]>
Since the beginning, the Intel ice driver has counted receive checksum offload mismatches into the rx_errors member of the rtnl_link_stats64 struct. In ethtool -S these show up as rx_csum_bad.nic.
I believe counting these in rx_errors is fundamentally wrong, as it's pretty clear from the comments in if_link.h and from every other statistic the driver is summing into rx_errors, that all of them would cause a "hardware drop" except for the UDP checksum mismatch, as well as the fact that all the other causes for rx_errors are L2 reasons, and this L4 UDP "mismatch" is an outlier.
A last nail in the coffin is that rx_errors is monitored in production and can indicate a bad NIC/cable/Switch port, but instead some random series of UDP packets with bad checksums will now trigger this alert. This false positive makes the alert useless and affects us as well as other companies.
This packet with presumably a bad UDP checksum is *already* passed to the stack, just not marked as offloaded by the hardware/driver. If it is dropped by the stack it will show up as UDP_MIB_CSUMERRORS.
And one more thing, none of the other Intel drivers, and at least bnxt_en and mlx5 both don't appear to count UDP offload mismatches as rx_errors.
Here is a related customer complaint:
https://community.intel.com/t5/Ethernet-Products/ice-rx-errros-is-too-sensitive-to-IP-TCP-attack-packets-Intel/td-p/1662125
--
I am sending this to net as I consider it a bug, and it will backport cleanly.
--- drivers/net/ethernet/intel/ice/ice_main.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_main.c +0 -1
@@ -6995,7 +6995,6 @@ void ice_update_vsi_stats(struct ice_vsi *vsi) cur_ns->rx_errors = pf->stats.crc_errors + pf->stats.illegal_bytes + pf->stats.rx_undersize + - pf->hw_csum_rx_error + pf->stats.rx_jabber + pf->stats.rx_fragments + pf->stats.rx_oversize;
Signature · 1 line
2.47.3
Quoted 33 lines · Jesse Brandeburg
From: Jesse Brandeburg <[email protected]>
Since the beginning, the Intel ice driver has counted receive checksum offload mismatches into the
rx_errorsmember of thertnl_link_stats64struct. In ethtool -S these show up as rx_csum_bad.nic.I believe counting these in
rx_errorsis fundamentally wrong, as it's pretty clear from the comments inif_link.hand from every other statistic the driver is summing intorx_errors, that all of them would cause a "hardware drop" except for the UDP checksum mismatch, as well as the fact that all the other causes forrx_errorsare L2 reasons, and this L4 UDP "mismatch" is an outlier.A last nail in the coffin is that
rx_errorsis monitored in production and can indicate a bad NIC/cable/Switch port, but instead some random series of UDP packets with bad checksums will now trigger this alert. This false positive makes the alert useless and affects us as well as other companies.This packet with presumably a bad UDP checksum is *already* passed to the stack, just not marked as offloaded by the hardware/driver. If it is dropped by the stack it will show up as
UDP_MIB_CSUMERRORS.And one more thing, none of the other Intel drivers, and at least
bnxt_enand mlx5 both don't appear to count UDP offload mismatches asrx_errors.Here is a related customer complaint:
https://community.intel.com/t5/Ethernet-Products/ice-rx-errros-is-too-sensitive-to-IP-TCP-attack-packets-Intel/td-p/1662125Fixes 4f1fe43c920b ("ice: Add more Rx errors to netdev's rx_error counter")Cc Tony Nguyen <[email protected]>Cc Jake Keller <[email protected]>Cc IWL <[email protected]>Signed-off-by Jesse Brandeburg <[email protected]>
Quoted 4 lines
--
I am sending this to net as I consider it a bug, and it will backport cleanly.
---
Its fine with me. I can't find anything explaining why we originally chose to put these in rx_errors, and I think its better to align with other drivers and vendors. I suspect its just as "this is an error, it obviously goes in rx_errors" even though its of a completely different kind.
Quoted 15 lines
drivers/net/ethernet/intel/ice/ice_main.c | 1 - 1 file changed, 1 deletion(-)drivers/net/ethernet/intel/ice/ice_main.c +0
-1@@ -6995,7 +6995,6 @@ void ice_update_vsi_stats(struct ice_vsi *vsi) cur_ns->rx_errors = pf->stats.crc_errors + pf->stats.illegal_bytes + pf->stats.rx_undersize + - pf->hw_csum_rx_error + pf->stats.rx_jabber + pf->stats.rx_fragments + pf->stats.rx_oversize;
Quoted 74 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Jesse Brandeburg
Sent: Tuesday, December 2, 2025 12:39 AM
To: [email protected]
Cc: Brandeburg, Jesse <[email protected]>; Nguyen, Anthony L <[email protected]>; Keller, Jacob E <[email protected]>; IWL <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Andrew Lunn <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; Brett Creeley <[email protected]>
Subject: [Intel-wired-lan] [PATCH net v1] ice: stop counting UDP csum mismatch asrx_errorsFrom: Jesse Brandeburg <[email protected]>
Since the beginning, the Intel ice driver has counted receive checksum offload mismatches into the
rx_errorsmember of thertnl_link_stats64struct. In ethtool -S these show up as rx_csum_bad.nic.I believe counting these in
rx_errorsis fundamentally wrong, as it's pretty clear from the comments inif_link.hand from every other statistic
the driver is summing intorx_errors, that all of them would cause a "hardware drop" except for the UDP checksum mismatch, as well as the fact
that all the other causes forrx_errorsare L2 reasons, and this L4 UDP
"mismatch" is an outlier.A last nail in the coffin is that
rx_errorsis monitored in production and
can indicate a bad NIC/cable/Switch port, but instead some random series of
UDP packets with bad checksums will now trigger this alert. This false positive makes the alert useless and affects us as well as other companies.This packet with presumably a bad UDP checksum is *already* passed to the
stack, just not marked as offloaded by the hardware/driver. If it is dropped by the stack it will show up asUDP_MIB_CSUMERRORS.And one more thing, none of the other Intel drivers, and at least
bnxt_en
and mlx5 both don't appear to count UDP offload mismatches asrx_errors.Here is a related customer complaint:
https://community.intel.com/t5/Ethernet-Products/ice-rx-errros-is-too-
sensitive-to-IP-TCP-attack-packets-Intel/td-p/1662125Fixes 4f1fe43c920b ("ice: Add more Rx errors to netdev's rx_errorcounter")
Cc Tony Nguyen <[email protected]>Cc Jake Keller <[email protected]>Cc IWL <[email protected]>Signed-off-by Jesse Brandeburg <[email protected]>--
I am sending this to net as I consider it a bug, and it will backport cleanly.--- drivers/net/ethernet/intel/ice/ice_main.c | 1 - 1 file changed, 1 deletion(-)drivers/net/ethernet/intel/ice/ice_main.c +0
-0
drivers/net/ethernet/intel/ice/ice_main.c void ice_update_vsi_stats(struct ice_vsi *vsi) · line 6998
Quoted 4 lines
drivers/net/ethernet/intel/ice/ice_main.c +0
-1@@ -6995,7 +6995,6 @@ void ice_update_vsi_stats(struct ice_vsi *vsi) cur_ns->rx_errors = pf->stats.crc_errors + pf->stats.illegal_bytes + pf->stats.rx_undersize + - pf->hw_csum_rx_error +
Good day , Jesse
It looks like you remove the single place where the ' hw_csum_rx_error' var is being really used. What about removing it's declaration and calculation then?
Quoted 5 lines
drivers/net/ethernet/intel/ice/ice_main.c +0
-1pf->stats.rx_jabber + pf->stats.rx_fragments + pf->stats.rx_oversize; --2.47.3
Quoted 6 lines · Aleksandr
Quoted 6 lines
drivers/net/ethernet/intel/ice/ice_main.c +0
-0@@ -6995,7 +6995,6 @@ void ice_update_vsi_stats(struct ice_vsi *vsi)
Quoted 8 lines
drivers/net/ethernet/intel/ice/ice_main.c void ice_update_vsi_stats(struct ice_vsi *vsi) · line 6998
Quoted 4 lines
drivers/net/ethernet/intel/ice/ice_main.c +0
-1cur_ns->rx_errors = pf->stats.crc_errors + pf->stats.illegal_bytes + pf->stats.rx_undersize + - pf->hw_csum_rx_error +Good day , Jesse
It looks like you remove the single place where the 'hw_csum_rx_error' var is being really used. What about removing it's declaration and calculation then?
Hi Aleks! That's not true, however, as the stat is incremented in receive path and shown in ethtool -S. I think it is incredibly valuable to have in the ethtool stats that the hardware is "not offloading" a checksum. As well, all the other drivers in the high-speed Ethernet category have a similar counter.
I hope you'll agree it's still useful?
Quoted 34 lines
-----Original Message-----
From: Jesse Brandeburg <[email protected]>
Sent: Friday, December 5, 2025 8:05 PM
To: Loktionov, Aleksandr <[email protected]>; Jesse Brandeburg <[email protected]>; [email protected]
Cc: Nguyen, Anthony L <[email protected]>; Keller, Jacob E <[email protected]>; IWL <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Andrew Lunn <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>
Subject: Re: [Intel-wired-lan] [PATCH net v1] ice: stop counting UDP csum mismatch asrx_errorsQuoted 6 lines · Aleksandr
drivers/net/ethernet/intel/ice/ice_main.c void ice_update_vsi_stats(struct ice_vsi
Quoted 6 lines
drivers/net/ethernet/intel/ice/ice_main.c +0
-0@@ -6995,7 +6995,6 @@ void ice_update_vsi_stats(struct ice_vsi*vsi)
Quoted 7 lines
drivers/net/ethernet/intel/ice/ice_main.c void ice_update_vsi_stats(struct ice_vsi *vsi) · line 6998
Quoted 4 lines
drivers/net/ethernet/intel/ice/ice_main.c +0
-1cur_ns->rx_errors = pf->stats.crc_errors + pf->stats.illegal_bytes + pf->stats.rx_undersize + - pf->hw_csum_rx_error +Good day , Jesse
It looks like you remove the single place where the '
hw_csum_rx_error' var is being really used.Quoted 1 line
What about removing it's declaration and calculation then?
Quoted 7 lines
Hi Aleks! That's not true, however, as the stat is incremented in receive path and shown in ethtool -S. I think it is incredibly valuable to have in the ethtool stats that the hardware is "not offloading" a checksum. As well, all the other drivers in the high- speed Ethernet category have a similar counter.
I hope you'll agree it's still useful?
So, the hw_csum_rx_error still will be visible in rx_csum_bad.nic as 'private' ethtool statistics. But I mean it will be not reflected in the standard "/sys/class/net/<if>/statistics". What do you think about it?
Quoted 40 lines · Aleksandr
Quoted 40 lines
-----Original Message-----
From: Jesse Brandeburg <[email protected]>
Sent: Friday, December 5, 2025 8:05 PM
To: Loktionov, Aleksandr <[email protected]>; Jesse Brandeburg <[email protected]>; [email protected]
Cc: Nguyen, Anthony L <[email protected]>; Keller, Jacob E <[email protected]>; IWL <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Andrew Lunn <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>
Subject: Re: [Intel-wired-lan] [PATCH net v1] ice: stop counting UDP csum mismatch asrx_errorsQuoted 6 lines · Aleksandr
drivers/net/ethernet/intel/ice/ice_main.c void ice_update_vsi_stats(struct ice_vsi
Quoted 6 lines
drivers/net/ethernet/intel/ice/ice_main.c +0
-0@@ -6995,7 +6995,6 @@ void ice_update_vsi_stats(struct ice_vsi*vsi)
Quoted 7 lines
drivers/net/ethernet/intel/ice/ice_main.c void ice_update_vsi_stats(struct ice_vsi *vsi) · line 6998
Quoted 4 lines
drivers/net/ethernet/intel/ice/ice_main.c +0
-1cur_ns->rx_errors = pf->stats.crc_errors + pf->stats.illegal_bytes + pf->stats.rx_undersize + - pf->hw_csum_rx_error +Good day , Jesse
It looks like you remove the single place where the '
hw_csum_rx_error' var is being really used.Quoted 1 line
What about removing it's declaration and calculation then?
Hi Aleks! That's not true, however, as the stat is incremented in receive path and shown in ethtool -S. I think it is incredibly valuable to have in the ethtool stats that the hardware is "not offloading" a checksum. As well, all the other drivers in the high- speed Ethernet category have a similar counter.
Quoted 3 lines
Quoted 1 line
I hope you'll agree it's still useful?
So, the
hw_csum_rx_errorstill will be visible in rx_csum_bad.nic as 'private' ethtool statistics.
Correct.
Quoted 2 lines
But I mean it will be not reflected in the standard "/sys/class/net/<if>/statistics". What do you think about it?
As the commit message said, no other drivers reflect this stat in net/interface/statistics (also there is no where to put it). I think not showing this is the whole intent of the patch. If there *was* a bad checksum it will be reflected in the kernel's checksum MIB stats, because the driver will have passed the frame to the stack anyway.
Why should this driver be different than all the other kernel drivers I mentioned in the commit message?
BR,
Jesse
Quoted 50 lines · On 12/5/2025 2:44 PM, [email protected] wrote:
Quoted 40 lines · Aleksandr
Quoted 40 lines
-----Original Message-----
From: Jesse Brandeburg <[email protected]>
Sent: Friday, December 5, 2025 8:05 PM
To: Loktionov, Aleksandr <[email protected]>; Jesse Brandeburg <[email protected]>; [email protected]
Cc: Nguyen, Anthony L <[email protected]>; Keller, Jacob E <[email protected]>; IWL <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Andrew Lunn <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>
Subject: Re: [Intel-wired-lan] [PATCH net v1] ice: stop counting UDP csum mismatch asrx_errorsQuoted 6 lines · Aleksandr
drivers/net/ethernet/intel/ice/ice_main.c void ice_update_vsi_stats(struct ice_vsi
Quoted 6 lines
drivers/net/ethernet/intel/ice/ice_main.c +0
-0@@ -6995,7 +6995,6 @@ void ice_update_vsi_stats(struct ice_vsi*vsi)
Quoted 7 lines
drivers/net/ethernet/intel/ice/ice_main.c void ice_update_vsi_stats(struct ice_vsi *vsi) · line 6998
Quoted 4 lines
drivers/net/ethernet/intel/ice/ice_main.c +0
-1cur_ns->rx_errors = pf->stats.crc_errors + pf->stats.illegal_bytes + pf->stats.rx_undersize + - pf->hw_csum_rx_error +Good day , Jesse
It looks like you remove the single place where the '
hw_csum_rx_error' var is being really used.Quoted 1 line
What about removing it's declaration and calculation then?
Hi Aleks! That's not true, however, as the stat is incremented in receive path and shown in ethtool -S. I think it is incredibly valuable to have in the ethtool stats that the hardware is "not offloading" a checksum. As well, all the other drivers in the high- speed Ethernet category have a similar counter.
Quoted 3 lines
Quoted 1 line
I hope you'll agree it's still useful?
So, the
hw_csum_rx_errorstill will be visible in rx_csum_bad.nic as 'private' ethtool statistics.Correct.
Quoted 2 lines
But I mean it will be not reflected in the standard "/sys/class/net/<if>/statistics". What do you think about it?
Quoted 6 lines
As the commit message said, no other drivers reflect this stat in
net/interface/statistics(also there is no where to put it). I think not showing this is the whole intent of the patch. If there *was* a bad checksum it will be reflected in the kernel's checksum MIB stats, because the driver will have passed the frame to the stack anyway.Why should this driver be different than all the other kernel drivers I mentioned in the commit message?
BR,
Jesse
Right. I agree with Jesse's proposed change. We still keep the stat for the ethtool but we don't report it as a full error to the standard statistics. This matches other drivers from our own products and other vendors.
Thanks,
Jake
Quoted 4 lines · Jacob Keller
Right. I agree with Jesse's proposed change. We still keep the stat for the ethtool but we don't report it as a full error to the standard statistics. This matches other drivers from our own products and other vendors.
Hi Tony, can I please get an update on the status of this patch? it's been two months for a 1 liner "net" fix.
Tony Nguyen
maintainerQuoted 8 lines · Jesse Brandeburg
Quoted 4 lines · Jacob Keller
Right. I agree with Jesse's proposed change. We still keep the stat for the ethtool but we don't report it as a full error to the standard statistics. This matches other drivers from our own products and other vendors.
Hi Tony, can I please get an update on the status of this patch? it's been two months for a 1 liner "net" fix.
Hi Jesse, it's part of the PR that I'm working on now; it'll go out today. It's an isolated and straightforward change that I'm sending it on.
Thanks,
Tony