From: David Ahern <dsahern@gmail.com>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>,
"Alexei Starovoitov" <ast@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org,
Jesper Dangaard Brouer <brouer@redhat.com>
Subject: Re: [PATCH bpf-next] samples/bpf: Attach XDP programs in driver mode by default
Date: Mon, 16 Dec 2019 08:01:14 -0700 [thread overview]
Message-ID: <71b7ba89-7780-8ce1-1b30-67ae6ebc214c@gmail.com> (raw)
In-Reply-To: <20191216110742.364456-1-toke@redhat.com>
On 12/16/19 4:07 AM, Toke Høiland-Jørgensen wrote:
> When attaching XDP programs, userspace can set flags to request the attach
> mode (generic/SKB mode, driver mode or hw offloaded mode). If no such flags
> are requested, the kernel will attempt to attach in driver mode, and then
> silently fall back to SKB mode if this fails.
>
> The silent fallback is a major source of user confusion, as users will try
> to load a program on a device without XDP support, and instead of an error
> they will get the silent fallback behaviour, not notice, and then wonder
> why performance is not what they were expecting.
>
> In an attempt to combat this, let's switch all the samples to default to
> explicitly requesting driver-mode attach. As part of this, ensure that all
> the userspace utilities have a switch to enable SKB mode. For those that
> have a switch to request driver mode, keep it but turn it into a no-op.
>
> Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
> ---
> samples/bpf/xdp1_user.c | 5 ++++-
> samples/bpf/xdp_adjust_tail_user.c | 5 ++++-
> samples/bpf/xdp_fwd_user.c | 17 ++++++++++++++---
> samples/bpf/xdp_redirect_cpu_user.c | 4 ++++
> samples/bpf/xdp_redirect_map_user.c | 5 ++++-
> samples/bpf/xdp_redirect_user.c | 5 ++++-
> samples/bpf/xdp_router_ipv4_user.c | 3 +++
> samples/bpf/xdp_rxq_info_user.c | 4 ++++
> samples/bpf/xdp_sample_pkts_user.c | 12 +++++++++---
> samples/bpf/xdp_tx_iptunnel_user.c | 5 ++++-
> samples/bpf/xdpsock_user.c | 5 ++++-
> 11 files changed, 58 insertions(+), 12 deletions(-)
>
Acked-by: David Ahern <dsahern@gmail.com>
Thanks for doing this, Toke.
next prev parent reply other threads:[~2019-12-16 15:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-16 11:07 [PATCH bpf-next] samples/bpf: Attach XDP programs in driver mode by default Toke Høiland-Jørgensen
2019-12-16 14:35 ` Jesper Dangaard Brouer
2019-12-16 14:55 ` Jesper Dangaard Brouer
2019-12-16 15:01 ` David Ahern [this message]
2019-12-16 15:06 ` Alexei Starovoitov
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=71b7ba89-7780-8ce1-1b30-67ae6ebc214c@gmail.com \
--to=dsahern@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=netdev@vger.kernel.org \
--cc=toke@redhat.com \
/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