All of lore.kernel.org
 help / color / mirror / Atom feed
From: Quentin Monnet <quentin.monnet@netronome.com>
To: John Fastabend <john.fastabend@gmail.com>,
	borkmann@iogearbox.net, ast@kernel.org
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH bpf-next v4 3/4] bpf: selftest additions for SOCKHASH
Date: Fri, 4 May 2018 11:11:26 +0100	[thread overview]
Message-ID: <e04cd3e1-a0a8-36be-19ee-448f44c56477@netronome.com> (raw)
In-Reply-To: <1525372108-8690-4-git-send-email-john.fastabend@gmail.com>

2018-05-03 11:28:27 UTC-0700 ~ John Fastabend <john.fastabend@gmail.com>
> This runs existing SOCKMAP tests with SOCKHASH map type. To do this
> we push programs into include file and build two BPF programs. One
> for SOCKHASH and one for SOCKMAP.
> 
> We then run the entire test suite with each type.
> 
> Signed-off-by: John Fastabend <john.fastabend@gmail.com>
> ---
>  tools/include/uapi/linux/bpf.h                     |  6 ++++-
>  tools/testing/selftests/bpf/Makefile               |  3 ++-
>  tools/testing/selftests/bpf/test_sockhash_kern.c   |  4 ++++
>  tools/testing/selftests/bpf/test_sockmap.c         | 27 ++++++++++++++++------
>  .../{test_sockmap_kern.c => test_sockmap_kern.h}   | 10 ++++----
>  5 files changed, 36 insertions(+), 14 deletions(-)
>  create mode 100644 tools/testing/selftests/bpf/test_sockhash_kern.c
>  rename tools/testing/selftests/bpf/{test_sockmap_kern.c => test_sockmap_kern.h} (97%)
> 
> diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
> index da77a93..5cb983d 100644
> --- a/tools/include/uapi/linux/bpf.h
> +++ b/tools/include/uapi/linux/bpf.h
> @@ -116,6 +116,7 @@ enum bpf_map_type {
>  	BPF_MAP_TYPE_DEVMAP,
>  	BPF_MAP_TYPE_SOCKMAP,
>  	BPF_MAP_TYPE_CPUMAP,
> +	BPF_MAP_TYPE_SOCKHASH,
>  };
>  
>  enum bpf_prog_type {
> @@ -1835,7 +1836,10 @@ struct bpf_stack_build_id {
>  	FN(msg_pull_data),		\
>  	FN(bind),			\
>  	FN(xdp_adjust_tail),		\
> -	FN(skb_get_xfrm_state),
> +	FN(skb_get_xfrm_state),		\
> +	FN(sock_hash_update),		\
> +	FN(msg_redirect_hash),		\
> +	FN(sk_redirect_hash),
>  
>  /* integer value in 'imm' field of BPF_CALL instruction selects which helper
>   * function eBPF program intends to call

Thanks for documenting the helpers in include/uapi/linux/bpf.h! However
the doc is missing in the update to the bpf.h file under tools/ in this
patch, could you please fix it?

Best regards,
Quentin

  reply	other threads:[~2018-05-04 10:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03 18:28 [PATCH bpf-next v4 0/4] Hash support for sock John Fastabend
2018-05-03 18:28 ` [PATCH bpf-next v4 1/4] bpf: sockmap, refactor sockmap routines to work with hashmap John Fastabend
2018-05-03 18:28 ` [PATCH bpf-next v4 2/4] bpf: sockmap, add hash map support John Fastabend
2018-05-03 18:28 ` [PATCH bpf-next v4 3/4] bpf: selftest additions for SOCKHASH John Fastabend
2018-05-04 10:11   ` Quentin Monnet [this message]
2018-05-03 18:28 ` [PATCH bpf-next v4 4/4] bpf: bpftool, support for sockhash John Fastabend
2018-05-03 18:31 ` [PATCH bpf-next v4 0/4] Hash support for sock 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=e04cd3e1-a0a8-36be-19ee-448f44c56477@netronome.com \
    --to=quentin.monnet@netronome.com \
    --cc=ast@kernel.org \
    --cc=borkmann@iogearbox.net \
    --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 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.