summaryrefslogtreecommitdiff
path: root/net/core/xdp.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-14 19:53:39 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-14 19:53:39 +0200
commita00fcbc115f9c934fe92e96358a7f392bb5549f0 (patch)
tree6733e44bb7efc8b49772f080c906ccd90b274008 /net/core/xdp.c
parent4ce535ec0084f0d712317cb99d383cad3288e713 (diff)
parentd434405aaab7d0ebc516b68a8fc4100922d7f5ef (diff)
Merge tag 'v5.12-rc7' into driver-core-next
We need the driver core fix in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/core/xdp.c')
-rw-r--r--net/core/xdp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/xdp.c b/net/core/xdp.c
index 05354976c1fc..858276e72c68 100644
--- a/net/core/xdp.c
+++ b/net/core/xdp.c
@@ -350,7 +350,8 @@ static void __xdp_return(void *data, struct xdp_mem_info *mem, bool napi_direct,
/* mem->id is valid, checked in xdp_rxq_info_reg_mem_model() */
xa = rhashtable_lookup(mem_id_ht, &mem->id, mem_id_rht_params);
page = virt_to_head_page(data);
- napi_direct &= !xdp_return_frame_no_direct();
+ if (napi_direct && xdp_return_frame_no_direct())
+ napi_direct = false;
page_pool_put_full_page(xa->page_pool, page, napi_direct);
rcu_read_unlock();
break;