[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1315123938.2635.1.camel@edumazet-laptop>
Date: Sun, 04 Sep 2011 10:12:18 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: kaber@...sh.net
Cc: davem@...emloft.net, netfilter-devel@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH 02/11] net: add function to allocate skbuff head
without data area
Le samedi 03 septembre 2011 à 19:26 +0200, kaber@...sh.net a écrit :
> +struct sk_buff *__alloc_skb_head(gfp_t gfp_mask, int node)
> +{
> + struct sk_buff *skb;
> +
> + /* Get the HEAD */
> + skb = kmem_cache_alloc_node(skbuff_head_cache,
> + gfp_mask & ~__GFP_DMA, node);
> + if (!skb)
> + goto out;
> + prefetchw(skb);
Please remove this prefetchw(), since we have no delay between it and
actual memset(skb).
> +
> + /*
> + * Only clear those fields we need to clear, not those that we will
> + * actually initialise below. Hence, don't put any more fields after
> + * the tail pointer in struct sk_buff!
> + */
> + memset(skb, 0, offsetof(struct sk_buff, tail));
--
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