nfp: add DCB IEEE support
authorBin Chen <bin.chen@corigine.com>
Thu, 12 Jan 2023 12:11:02 +0000 (13:11 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 14 Jan 2023 05:40:01 +0000 (21:40 -0800)
commit9b7fe8046d7429ba776f962ad3b4b7ba2d6859c8
tree8d58f8ee356578e6829260704a2bc25e2a23b0e7
parentbf20ce9f3040e29f806d2b290f7bddbdee9f32ad
nfp: add DCB IEEE support

Add basic DCB IEEE support. This includes support for ETS, max-rate,
and DSCP to user priority mapping.

DCB may be configured using iproute2's dcb command.
Example usage:
  dcb ets set dev $dev tc-tsa 0:ets 1:ets 2:ets 3:ets 4:ets 5:ets \
    6:ets 7:ets tc-bw 0:0 1:80 2:0 3:0 4:0 5:0 6:20 7:0
  dcb maxrate set dev $dev tc-maxrate 1:1000bit

And DCB configuration can be shown using:
  dcb ets show dev $dev
  dcb maxrate show dev $dev

Signed-off-by: Bin Chen <bin.chen@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20230112121102.469739-1-simon.horman@corigine.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/netronome/nfp/Makefile
drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h
drivers/net/ethernet/netronome/nfp/nic/dcb.c [new file with mode: 0644]
drivers/net/ethernet/netronome/nfp/nic/main.c
drivers/net/ethernet/netronome/nfp/nic/main.h [new file with mode: 0644]