netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <dborkman@redhat.com>
To: Alexei Starovoitov <ast@plumgrid.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: filter: rename 'struct sock_filter_int' into 'struct bpf_insn'
Date: Fri, 25 Jul 2014 01:21:21 +0200	[thread overview]
Message-ID: <53D194F1.6020603@redhat.com> (raw)
In-Reply-To: <1406237179-3713-1-git-send-email-ast@plumgrid.com>

On 07/24/2014 11:26 PM, Alexei Starovoitov wrote:
> eBPF is used by socket filtering, seccomp and soon by tracing and
> exposed to userspace, therefore 'sock_filter_int' name is not accurate.
> Rename it to 'bpf_insn'
>
> Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
> ---
...
>   #define BPF_ALU64_REG(OP, DST, SRC)				\
> -	((struct sock_filter_int) {				\
> +	((struct bpf_insn) {				\

                              ^^^ Please also fix up whitespacing here
                                  and all the other sections below.

>   		.code  = BPF_ALU64 | BPF_OP(OP) | BPF_X,	\
>   		.dst_reg = DST,					\
>   		.src_reg = SRC,					\
> @@ -90,7 +90,7 @@ enum {
>   		.imm   = 0 })
>
>   #define BPF_ALU32_REG(OP, DST, SRC)				\
> -	((struct sock_filter_int) {				\
> +	((struct bpf_insn) {				\
>   		.code  = BPF_ALU | BPF_OP(OP) | BPF_X,		\
>   		.dst_reg = DST,					\
>   		.src_reg = SRC,					\
> @@ -100,7 +100,7 @@ enum {
>   /* ALU ops on immediates, bpf_add|sub|...: dst_reg += imm32 */
>
>   #define BPF_ALU64_IMM(OP, DST, IMM)				\
> -	((struct sock_filter_int) {				\
> +	((struct bpf_insn) {				\
>   		.code  = BPF_ALU64 | BPF_OP(OP) | BPF_K,	\
>   		.dst_reg = DST,					\
>   		.src_reg = 0,					\
> @@ -108,7 +108,7 @@ enum {
>   		.imm   = IMM })
>
>   #define BPF_ALU32_IMM(OP, DST, IMM)				\
> -	((struct sock_filter_int) {				\
> +	((struct bpf_insn) {				\
>   		.code  = BPF_ALU | BPF_OP(OP) | BPF_K,		\
>   		.dst_reg = DST,					\
>   		.src_reg = 0,					\
> @@ -118,7 +118,7 @@ enum {
>   /* Endianess conversion, cpu_to_{l,b}e(), {l,b}e_to_cpu() */
>
>   #define BPF_ENDIAN(TYPE, DST, LEN)				\
> -	((struct sock_filter_int) {				\
> +	((struct bpf_insn) {				\
>   		.code  = BPF_ALU | BPF_END | BPF_SRC(TYPE),	\
>   		.dst_reg = DST,					\
>   		.src_reg = 0,					\
> @@ -128,7 +128,7 @@ enum {
>   /* Short form of mov, dst_reg = src_reg */
>
>   #define BPF_MOV64_REG(DST, SRC)					\
> -	((struct sock_filter_int) {				\
> +	((struct bpf_insn) {				\
>   		.code  = BPF_ALU64 | BPF_MOV | BPF_X,		\
>   		.dst_reg = DST,					\
>   		.src_reg = SRC,					\
> @@ -136,7 +136,7 @@ enum {
>   		.imm   = 0 })
>
>   #define BPF_MOV32_REG(DST, SRC)					\
> -	((struct sock_filter_int) {				\
> +	((struct bpf_insn) {				\
>   		.code  = BPF_ALU | BPF_MOV | BPF_X,		\
>   		.dst_reg = DST,					\
>   		.src_reg = SRC,					\
....

  reply	other threads:[~2014-07-24 23:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-24 21:26 [PATCH net-next] net: filter: rename 'struct sock_filter_int' into 'struct bpf_insn' Alexei Starovoitov
2014-07-24 23:21 ` Daniel Borkmann [this message]
2014-07-24 23:26   ` Alexei Starovoitov
2014-07-24 23:28     ` Daniel Borkmann

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=53D194F1.6020603@redhat.com \
    --to=dborkman@redhat.com \
    --cc=ast@plumgrid.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).