]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: tweak page counting for XDP_REDIRECT
authorBjörn Töpel <bjorn.topel@intel.com>
Thu, 22 Mar 2018 09:02:36 +0000 (10:02 +0100)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 23 Mar 2018 22:23:51 +0000 (15:23 -0700)
commit5afe9d8874bc334a495a24053d77f7f7db2e9dfd
tree0b572c2a5c465ff76d738b106aafb6e13fea77af
parentaa6a8602cb1d24b07ee2ecef4bc6f4ea55ac046a
ixgbe: tweak page counting for XDP_REDIRECT

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/ixgbe/ixgbe_main.c