RE: [PATCH iwl-net 05/10] ice: report VF tx_dropped with tx_errors instead of tx_discards

From
Romanowski, Rafal <hidden>
Date
2026-11-02 10:52:34
Also in
bpf, intel-wired-lan, lkml
Reply to
Ivan Vecera, 2026-10-03
-----Original Message-----
From: Ivan Vecera <ivecera@redhat.com>
Sent: Saturday, October 3, 2026 11:55 AM
To: <redacted>; Oros, Petr <redacted>;
netdev@vger.kernel.org
Cc: Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
[off-list ref]; Andrew Lunn [off-list ref];
David S. Miller [off-list ref]; Eric Dumazet [off-list ref];
Jakub Kicinski [off-list ref]; Paolo Abeni [off-list ref]; Lobakin,
Aleksander [off-list ref]; Alexei Starovoitov
[off-list ref]; Daniel Borkmann [off-list ref]; Jesper Dangaard
Brouer [off-list ref]; John Fastabend [off-list ref];
Stanislav Fomichev [off-list ref]; Henry Tieman
[off-list ref]; Anirudh Venkataramanan
[off-list ref]; Michal Swiatkowski
[off-list ref]; Jesse Brandeburg
[off-list ref]; Preethi Banala [off-list ref]; Kiran Patil
[off-list ref]; Dan Nowlin [off-list ref]; Stephen
Hemminger [off-list ref]; intel-wired-lan@lists.osuosl.org;
linux-kernel@vger.kernel.org; bpf@vger.kernel.org
Subject: Re: [PATCH iwl-net 05/10] ice: report VF tx_dropped with tx_errors
instead of tx_discards

On October 2, 2026 3:07:47 PM GMT+02:00, Petr Oros [off-list ref]
wrote:
quoted
ice_get_vf_stats() fills tx_dropped from eth_stats.tx_discards, which
ice_update_eth_stats() never updates because the GLV_TDPC register it
would come from is not implemented in E810 hardware. The Tx drops of a
VF, such as switch drops on an anti spoof violation, malicious driver
drops or TTL expiry, are counted by GLV_TEPC into eth_stats.tx_errors
instead, so the VF always reports zero dropped packets.

With spoof checking on, a VF sending 60 valid frames and 30 frames with
a forged source MAC shows:

 vf 0 ... spoof checking on, link-state auto, trust off
   TX: bytes  packets   dropped
         3600       60        0

Report tx_errors as tx_dropped, the VF stats have no separate error
field. With the change the same test reports 30 dropped packets.

i40e fixed the same issue in commit 50b2af451597 ("i40e: report VF
tx_dropped with tx_errors instead of tx_discards").

Fixes: 730fdea40bef ("ice: implement VF stats NDO")
Assisted-by: LLM
Signed-off-by: Petr Oros <redacted>
---
drivers/net/ethernet/intel/ice/ice_sriov.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_sriov.c
b/drivers/net/ethernet/intel/ice/ice_sriov.c
index b21279f0f5f1e1..8faddf8ba0d523 100644
--- a/drivers/net/ethernet/intel/ice/ice_sriov.c
+++ b/drivers/net/ethernet/intel/ice/ice_sriov.c
@@ -1640,7 +1640,7 @@ int ice_get_vf_stats(struct net_device *netdev, int
vf_id,
quoted
	vf_stats->broadcast  = stats->rx_broadcast;
	vf_stats->multicast  = stats->rx_multicast;
	vf_stats->rx_dropped = stats->rx_discards;
-	vf_stats->tx_dropped = stats->tx_discards;
+	vf_stats->tx_dropped = stats->tx_errors;

out_put_vf:
	ice_put_vf(vf);
Reviewed-by: Ivan Vecera <ivecera@redhat.com>

Tested-by: Rafal Romanowski <redacted>
Thread (41 messages) 41 messages, 5 authors, last reply 16h ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help