Subject: Re: [PATCH - net-2.6.24 0/2] Introduce and use print_ip and print_ipv6

From: Joe Perches <[email-masked]>
Date: Thu, 20 Sep 2007 16:20:58 -0700

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