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>
Cc: <kernel-team@fb.com>, <netdev@vger.kernel.org>,
	<daniel@iogearbox.net>, <ast@kernel.org>
Subject: [PATCH bpf-next 0/1] bpf: add XDP_SOCK type
Date: Wed, 5 Jun 2019 08:57:55 -0700	[thread overview]
Message-ID: <20190605155756.3779466-1-jonathan.lemon@gmail.com> (raw)

Have the xskmap version of bpf_map_lookup_elem() return
an XDP_SOCK type.  This can be used to verify the existence
of an entry, and then check the sock properties.

Further improvements would include passing the pointer 
directly to a helper for redirrection instead of referencing
the map again.

Jonathan Lemon (1):
  bpf: Allow bpf_map_lookup_elem() on an xskmap

 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 ++
 .../bpf/verifier/prevent_map_lookup.c         | 15 -------
 tools/testing/selftests/bpf/verifier/sock.c   | 18 +++++++++
 9 files changed, 107 insertions(+), 19 deletions(-)

-- 
2.17.1


             reply	other threads:[~2019-06-05 15:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-05 15:57 Jonathan Lemon [this message]
2019-06-05 15:57 ` [PATCH 1/1] bpf: Allow bpf_map_lookup_elem() on an xskmap Jonathan Lemon
2019-06-05 17:16   ` Björn Töpel
2019-06-05 18:36     ` Jonathan Lemon
2019-06-05 22:31   ` Martin Lau

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=20190605155756.3779466-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).