[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1190330458.26101.188.camel@localhost>
Date: Thu, 20 Sep 2007 16:20:58 -0700
From: Joe Perches <joe@...ches.com>
To: Thomas Graf <tgraf@...g.ch>
Cc: netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
Jeff Garzik <jgarzik@...ox.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH - net-2.6.24 0/2] Introduce and use print_ip and
print_ipv6
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
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists