diff options
author | Gal Pressman <gal@nvidia.com> | 2025-05-08 13:30:34 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-05-09 16:24:28 -0700 |
commit | 1b2900db0119c02e6445bb61ec3fba982d10cc8d (patch) | |
tree | 696a5da055f0a3ef2074748faa042e745b2dc134 /tools/net/ynl/pyynl/cli.py | |
parent | 179542a98730ba40aef6806c7480c85ce731e588 (diff) |
ethtool: Block setting of symmetric RSS when non-symmetric rx-flow-hash is requested
Symmetric RSS hash requires that:
* No other fields besides IP src/dst and/or L4 src/dst are set
* If src is set, dst must also be set
This restriction was only enforced when RXNFC was configured after
symmetric hash was enabled. In the opposite order of operations (RXNFC
then symmetric enablement) the check was not performed.
Perform the sanity check on set_rxfh as well, by iterating over all flow
types hash fields and making sure they are all symmetric.
Introduce a function that returns whether a flow type is hashable (not
spec only) and needs to be iterated over. To make sure that no one
forgets to update the list of hashable flow types when adding new flow
types, a static assert is added to draw the developer's attention.
The conversion of uapi #defines to enum is not ideal, but as Jakub
mentioned [1], we have precedent for that.
[1] https://lore.kernel.org/netdev/20250324073509.6571ade3@kernel.org/
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250508103034.885536-1-gal@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/net/ynl/pyynl/cli.py')
0 files changed, 0 insertions, 0 deletions