aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/android
diff options
context:
space:
mode:
authorMagnus Karlsson <magnus.karlsson@intel.com>2019-01-29 15:03:50 +0100
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2019-02-21 11:02:47 -0800
commit4a9b32f30f805ca596d76605903a48eab58e0b88 (patch)
treeea12cd6cd17199f28d0ed18d66134b3e17fbe97c /drivers/android
parenti40e: fix potential RX buffer starvation for AF_XDP (diff)
downloadlinux-dev-4a9b32f30f805ca596d76605903a48eab58e0b88.tar.xz
linux-dev-4a9b32f30f805ca596d76605903a48eab58e0b88.zip
ixgbe: fix potential RX buffer starvation for AF_XDP
When the RX rings are created they are also populated with buffers so that packets can be received. Usually these are kernel buffers, but for AF_XDP in zero-copy mode, these are user-space buffers and in this case the application might not have sent down any buffers to the driver at this point. And if no buffers are allocated at ring creation time, no packets can be received and no interrupts will be generated so the NAPI poll function that allocates buffers to the rings will never get executed. To rectify this, we kick the NAPI context of any queue with an attached AF_XDP zero-copy socket in two places in the code. Once after an XDP program has loaded and once after the umem is registered. This take care of both cases: XDP program gets loaded first then AF_XDP socket is created, and the reverse, AF_XDP socket is created first, then XDP program is loaded. Fixes: d0bcacd0a130 ("ixgbe: add AF_XDP zero-copy Rx support") Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/android')
0 files changed, 0 insertions, 0 deletions