netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nikita V. Shirokov" <tehnerd@tehnerd.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: Alexei Starovoitov <ast@kernel.org>, netdev@vger.kernel.org
Subject: Re: [PATCH bpf-next v2 00/11] introduction of bpf_xdp_adjust_tail
Date: Tue, 17 Apr 2018 21:44:50 -0700	[thread overview]
Message-ID: <20180418044450.GA17737@maindev> (raw)
In-Reply-To: <e94b002a-4d91-b07c-6707-cc2f01642ab0@iogearbox.net>

On Wed, Apr 18, 2018 at 02:37:40PM +0200, Daniel Borkmann wrote:
> On 04/18/2018 06:29 AM, Nikita V. Shirokov wrote:
> > In this patch series i'm add new bpf helper which allow to manupulate
> > xdp's data_end pointer. right now only "shrinking" (reduce packet's size
> > by moving pointer) is supported (and i see no use case for "growing").
> > Main use case for such helper is to be able to generate controll (ICMP)
> > messages from XDP context. such messages usually contains first N bytes
> > from original packets as a payload, and this is exactly what this helper
> > would allow us to do (see patch 3 for sample program, where we generate
> > ICMP "packet too big" message). This helper could be usefull for load
> > balancing applications where after additional encapsulation, resulting
> > packet could be bigger then interface MTU.
> > Aside from new helper this patch series contains minor changes in device
> > drivers (for ones which requires), so they would recal packet's length
> > not only when head pointer was adjusted, but if tail's one as well.
> 
> The whole set doesn't have any SoBs from you which is mandatory before
> applying anything. Please add.
> 
sorry about that, somehow lost it between v1 and v2 ;)
> Thanks,
> Daniel
> 
> > v1->v2:
> >  * fixed kbuild warning
> >  * made offset eq 0 invalid for xdp_bpf_adjust_tail
> >  * splitted bpf_prog_test_run fix and selftests in sep commits
> >  * added SPDX licence where applicable
> >  * some reshuffling in patches order (tests now in the end)
> > 
> > 
> > Nikita V. Shirokov (11):
> >   bpf: making bpf_prog_test run aware of possible data_end ptr change
> >   bpf: adding tests for bpf_xdp_adjust_tail
> >   bpf: adding bpf_xdp_adjust_tail helper
> >   bpf: make generic xdp compatible w/ bpf_xdp_adjust_tail
> >   bpf: make mlx4 compatible w/ bpf_xdp_adjust_tail
> >   bpf: make bnxt compatible w/ bpf_xdp_adjust_tail
> >   bpf: make cavium thunder compatible w/ bpf_xdp_adjust_tail
> >   bpf: make netronome nfp compatible w/ bpf_xdp_adjust_tail
> >   bpf: make tun compatible w/ bpf_xdp_adjust_tail
> >   bpf: make virtio compatible w/ bpf_xdp_adjust_tail
> >   bpf: add bpf_xdp_adjust_tail sample prog
> > 
> >  drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c      |   2 +-
> >  drivers/net/ethernet/cavium/thunder/nicvf_main.c   |   2 +-
> >  drivers/net/ethernet/mellanox/mlx4/en_rx.c         |   2 +-
> >  .../net/ethernet/netronome/nfp/nfp_net_common.c    |   2 +-
> >  drivers/net/tun.c                                  |   3 +-
> >  drivers/net/virtio_net.c                           |   7 +-
> >  include/uapi/linux/bpf.h                           |  10 +-
> >  net/bpf/test_run.c                                 |   3 +-
> >  net/core/dev.c                                     |  10 +-
> >  net/core/filter.c                                  |  29 +++-
> >  samples/bpf/Makefile                               |   4 +
> >  samples/bpf/xdp_adjust_tail_kern.c                 | 152 +++++++++++++++++++++
> >  samples/bpf/xdp_adjust_tail_user.c                 | 142 +++++++++++++++++++
> >  tools/include/uapi/linux/bpf.h                     |  10 +-
> >  tools/testing/selftests/bpf/Makefile               |   2 +-
> >  tools/testing/selftests/bpf/bpf_helpers.h          |   5 +
> >  tools/testing/selftests/bpf/test_adjust_tail.c     |  30 ++++
> >  tools/testing/selftests/bpf/test_progs.c           |  32 +++++
> >  18 files changed, 435 insertions(+), 12 deletions(-)
> >  create mode 100644 samples/bpf/xdp_adjust_tail_kern.c
> >  create mode 100644 samples/bpf/xdp_adjust_tail_user.c
> >  create mode 100644 tools/testing/selftests/bpf/test_adjust_tail.c
> > 
> 

      reply	other threads:[~2018-04-18 13:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-18  4:29 [PATCH bpf-next v2 00/11] introduction of bpf_xdp_adjust_tail Nikita V. Shirokov
2018-04-18  4:29 ` [PATCH bpf-next v2 01/11] bpf: adding bpf_xdp_adjust_tail helper Nikita V. Shirokov
2018-04-18 16:56   ` Alexei Starovoitov
2018-04-18  4:29 ` [PATCH bpf-next v2 02/11] bpf: make generic xdp compatible w/ bpf_xdp_adjust_tail Nikita V. Shirokov
2018-04-18 12:48   ` Jesper Dangaard Brouer
2018-04-18  4:48     ` Nikita V. Shirokov
2018-04-18  4:29 ` [PATCH bpf-next v2 03/11] bpf: make mlx4 " Nikita V. Shirokov
2018-04-18 10:53   ` Tariq Toukan
2018-04-18  4:29 ` [PATCH bpf-next v2 04/11] bpf: make bnxt " Nikita V. Shirokov
2018-04-18  4:29 ` [PATCH bpf-next v2 05/11] bpf: make cavium thunder " Nikita V. Shirokov
2018-04-18  4:29 ` [PATCH bpf-next v2 06/11] bpf: make netronome nfp " Nikita V. Shirokov
2018-04-18  4:29 ` [PATCH bpf-next v2 07/11] bpf: make tun " Nikita V. Shirokov
2018-04-18  4:29 ` [PATCH bpf-next v2 08/11] bpf: make virtio " Nikita V. Shirokov
2018-04-18  4:29 ` [PATCH bpf-next v2 09/11] bpf: making bpf_prog_test run aware of possible data_end ptr change Nikita V. Shirokov
2018-04-18  4:29 ` [PATCH bpf-next v2 10/11] bpf: adding tests for bpf_xdp_adjust_tail Nikita V. Shirokov
2018-04-18  4:29 ` [PATCH bpf-next v2 11/11] bpf: add bpf_xdp_adjust_tail sample prog Nikita V. Shirokov
2018-04-18 12:37 ` [PATCH bpf-next v2 00/11] introduction of bpf_xdp_adjust_tail Daniel Borkmann
2018-04-18  4:44   ` Nikita V. Shirokov [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=20180418044450.GA17737@maindev \
    --to=tehnerd@tehnerd.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --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).