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: <20191016092716.1a8d528f@cakuba.netronome.com>
Date:   Wed, 16 Oct 2019 09:27:16 -0700
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Lorenzo Bianconi <lorenzo@...nel.org>
Cc:     netdev@...r.kernel.org, lorenzo.bianconi@...hat.com,
        davem@...emloft.net, thomas.petazzoni@...tlin.com,
        brouer@...hat.com, ilias.apalodimas@...aro.org,
        matteo.croce@...hat.com, mw@...ihalf.com
Subject: Re: [PATCH v3 net-next 8/8] net: mvneta: add XDP_TX support

On Wed, 16 Oct 2019 12:09:00 +0200, Lorenzo Bianconi wrote:
> > > +static int
> > > +mvneta_xdp_xmit_back(struct mvneta_port *pp, struct xdp_buff *xdp)
> > > +{
> > > +	struct xdp_frame *xdpf = convert_to_xdp_frame(xdp);
> > > +	int cpu = smp_processor_id();
> > > +	struct mvneta_tx_queue *txq;
> > > +	struct netdev_queue *nq;
> > > +	u32 ret;
> > > +
> > > +	if (unlikely(!xdpf))
> > > +		return MVNETA_XDP_CONSUMED;  
> > 
> > Personally I'd prefer you haven't called a function which return code
> > has to be error checked in local variable init.  
> 
> do you mean moving cpu = smp_processor_id(); after the if condition?

	[...]
	struct xdp_frame *xdpf;
	[...]

	xdpf = convert_to_xdp_frame(xdp);
	if (unlikely(!xdpf))
		return MVNETA_XDP_CONSUMED;

I meant xdpf, sorry to be unclear.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ