Re: [RFC] ipv6: Change %pI6 format to output compacted addresses?
From: Chuck Lever <chuck.lever@oracle.com>
Date: 2009-08-13 21:03:35
On Aug 13, 2009, at 4:34 PM, Joe Perches wrote:
On Thu, 2009-08-13 at 16:24 -0400, Brian Haley wrote:quoted
Is your arch "um"? Seems like those are only defined there, I'm building a straight x86 kernel.Nope. I did make allyesconfig ; make lib/vsprintf.o lib ctype.o allnoconfig works though.quoted
This core dumps when running "test", I'm still trying to track down why.missing return on ip_addr_stringquoted
I think we're thinking too hard about this, I would think we'd always want to print the shortened IPv6 address in debugging messages with %pI6.True, but you can't tell in sprintf as it's used in seq. for instance: net/sunrpc/svcauth_unix.c: seq_printf(m, "%s %pI6 %s\n", im-quoted
m_class, &addr, dom);
This one might be a bad example. RPC IPv6 support, especially server side, isn't written in stone yet. User space may not even be ready for an IPv6 address here; I can check. If user space happens to be flexible here, then it won't matter if this particular instance is shorthanded or not. [ I would think user space in general should be using inet_pton(3) everywhere for such interfaces, so the format of these addresses wouldn't matter so much. Probably impossible at this point. ]
quoted
The %pi6 places need to stay since they're an API to userspace. I don't think we need the extra "c" and "c4" support.I'm pretty sure it can't change and a new form is needed so %pi6c should be OK. I'd rather not use another %p<foo> letter.
I'm not arguing one way or the other, but it would be useful if someone could check exactly what the dependencies are right now. It seems like we're speculating a bit.
quoted
One comment on a quick scan of the code: ip6_addr[8 * 5] is fine here, we won't ever have all eight plus an IPv4 address.I'm fixing it up and will resubmit something working in a little while. cheers, Joe
-- Chuck Lever chuck[dot]lever[at]oracle[dot]com