Thread (26 messages) 26 messages, 5 authors, 2012-01-07

Re: [PATCH 3/6] net: add support for per-paged-fragment destructors

From: Ian Campbell <hidden>
Date: 2012-01-06 08:50:33

On Fri, 2012-01-06 at 01:15 +0000, Michał Mirosław wrote:
On Thu, Jan 05, 2012 at 05:13:41PM +0000, Ian Campbell wrote:
quoted
Entities which care about the complete lifecycle of pages which they inject
into the network stack via an skb paged fragment can choose to set this
destructor in order to receive a callback when the stack is really finished
with a page (including all clones, retransmits, pull-ups etc etc).
[...]
quoted
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -143,9 +143,16 @@ struct sk_buff;
 
 typedef struct skb_frag_struct skb_frag_t;
 
+struct skb_frag_destructor {
+	atomic_t ref;
+	int (*destroy)(void *data);
+	void *data;
+};
+
[...]

What happened to removal of 'data' field from this structure?
I did that in my branch where I also moved the *page into there (to try
and shrink the frag size) and forgot to rescue it when I switched back.
I'll make the change again for next time.

Thanks for the reminder.

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