From: Simon Horman <simon.horman@corigine.com>
To: Hariprasad Kelam <hkelam@marvell.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com,
edumazet@google.com, sgoutham@marvell.com, lcherian@marvell.com,
gakula@marvell.com, jerinj@marvell.com, sbhatta@marvell.com,
jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
saeedm@nvidia.com, richardcochran@gmail.com, tariqt@nvidia.com,
linux-rdma@vger.kernel.org, maxtram95@gmail.com,
naveenm@marvell.com, bpf@vger.kernel.org,
hariprasad.netdev@gmail.com
Subject: Re: [net-next Patch V4 1/4] sch_htb: Allow HTB priority parameter in offload mode
Date: Fri, 10 Feb 2023 14:25:54 +0100 [thread overview]
Message-ID: <Y+ZF4k8+CidOG75r@corigine.com> (raw)
In-Reply-To: <20230210111051.13654-2-hkelam@marvell.com>
On Fri, Feb 10, 2023 at 04:40:48PM +0530, Hariprasad Kelam wrote:
> From: Naveen Mamindlapalli <naveenm@marvell.com>
>
> 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>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en/qos.c | 7 ++++++-
> include/net/pkt_cls.h | 1 +
> net/sched/sch_htb.c | 7 +++----
> 3 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c b/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c
> index 2842195ee548..b683dc787827 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_MOD(htb_qopt->extack,
> + "prio parameter is not supported by device with HTB offload enabled.");
> + return -EINVAL;
I think returning -EOPNOTSUPP would be more appropriate here.
> + }
> +
> switch (htb_qopt->command) {
> case TC_HTB_CREATE:
> if (!mlx5_qos_is_supported(priv->mdev)) {
> @@ -515,4 +521,3 @@ int mlx5e_mqprio_rl_get_node_hw_id(struct mlx5e_mqprio_rl *rl, int tc, u32 *hw_i
> *hw_id = rl->leaves_id[tc];
> return 0;
> }
> -
nit: This is a good cleanup. But not strictly related to this patch.
...
next prev parent reply other threads:[~2023-02-10 13:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 11:10 [net-next Patch V4 0/4] octeontx2-pf: HTB offload support Hariprasad Kelam
2023-02-10 11:10 ` [net-next Patch V4 1/4] sch_htb: Allow HTB priority parameter in offload mode Hariprasad Kelam
2023-02-10 13:25 ` Simon Horman [this message]
2023-02-12 16:19 ` Hariprasad Kelam
2023-02-10 11:10 ` [net-next Patch V4 2/4] octeontx2-pf: qos send queues management Hariprasad Kelam
2023-02-10 15:13 ` Simon Horman
2023-02-13 6:19 ` Hariprasad Kelam
2023-02-10 11:10 ` [net-next Patch V4 3/4] octeontx2-pf: Refactor schedular queue alloc/free calls Hariprasad Kelam
2023-02-10 15:06 ` Simon Horman
2023-02-12 16:21 ` Hariprasad Kelam
2023-02-10 11:10 ` [net-next Patch V4 4/4] octeontx2-pf: Add support for HTB offload Hariprasad Kelam
2023-02-10 15:05 ` Simon Horman
2023-02-13 6:16 ` Hariprasad Kelam
2023-02-11 0:36 ` [net-next Patch V4 0/4] octeontx2-pf: HTB offload support Jakub Kicinski
2023-02-13 6:22 ` Hariprasad Kelam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y+ZF4k8+CidOG75r@corigine.com \
--to=simon.horman@corigine.com \
--cc=bpf@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hariprasad.netdev@gmail.com \
--cc=hkelam@marvell.com \
--cc=jerinj@marvell.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=lcherian@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=maxtram95@gmail.com \
--cc=naveenm@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=saeedm@nvidia.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
--cc=tariqt@nvidia.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.