All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 00/10] introduction of bpf_xdp_adjust_tail
@ 2018-04-17  6:51 Nikita V. Shirokov
  2018-04-17  6:51 ` [PATCH bpf-next 01/10] [bpf]: adding bpf_xdp_adjust_tail helper Nikita V. Shirokov
                   ` (9 more replies)
  0 siblings, 10 replies; 22+ messages in thread
From: Nikita V. Shirokov @ 2018-04-17  6:51 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann; +Cc: netdev, Nikita V. Shirokov

In this patch series i'm adding 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.

Nikita V. Shirokov (10):
  [bpf]: adding bpf_xdp_adjust_tail helper
  [bpf]: adding tests for bpf_xdp_adjust_tail
  [bpf]: add bpf_xdp_adjust_tail sample prog
  [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

 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                 | 151 +++++++++++++++++++++
 samples/bpf/xdp_adjust_tail_user.c                 | 141 +++++++++++++++++++
 tools/include/uapi/linux/bpf.h                     |  11 +-
 tools/testing/selftests/bpf/Makefile               |   2 +-
 tools/testing/selftests/bpf/bpf_helpers.h          |   5 +
 tools/testing/selftests/bpf/test_adjust_tail.c     |  29 ++++
 tools/testing/selftests/bpf/test_progs.c           |  32 +++++
 18 files changed, 433 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

-- 
2.15.1

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2018-04-18  2:16 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-17  6:51 [PATCH bpf-next 00/10] introduction of bpf_xdp_adjust_tail Nikita V. Shirokov
2018-04-17  6:51 ` [PATCH bpf-next 01/10] [bpf]: adding bpf_xdp_adjust_tail helper Nikita V. Shirokov
2018-04-17 14:14   ` kbuild test robot
2018-04-17 22:58   ` Alexei Starovoitov
2018-04-17  6:51 ` [PATCH bpf-next 02/10] [bpf]: adding tests for bpf_xdp_adjust_tail Nikita V. Shirokov
2018-04-17 23:04   ` Alexei Starovoitov
2018-04-17  6:51 ` [PATCH bpf-next 03/10] [bpf]: add bpf_xdp_adjust_tail sample prog Nikita V. Shirokov
2018-04-17  6:51 ` [PATCH bpf-next 04/10] [bpf]: make generic xdp compatible w/ bpf_xdp_adjust_tail Nikita V. Shirokov
2018-04-17 23:06   ` Alexei Starovoitov
2018-04-17  6:51 ` [PATCH bpf-next 05/10] [bpf]: make mlx4 " Nikita V. Shirokov
2018-04-17 23:06   ` Alexei Starovoitov
2018-04-17  6:51 ` [PATCH bpf-next 06/10] [bpf]: make bnxt " Nikita V. Shirokov
2018-04-17 23:07   ` Alexei Starovoitov
2018-04-17  6:51 ` [PATCH bpf-next 07/10] [bpf]: make cavium thunder " Nikita V. Shirokov
2018-04-17 23:07   ` Alexei Starovoitov
2018-04-17  6:51 ` [PATCH bpf-next 08/10] [bpf]: make netronome nfp " Nikita V. Shirokov
2018-04-17 23:08   ` Alexei Starovoitov
2018-04-18  0:40     ` Jakub Kicinski
2018-04-17  6:51 ` [PATCH bpf-next 09/10] [bpf]: make tun " Nikita V. Shirokov
2018-04-18  2:16   ` Jason Wang
2018-04-17  6:51 ` [PATCH bpf-next 10/10] [bpf]: make virtio " Nikita V. Shirokov
2018-04-18  2:16   ` Jason Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.