* NET_RX_DROP question
@ 2022-11-03 14:08 Joakim Tjernlund
2022-11-07 14:54 ` Joakim Tjernlund
0 siblings, 1 reply; 3+ messages in thread
From: Joakim Tjernlund @ 2022-11-03 14:08 UTC (permalink / raw)
To: netdev
In our ethernet drivers RX path we have:
if (netif_receive_skb(skb) == NET_RX_DROP)
priv->stats.rx_dropped++;
Now we can see dropped counter counting dropped pkgs but we don't see
any corrupt pkgs etc. Is NET_RX_DROP really meant to be used like this?
It gives the impression that there is something wrong with the driver.
Jocke
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: NET_RX_DROP question
2022-11-03 14:08 NET_RX_DROP question Joakim Tjernlund
@ 2022-11-07 14:54 ` Joakim Tjernlund
2022-11-07 16:48 ` Francois Romieu
0 siblings, 1 reply; 3+ messages in thread
From: Joakim Tjernlund @ 2022-11-07 14:54 UTC (permalink / raw)
To: netdev
On Thu, 2022-11-03 at 15:08 +0100, Joakim Tjernlund wrote:
> In our ethernet drivers RX path we have:
> if (netif_receive_skb(skb) == NET_RX_DROP)
> priv->stats.rx_dropped++;
>
> Now we can see dropped counter counting dropped pkgs but we don't see
> any corrupt pkgs etc. Is NET_RX_DROP really meant to be used like this?
> It gives the impression that there is something wrong with the driver.
>
> Jocke
Looking into drivers/net/ethernet is seems just a few checks if (netif_receive_skb(skb) == NET_RX_DROP),
the majority does not which makes me this I should just drop this check.
Confirmation more than welcome.
Jocke
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: NET_RX_DROP question
2022-11-07 14:54 ` Joakim Tjernlund
@ 2022-11-07 16:48 ` Francois Romieu
0 siblings, 0 replies; 3+ messages in thread
From: Francois Romieu @ 2022-11-07 16:48 UTC (permalink / raw)
To: Joakim Tjernlund; +Cc: netdev
Joakim Tjernlund <Joakim.Tjernlund@infinera.com> :
[...]
> Looking into drivers/net/ethernet is seems just a few checks if (netif_receive_skb(skb) == NET_RX_DROP),
> the majority does not which makes me this I should just drop this check.
>
> Confirmation more than welcome.
The driver should not maintain stats for packets dropped by
the core network. They are already accounted for in core stats
(include/linux/netdevice.c::struct net_device.core_stats).
--
Ueimor
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-07 16:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-03 14:08 NET_RX_DROP question Joakim Tjernlund
2022-11-07 14:54 ` Joakim Tjernlund
2022-11-07 16:48 ` Francois Romieu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).