]> www.infradead.org Git - users/jedix/linux-maple.git/commit
i40e: Test memory before ethtool alloc succeeds
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Mon, 18 Apr 2016 18:33:49 +0000 (11:33 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 7 Jul 2016 17:41:24 +0000 (10:41 -0700)
commit1fd03d13787723cc4c30f18573fc61f678209679
tree7b137a3797bc1175c3fe5868bde25d7257a34060
parentf81b366afe17edf707d5d898089e15cf4a136edf
i40e: Test memory before ethtool alloc succeeds

Orabug: 23176970

When testing on systems with very limited amounts of RAM, a bug was
found where, while changing the number of descriptors using ethtool,
the driver didn't test the limits of system memory before permanently
assuming it would be able to get receive buffer memory.

Work around this issue by pre-allocation of the receive buffer
memory, in the "ghost" ring, which is then used during reinit
using the new ring length.

Change-Id: I92d7a5fb59a6c884b2efdd1ec652845f101c3359
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 147e81ec7568933a51fe58b64244383e929870fb)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c