public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: John Fastabend <john.fastabend@gmail.com>, ast@kernel.org
Cc: netdev@vger.kernel.org
Subject: Re: [bpf-next PATCH v2 0/2] SK_MSG programs: read sock fields
Date: Fri, 18 May 2018 23:11:30 +0200	[thread overview]
Message-ID: <a07482de-a002-93b6-fa47-7e057cea7302@iogearbox.net> (raw)
In-Reply-To: <20180517211452.14426.98480.stgit@john-Precision-Tower-5810>

On 05/17/2018 11:16 PM, John Fastabend wrote:
> In this series we add the ability for sk msg programs to read basic
> sock information about the sock they are attached to. The second
> patch adds the tests to the selftest test_verifier.
> 
> One obseration that I had from writing this seriess is lots of the
> ./net/core/filter.c code is almost duplicated across program types.
> I thought about building a template/macro that we could use as a
> single block of code to read sock data out for multiple programs,
> but I wasn't convinced it was worth it yet. The result was using a
> macro saved a couple lines of code per block but made the code
> a bit harder to read IMO. We can probably revisit the idea later
> if we get more duplication.
> 
> v2: add errstr field to negative test_verifier test cases to ensure
>     we get the expected err string back from the verifier.
> 
> ---
> 
> John Fastabend (2):
>       bpf: allow sk_msg programs to read sock fields
>       bpf: add sk_msg prog sk access tests to test_verifier
> 
> 
>  include/linux/filter.h                      |    1 
>  include/uapi/linux/bpf.h                    |    8 ++
>  kernel/bpf/sockmap.c                        |    1 
>  net/core/filter.c                           |  114 ++++++++++++++++++++++++++-
>  tools/include/uapi/linux/bpf.h              |    8 ++
>  tools/testing/selftests/bpf/test_verifier.c |  115 +++++++++++++++++++++++++++
>  6 files changed, 244 insertions(+), 3 deletions(-)
> 
> --
> Signature
> 

Applied to bpf-next, thanks John!

      parent reply	other threads:[~2018-05-18 21:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17 21:16 [bpf-next PATCH v2 0/2] SK_MSG programs: read sock fields John Fastabend
2018-05-17 21:16 ` [bpf-next PATCH v2 1/2] bpf: allow sk_msg programs to " John Fastabend
2018-05-17 21:17 ` [bpf-next PATCH v2 2/2] bpf: add sk_msg prog sk access tests to test_verifier John Fastabend
2018-05-18 21:11 ` Daniel Borkmann [this message]

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=a07482de-a002-93b6-fa47-7e057cea7302@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=ast@kernel.org \
    --cc=john.fastabend@gmail.com \
    --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