sch_htb: Allow HTB priority parameter in offload mode
authorNaveen Mamindlapalli <naveenm@marvell.com>
Sat, 13 May 2023 08:51:36 +0000 (14:21 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 May 2023 08:31:07 +0000 (09:31 +0100)
commit12e7789ad5b476e945aba8edb1161c633cb7db31
tree43787023adafbc1fe413fcca965a95745c4c1267
parentb2cbac9b9b28730e9e53be20b6cdf979d3b9f27e
sch_htb: Allow HTB priority parameter in offload mode

The current implementation of HTB offload returns the EINVAL error
for unsupported parameters like prio and quantum. This patch removes
the error returning checks for 'prio' parameter and populates its
value to tc_htb_qopt_offload structure such that driver can use the
same.

Add prio parameter check in mlx5 driver, as mlx5 devices are not capable
of supporting the prio parameter when htb offload is used. Report error
if prio parameter is set to a non-default value.

Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com>
Co-developed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c
include/net/pkt_cls.h
net/sched/sch_htb.c