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] [thread-next>] [day] [month] [year] [list]
Message-ID: <5faee7f9d8972_d58320848@john-XPS-13-9370.notmuch>
Date:   Fri, 13 Nov 2020 12:09:29 -0800
From:   John Fastabend <john.fastabend@...il.com>
To:     Lorenzo Bianconi <lorenzo@...nel.org>, netdev@...r.kernel.org
Cc:     bpf@...r.kernel.org, lorenzo.bianconi@...hat.com,
        davem@...emloft.net, kuba@...nel.org, brouer@...hat.com,
        ilias.apalodimas@...aro.org, john.fastabend@...il.com
Subject: RE: [PATCH v6 net-nex 4/5] net: mvpp2: add xdp tx return bulking
 support

Lorenzo Bianconi wrote:
> Convert mvpp2 driver to xdp_return_frame_bulk APIs.
> 
> XDP_REDIRECT (upstream codepath): 1.79Mpps
> XDP_REDIRECT (upstream codepath + bulking APIs): 1.93Mpps
> 
> Tested-by: Matteo Croce <mcroce@...rosoft.com>
> Co-developed-by: Jesper Dangaard Brouer <brouer@...hat.com>
> Signed-off-by: Jesper Dangaard Brouer <brouer@...hat.com>
> Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
> ---
>  drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> index f6616c8933ca..3069e192d773 100644
> --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> @@ -2440,8 +2440,13 @@ static void mvpp2_txq_bufs_free(struct mvpp2_port *port,
>  				struct mvpp2_tx_queue *txq,
>  				struct mvpp2_txq_pcpu *txq_pcpu, int num)
>  {
> +	struct xdp_frame_bulk bq;
>  	int i;
>  
> +	xdp_frame_bulk_init(&bq);
> +
> +	rcu_read_lock(); /* need for xdp_return_frame_bulk */
> +
>  	for (i = 0; i < num; i++) {
>  		struct mvpp2_txq_pcpu_buf *tx_buf =
>  			txq_pcpu->buffs + txq_pcpu->txq_get_index;
> @@ -2454,10 +2459,13 @@ static void mvpp2_txq_bufs_free(struct mvpp2_port *port,
>  			dev_kfree_skb_any(tx_buf->skb);
>  		else if (tx_buf->type == MVPP2_TYPE_XDP_TX ||
>  			 tx_buf->type == MVPP2_TYPE_XDP_NDO)
> -			xdp_return_frame(tx_buf->xdpf);
> +			xdp_return_frame_bulk(tx_buf->xdpf, &bq);
>  
>  		mvpp2_txq_inc_get(txq_pcpu);
>  	}
> +	xdp_flush_frame_bulk(&bq);
> +
> +	rcu_read_unlock();
>  }
>  
>  static inline struct mvpp2_rx_queue *mvpp2_get_rx_queue(struct mvpp2_port *port,
> -- 
> 2.26.2
> 

Acked-by: John Fastabend <john.fastabend@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ