From: Andi Kleen <ak@suse.de>
To: Mitchell Blank Jr <mitch@sfgoth.com>
Cc: netdev@oss.sgi.com, davem@redhat.com
Subject: Re: [PATCH] small skbuff.[ch] tweaks
Date: Tue, 2 Sep 2003 10:58:33 +0200 [thread overview]
Message-ID: <20030902105833.04778449.ak@suse.de> (raw)
In-Reply-To: <20030902081625.GA52298@gaz.sfgoth.com>
On Tue, 2 Sep 2003 01:16:25 -0700
Mitchell Blank Jr <mitch@sfgoth.com> 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
next prev parent reply other threads:[~2003-09-02 8:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-02 8:16 [PATCH] small skbuff.[ch] tweaks Mitchell Blank Jr
2003-09-02 8:58 ` Andi Kleen [this message]
2003-09-02 9:10 ` Mitchell Blank Jr
2003-09-02 9:04 ` Andi Kleen
2003-09-02 9:49 ` Mitchell Blank Jr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030902105833.04778449.ak@suse.de \
--to=ak@suse.de \
--cc=davem@redhat.com \
--cc=mitch@sfgoth.com \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).