]> git.baikalelectronics.ru Git - kernel.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)
commita4542a7a3091374b1212c9cf54804b599d0a3225
tree2b3bff5e5bac2b5150e91c5fac410322898fc493
parentf8bc9bbd9e3a08c438f878c58b07741ad8955abc
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