[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 9 Sep 2016 16:37:06 -0700
From: John Fastabend <john.fastabend@...il.com>
To: bblanco@...mgrid.com, alexei.starovoitov@...il.com,
jeffrey.t.kirsher@...el.com, brouer@...hat.com, davem@...emloft.net
Cc: xiyou.wangcong@...il.com, intel-wired-lan@...ts.osuosl.org,
u9012063@...il.com, netdev@...r.kernel.org
Subject: Re: [net-next PATCH v2 2/2] e1000: bundle xdp xmit routines
On 16-09-09 02:29 PM, John Fastabend wrote:
> e1000 supports a single TX queue so it is being shared with the stack
> when XDP runs XDP_TX action. This requires taking the xmit lock to
> ensure we don't corrupt the tx ring. To avoid taking and dropping the
> lock per packet this patch adds a bundling implementation to submit
> a bundle of packets to the xmit routine.
>
> I tested this patch running e1000 in a VM using KVM over a tap
> device using pktgen to generate traffic along with 'ping -f -l 100'.
>
> Suggested-by: Jesper Dangaard Brouer <brouer@...hat.com>
> Signed-off-by: John Fastabend <john.r.fastabend@...el.com>
> ---
This patch is a bit bogus in a few spots as well...
> -
> - if (E1000_DESC_UNUSED(tx_ring) < 2) {
> - HARD_TX_UNLOCK(netdev, txq);
> - return;
> + for (; i < E1000_XDP_XMIT_BUNDLE_MAX && buffer_info[i].buffer; i++) {
> + e1000_xmit_raw_frame(buffer_info[i].buffer,
> + buffer_info[i].length,
> + adapter, tx_ring);
> + buffer_info[i].buffer->rxbuf.page = NULL;
> + buffer_info[i].buffer = NULL;
> + buffer_info[i].length = 0;
> + i++;
^^^^^^^^
Powered by blists - more mailing lists