lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <PH0PR18MB4474ACB4E8103A05AE160B17DEDC9@PH0PR18MB4474.namprd18.prod.outlook.com>
Date:   Sun, 12 Feb 2023 16:19:26 +0000
From:   Hariprasad Kelam <hkelam@...vell.com>
To:     Simon Horman <simon.horman@...igine.com>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        Sunil Kovvuri Goutham <sgoutham@...vell.com>,
        Linu Cherian <lcherian@...vell.com>,
        Geethasowjanya Akula <gakula@...vell.com>,
        Jerin Jacob Kollanukkaran <jerinj@...vell.com>,
        Subbaraya Sundeep Bhatta <sbhatta@...vell.com>,
        "jhs@...atatu.com" <jhs@...atatu.com>,
        "xiyou.wangcong@...il.com" <xiyou.wangcong@...il.com>,
        "jiri@...nulli.us" <jiri@...nulli.us>,
        "saeedm@...dia.com" <saeedm@...dia.com>,
        "richardcochran@...il.com" <richardcochran@...il.com>,
        "tariqt@...dia.com" <tariqt@...dia.com>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "maxtram95@...il.com" <maxtram95@...il.com>,
        Naveen Mamindlapalli <naveenm@...vell.com>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        "hariprasad.netdev@...il.com" <hariprasad.netdev@...il.com>
Subject: Re: [net-next Patch V4 1/4] sch_htb: Allow HTB priority parameter in
 offload mode



> On Fri, Feb 10, 2023 at 04:40:48PM +0530, Hariprasad Kelam wrote:
> > From: Naveen Mamindlapalli <naveenm@...vell.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@...vell.com>
> > Co-developed-by: Rahul Rameshbabu <rrameshbabu@...dia.com>
> > Signed-off-by: Rahul Rameshbabu <rrameshbabu@...dia.com>
> > Signed-off-by: Hariprasad Kelam <hkelam@...vell.com>
> > Signed-off-by: Sunil Kovvuri Goutham <sgoutham@...vell.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.

ACK, will fix in next version.

Thanks,
Hariprasad k
> 
> > +	}
> > +
> >  	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.
> 
> ...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ