From: John Fastabend <john.fastabend@gmail.com>
To: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: jeffrey.t.kirsher@intel.com, netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] ixgbe: add support for XDP_TX action
Date: Mon, 24 Apr 2017 12:35:04 -0700 [thread overview]
Message-ID: <58FE5368.1000201@gmail.com> (raw)
In-Reply-To: <20170424212921.36fdfff7@redhat.com>
On 17-04-24 12:29 PM, Jesper Dangaard Brouer wrote:
> On Sun, 23 Apr 2017 18:31:36 -0700
> John Fastabend <john.fastabend@gmail.com> wrote:
>
>> +static int ixgbe_xmit_xdp_ring(struct ixgbe_adapter *adapter,
>> + struct xdp_buff *xdp)
>> +{
>> + struct ixgbe_ring *ring = adapter->xdp_ring[smp_processor_id()];
>
> I was about to question whether is it always true that the array size
> can match the number of CPUs in the system, but I can see later in
> ixgbe_xdp_setup() that you reject XDP program if the system have more
> CPUs that MAX_XDP_QUEUES.
Yep.
[...]
>> +
>> + tx_buffer->next_to_watch = tx_desc;
>> + ring->next_to_use = i;
>> +
>> + writel(i, ring->tail);
>
> A tailptr write for every XDP_TX packet is not going be fast, but you
> already mentioned that this is not optimal yet, so I guess you are aware.
>
There is another patch on Jeff's tree to only kick the tail ptr once per
receive path invocation.
https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git/commit/?h=dev-queue&id=24043a662d11e048de903e12bf86059844c207e2
That patch brings packet rates up to near line rate @ 64 bytes.
Thanks,
John
prev parent reply other threads:[~2017-04-24 19:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-24 1:30 [PATCH 0/2] ixgbe updates John Fastabend
2017-04-24 1:31 ` [PATCH 1/2] ixgbe: add XDP support for pass and drop actions John Fastabend
2017-04-24 4:05 ` Jakub Kicinski
2017-04-24 4:26 ` John Fastabend
2017-04-24 1:31 ` [PATCH 2/2] ixgbe: add support for XDP_TX action John Fastabend
2017-04-24 19:29 ` Jesper Dangaard Brouer
2017-04-24 19:35 ` John Fastabend [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=58FE5368.1000201@gmail.com \
--to=john.fastabend@gmail.com \
--cc=brouer@redhat.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).