public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: ast@kernel.org, daniel@iogearbox.net, davem@davemloft.net
Cc: netdev@vger.kernel.org, john.fastabend@gmail.com
Subject: [net-next PATCH 0/9] sockmap UAPI updates and fixes
Date: Mon, 28 Aug 2017 07:09:45 -0700	[thread overview]
Message-ID: <20170828140850.14143.83953.stgit@john-Precision-Tower-5810> (raw)

This series updates sockmap UAPI, adds additional test cases and
provides a couple fixes.

First the UAPI changes. The original API added two sockmap specific
API artifacts (a) a new map_flags field with a sockmap specific update
command and (b) a new sockmap specific attach field in the attach data
structure. After this series instead of attaching programs with a
single command now two commands are used to attach programs to maps
individually. This allows us to add new programs easily in the future
and avoids any specific sockmap data structure additions. The
map_flags field is also removed and instead we allow socks to be
added to multiple maps that may or may not have programs attached.
This allows users to decide if a sock should run a SK_SKB program type
on receive based on the map it is attached to. This is a nice
improvement. See patches for specific details.

More test cases were added to test above changes and also stress test
the interface.

Finally two fixes/improvements were made. First a missing rcu
section was added. Second now sockmap can build without KCM being
used to trigger 'y' on CONFIG_STREAM_PARSER by selecting a new
BPF config option.

---

John Fastabend (9):
      bpf: convert sockmap field attach_bpf_fd2 to type
      bpf: sockmap, remove STRPARSER map_flags and add multi-map support
      bpf: sockmap add missing rcu_read_(un)lock in smap_data_ready
      bpf: additional sockmap self tests
      bpf: more SK_SKB selftests
      bpf: harden sockmap program attach to ensure correct map type
      bpf: sockmap indicate sock events to listeners
      bpf: sockmap requires STREAM_PARSER add Kconfig entry
      bpf: test_maps add sockmap stress test


 include/linux/bpf.h                                |   10 +
 include/uapi/linux/bpf.h                           |   12 -
 kernel/bpf/sockmap.c                               |  312 ++++++++++++--------
 kernel/bpf/syscall.c                               |   38 +-
 net/Kconfig                                        |   12 +
 samples/sockmap/sockmap_kern.c                     |    6 
 samples/sockmap/sockmap_user.c                     |   12 +
 tools/include/uapi/linux/bpf.h                     |    9 -
 tools/lib/bpf/bpf.c                                |   14 -
 tools/lib/bpf/bpf.h                                |    4 
 tools/testing/selftests/bpf/bpf_helpers.h          |    3 
 tools/testing/selftests/bpf/sockmap_parse_prog.c   |    8 -
 tools/testing/selftests/bpf/sockmap_verdict_prog.c |   30 ++
 tools/testing/selftests/bpf/test_maps.c            |  272 +++++++++++------
 tools/testing/selftests/bpf/test_verifier.c        |   98 ++++++
 15 files changed, 544 insertions(+), 296 deletions(-)

             reply	other threads:[~2017-08-28 14:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-28 14:09 John Fastabend [this message]
2017-08-28 14:10 ` [net-next PATCH 1/9] bpf: convert sockmap field attach_bpf_fd2 to type John Fastabend
2017-08-28 17:22   ` Alexei Starovoitov
2017-08-28 14:10 ` [net-next PATCH 2/9] bpf: sockmap, remove STRPARSER map_flags and add multi-map support John Fastabend
2017-08-28 17:31   ` Alexei Starovoitov
2017-08-28 14:10 ` [net-next PATCH 3/9] bpf: sockmap add missing rcu_read_(un)lock in smap_data_ready John Fastabend
2017-08-28 14:11 ` [net-next PATCH 4/9] bpf: additional sockmap self tests John Fastabend
2017-08-28 17:36   ` Alexei Starovoitov
2017-08-28 14:11 ` [net-next PATCH 5/9] bpf: more SK_SKB selftests John Fastabend
2017-08-28 17:38   ` Alexei Starovoitov
2017-08-28 14:11 ` [net-next PATCH 6/9] bpf: harden sockmap program attach to ensure correct map type John Fastabend
2017-08-28 17:33   ` Alexei Starovoitov
2017-08-28 14:12 ` [net-next PATCH 7/9] bpf: sockmap indicate sock events to listeners John Fastabend
2017-08-28 14:12 ` [net-next PATCH 8/9] bpf: sockmap requires STREAM_PARSER add Kconfig entry John Fastabend
2017-08-28 17:34   ` Alexei Starovoitov
2017-08-28 14:12 ` [net-next PATCH 9/9] bpf: test_maps add sockmap stress test John Fastabend
2017-08-28 18:13 ` [net-next PATCH 0/9] sockmap UAPI updates and fixes David Miller

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=20170828140850.14143.83953.stgit@john-Precision-Tower-5810 \
    --to=john.fastabend@gmail.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.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