netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH - net-2.6.24 0/2] Introduce and use print_ip and print_ipv6
@ 2007-09-20  6:53 Joe Perches
  2007-09-20 14:55 ` Randy Dunlap
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Joe Perches @ 2007-09-20  6:53 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Jeff Garzik, Andrew Morton

In the same vein as print_mac, the implementations
introduce declaration macros:
	DECLARE_IP_BUF(var)
	DECLARE_IPV6_BUF(var)
and functions:
	print_ip
	print_ipv6
	print_ipv6_nofmt

IPV4 Use:

	DECLARE_IP_BUF(ipbuf);
	__be32 addr;
	print_ip(ipbuf, addr);

IPV6 use:

	DECLARE_IPV6_BUF(ipv6buf);
	const struct in6_addr *addr;
	print_ipv6(ipv6buf, addr);
and
	print_ipv6_nofmt(ipv6buf, addr);

compiled x86, defconfig and allyesconfig


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH - net-2.6.24 0/2] Introduce and use print_ip and print_ipv6
  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 23:05 ` Thomas Graf
  2007-09-26  2:29 ` David Miller
  2 siblings, 1 reply; 10+ messages in thread
From: Randy Dunlap @ 2007-09-20 14:55 UTC (permalink / raw)
  To: Joe Perches; +Cc: netdev, David Miller, Jeff Garzik, Andrew Morton

On Wed, 19 Sep 2007 23:53:31 -0700 Joe Perches wrote:

> In the same vein as print_mac, the implementations
> introduce declaration macros:
> 	DECLARE_IP_BUF(var)
> 	DECLARE_IPV6_BUF(var)
> and functions:
> 	print_ip
> 	print_ipv6
> 	print_ipv6_nofmt
> 
> IPV4 Use:
> 
> 	DECLARE_IP_BUF(ipbuf);
> 	__be32 addr;
> 	print_ip(ipbuf, addr);
> 
> IPV6 use:
> 
> 	DECLARE_IPV6_BUF(ipv6buf);
> 	const struct in6_addr *addr;
> 	print_ipv6(ipv6buf, addr);
> and
> 	print_ipv6_nofmt(ipv6buf, addr);
> 
> compiled x86, defconfig and allyesconfig


How large are the patches if you posted them for review instead
of just referencing gits for them?  (which cuts down on review
possibilities)

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH - net-2.6.24 0/2] Introduce and use print_ip and print_ipv6
  2007-09-20 14:55 ` Randy Dunlap
@ 2007-09-20 15:25   ` Joe Perches
  2007-09-20 17:46     ` Ilpo Järvinen
  0 siblings, 1 reply; 10+ messages in thread
From: Joe Perches @ 2007-09-20 15:25 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: netdev, David Miller, Jeff Garzik, Andrew Morton

On Thu, 2007-09-20 at 07:55 -0700, Randy Dunlap wrote:
> How large are the patches if you posted them for review instead
> of just referencing gits for them?  (which cuts down on review
> possibilities)

The v4 is ~130kb, the v6 ~35kb.

There is a gitweb available at:

print_ip:
http://repo.or.cz/w/linux-2.6/trivial-mods.git?a=shortlog;h=print_ipv4
commit diff:
http://repo.or.cz/w/linux-2.6/trivial-mods.git?a=commitdiff;h=1e3a30d5d8b49b3accca07cc84ecf6d977cacdd5

print_ipv6:
http://repo.or.cz/w/linux-2.6/trivial-mods.git?a=shortlog;h=print_ipv6
commit diff:
http://repo.or.cz/w/linux-2.6/trivial-mods.git?a=commitdiff;h=e96b794a57a164db84379e2baf5fe2622a5ae3bf



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH - net-2.6.24 0/2] Introduce and use print_ip and print_ipv6
  2007-09-20 15:25   ` Joe Perches
@ 2007-09-20 17:46     ` Ilpo Järvinen
  0 siblings, 0 replies; 10+ messages in thread
From: Ilpo Järvinen @ 2007-09-20 17:46 UTC (permalink / raw)
  To: Joe Perches
  Cc: Randy Dunlap, Netdev, David Miller, Jeff Garzik, Andrew Morton

On Thu, 20 Sep 2007, Joe Perches wrote:

> On Thu, 2007-09-20 at 07:55 -0700, Randy Dunlap wrote:
> > How large are the patches if you posted them for review instead
> > of just referencing gits for them?  (which cuts down on review
> > possibilities)
> 
> The v4 is ~130kb, the v6 ~35kb.
>
> There is a gitweb available at:
> 
> print_ip:
> http://repo.or.cz/w/linux-2.6/trivial-mods.git?a=shortlog;h=print_ipv4
> commit diff:
> http://repo.or.cz/w/linux-2.6/trivial-mods.git?a=commitdiff;h=1e3a30d5d8b49b3accca07cc84ecf6d977cacdd5
> 
> print_ipv6:
> http://repo.or.cz/w/linux-2.6/trivial-mods.git?a=shortlog;h=print_ipv6
> commit diff:
> http://repo.or.cz/w/linux-2.6/trivial-mods.git?a=commitdiff;h=e96b794a57a164db84379e2baf5fe2622a5ae3bf

...Alternatively you could split it up a bit and send those smaller 
chunks for reviewing purposes only (even though it would be combined
to a single big patch in the end).

-- 
 i.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH - net-2.6.24 0/2] Introduce and use print_ip and print_ipv6
  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 23:05 ` Thomas Graf
  2007-09-20 23:20   ` Joe Perches
  2007-09-26  2:29 ` David Miller
  2 siblings, 1 reply; 10+ messages in thread
From: Thomas Graf @ 2007-09-20 23:05 UTC (permalink / raw)
  To: Joe Perches; +Cc: netdev, David Miller, Jeff Garzik, Andrew Morton

* Joe Perches <joe@perches.com> 2007-09-19 23:53
> In the same vein as print_mac, the implementations
> introduce declaration macros:
> 	DECLARE_IP_BUF(var)
> 	DECLARE_IPV6_BUF(var)
> and functions:
> 	print_ip
> 	print_ipv6
> 	print_ipv6_nofmt
> 
> IPV4 Use:
> 
> 	DECLARE_IP_BUF(ipbuf);
> 	__be32 addr;
> 	print_ip(ipbuf, addr);
> 
> IPV6 use:
> 
> 	DECLARE_IPV6_BUF(ipv6buf);
> 	const struct in6_addr *addr;
> 	print_ipv6(ipv6buf, addr);
> and
> 	print_ipv6_nofmt(ipv6buf, addr);
> 
> compiled x86, defconfig and allyesconfig

What exactly is the advantage of this?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH - net-2.6.24 0/2] Introduce and use print_ip and print_ipv6
  2007-09-20 23:05 ` Thomas Graf
@ 2007-09-20 23:20   ` Joe Perches
  0 siblings, 0 replies; 10+ messages in thread
From: Joe Perches @ 2007-09-20 23:20 UTC (permalink / raw)
  To: Thomas Graf; +Cc: netdev, David Miller, Jeff Garzik, Andrew Morton

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 



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH - net-2.6.24 0/2] Introduce and use print_ip and print_ipv6
  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 23:05 ` Thomas Graf
@ 2007-09-26  2:29 ` David Miller
  2007-09-26  4:36   ` Joe Perches
  2 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2007-09-26  2:29 UTC (permalink / raw)
  To: joe; +Cc: netdev, jgarzik, akpm

From: Joe Perches <joe@perches.com>
Date: Wed, 19 Sep 2007 23:53:31 -0700

> In the same vein as print_mac, the implementations
> introduce declaration macros:

I'm going to hold on this for now, there is no universal
agreement that this is something we want to do and I'd
like to take care of getting the more certain stuff into
net-2.6.24 before "iffy" bits like this one.

Thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH - net-2.6.24 0/2] Introduce and use print_ip and print_ipv6
  2007-09-26  2:29 ` David Miller
@ 2007-09-26  4:36   ` Joe Perches
  2007-09-26  5:11     ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: Joe Perches @ 2007-09-26  4:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, jgarzik, akpm

On Tue, 2007-09-25 at 19:29 -0700, David Miller wrote:
> I'm going to hold on this for now, there is no universal
> agreement that this is something we want to do and I'd
> like to take care of getting the more certain stuff into
> net-2.6.24 before "iffy" bits like this one.

Here's an argument for inclusion:

defconfig without patches:

$ size vmlinux
   text    data     bss     dec     hex filename
4738370  518986  622592 5879948  59b88c vmlinux

defconfig with patches:

$ size vmlinux
   text    data     bss     dec     hex filename
4735238  518986  622592 5876816  59ac50 vmlinux

cheers, Joe


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH - net-2.6.24 0/2] Introduce and use print_ip and print_ipv6
  2007-09-26  4:36   ` Joe Perches
@ 2007-09-26  5:11     ` David Miller
  2007-09-26  5:18       ` Jeff Garzik
  0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2007-09-26  5:11 UTC (permalink / raw)
  To: joe; +Cc: netdev, jgarzik, akpm

From: Joe Perches <joe@perches.com>
Date: Tue, 25 Sep 2007 21:36:38 -0700

> On Tue, 2007-09-25 at 19:29 -0700, David Miller wrote:
> > I'm going to hold on this for now, there is no universal
> > agreement that this is something we want to do and I'd
> > like to take care of getting the more certain stuff into
> > net-2.6.24 before "iffy" bits like this one.
> 
> Here's an argument for inclusion:
> 
> defconfig without patches:

Sure, but this ignores certain things that text/data/bss
size don't show you.

For one thing, stack frames might now be larger in the
functions where the new variables get added, even if they
aren't used to print out the debugging message.  And that
could have negative performance implications.

Nothing is every black and white, everything is gray :-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH - net-2.6.24 0/2] Introduce and use print_ip and print_ipv6
  2007-09-26  5:11     ` David Miller
@ 2007-09-26  5:18       ` Jeff Garzik
  0 siblings, 0 replies; 10+ messages in thread
From: Jeff Garzik @ 2007-09-26  5:18 UTC (permalink / raw)
  To: David Miller; +Cc: joe, netdev, akpm

David Miller wrote:
> From: Joe Perches <joe@perches.com>
> Date: Tue, 25 Sep 2007 21:36:38 -0700
> 
>> On Tue, 2007-09-25 at 19:29 -0700, David Miller wrote:
>>> I'm going to hold on this for now, there is no universal
>>> agreement that this is something we want to do and I'd
>>> like to take care of getting the more certain stuff into
>>> net-2.6.24 before "iffy" bits like this one.
>> Here's an argument for inclusion:
>>
>> defconfig without patches:
> 
> Sure, but this ignores certain things that text/data/bss
> size don't show you.

size(1) output also ignores the merge noise this creates, and IMO we've 
got a lot of that already...

	Jeff




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-09-26  5:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).