Re: [PATCH net-next v6 10/14] net: ethernet: oa_tc6: implement receive path to receive rx ethernet frames

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jakub,

Thanks for reviewing the patches.

On 16/08/24 10:31 pm, Jakub Kicinski wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On Mon, 12 Aug 2024 15:56:07 +0530 Parthiban Veerasooran wrote:
>> +     if (netif_rx(tc6->rx_skb) == NET_RX_DROP)
>> +             tc6->netdev->stats.rx_dropped++;
> 
> This is a bit unusual. If the core decides to drop the packet it will
> count the drop towards the appropriate statistic. The drivers generally
> only count their own drops, and call netif_rx() without checking the
> return value.
The first version of this patch series didn't have this check. There was 
a comment in the 1st version to check the return value and update the 
statistics.

https://lore.kernel.org/lkml/375fa9b4-0fb8-8d4b-8cb5-d8a9240d8f16@xxxxxxxxxx/

That was the reason why it was introduced in the v2 of the patch series 
itself. It seems, somehow it got escaped from your RADAR from v2 to v5 
:D. Sorry, somehow I also missed to check it in the netdev core. Now I 
understand that the rx drop handled in the core itself in the below link 
using the function "dev_core_stats_rx_dropped_inc(skb->dev)".

https://github.com/torvalds/linux/blob/master/net/core/dev.c#L4894

Is my understanding correct? if so then I will remove this check in the 
next version.

Best regards,
Parthiban V






[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux