| To: | Mitchell Blank Jr <mitch@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] small skbuff.[ch] tweaks |
| From: | Andi Kleen <ak@xxxxxxx> |
| Date: | Tue, 2 Sep 2003 10:58:33 +0200 |
| Cc: | netdev@xxxxxxxxxxx, davem@xxxxxxxxxx |
| In-reply-to: | <20030902081625.GA52298@xxxxxxxxxxxxxx> |
| References: | <20030902081625.GA52298@xxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
On Tue, 2 Sep 2003 01:16:25 -0700
Mitchell Blank Jr <mitch@xxxxxxxxxx> wrote:
> --- linux-2.6.0-test4-VIRGIN/net/core/skbuff.c 2003-08-22
> 13:47:28.000000000 -0700
> +++ linux-2.6.0-test4mnb1/net/core/skbuff.c 2003-09-01 14:00:37.000000000
> -0700
> @@ -129,14 +129,17 @@
> /* Get the HEAD */
> skb = kmem_cache_alloc(skbuff_head_cache,
> gfp_mask & ~__GFP_DMA);
> - if (!skb)
> + if (unlikely(!skb))
> goto out;
>
> /* Get the DATA. Size must match skb_add_mtu(). */
> size = SKB_DATA_ALIGN(size);
> data = kmalloc(size + sizeof(struct skb_shared_info), gfp_mask);
> - if (!data)
> - goto nodata;
> + if (unlikely(!data)) {
Both unlikely(!ptr) and likely(ptr) are not needed because gcc assumes this
by default
-Andi
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] small skbuff.[ch] tweaks, Andi Kleen |
|---|---|
| Next by Date: | Re: [PATCH] small skbuff.[ch] tweaks, Mitchell Blank Jr |
| Previous by Thread: | [PATCH] small skbuff.[ch] tweaks, Mitchell Blank Jr |
| Next by Thread: | Re: [PATCH] small skbuff.[ch] tweaks, Mitchell Blank Jr |
| Indexes: | [Date] [Thread] [Top] [All Lists] |