From: Daniel Borkmann <dborkman@redhat.com>
To: Alexei Starovoitov <ast@plumgrid.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Chema Gonzalez <chema@google.com>,
Eric Dumazet <edumazet@google.com>,
Network Development <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] net: filter: cleanup A/X name usage
Date: Tue, 10 Jun 2014 09:29:00 +0200 [thread overview]
Message-ID: <5396B3BC.30504@redhat.com> (raw)
In-Reply-To: <CAMEtUux+sj7o9=57JAaHvGJXJmfuyRKb+dFL_3ZdkmAoHy9XzA@mail.gmail.com>
On 06/09/2014 09:25 PM, Alexei Starovoitov wrote:
...
> Point taken. Will do more thorough documentation patch to
> explain eBPF instruction set a bit better. Mainly to clarify encoding.
> eBPF tried to be as close as possible to classic BPF, since I thought
> it will make it easier to understand. That's why I reused A/X in names
> and bits in opcode encoding.
> In classic, A is accumulator and X is indeX. In eBPF I thought
> calling destination register 'a_reg' made sense, since it would
> indicate that this 'a_reg' is a register that is used as 'accumulator'
> in the instruction. Like in "bpf_add R2, 5", R2 is Accumulator.
> In "bpf_add R2, R3", R2 is Accumulator and R3 is indeX
> and BPF_X bit in opcode indicates whether 'x_reg' field of the
> instruction is used. Unfortunately that decision caused the whole
> A/X naming confusion, that this patch is addressing.
> src_reg and dst_reg are indeed better names.
I think both naming conventions (before/after) are fine, imho.
next prev parent reply other threads:[~2014-06-10 7:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-06 21:46 [PATCH net-next] net: filter: cleanup A/X name usage Alexei Starovoitov
2014-06-08 20:21 ` Daniel Borkmann
2014-06-09 17:10 ` Chema Gonzalez
2014-06-09 19:25 ` Alexei Starovoitov
2014-06-10 7:29 ` Daniel Borkmann [this message]
2014-06-11 7:13 ` 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=5396B3BC.30504@redhat.com \
--to=dborkman@redhat.com \
--cc=ast@plumgrid.com \
--cc=chema@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.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.