i40e/i40evf: avoid atomics
authorMitch Williams <mitch.a.williams@intel.com>
Fri, 15 Jan 2016 22:33:15 +0000 (14:33 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 18 Feb 2016 07:11:07 +0000 (23:11 -0800)
commit16fd08b85962f6288fe1191856aa98cb0d40aa30
tree1e57a1a007322eb1020d35ccc5236927f5148986
parent4147e2c5eec037dc51e4767b0ed42b32c6fecf9d
i40e/i40evf: avoid atomics

In the case where we have a page fully used by receive data, we need to
release the page fully to the stack. Instead of calling get_page (which
increments the page count) followed by free_page (which decrements the
page count), just donate our reference to the stack. Although this
donation is not tax deductible, it does allow us to avoid two very
expensive atomic operations that reverse each other.

Change-ID: If70739792d5748995fc175ec92ac2171ed4ad8fc
Signed-off-by: Mitch Williams <mitch.a.williams@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