]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: VF rate limit support
authorBin Chen <bin.chen@corigine.com>
Wed, 11 May 2022 11:39:32 +0000 (13:39 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 12 May 2022 11:03:08 +0000 (13:03 +0200)
commit0f4b1d2f61df7bff6b25b43e3a322b84c7aea922
tree65c76bd75ec6eef47ec3437db6aa5c0df3d36f92
parented62f85ec48df9e4df780bc873a63858f77de298
nfp: VF rate limit support

Add VF rate limit feature

This patch enhances the NFP driver to supports assignment of
both max_tx_rate and min_tx_rate to VFs

The template of configurations below is all supported.
e.g.
 # ip link set $DEV vf $VF_NUM max_tx_rate $RATE_VALUE
 # ip link set $DEV vf $VF_NUM min_tx_rate $RATE_VALUE
 # ip link set $DEV vf $VF_NUM max_tx_rate $RATE_VALUE \
       min_tx_rate $RATE_VALUE
 # ip link set $DEV vf $VF_NUM min_tx_rate $RATE_VALUE \
       max_tx_rate $RATE_VALUE

The max RATE_VALUE is limited to 0xFFFF which is about
63Gbps (using 1024 for 1G)

Signed-off-by: Bin Chen <bin.chen@corigine.com>
Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Baowen Zheng <baowen.zheng@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c
drivers/net/ethernet/netronome/nfp/nfp_net_sriov.c
drivers/net/ethernet/netronome/nfp/nfp_net_sriov.h