> -----Original Message----- > From: Ivan Vecera <[email protected]> > Sent: Saturday, October 3, 2026 11:55 AM > To: [email protected]; Oros, Petr <[email protected]>; > [email protected] > Cc: Nguyen, Anthony L <[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]>; Lobakin, > Aleksander <[email protected]>; Alexei Starovoitov > <[email protected]>; Daniel Borkmann <[email protected]>; Jesper Dangaard > Brouer <[email protected]>; John Fastabend <[email protected]>; > Stanislav Fomichev <[email protected]>; Henry Tieman > <[email protected]>; Anirudh Venkataramanan > <[email protected]>; Michal Swiatkowski > <[email protected]>; Jesse Brandeburg > <[email protected]>; Preethi Banala <[email protected]>; Kiran Patil > <[email protected]>; Dan Nowlin <[email protected]>; Stephen > Hemminger <[email protected]>; [email protected]; > [email protected]; [email protected] > 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 <[email protected]> > wrote: > >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 <[email protected]> > >--- > > 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, > > 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 <[email protected]>
Tested-by: Rafal Romanowski <[email protected]>
