]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/net/ethernet/intel/i40e/i40e_txrx.c
i40e/i40evf: Pull out code for cleaning up Rx buffers
authorAlexander Duyck <alexander.h.duyck@intel.com>
Tue, 14 Mar 2017 17:15:24 +0000 (10:15 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 29 Mar 2017 09:15:06 +0000 (02:15 -0700)
commita0cfc3130eef5406867b38d7e6ac25d1b87e2c76
tree3794ff55eaf2593501d23ae4e929c4c2499c2b76
parent9a064128fc8489e9066fde872f6fdeb3d1bbb84f
i40e/i40evf: Pull out code for cleaning up Rx buffers

This patch pulls out the code responsible for handling buffer recycling and
page counting and distributes it through several functions.  This allows us
to commonize the bits that handle either freeing or recycling the buffers.

As far as the page count tracking one change to the logic is that
pagecnt_bias is decremented as soon as we call i40e_get_rx_buffer.  It is
then the responsibility of the function that pulls the data to either
increment the pagecnt_bias if the buffer can be recycled as-is, or to
update page_offset so that we are pointing at the correct location for
placement of the next buffer.

Change-ID: Ibac576360cb7f0b1627f2a993d13c1a8a2bf60af
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40evf/i40e_txrx.c