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() _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev