lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 12 May 2020 04:11:11 +0300
From:   Vladimir Oltean <>
To:     Florian Fainelli <>
Cc:     Andrew Lunn <>,
        Vivien Didelot <>,
        "David S. Miller" <>,
        Jakub Kicinski <>,
        netdev <>
Subject: Re: [PATCH net-next 4/4] net: dsa: implement and use a generic
 procedure for the flow dissector

On Tue, 12 May 2020 at 02:15, Florian Fainelli <> wrote:
> On 5/11/2020 1:20 PM, Vladimir Oltean wrote:
> > From: Vladimir Oltean <>
> >
> > For all DSA formats that don't use tail tags, it looks like behind the
> > obscure number crunching they're all doing the same thing: locating the
> > real EtherType behind the DSA tag. Nonetheless, this is not immediately
> > obvious, so create a generic helper for those DSA taggers that put the
> > header before the EtherType.
> >
> > Another assumption for the generic function is that the DSA tags are of
> > equal length on RX and on TX. Prior to the previous patch, this was not
> > true for ocelot and for gswip. The problem was resolved for ocelot, but
> > for gswip it still remains, so that hasn't been converted.
> >
> > Signed-off-by: Vladimir Oltean <>
> Given that __skb_flow_dissect() already de-references dsa_device_ops
> from skb->dev->dsa_ptr, maybe we can go one step further and just have
> dsa_tag_generic_flow_dissect obtain the overhead from the SKB directly
> since this will already have touched the cache lines involved. This then
> makes it unnecessary for the various taggers to specify a custom
> function and instead, dsa_tag_generic_flow_dissect() can be assigned
> where the dsa_device_ops are declared for the various tags. Did I miss
> something?
> It also looks like tag_ocelot.c and tag_sja1105.c should have their
> dsa_device_ops structures const, as a separate patch certainly.
> --
> Florian

Actually I wrote this patch in such a way that the assembly code
generated would remain the same, since dsa_tag_generic_flow_dissect is
inline, the arithmetic would be done at compile time, which it
wouldn't be if this function were to look at the tagger .overhead.
I don't know, I can do either way.

Powered by blists - more mailing lists