Re: [PATCH net-next 0/9] Remove skb_mac_header() dependency in DSA xmit path

From: Vladimir Oltean
Date: Thu Mar 23 2023 - 12:38:51 EST


Hi Eric,

On Thu, Mar 23, 2023 at 09:24:28AM -0700, Eric Dumazet wrote:
> On Wed, Mar 22, 2023 at 4:38 PM Vladimir Oltean <vladimir.oltean@xxxxxxx> wrote:
> >
> > Eric started working on removing skb_mac_header() assumptions from the
> > networking xmit path, and I offered to help for DSA:
> > https://lore.kernel.org/netdev/20230321164519.1286357-1-edumazet@xxxxxxxxxx/
> >
> > The majority of this patch set is a straightforward replacement of
> > skb_mac_header() with skb->data (hidden either behind skb_eth_hdr(), or
> > behind skb_vlan_eth_hdr()). The only patch which is more "interesting"
> > is 9/9.
> >
>
> SGTM, thanks a lot !
>
> For the whole series :
>
> Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>

I'd have to resend this patch set anyway, due to the kdoc warning from
the last patch:
https://patchwork.hopto.org/static/nipa/732927/13184745/kdoc/stderr
(and also probably to CC the driver maintainers where I'm refactoring
stuff; didn't want to do that for what I was sure would only be the
initial patch set)

Have you seen my dilemma from patch 9/9 and from the cover letter -
__skb_vlan_pop() potentially being called from not just one xmit code
path? I took a different approach for vlan_insert_tag() (patch 1/9)
compared to __skb_vlan_pop() (patch 9/9). If we look at the larger
picture with the tc-vlan action, it would be a valid alternative to also
use skb_mac_header_was_set() in __skb_vlan_pop().