[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170613.171707.2024415777832835116.davem@davemloft.net>
Date: Tue, 13 Jun 2017 17:17:07 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: brakmo@...com
Cc: netdev@...r.kernel.org, kernel-team@...com, bmatheny@...com,
ast@...com, daniel@...earbox.net, dsa@...ulusnetworks.com
Subject: Re: [RFC PATCH net-next 09/15] bpf: Sample BPF program to set
buffer sizes
From: Lawrence Brakmo <brakmo@...com>
Date: Tue, 13 Jun 2017 10:59:58 -0700
> diff --git a/samples/bpf/tcp_bufs_kern.c b/samples/bpf/tcp_bufs_kern.c
> new file mode 100644
> index 0000000..a407b73
> --- /dev/null
> +++ b/samples/bpf/tcp_bufs_kern.c
...
> +SEC("sockops")
> +int bpf_bufs(struct __sk_buff *skb)
> +{
> + struct bpf_socket_ops *skops = (struct bpf_socket_ops *) skb;
> + char fmt1[] = "BPF command: %d\n";
> + char fmt2[] = " Returning %d\n";
> + int op;
> + int rv = 0;
> + int rwnd_init = 40;
> + int bufsize = 1500000;
> +
> + // For testing purposes, only execute rest of BPF program
> + // if neither port numberis 55601
Local variable ordering and C++ comments.
Thanks.
Powered by blists - more mailing lists