Add support for configure CBS through TC

Issue: New feature requirement to have
CBS configuration through TC

Fix: added support for same.

sudo tc qdisc add dev eth4 parent root handle 6666 mqprio \
        num_tc 3 \
        map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \
        queues 1@0 1@1 2@2 \
        hw 0
sudo tc qdisc replace dev eth4 parent 6666:3 cbs \
        idleslope 2000000 sendslope -8000000 hicredit 3000 locredit -1200 \
        offload 1

Bug  200776994

Change-Id: Id83b967bcbbb18201f2757987ab1cefe63b4ad8d
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2649428
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Rakesh Goyal
2022-01-04 15:32:08 +05:30
committed by Revanth Kumar Uppala
parent ad01764abb
commit dbf00db6bb
3 changed files with 109 additions and 2 deletions

View File

@@ -4109,6 +4109,8 @@ static int ether_setup_tc(struct net_device *ndev, enum tc_setup_type type,
switch (type) {
case TC_SETUP_QDISC_TAPRIO:
return ether_tc_setup_taprio(pdata, type_data);
case TC_SETUP_QDISC_CBS:
return ether_tc_setup_cbs(pdata, type_data);
default:
return -EOPNOTSUPP;
}