]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: fix crash when Rx descriptor count is changed
authorBjörn Töpel <bjorn.topel@intel.com>
Fri, 12 Jun 2020 11:47:31 +0000 (13:47 +0200)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 19 Jun 2020 05:37:25 +0000 (22:37 -0700)
commitc3b7bf76c8a387096eda710ae9864b9cfff84a67
tree31cd38e14cc5b4b5262079f6d93ef0fc79ad91eb
parent97e3cfeee67d78370d8a7069075ba3ab66cbfc48
i40e: fix crash when Rx descriptor count is changed

When the AF_XDP buffer allocator was introduced, the Rx SW ring
"rx_bi" allocation was moved from i40e_setup_rx_descriptors()
function, and was instead done in the i40e_configure_rx_ring()
function.

This broke the ethtool set_ringparam() hook for changing the Rx
descriptor count, which was relying on i40e_setup_rx_descriptors() to
handle the allocation.

Fix this by adding an explicit i40e_alloc_rx_bi() call to
i40e_set_ringparam().

Fixes: 37acda8df085 ("i40e: Separate kernel allocated rx_bi rings from AF_XDP rings")
Signed-off-by: Björn Töpel <bjorn.topel@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_ethtool.c