From: Joe Perches <joe@perches.com>
To: Thomas Graf <tgraf@suug.ch>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
Jeff Garzik <jgarzik@pobox.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH - net-2.6.24 0/2] Introduce and use print_ip and print_ipv6
Date: Thu, 20 Sep 2007 16:20:58 -0700 [thread overview]
Message-ID: <1190330458.26101.188.camel@localhost> (raw)
In-Reply-To: <20070920230552.GF15613@postel.suug.ch>
On Fri, 2007-09-21 at 01:05 +0200, Thomas Graf wrote:
> What exactly is the advantage of this?
It makes the kernel image smaller and has consistency,
typechecking and sparse advantages.
print_mac(char *buf, const u8 *addr)
print_ip(char *buf, __be32 addr)
print_ipv6(char *buf, const u8 *addr)
Current use of formatting for IPV6:
NIP6_FMT in each format, 38 bytes %s is 2.
NIP6(addr) is 8 args, and inlined ntohs overhead
now it's:
automatic buffer, format "%s", function call and 2 args
IPv4 is more or less a wash:
format "%u.%u.%u.%u", 11 bytes, 4 args inlined
vs
automatic buffer, format "%s", function call and 2 args
next prev parent reply other threads:[~2007-09-20 23:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-20 6:53 [PATCH - net-2.6.24 0/2] Introduce and use print_ip and print_ipv6 Joe Perches
2007-09-20 14:55 ` Randy Dunlap
2007-09-20 15:25 ` Joe Perches
2007-09-20 17:46 ` Ilpo Järvinen
2007-09-20 23:05 ` Thomas Graf
2007-09-20 23:20 ` Joe Perches [this message]
2007-09-26 2:29 ` David Miller
2007-09-26 4:36 ` Joe Perches
2007-09-26 5:11 ` David Miller
2007-09-26 5:18 ` Jeff Garzik
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=1190330458.26101.188.camel@localhost \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
--cc=tgraf@suug.ch \
/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).