public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat•com>
To: Toshiaki Makita <makita.toshiaki@lab•ntt.co.jp>,
	Alexei Starovoitov <ast@kernel•org>,
	Daniel Borkmann <daniel@iogearbox•net>,
	"David S. Miller" <davem@davemloft•net>,
	Jakub Kicinski <jakub.kicinski@netronome•com>,
	Jesper Dangaard Brouer <hawk@kernel•org>,
	John Fastabend <john.fastabend@gmail•com>
Cc: netdev@vger•kernel.org, xdp-newbies@vger•kernel.org, bpf@vger•kernel.org
Subject: Re: [PATCH bpf-next 1/3] xdp: Add bulk XDP_TX queue
Date: Thu, 23 May 2019 13:33:54 +0200	[thread overview]
Message-ID: <87v9y11k2l.fsf@toke.dk> (raw)
In-Reply-To: <2ab04d02-634e-9420-9514-e4ede08bcb10@lab.ntt.co.jp>

Toshiaki Makita <makita.toshiaki@lab•ntt.co.jp> writes:

> On 2019/05/23 20:11, Toke Høiland-Jørgensen wrote:
>> Toshiaki Makita <makita.toshiaki@lab•ntt.co.jp> writes:
>> 
>>> XDP_TX is similar to XDP_REDIRECT as it essentially redirects packets to
>>> the device itself. XDP_REDIRECT has bulk transmit mechanism to avoid the
>>> heavy cost of indirect call but it also reduces lock acquisition on the
>>> destination device that needs locks like veth and tun.
>>>
>>> XDP_TX does not use indirect calls but drivers which require locks can
>>> benefit from the bulk transmit for XDP_TX as well.
>> 
>> XDP_TX happens on the same device, so there's an implicit bulking
>> happening because of the NAPI cycle. So why is an additional mechanism
>> needed (in the general case)?
>
> Not sure what the implicit bulking you mention is. XDP_TX calls
> .ndo_xdp_xmit() for each packet, and it acquires a lock in veth and
> tun. To avoid this, we need additional storage for bulking like devmap
> for XDP_REDIRECT.

The bulking is in veth_poll(), where veth_xdp_flush() is only called at
the end. But see my other reply to the veth.c patch for the lock
contention issue...

-Toke

  reply	other threads:[~2019-05-23 11:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23 10:56 [PATCH bpf-next 0/3] veth: Bulk XDP_TX Toshiaki Makita
2019-05-23 10:56 ` [PATCH bpf-next 1/3] xdp: Add bulk XDP_TX queue Toshiaki Makita
2019-05-23 11:11   ` Toke Høiland-Jørgensen
2019-05-23 11:24     ` Toshiaki Makita
2019-05-23 11:33       ` Toke Høiland-Jørgensen [this message]
2019-05-23 10:56 ` [PATCH bpf-next 2/3] xdp: Add tracepoint for bulk XDP_TX Toshiaki Makita
2019-05-23 13:12   ` Jesper Dangaard Brouer
2019-05-24  1:33     ` Toshiaki Makita
2019-05-23 10:56 ` [PATCH bpf-next 3/3] veth: Support " Toshiaki Makita
2019-05-23 11:25   ` Toke Høiland-Jørgensen
2019-05-23 11:35     ` Toshiaki Makita
2019-05-23 12:18       ` Toke Høiland-Jørgensen
2019-05-23 13:40         ` Toshiaki Makita
2019-05-23 13:29       ` Jesper Dangaard Brouer
2019-05-23 13:51         ` Toshiaki Makita
2019-05-24  3:13           ` Jason Wang
2019-05-24  3:28             ` Toshiaki Makita
2019-05-24  3:54               ` Jason Wang
2019-05-24  4:52                 ` Toshiaki Makita
2019-05-24  9:53           ` Jesper Dangaard Brouer
2019-05-27  6:08             ` Toshiaki Makita

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=87v9y11k2l.fsf@toke.dk \
    --to=toke@redhat$(echo .)com \
    --cc=ast@kernel$(echo .)org \
    --cc=bpf@vger$(echo .)kernel.org \
    --cc=daniel@iogearbox$(echo .)net \
    --cc=davem@davemloft$(echo .)net \
    --cc=hawk@kernel$(echo .)org \
    --cc=jakub.kicinski@netronome$(echo .)com \
    --cc=john.fastabend@gmail$(echo .)com \
    --cc=makita.toshiaki@lab$(echo .)ntt.co.jp \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=xdp-newbies@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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