From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: fbl@redhat.com, weiyj.lk@gmail.com,
yongjun_wei@trendmicro.com.cn, netdev@vger.kernel.org
Subject: Re: [PATCH] skbuff: remove pointless conditional before kfree_skb()
Date: Thu, 30 Aug 2012 13:39:28 -0400 (EDT) [thread overview]
Message-ID: <20120830.133928.1850319389901233806.davem@davemloft.net> (raw)
In-Reply-To: <1346211528.3571.26.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 28 Aug 2012 20:38:48 -0700
> On Tue, 2012-08-28 at 17:39 -0300, Flavio Leitner wrote:
>
>> Ok, and what if kfree_skb() becomes a macro that first checks
>> if the skb is NULL and if not, call the _kfree_skb() to
>> continue as before?
>>
>> #define kfree_skb(skb) \
>> if (skb) \
>> _kfree_skb(skb) \
>
> Then its adding a conditional test on each call site and increase
> kernel code size.
>
> So if you plan submitting such patch, please keep the whole thing out of
> line.
I'm tossing this entire series.
Each and every case must be investigated individually and:
1) If the check is kept, a big comment explaining why is added
to the code.
2) If the check is removed, a big piece of explanatory text is
added to the commit log message explaining everything in
full detail.
prev parent reply other threads:[~2012-08-30 17:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-28 13:10 [PATCH] skbuff: remove pointless conditional before kfree_skb() Wei Yongjun
2012-08-28 14:12 ` Eric Dumazet
2012-08-28 19:17 ` Flavio Leitner
2012-08-28 20:09 ` Eric Dumazet
2012-08-28 20:39 ` Flavio Leitner
2012-08-29 3:38 ` Eric Dumazet
2012-08-30 17:39 ` David Miller [this message]
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=20120830.133928.1850319389901233806.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=fbl@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=weiyj.lk@gmail.com \
--cc=yongjun_wei@trendmicro.com.cn \
/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).