lists.openwall.net   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  linux-cve-announce  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]
Message-ID: <16b11435-e9f4-f869-bbcd-fea3cb069f71@gmail.com>
Date:   Mon, 11 May 2020 16:15:34 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Vladimir Oltean <olteanv@...il.com>, andrew@...n.ch,
        vivien.didelot@...il.com
Cc:     davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 4/4] net: dsa: implement and use a generic
 procedure for the flow dissector



On 5/11/2020 1:20 PM, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@....com>
> 
> 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 <vladimir.oltean@....com>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ