]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ixgbe: Simplify logic for ethtool loopback frame creation and testing
authorAlexander Duyck <alexander.h.duyck@intel.com>
Wed, 8 Feb 2012 07:50:09 +0000 (07:50 +0000)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 15:05:00 +0000 (23:05 +0800)
commitaa0cbc2ccc7d133f5306cd8e28547187b3129280
tree20d25db702272df4882e6a2c2ab657a098587bbf
parent844600de2ab188c52ff162a172caf21a65c7868c
ixgbe: Simplify logic for ethtool loopback frame creation and testing

This change makes it a bit easier to do the loopback frame creating and
testing.  Previously we were doing an and to drop the last bit, and then
dividing the frame_size by 2 in order to get locations for frame bytes and
testing.  Instead we can simplify it by just shifting the register one bit
to the right and using that for the frame offsets.

This change also replaces all instances of rx_buffer_info with just
rx_buffer since that is closer to the name of the actual structure being
used and can save a few extra characters.

In addition I have updated the logic for cleaning up a test frame so that
we pass an rx_buffer instead of the sk_buff.  The main motivation behind
this is changes that will replace the sk_buff with just a page in the
future.

(cherry picked from commit 3832b26e49ad9e585239b32f763c31679f9e41fe)
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/ixgbe/ixgbe_ethtool.c