[ofa-general] Re: [PATCH V2 1/3] Create a new library libibnetdisc

Ira Weiny weiny2 at llnl.gov
Tue Dec 23 14:56:46 PST 2008


On Tue, 23 Dec 2008 07:32:36 -0800
Roland Dreier <rdreier at cisco.com> wrote:

>  > This function ends up using a lot of stack space.
> 
> This is userspace... are a few KB on the stack really an issue?

Also that is in the test code (libibnetdisc/test/iblinkinfotest.c).  The real
iblinkinfo has them all declared static.

void
print_port(ibnd_node_t *node, ibnd_port_t *port)
{
	static char remote_guid_str[256];
	static char remote_str[256];
	static char link_str[256];
	static char width_msg[256];
	static char speed_msg[256];
	static char ext_port_str[256];
	static char loc_sma_lid[16];

...

Sorry about the confusion,
Ira




More information about the general mailing list