]> git.karo-electronics.de Git - karo-tx-linux.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)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 13 Mar 2012 03:56:52 +0000 (20:56 -0700)
commit3832b26e49ad9e585239b32f763c31679f9e41fe
tree2b3bff5e5bac2b5150e91c5fac410322898fc493
parenta557928e26b08496c8f4b6c04e3838ad8048ad85
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.

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>
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c