]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'eth_type_trans'
authorDavid S. Miller <davem@davemloft.net>
Mon, 4 May 2015 02:30:36 +0000 (22:30 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 May 2015 02:30:36 +0000 (22:30 -0400)
commitcb8afa81b40ce809a4801c271731875cb767ecc0
tree3f5fe450644b92d062c9e6f52a56e9e50bcec8f5
parent956e8bfbcf4ada0274bcfb3e376c2e713edae5ce
parentdc10bcab17c636f8f0aee76df8469674261594dd
Merge branch 'eth_type_trans'

Alexander Duyck says:

====================
A few minor clean-ups to eth_type_trans

This series addresses a few minor issues I found in eth_type_trans that
that allow us to gain back something like 3 or more cycles per packet.

The first change is to drop the byte swap since it isn't necessary.  On x86
we could just check the first byte and compare that against the upper 8
bits of the Ethertype to determine if we are dealing with a size value or
not.

The second makes it so that the value we read in to test for multicast can
be used for the address comparison.  This allows us to avoid a second read
of the destination address.

The final change is to avoid some unneeded instructions in computing the
Ethernet header pointer.  When we start the call the Ethernet header is at
skb->data, so we just use that rather than computing mac_header, and then
adding that back to skb->head.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>