Skip to content

Commit

Permalink
nfp: add DCB IEEE support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bin Chen authored and Jakub Kicinski committed Jan 14, 2023
1 parent bf20ce9 commit 9b7fe80
Show file tree
Hide file tree
Showing 5 changed files with 657 additions and 2 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/netronome/nfp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,5 @@ endif
nfp-$(CONFIG_NFP_NET_IPSEC) += crypto/ipsec.o nfd3/ipsec.o

nfp-$(CONFIG_NFP_DEBUG) += nfp_net_debugfs.o

nfp-$(CONFIG_DCB) += nic/dcb.o
1 change: 1 addition & 0 deletions drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@
#define NFP_NET_CFG_MBOX_CMD_IPSEC 3
#define NFP_NET_CFG_MBOX_CMD_PCI_DSCP_PRIOMAP_SET 5
#define NFP_NET_CFG_MBOX_CMD_TLV_CMSG 6
#define NFP_NET_CFG_MBOX_CMD_DCB_UPDATE 7

#define NFP_NET_CFG_MBOX_CMD_MULTICAST_ADD 8
#define NFP_NET_CFG_MBOX_CMD_MULTICAST_DEL 9
Expand Down
Loading

0 comments on commit 9b7fe80

Please sign in to comment.