From: David Miller <davem@davemloft.net>
To: alexander.h.duyck@redhat.com
Cc: netdev@vger.kernel.org, stephen@networkplumber.org, pshelar@nicira.com
Subject: Re: [net-next PATCH 0/5] Add eth_proto_is_802_3 to provide improved means of checking Ethertype
Date: Tue, 05 May 2015 19:24:59 -0400 (EDT) [thread overview]
Message-ID: <20150505.192459.2030369260746371959.davem@davemloft.net> (raw)
In-Reply-To: <20150504212603.2536.29877.stgit@ahduyck-vm-fedora22>
From: Alexander Duyck <alexander.h.duyck@redhat.com>
Date: Mon, 04 May 2015 14:33:42 -0700
> This patch series implements and makes use of eth_proto_is_802_3(). The
> idea behind the function is to provide an optimized means of testing to
> determine if a given Ethertype value is a length or 802.3 protocol number.
> The standard path for this was to use ntohs(proto) and then perform a
> comparison. This adds a slight cost as it usually requires either a 16b
> rotate or byte swap which can cost 1 cycle or more depending on the
> processor.
>
> I had previously addressed this for eth_type_trans, however in doing so I had
> overlooked checking with sparse and had introduced a couple sparse warnings.
> The first patch in this series fixes those sparse warnings as well as does
> some additional optimization for big endian systems. In addition it pushes
> the code out into a separate function which can then be used in the other
> patches to reduce the instruction count/processing time in those functions
> as well.
Series applied, thanks!
prev parent reply other threads:[~2015-05-05 23:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-04 21:33 [net-next PATCH 0/5] Add eth_proto_is_802_3 to provide improved means of checking Ethertype Alexander Duyck
2015-05-04 21:33 ` [net-next PATCH 1/5] etherdev: Fix sparse error, make test usable by other functions Alexander Duyck
2015-05-04 21:33 ` [net-next PATCH 2/5] ebtables: Use eth_proto_is_802_3 Alexander Duyck
2015-05-04 21:33 ` [net-next PATCH 3/5] ipv4/ip_tunnel_core: " Alexander Duyck
2015-05-04 21:34 ` [net-next PATCH 4/5] openvswitch: " Alexander Duyck
2015-05-04 21:34 ` [net-next PATCH 5/5] vlan: " Alexander Duyck
2015-05-05 23:24 ` David Miller [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=20150505.192459.2030369260746371959.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=alexander.h.duyck@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pshelar@nicira.com \
--cc=stephen@networkplumber.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