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

From: "Michael S. Tsirkin" <[email-masked]>
Date: Tue, 8 May 2012 15:46:29 +0300

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 <[email-masked]>

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 <[email-masked]>

---

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.