[ofa-general] ***SPAM*** Re: [PATCH v3 3/3] Convert ibnetdiscover to use new ibnetdisc library.

Sasha Khapyorsky sashak at voltaire.com
Thu Apr 23 01:25:35 PDT 2009


On 15:43 Fri 03 Apr     , Ira Weiny wrote:
> From e506ac4d6accefb49b89811cc9dd77775ad481f7 Mon Sep 17 00:00:00 2001
> From: Ira Weiny <weiny2 at llnl.gov>
> Date: Fri, 3 Apr 2009 15:28:29 -0700
> Subject: [PATCH] Convert ibnetdiscover to use new ibnetdisc library.
> 
>    All other functionality is preserved

And what about '-v' and '-e' options? Why is it removed from man page?

> Signed-off-by: Ira Weiny <weiny2 at llnl.gov>
> ---
>  infiniband-diags/Makefile.am                  |    5 +-
>  infiniband-diags/include/grouping.h           |  113 ---
>  infiniband-diags/libibnetdisc/src/chassis.c   |   20 +-
>  infiniband-diags/libibnetdisc/src/ibnetdisc.c |    5 +-
>  infiniband-diags/man/ibnetdiscover.8          |   10 +-
>  infiniband-diags/src/grouping.c               |  785 --------------------
>  infiniband-diags/src/ibnetdiscover.c          |  974 +++++++++----------------
>  7 files changed, 345 insertions(+), 1567 deletions(-)
>  delete mode 100644 infiniband-diags/include/grouping.h
>  delete mode 100644 infiniband-diags/src/grouping.c
> 
> diff --git a/infiniband-diags/Makefile.am b/infiniband-diags/Makefile.am
> index b480a4a..19b992c 100644
> --- a/infiniband-diags/Makefile.am
> +++ b/infiniband-diags/Makefile.am
> @@ -41,7 +41,8 @@ LDADD = libcommon.a
>  
>  libcommon_a_SOURCES = src/ibdiag_common.c
>  src_ibaddr_SOURCES = src/ibaddr.c
> -src_ibnetdiscover_SOURCES = src/ibnetdiscover.c src/grouping.c
> +src_ibnetdiscover_SOURCES = src/ibnetdiscover.c
> +src_ibnetdiscover_LDFLAGS = -L$(top_srcdir)/libibnetdisc -libnetdisc

As with previous patch 'top_builddir' should be used here.

>  src_ibping_SOURCES = src/ibping.c
>  src_ibportstate_SOURCES = src/ibportstate.c
>  src_ibroute_SOURCES = src/ibroute.c
> @@ -57,7 +58,7 @@ src_ibsendtrap_SOURCES = src/ibsendtrap.c
>  src_vendstat_SOURCES = src/vendstat.c
>  src_mcm_rereg_test_SOURCES = src/mcm_rereg_test.c
>  src_iblinkinfo_SOURCES = src/iblinkinfo.c
> -src_iblinkinfo_LDADD = -libnetdisc
> +src_iblinkinfo_LDFLAGS = -L$(top_srcdir)/libibnetdisc -libnetdisc

BTW what is the reason change LDADD to LDFLAGS?

> diff --git a/infiniband-diags/libibnetdisc/src/ibnetdisc.c b/infiniband-diags/libibnetdisc/src/ibnetdisc.c
> index bf7c2a7..479bae7 100644
> --- a/infiniband-diags/libibnetdisc/src/ibnetdisc.c
> +++ b/infiniband-diags/libibnetdisc/src/ibnetdisc.c
> @@ -150,6 +150,9 @@ query_node(struct ibnd_fabric *fabric, struct ibnd_node *inode,
>  		return -1;
>  	decode_port_info(port);
>  
> +	port->base_lid = node->smalid;  /* LID is still defined by port 0 */
> +	port->lmc = node->smalmc;
> +
>          if (!smp_query_via(node->switchinfo, portid, IB_ATTR_SWITCH_INFO, 0, timeout_ms,
>  			fabric->ibmad_port))
>  		node->smaenhsp0 = 0;	/* assume base SP0 */
> @@ -167,7 +170,7 @@ add_port_to_dpath(ib_dr_path_t *path, int nextport)
>  	if (path->cnt+2 >= sizeof(path->p))
>  		return -1;
>  	++path->cnt;
> -	path->p[path->cnt] = nextport;
> +	path->p[path->cnt] = (uint8_t) nextport;
>  	return path->cnt;
>  }
>  
> diff --git a/infiniband-diags/man/ibnetdiscover.8 b/infiniband-diags/man/ibnetdiscover.8
> index 958efa9..768d392 100644
> --- a/infiniband-diags/man/ibnetdiscover.8
> +++ b/infiniband-diags/man/ibnetdiscover.8
> @@ -5,7 +5,7 @@ ibnetdiscover \- discover InfiniBand topology
>  
>  .SH SYNOPSIS
>  .B ibnetdiscover
> -[\-d(ebug)] [\-e(rr_show)] [\-v(erbose)] [\-s(how)] [\-l(ist)] [\-g(rouping)] [\-H(ca_list)] [\-S(witch_list)] [\-R(outer_list)] [\-C ca_name] [\-P ca_port] [\-t(imeout) timeout_ms] [\-V(ersion)] [\--node-name-map <node-name-map>] [\-p(orts)] [\-h(elp)] [<topology-file>]
> +[\-d(ebug)] [\-s(how)] [\-l(ist)] [\-g(rouping)] [\-H(ca_list)] [\-S(witch_list)] [\-R(outer_list)] [\-C ca_name] [\-P ca_port] [\-t(imeout) timeout_ms] [\-V(ersion)] [\--node-name-map <node-name-map>] [\-p(orts)] [\-h(elp)] [<topology-file>]
>  
>  .SH DESCRIPTION
>  .PP
> @@ -37,7 +37,7 @@ List of connected switches
>  List of connected routers
>  .TP
>  \fB\-s\fR, \fB\-\-show\fR
> -Show more information
> +Show progress information during discovery.
>  .TP
>  \fB\-\-node\-name\-map\fR <node-name-map>
>  Specify a node name map.  The node name map file maps GUIDs to more user friendly
> @@ -57,15 +57,9 @@ using the util_name -h syntax.
>  # Debugging flags
>  .PP
>  \-d      raise the IB debugging level.
> -        May be used several times (-ddd or -d -d -d).
> -.PP
> -\-e      show send and receive errors (timeouts and others)
>  .PP
>  \-h      show the usage message
>  .PP
> -\-v      increase the application verbosity level.
> -        May be used several times (-vv or -v -v -v)
> -.PP
>  \-V      show the version info.

Those options are used actually. Why should it be removed from man page?
Just typo?

Sasha



More information about the general mailing list