From: Jesper Juhl <jj@chaosbits.net>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Netfilter Core Team <coreteam@netfilter.org>,
Jan Rekorajski <baggins@pld.org.pl>,
"David S. Miller" <davem@davemloft.net>,
netfilter-devel@vger.kernel.org, netfilter@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Reduce number of pointer dereferences in IPv6 netfilter LOG module function dump_packet()
Date: Mon, 15 Nov 2010 22:50:13 +0100 (CET) [thread overview]
Message-ID: <alpine.LNX.2.00.1011152249160.20408@swampdragon.chaosbits.net> (raw)
In-Reply-To: <alpine.LNX.2.00.1011152246050.20408@swampdragon.chaosbits.net>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1630 bytes --]
On Mon, 15 Nov 2010, Jesper Juhl wrote:
> On Mon, 15 Nov 2010, Eric Dumazet wrote:
>
> > Le dimanche 14 novembre 2010 à 22:47 +0100, Jesper Juhl a écrit :
> > > By adding two pointer variables to
> > > net/ipv6/netfilter/ip6t_LOG.c::dump_packet() we can save 19 bytes of .text
> > > and many pointer dereferences.
> > >
> > > before:
> > > text data bss dec hex filename
> > > 6258 600 3088 9946 26da net/ipv6/netfilter/ip6t_LOG.o
> > >
> > > after:
> > > text data bss dec hex filename
> > > 6239 600 3088 9927 26c7 net/ipv6/netfilter/ip6t_LOG.o
> > >
> > >
> > > Please Cc me on replies.
> > >
> > >
> > > Signed-off-by: Jesper Juhl <jj@chaosbits.net>
> > > ---
> > > ip6t_LOG.c | 16 ++++++++++------
> > > 1 file changed, 10 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c
> > > index 09c8889..51d10a5 100644
> > > --- a/net/ipv6/netfilter/ip6t_LOG.c
> > > +++ b/net/ipv6/netfilter/ip6t_LOG.c
> [...]
> >
> > Same comment than previous patch, you add a NULL dereference.
> >
> Hopefully this is beter (same as change done to the other (ipv4) patch).
>
>
>
> Fewer pointer derefs and smaller .text size for
> net/ipv4/netfilter/ipt_LOG.c::dump_packet()
>
I'm an idiot, that should of course read
"net/ipv6/netfilter/ip6t_LOG.c::dump_packet()"
That'll teach me not to cut'n'paste descriptions :-(
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.
prev parent reply other threads:[~2010-11-15 21:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-14 21:47 [PATCH] Reduce number of pointer dereferences in IPv6 netfilter LOG module function dump_packet() Jesper Juhl
2010-11-15 0:50 ` Eric Dumazet
2010-11-15 21:49 ` Jesper Juhl
2010-11-15 21:50 ` Jesper Juhl [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=alpine.LNX.2.00.1011152249160.20408@swampdragon.chaosbits.net \
--to=jj@chaosbits.net \
--cc=baggins@pld.org.pl \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=netfilter@vger.kernel.org \
/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