netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Lemon <jonathan.lemon@gmail.com>
To: <bjorn.topel@intel.com>, <magnus.karlsson@intel.com>,
	<toke@redhat.com>, <brouer@redhat.com>, <daniel@iogearbox.net>,
	<ast@kernel.org>
Cc: <kernel-team@fb.com>, <netdev@vger.kernel.org>
Subject: [PATCH v5 bpf-next 0/4] Better handling of xskmap entries
Date: Thu, 6 Jun 2019 13:59:39 -0700	[thread overview]
Message-ID: <20190606205943.818795-1-jonathan.lemon@gmail.com> (raw)

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


             reply	other threads:[~2019-06-06 20:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06 20:59 Jonathan Lemon [this message]
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

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=20190606205943.818795-1-jonathan.lemon@gmail.com \
    --to=jonathan.lemon@gmail.com \
    --cc=ast@kernel.org \
    --cc=bjorn.topel@intel.com \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=toke@redhat.com \
    /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).