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: 
 <BY3PR18MB47071C9FB7E516063668825EA00F2@BY3PR18MB4707.namprd18.prod.outlook.com>
Date: Wed, 17 Apr 2024 05:17:49 +0000
From: Sai Krishna Gajula <saikrishnag@...vell.com>
To: Simon Horman <horms@...nel.org>
CC: "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com"
	<edumazet@...gle.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>,
        Sunil Kovvuri Goutham <sgoutham@...vell.com>,
        Geethasowjanya Akula <gakula@...vell.com>,
        Hariprasad Kelam
	<hkelam@...vell.com>,
        Subbaraya Sundeep Bhatta <sbhatta@...vell.com>
Subject: Re: [net-next PATCH] octeontx2-pf: Add ucast filter count
 configurability via devlink.


> -----Original Message-----
> From: Simon Horman <horms@...nel.org>
> Sent: Tuesday, April 16, 2024 3:53 PM
> To: Sai Krishna Gajula <saikrishnag@...vell.com>
> Cc: davem@...emloft.net; edumazet@...gle.com; kuba@...nel.org;
> pabeni@...hat.com; netdev@...r.kernel.org; linux-kernel@...r.kernel.org;
> Sunil Kovvuri Goutham <sgoutham@...vell.com>; Geethasowjanya Akula
> <gakula@...vell.com>; Hariprasad Kelam <hkelam@...vell.com>; Subbaraya
> Sundeep Bhatta <sbhatta@...vell.com>
> Subject: Re: [net-next PATCH] octeontx2-pf: Add ucast filter
> count configurability via devlink.
> 
> On Sun, Apr 14, 2024 at 04:28:30PM +0530, Sai Krishna wrote:
> > Added a devlink param to set/modify unicast filter count. Currently
> > it's hardcoded with a macro.
> 
> Hi Sai,
> 
> I think it would be nice to provide a sample devlink command in the patch
> description, as you did for:
> 
> 2da489432747 ("octeontx2-pf: devlink params support to set mcam entry
> count")
> 
> > Signed-off-by: Sai Krishna <saikrishnag@...vell.com>

Ack, yeah.. missed to add example command. Will do in patch v2.

> 
> ...
> 
> > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.c
> > b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.c
> 
> ...
> 
> > +static int otx2_dl_ucast_flt_cnt_get(struct devlink *devlink, u32 id,
> > +				     struct devlink_param_gset_ctx *ctx) {
> > +	struct otx2_devlink *otx2_dl = devlink_priv(devlink);
> > +	struct otx2_nic *pfvf = otx2_dl->pfvf;
> > +
> > +	if (!pfvf->flow_cfg) {
> > +		ctx->val.vu8 = 0;
> > +		return 0;
> > +	}
> > +
> > +	ctx->val.vu8 = pfvf->flow_cfg->ucast_flt_cnt;
> 
> nit: perhaps this could be more succinctly expressed as follows
>      (completely untested!):
> 
> 	ctx->val.vu8 = pfvf->flow_cfg ? pfvf->flow_cfg->ucast_flt_cnt : 0;

Ack, Will submit changes with patch V2.

> 
> > +
> > +	return 0;
> > +}
> 
> ...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ