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:   Tue, 20 Oct 2020 12:34:00 +0200
From:   Lorenzo Bianconi <lorenzo@...nel.org>
To:     Jesper Dangaard Brouer <brouer@...hat.com>
Cc:     netdev@...r.kernel.org, bpf@...r.kernel.org, davem@...emloft.net,
        kuba@...nel.org, lorenzo.bianconi@...hat.com,
        ilias.apalodimas@...aro.org
Subject: Re: [RFC 1/2] net: xdp: introduce bulking for xdp tx return path

> On Tue, 20 Oct 2020 11:33:37 +0200
> Lorenzo Bianconi <lorenzo@...nel.org> wrote:
> 
> > diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
> > index 54b0bf574c05..af33cc62ed4c 100644
> > --- a/drivers/net/ethernet/marvell/mvneta.c
> > +++ b/drivers/net/ethernet/marvell/mvneta.c
> > @@ -663,6 +663,8 @@ struct mvneta_tx_queue {
> >  
> >  	/* Affinity mask for CPUs*/
> >  	cpumask_t affinity_mask;
> > +
> > +	struct xdp_frame_bulk bq;
> >  };
> >  
> >  struct mvneta_rx_queue {
> > @@ -1854,12 +1856,10 @@ static void mvneta_txq_bufs_free(struct mvneta_port *pp,
> >  			dev_kfree_skb_any(buf->skb);
> >  		} else if (buf->type == MVNETA_TYPE_XDP_TX ||
> >  			   buf->type == MVNETA_TYPE_XDP_NDO) {
> > -			if (napi && buf->type == MVNETA_TYPE_XDP_TX)
> > -				xdp_return_frame_rx_napi(buf->xdpf);
> > -			else
> > -				xdp_return_frame(buf->xdpf);
> > +			xdp_return_frame_bulk(buf->xdpf, &txq->bq, napi);
> 
> Hmm, I don't think you can use 'napi' directly here.
> 
> You are circumventing check (buf->type == MVNETA_TYPE_XDP_TX), and will
> now also allow XDP_NDO (XDP_REDIRECT) to basically use xdp_return_frame_rx_napi().

ack, right. I will fix it.

Regards,
Lorenzo

> 
> 
> >  		}
> >  	}
> > +	xdp_flush_frame_bulk(&txq->bq, napi);
> >  
> >  	netdev_tx_completed_queue(nq, pkts_compl, bytes_compl);
> >  }
> 
> 
> 
> -- 
> Best regards,
>   Jesper Dangaard Brouer
>   MSc.CS, Principal Kernel Engineer at Red Hat
>   LinkedIn: http://www.linkedin.com/in/brouer
> 

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ