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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <PH0PR18MB44744508CBFA6ED92BE60782DED99@PH0PR18MB4474.namprd18.prod.outlook.com>
Date:   Thu, 9 Feb 2023 16:03:50 +0000
From:   Hariprasad Kelam <hkelam@...vell.com>
To:     Paolo Abeni <pabeni@...hat.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     "kuba@...nel.org" <kuba@...nel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "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>,
        "hariprasad.netdev@...il.com" <hariprasad.netdev@...il.com>
Subject: Re: [net-next PATCH V3 4/4] octeontx2-pf: Add support for HTB offload

Please see inline,


> On Mon, 2023-02-06 at 11:16 +0530, Hariprasad Kelam wrote:
> > +static int otx2_qos_txschq_alloc(struct otx2_nic *pfvf,
> > +				 struct otx2_qos_cfg *cfg)
> > +{
> > +	struct nix_txsch_alloc_req *req;
> > +	struct nix_txsch_alloc_rsp *rsp;
> > +	struct mbox *mbox = &pfvf->mbox;
> > +	int lvl, rc, schq;
> > +
> > +	mutex_lock(&mbox->lock);
> > +	req = otx2_mbox_alloc_msg_nix_txsch_alloc(&pfvf->mbox);
> > +	if (!req)
> > +		return -ENOMEM;
> 
> This does not releases the mbox->lock mutex on error (another occurrence
> below).
>
ACK , will fix this in next version.
 
> [...]
> 
> 
> > +static int otx2_qos_txschq_update_config(struct otx2_nic *pfvf,
> > +					 struct otx2_qos_node *node,
> > +					 struct otx2_qos_cfg *cfg)
> > +{
> > +	int ret = 0;
> > +
> > +	otx2_qos_txschq_fill_cfg(pfvf, node, cfg);
> > +	ret = otx2_qos_txschq_push_cfg(pfvf, node, cfg);
> > +
> > +	return ret;
> 
> I personally find the plain:
> 
> 	return <function>
> 
> more easy to read - more instances below.
> 
ACK , will fix this in next version.
> [...]
> 
> > +static void otx2_reset_qdisc(struct net_device *dev, u16 qid) {
> > +	struct netdev_queue *dev_queue = netdev_get_tx_queue(dev,
> qid);
> > +	struct Qdisc *qdisc = dev_queue->qdisc_sleeping;
> > +
> > +	if (!qdisc)
> > +		return;
> > +
> > +	spin_lock_bh(qdisc_lock(qdisc));
> > +	qdisc_reset(qdisc);
> > +	spin_unlock_bh(qdisc_lock(qdisc));
> > +}
> 
> The above looks like a possible shared helper, as mlx code implements a
> quite identical function.
> 
Found equivalent API dev_reset_queue() but it is defined as static, will reuse the same by exposing
This API in header file (sch_generic.h)

Thanks,
Hariprasad k


> Cheers,
> 
> Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ