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] [day] [month] [year] [list]
Message-ID: <CAADnVQKhFzGpA0F_rB4uMh25rbNSXeOTMeTKK8QfokevAK9nGw@mail.gmail.com>
Date:   Mon, 16 Dec 2019 07:06:19 -0800
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     David Ahern <dsahern@...il.com>
Cc:     Toke Høiland-Jørgensen <toke@...hat.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Network Development <netdev@...r.kernel.org>,
        bpf <bpf@...r.kernel.org>,
        Jesper Dangaard Brouer <brouer@...hat.com>
Subject: Re: [PATCH bpf-next] samples/bpf: Attach XDP programs in driver mode
 by default

On Mon, Dec 16, 2019 at 7:01 AM David Ahern <dsahern@...il.com> wrote:
>
> 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@...hat.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@...il.com>

Applied. Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ