Thread (30 messages) flat view 30 messages, 3 authors, 2012-05-14

Re: [PATCH RFC 6/6] skbuff: set zerocopy flag on frag destructor

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2012-05-08 12:46:29
Subsystem: networking [general], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

On Mon, May 07, 2012 at 04:54:57PM +0300, Michael S. Tsirkin wrote:
set tx flags when adding a frag destructor to
force frags to be orphaned as appropriate.
copy when copying frags between skbs.
Note: rare false positives (where flag is set with no
destructors) are harmless.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Ugh. I somehow managed to mangle this last patch and send out
a version that defines skb_copy_frag_destructor twice.
The following is needed on top (not resubmitting everything as it's an
RFC, and needs to be part of Ian's patchset anyway.  Sorry about the
noise.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

---
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 2876e4d..5fbefc3 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -258,13 +258,6 @@ enum {
 	SKBTX_WIFI_STATUS = 1 << 5,
 };
 
-static inline void skb_copy_frag_destructor(struct sk_buff *to,
-					    struct sk_buff *from)
-{
-	skb_shinfo(to)->tx_flags |= skb_shinfo(from)->tx_flags &
-		SKBTX_DEV_ZEROCOPY;
-}
-
 /*
  * The callback notifies userspace to release buffers when skb DMA is done in
  * lower device, the skb last reference should be 0 when calling this.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help