Thread (13 messages) flat view 13 messages, 2 authors, 2016-03-11

[PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk

From: Sunil Kovvuri <hidden>
Date: 2016-03-07 17:23:18
Also in: lkml, netdev

On Mon, Mar 7, 2016 at 10:34 PM, David Miller [off-list ref] wrote:
From: Sunil Kovvuri <redacted>
Date: Mon, 7 Mar 2016 22:28:39 +0530
quoted
Hi David,
quoted
quoted
you create a window of time during which the consumer
can release the page and prematurely free it.
Okay, but here the consumer i.e HW is notified only after page count
is incremented.
For example if you check 'nicvf_refill_rbdr' fn() only after receive
buffer ring is
refilled with buffers, doorbell is issued to hardware to start using
the new buffers.

So
@@ -241,6 +254,8 @@ refill:
                new_rb++;
        }

+       nicvf_get_page(nic);
+
calling 'nicvf_get_page' before issuing doorbell ensures page ref
count is properly
set before hw/consumer can use the buffers.
So if you know ahead of time how the page will be split up, just
calculate that when you get the page and increment the page count
appropriately.

That's what we do in the NIU driver.
Thanks for the suggestion, will check and get back.

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