[ofw] Re: [PATCH 8/8] [ib-diags] smpquery: add support for WinOF
Sasha Khapyorsky
sashak at voltaire.com
Wed Feb 18 01:52:30 PST 2009
Hi Sean,
On 14:37 Tue 17 Feb , Sean Hefty wrote:
> Allow smpquery to build and run on both Linux and Windows. Window
> build files are maintained in the WinOF respository. These changes
> allow dropping the infiniband-diags into the WinOF build environment.
>
> Signed-off-by: Sean Hefty <sean.hefty at intel.com>
> ---
>
> infiniband-diags/src/smpquery.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/infiniband-diags/src/smpquery.c b/infiniband-diags/src/smpquery.c
> index 44280e1..2d3d91b 100644
> --- a/infiniband-diags/src/smpquery.c
> +++ b/infiniband-diags/src/smpquery.c
> @@ -47,7 +47,7 @@
>
> #include <infiniband/umad.h>
> #include <infiniband/mad.h>
> -#include <infiniband/complib/cl_nodenamemap.h>
> +#include <complib/cl_nodenamemap.h>
Is it needed? Rest tools use similar path with leading 'infiniband'.
>
> #include "ibdiag_common.h"
>
> @@ -191,7 +191,7 @@ pkey_table(ib_portid_t *dest, char **argv, int argc)
> } else
> mad_decode_field(data, IB_NODE_PARTITION_CAP_F, &n);
>
> - for (i = 0; i < (n + 31) / 32; i++) {
> + for (i = 0; i < (uint32_t) ((n + 31) / 32); i++) {
Wouldn't it be better to make declare i, j, k as int? Width 32 doesn't
make any sense here.
> mod = i | (portnum << 16);
> if (!smp_query(data, dest, IB_ATTR_PKEY_TBL, mod, 0))
> return "pkey table query failed";
> @@ -353,7 +353,7 @@ guid_info(ib_portid_t *dest, char **argv, int argc)
> return "port info failed";
> mad_decode_field(data, IB_PORT_GUID_CAP_F, &n);
>
> - for (i = 0; i < (n + 7) / 8; i++) {
> + for (i = 0; i < (uint32_t) ((n + 7) / 8); i++) {
Ditto.
Sasha
> mod = i;
> if (!smp_query(data, dest, IB_ATTR_GUID_INFO, mod, 0))
> return "guid info query failed";
> @@ -412,7 +412,7 @@ int main(int argc, char **argv)
> const struct ibdiag_opt opts[] = {
> { "combined", 'c', 0, NULL, "use Combined route address argument"},
> { "node-name-map", 1, 1, "<file>", "node name map file"},
> - {}
> + { 0 }
> };
> const char *usage_examples[] = {
> "portinfo 3 1\t\t\t\t# portinfo by lid, with port modifier",
>
>
>
More information about the ofw
mailing list