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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YrH5UxJ+x+3k3bKq@C02YVCJELVCG.dhcp.broadcom.net>
Date:   Tue, 21 Jun 2022 13:01:07 -0400
From:   Andy Gospodarek <andrew.gospodarek@...adcom.com>
To:     John Fastabend <john.fastabend@...il.com>
Cc:     Andy Gospodarek <andrew.gospodarek@...adcom.com>, ast@...nel.org,
        daniel@...earbox.net, davem@...emloft.net, kuba@...nel.org,
        hawk@...nel.org, andrii@...nel.org, kafai@...com,
        songliubraving@...com, yhs@...com, kpsingh@...nel.org,
        toke@...hat.com, lorenzo.bianconi@...hat.com,
        netdev@...r.kernel.org, bpf@...r.kernel.org
Subject: Re: [PATCH net-next] samples/bpf: fixup some xdp progs to be able to
 support xdp multibuffer

On Tue, Jun 21, 2022 at 08:51:34AM -0700, John Fastabend wrote:
> Andy Gospodarek wrote:
> > This changes the section name for the bpf program embedded in these
> > files to "xdp.frags" to allow the programs to be loaded on drivers that
> > are using an MTU greater than PAGE_SIZE.  Rather than directly accessing
> > the buffers, the packet data is now accessed via xdp helper functions to
> > provide an example for those who may need to write more complex
> > programs.
> > 
> > Signed-off-by: Andy Gospodarek <gospo@...adcom.com>
> > ---
> 
> OK. Although we lose the non frag example, but I guess that is fine and
> highlights we don't maintain samples.
> 
> Acked-by: John Fastabend <john.fastabend@...il.com>

Thanks for taking a look, John.  My original changes had separate
functions for handling MB vs single buffer access.  I went with the
patch I posted for a few reasons:

- I liked the idea of one method for accessing the data via
  bpf_xdp_load_bytes -- even if that was less efficient for the
  single-buffer case.
- I did not love how much code it added nor what it looked like when I
  was done.
- Raw access of a non-frag xdp_buff is still available in
  xdp_rxq_info_kern.c if folks need an example of the most efficient way to
  benchmark an implementation.

-andy



Download attachment "smime.p7s" of type "application/pkcs7-signature" (4222 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ