All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 bpf-next 0/4] Better handling of xskmap entries
@ 2019-06-06 20:59 Jonathan Lemon
  2019-06-06 20:59 ` [PATCH v5 bpf-next 1/4] bpf: Allow bpf_map_lookup_elem() on an xskmap Jonathan Lemon
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Jonathan Lemon @ 2019-06-06 20:59 UTC (permalink / raw)
  To: bjorn.topel, magnus.karlsson, toke, brouer, daniel, ast
  Cc: kernel-team, netdev

Currently, the AF_XDP code uses a separate map in order to
determine if an xsk is bound to a queue.  Have the xskmap
lookup return a XDP_SOCK pointer on the kernel side, which
the verifier uses to extract relevant values.

Patches:
 1 - adds XSK_SOCK type
 2 - sync bpf.h with tools
 3 - add tools selftest
 4 - update lib/bpf, removing qidconf

v4->v5:
 - xskmap lookup now returns XDP_SOCK type instead of pointer to element.
 - no changes lib/bpf/xsk.c

v3->v4:
 - Clarify error handling path.

v2->v3:
 - Use correct map type.

Jonathan Lemon (4):
  bpf: Allow bpf_map_lookup_elem() on an xskmap
  bpf/tools: sync bpf.h
  tools/bpf: Add bpf_map_lookup_elem selftest for xskmap
  libbpf: remove qidconf and better support external bpf programs.

 include/linux/bpf.h                           |   8 ++
 include/net/xdp_sock.h                        |   4 +-
 include/uapi/linux/bpf.h                      |   4 +
 kernel/bpf/verifier.c                         |  26 ++++-
 kernel/bpf/xskmap.c                           |   7 ++
 net/core/filter.c                             |  40 +++++++
 tools/include/uapi/linux/bpf.h                |   4 +
 tools/lib/bpf/xsk.c                           | 103 +++++-------------
 .../bpf/verifier/prevent_map_lookup.c         |  15 ---
 tools/testing/selftests/bpf/verifier/sock.c   |  18 +++
 10 files changed, 135 insertions(+), 94 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2019-06-11  6:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-06 20:59 [PATCH v5 bpf-next 0/4] Better handling of xskmap entries Jonathan Lemon
2019-06-06 20:59 ` [PATCH v5 bpf-next 1/4] bpf: Allow bpf_map_lookup_elem() on an xskmap Jonathan Lemon
2019-06-06 20:59 ` [PATCH v5 bpf-next 2/4] bpf/tools: sync bpf.h Jonathan Lemon
2019-06-07  6:17   ` Martin Lau
2019-06-06 20:59 ` [PATCH v5 3/4] tools/bpf: Add bpf_map_lookup_elem selftest for xskmap Jonathan Lemon
2019-06-07  6:18   ` Martin Lau
2019-06-06 20:59 ` [PATCH v5 4/4] libbpf: remove qidconf and better support external bpf programs Jonathan Lemon
2019-06-09  6:52 ` [PATCH v5 bpf-next 0/4] Better handling of xskmap entries Björn Töpel
2019-06-11  6:36 ` Alexei Starovoitov

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.