Re: [net-next Patch v2 1/5] sch_htb: Allow HTB priority parameter in offload mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Wed, Jan 18, 2023 at 03:34:06PM +0530, Hariprasad Kelam wrote:
> From: Naveen Mamindlapalli <naveenm@xxxxxxxxxxx>
> 
> 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@xxxxxxxxxxx>
> Co-developed-by: Rahul Rameshbabu <rrameshbabu@xxxxxxxxxx>
> Signed-off-by: Rahul Rameshbabu <rrameshbabu@xxxxxxxxxx>
> Signed-off-by: Hariprasad Kelam <hkelam@xxxxxxxxxxx>
> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@xxxxxxxxxxx>
> ---
> v2*  ensure other drivers won't effect by allowing 'prio'
>      parameter in htb offload mode

<...>

> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c 
> b/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c
> index 2842195ee548..e16b3d6ea471 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c
> @@ -379,6 +379,12 @@ int mlx5e_htb_setup_tc(struct mlx5e_priv *priv, struct tc_htb_qopt_offload *htb_
>  	if (!htb && htb_qopt->command != TC_HTB_CREATE)
>  		return -EINVAL;
> 
> +	if (htb_qopt->prio) {
> +		NL_SET_ERR_MSG(htb_qopt->extack,
> +			       "prio parameter is not supported by device with HTB offload 
> +enabled.");

NL_SET_ERR_MSG_MOD()

>> will add this change in next version.

Thanks,
Hariprasad k

Thanks




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux