netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Chenbo Feng <chenbofeng.kernel@gmail.com>,
	netdev@vger.kernel.org, Alexei Starovoitov <ast@fb.com>
Cc: Lorenzo Colitti <lorenzo@google.com>,
	Willem de Bruijn <willemb@google.com>,
	Chenbo Feng <fengc@google.com>
Subject: Re: [PATCH net-next v5 3/3] A Sample of using socket cookie and uid for traffic monitoring
Date: Tue, 21 Mar 2017 00:07:52 +0100	[thread overview]
Message-ID: <58D060C8.7010507@iogearbox.net> (raw)
In-Reply-To: <1490035266-9861-4-git-send-email-chenbofeng.kernel@gmail.com>

On 03/20/2017 07:41 PM, Chenbo Feng wrote:
> From: Chenbo Feng <fengc@google.com>
>
> Add a sample program to demostrate the possible usage of
> get_socket_cookie and get_socket_uid helper function. The program will
> store bytes and packets counting of in/out traffic monitored by iptables
> and store the stats in a bpf map in per socket base. The owner uid of
> the socket will be stored as part of the data entry. A shell script for
> running the program is also included.
>
> Signed-off-by: Chenbo Feng <fengc@google.com>
[...]
> +int main(int argc, char *argv[])
> +{
> +	if (argc > 2) {
> +		printf("Too many argument provided\n");
> +		return 1;
[...]
> +
> +	return 0;
> +}
> +
> +
> +
> +
> +
> +

Did these bits slip in accidentally?

> diff --git a/samples/bpf/libbpf.h b/samples/bpf/libbpf.h
> index 3705fba..8ab36a0 100644
> --- a/samples/bpf/libbpf.h
> +++ b/samples/bpf/libbpf.h
> @@ -135,6 +135,16 @@ struct bpf_insn;
>   		.off   = OFF,					\
>   		.imm   = 0 })
>
[...]

      reply	other threads:[~2017-03-20 23:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-20 18:41 [PATCH net-next v5 0/3] net: core: Two Helper function about socket information Chenbo Feng
2017-03-20 18:41 ` [PATCH net-next v5 1/3] Add a helper function to get socket cookie in eBPF Chenbo Feng
2017-03-20 23:05   ` Daniel Borkmann
2017-03-20 18:41 ` [PATCH net-next v5 2/3] Add a eBPF helper function to retrieve socket uid Chenbo Feng
2017-03-20 23:11   ` Daniel Borkmann
2017-03-20 18:41 ` [PATCH net-next v5 3/3] A Sample of using socket cookie and uid for traffic monitoring Chenbo Feng
2017-03-20 23:07   ` 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=58D060C8.7010507@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=ast@fb.com \
    --cc=chenbofeng.kernel@gmail.com \
    --cc=fengc@google.com \
    --cc=lorenzo@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=willemb@google.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).