summaryrefslogtreecommitdiffstats
path: root/include/net/xdp_priv.h
diff options
context:
space:
mode:
authorJonathan Lemon <jonathan.lemon@gmail.com>2019-11-14 23:13:00 +0100
committerDavid S. Miller <davem@davemloft.net>2019-11-16 21:39:10 +0100
commitc3f812cea0d7006469d1cf33a4a9f0a12bb4b3a3 (patch)
tree7c0bb8f75587b1c9d219c0006c44c73432931eeb /include/net/xdp_priv.h
parentMerge branch 'smc-last-part-of-termination-improvements' (diff)
downloadlinux-c3f812cea0d7006469d1cf33a4a9f0a12bb4b3a3.tar.xz
linux-c3f812cea0d7006469d1cf33a4a9f0a12bb4b3a3.zip
page_pool: do not release pool until inflight == 0.
The page pool keeps track of the number of pages in flight, and it isn't safe to remove the pool until all pages are returned. Disallow removing the pool until all pages are back, so the pool is always available for page producers. Make the page pool responsible for its own delayed destruction instead of relying on XDP, so the page pool can be used without the xdp memory model. When all pages are returned, free the pool and notify xdp if the pool is registered with the xdp memory system. Have the callback perform a table walk since some drivers (cpsw) may share the pool among multiple xdp_rxq_info. Note that the increment of pages_state_release_cnt may result in inflight == 0, resulting in the pool being released. Fixes: d956a048cd3f ("xdp: force mem allocator removal and periodic warning") Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/xdp_priv.h')
-rw-r--r--include/net/xdp_priv.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/include/net/xdp_priv.h b/include/net/xdp_priv.h
index 6a8cba6ea79a..a9d5b7603b89 100644
--- a/include/net/xdp_priv.h
+++ b/include/net/xdp_priv.h
@@ -12,12 +12,8 @@ struct xdp_mem_allocator {
struct page_pool *page_pool;
struct zero_copy_allocator *zc_alloc;
};
- int disconnect_cnt;
- unsigned long defer_start;
struct rhash_head node;
struct rcu_head rcu;
- struct delayed_work defer_wq;
- unsigned long defer_warn;
};
#endif /* __LINUX_NET_XDP_PRIV_H__ */