mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dborkman@redhat.com
Cc: ast@plumgrid.com, netdev@vger.kernel.org, hagen@jauu.net,
	keescook@chromium.org, pmoore@redhat.com, mingo@kernel.org,
	hpa@linux.intel.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 8/9] net: filter: rework/optimize internal BPF interpreter's instruction set
Date: Thu, 27 Mar 2014 15:23:19 -0400 (EDT)	[thread overview]
Message-ID: <20140327.152319.1469721259196062415.davem@davemloft.net> (raw)
In-Reply-To: <1395867970-1338-9-git-send-email-dborkman@redhat.com>

From: Daniel Borkmann <dborkman@redhat.com>
Date: Wed, 26 Mar 2014 22:06:09 +0100

>   - Adds swab insns for 32/64-bit

I don't like this.

You don't want a swab instruction, you want "endian X to endian Y".  Just
like we have "cpu_to_le32()", "le32_to_cpu()" et al. in the kernel.

That way the user can be completely oblivious as to the endianness of
the cpu it's running on.

So if you ask for a "to little endian" swab, if the chip is
little-endian then no code needs to be emitted at all, it's a nop.

There is zero reason for the BPF program emitted by userspace to be
dependant upon the cpu endianness.

  reply	other threads:[~2014-03-27 19:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1395867970-1338-1-git-send-email-dborkman@redhat.com>
2014-03-26 21:06 ` Daniel Borkmann
2014-03-27 19:23   ` David Miller [this message]
2014-03-27 20:30     ` Alexei Starovoitov

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=20140327.152319.1469721259196062415.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ast@plumgrid.com \
    --cc=dborkman@redhat.com \
    --cc=hagen@jauu.net \
    --cc=hpa@linux.intel.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pmoore@redhat.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

all inboxes | Powered by JetHome®