]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: tweak page counting for XDP_REDIRECT
authorBjörn Töpel <bjorn.topel@intel.com>
Thu, 22 Mar 2018 15:14:33 +0000 (16:14 +0100)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 26 Mar 2018 21:10:04 +0000 (14:10 -0700)
commit223352f66d0fa065c8f8ca0ff443ebfaa1393515
tree060d6bda48d6f94dacfac95e764c1e645ff2d5de
parentd3f235c9b6083f03070fda13bed2ef76e28b558c
i40e: tweak page counting for XDP_REDIRECT

This commit tweaks the page counting for XDP_REDIRECT to function
properly. XDP_REDIRECT support will be added in a future commit.

The current page counting scheme assumes that the reference count
cannot decrease until the received frame is sent to the upper layers
of the networking stack. This assumption does not hold for the
XDP_REDIRECT action, since a page (pointed out by xdp_buff) can have
its reference count decreased via the xdp_do_redirect call.

To work around that, we now start off by a large page count and then
don't allow a refcount less than two.

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_txrx.c