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
| ||
|
Date: Sat, 26 Sep 2020 21:18:15 +0300 From: Vladimir Oltean <olteanv@...il.com> To: Andrew Lunn <andrew@...n.ch> Cc: Vladimir Oltean <vladimir.oltean@....com>, netdev@...r.kernel.org, davem@...emloft.net, f.fainelli@...il.com, vivien.didelot@...il.com, kuba@...nel.org Subject: Re: [PATCH v2 net-next 06/16] net: dsa: add a generic procedure for the flow dissector On Sat, Sep 26, 2020 at 08:05:45PM +0200, Andrew Lunn wrote: > Given spectra and meltdown etc, jumping through a pointer is expensive > and we try to avoid it on the hot path. Given most of the taggers are > going to use the generic version, maybe add a test here, is > ops->flow_dissect the generic version, and if so, call it directly, > rather than go through the pointer. Or only set ops->flow_dissect if > the generic version cannot be used. Agree about the motivation to eliminate an indirect call if possible. The situation is as follows: - Some taggers are before DMAC or before EtherType. These are the vast majority, and dsa_tag_generic_flow_dissect works well for them. We can keep the .flow_dissect callback as an override, but if this is absent, then the flow dissector can call dsa_tag_generic_flow_dissect directly. - Some taggers use tail tags. These don't need any massaging at all. But we need to tell the flow dissector to not call dsa_tag_generic_flow_dissect if it doesn't find a function pointer. I'm thinking about adding another "bool tail_tag" in struct dsa_device_ops, for this purpose and not only*. *Usually tunnel interfaces need to set dev->needed_headroom for the memory allocator. But DSA doesn't request that, and needs to check manually in the xmit function if the headroom is large enough to push a tag. BUT! tail tags don't need dev->needed_headroom, they need dev->needed_tailroom, I think. So I was thinking about adding this bool anyway, to distinguish between these 2 cases. What do you think?
Powered by blists - more mailing lists