diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2020-09-26 22:32:08 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-26 14:17:59 -0700 |
commit | 54fec33582aa60a76902dbe24ac8c1b5650e8e63 (patch) | |
tree | 1997e33e69b3cd5b2f839f68ab1ae536c39bb273 /net/dsa | |
parent | 7a6ffe764be35af0527d8cfd047945e8f8797ddf (diff) |
net: flow_dissector: avoid indirect call to DSA .flow_dissect for generic case
With the recent mitigations against speculative execution exploits,
indirect function calls are more expensive and it would be good to avoid
them where possible.
In the case of DSA, most switch taggers will shift the EtherType and
next headers by a fixed amount equal to that tag's length in bytes.
So we can use a generic procedure to determine that, without calling
into custom tagger code. However we still leave the flow_dissect method
inside struct dsa_device_ops as an override for the generic function.
Suggested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
0 files changed, 0 insertions, 0 deletions