[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130524160106.GA30252@casper.infradead.org>
Date: Fri, 24 May 2013 17:01:06 +0100
From: Thomas Graf <tgraf@...g.ch>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: netdev@...r.kernel.org, jesse@...ira.com, dev@...nvswitch.org
Subject: Re: [PATCH net-next 1/2] net: Export skb_zerocopy() to zerocopy from
one skb to another
On 05/24/13 at 08:31am, Eric Dumazet wrote:
> Hmm. Big warning here : In the nfnetlink case, we specifically made sure
> that this path was taken only if skb->head_frag was set (all incoming
> packets have this property, but not outgoing ones yet)
>
> This should be documented if we move it to net/core/skbuff.c, or we
> should add a BUG_ON()
Good point.
I guess we could ensure in skb_zerocopy() that if !head_frag then we
enforce hlen = max(hlen, skb_headlen(skb)) to always fall back to
skb_copy_bits() for !head_frag.
> I see your openvswitch code seems OK.
>
> Maybe also put in net/core/skbuff.c the code dealing with this stuff ?
>
> + if (!skb->head_frag ||
> + skb_headlen(skb) < L1_CACHE_BYTES ||
> + skb_shinfo(skb)->nr_frags >= MAX_SKB_FRAGS)
> + hlen = skb_headlen(skb);
> +
> + if (skb_has_frag_list(skb))
> + hlen = skb->len;
I'll put this into skb_zerocopy_hdrlen()
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists