Re: [PATCH net 1/2] net: enetc: correct the statistics of rx bytes

From: Vladimir Oltean
Date: Fri Jun 02 2023 - 06:33:56 EST


On Fri, Jun 02, 2023 at 01:27:10PM +0300, Vladimir Oltean wrote:
> Hmm, to avoid the conditional, have you considered adding an "int *rx_byte_cnt"
> argument to enetc_build_skb()? It can be updated with "(*rx_byte_cnt) += size"
> from all places where we already have "(*cleaned_cnt)++".

Ah, don't mind me. We can't avoid the conditional, since the VLAN header
is offloaded as you said. It's not in the buffer.