Thread (16 messages) 16 messages, 5 authors, 2021-06-07

Re: [PATCH net-next v6 3/5] page_pool: Allow drivers to hint on SKB recycling

From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Date: 2021-06-07 04:37:40
Also in: bpf, linux-mm, lkml, netdev

Hi David,

On Sat, Jun 05, 2021 at 10:06:30AM -0600, David Ahern wrote:
On 6/4/21 2:42 AM, Ilias Apalodimas wrote:
quoted
[...]
quoted
quoted
+	/* Driver set this to memory recycling info. Reset it on recycle.
+	 * This will *not* work for NIC using a split-page memory model.
+	 * The page will be returned to the pool here regardless of the
+	 * 'flipped' fragment being in use or not.
+	 */
I am not sure I understand how does the last part of comment related
to the code below, as there is no driver using split-page memory model
will reach here because those driver will not call skb_mark_for_recycle(),
right?
Yes the comment is there to prohibit people (mlx5 only actually) to add the
recycling bit on their driver.  Because if they do it will *probably* work
but they might get random corrupted packets which will be hard to debug.
What's the complexity for getting it to work with split page model?
Since 1500 is the default MTU, requiring a page per packet means a lot
of wasted memory.
It boils down to 'can we re-use the page or is someone using it'.
Yunsheng sent a patch in earlier series that implements this with
ref counters. As Matteo mentions we can also add another page pool type.

In theory none of those sound too hard, but we'll have to code it and see.

/Ilias
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help