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

From: Romanowski, Rafal

Date: Mon Nov 02 2026 - 05:59:28 EST


> -----Original Message-----
> From: Ivan Vecera <ivecera@xxxxxxxxxx>
> Sent: Saturday, October 3, 2026 11:55 AM
> To: intel-wired-lan@xxxxxxxxxx; Oros, Petr <poros@xxxxxxxxxx>;
> netdev@xxxxxxxxxxxxxxx
> Cc: Nguyen, Anthony L <anthony.l.nguyen@xxxxxxxxx>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@xxxxxxxxx>; Andrew Lunn <andrew+netdev@xxxxxxx>;
> David S. Miller <davem@xxxxxxxxxxxxx>; Eric Dumazet <edumazet@xxxxxxxxxx>;
> Jakub Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>; Lobakin,
> Aleksander <aleksander.lobakin@xxxxxxxxx>; Alexei Starovoitov
> <ast@xxxxxxxxxx>; Daniel Borkmann <daniel@xxxxxxxxxxxxx>; Jesper Dangaard
> Brouer <hawk@xxxxxxxxxx>; John Fastabend <john.fastabend@xxxxxxxxx>;
> Stanislav Fomichev <sdf@xxxxxxxxxxx>; Henry Tieman
> <henry.w.tieman@xxxxxxxxx>; Anirudh Venkataramanan
> <anirudh.venkataramanan@xxxxxxxxx>; Michal Swiatkowski
> <michal.swiatkowski@xxxxxxxxxxxxxxx>; Jesse Brandeburg
> <jbrandeb@xxxxxxxxxx>; Preethi Banala <preethi.banala@xxxxxxxxx>; Kiran Patil
> <kiran.patil@xxxxxxxxx>; Dan Nowlin <dan.nowlin@xxxxxxxxx>; Stephen
> Hemminger <stephen@xxxxxxxxxxxxxxxxxx>; intel-wired-lan@xxxxxxxxxxxxxxxx;
> linux-kernel@xxxxxxxxxxxxxxx; bpf@xxxxxxxxxxxxxxx
> 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 <poros@xxxxxxxxxx>
> 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 <poros@xxxxxxxxxx>
> >---
> > 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 <ivecera@xxxxxxxxxx>


Tested-by: Rafal Romanowski <rafal.romanowski@xxxxxxxxx>