The Marvell switches allow the hash algorithm for MAC addresses in the address translation unit to be configured. Add support to the DSA core to allow DSA drivers to make use of devlink parameters, and allow the ATU hash to be get/set via such a parameter.
v2: Pass a pointer for where the hash should be stored, return a plain errno, or 0. Document the parameter. v3: Document type of parameter, and valid range Add break statements to default clause of switch Directly use ctx->val.vu8 Andrew Lunn (2): net: dsa: Add support for devlink device parameters net: dsa: mv88e6xxx: Add devlink param for ATU hash algorithm. .../networking/devlink-params-mv88e6xxx.txt | 7 + MAINTAINERS | 1 + drivers/net/dsa/mv88e6xxx/chip.c | 131 +++++++++++++++++- drivers/net/dsa/mv88e6xxx/chip.h | 4 + drivers/net/dsa/mv88e6xxx/global1.h | 3 + drivers/net/dsa/mv88e6xxx/global1_atu.c | 32 +++++ include/net/dsa.h | 23 +++ net/dsa/dsa.c | 48 +++++++ net/dsa/dsa2.c | 7 +- 9 files changed, 254 insertions(+), 2 deletions(-) create mode 100644 Documentation/networking/devlink-params-mv88e6xxx.txt -- 2.23.0
