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]
Date:   Thu, 07 Jan 2021 20:56:01 -0800
From:   Saeed Mahameed <saeed@...nel.org>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        Oz Shlomo <ozsh@...dia.com>,
        Marcelo Ricardo Leitner <marcelo.leitner@...il.com>,
        Roi Dayan <roid@...dia.com>, Paul Blakey <paulb@...dia.com>
Subject: Re: [net 04/11] net/mlx5e: CT: Use per flow counter when CT flow
 accounting is enabled

On Thu, 2021-01-07 at 20:40 -0800, Jakub Kicinski wrote:
> On Thu, 07 Jan 2021 20:18:36 -0800 Saeed Mahameed wrote:
> > On Thu, 2021-01-07 at 20:06 -0800, Saeed Mahameed wrote:
> > > On Thu, 2021-01-07 at 19:07 -0800, Jakub Kicinski wrote:  
> > > > On Thu,  7 Jan 2021 12:28:38 -0800 Saeed Mahameed wrote:  
> > > > > +	int ret;
> > > > > +
> > > > > +	counter = kzalloc(sizeof(*counter), GFP_KERNEL);
> > > > > +	if (!counter)
> > > > > +		return ERR_PTR(-ENOMEM);
> > > > > +
> > > > > +	counter->is_shared = false;
> > > > > +	counter->counter = mlx5_fc_create(ct_priv->dev, true);
> > > > > +	if (IS_ERR(counter->counter)) {
> > > > > +		ct_dbg("Failed to create counter for ct
> > > > > entry");
> > > > > +		ret = PTR_ERR(counter->counter);
> > > > > +		kfree(counter);
> > > > > +		return ERR_PTR(ret);  
> > > > 
> > > > The err ptr -> ret -> err ptr conversion seems entirely
> > > > pointless,
> > > > no?  
> > > Indeed, will address this in a net-next patch
> > >   
> > 
> > Actually no, because counter is being kfreed so we must return
> > ERR_PTR(ret).
> 
> Ah, good point, just the other one then:
> 
> +	shared_counter = mlx5_tc_ct_counter_create(ct_priv);
> +	if (IS_ERR(shared_counter)) {
> +		ret = PTR_ERR(shared_counter);
>  		return ERR_PTR(ret);
>  	}
Done, will send to net-next once this is back merged.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ