author | boris.chiu@oracle.com |
Mon, 09 May 2016 19:41:29 -0700 | |
branch | s11u3-sru |
changeset 5950 | 9032c8d91972 |
parent 3679 | c058dce9610f |
child 6322 | c8b38df3868d |
permissions | -rw-r--r-- |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
1 |
/* |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
2 |
* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
3 |
* |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
4 |
* This software is available to you under a choice of one of two |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
5 |
* licenses. You may choose to be licensed under the terms of the GNU |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
6 |
* General Public License (GPL) Version 2, available from the file |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
7 |
* COPYING in the main directory of this source tree, or the |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
8 |
* OpenIB.org BSD license below: |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
9 |
* |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
10 |
* Redistribution and use in source and binary forms, with or |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
11 |
* without modification, are permitted provided that the following |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
12 |
* conditions are met: |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
13 |
* |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
14 |
* - Redistributions of source code must retain the above |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
15 |
* copyright notice, this list of conditions and the following |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
16 |
* disclaimer. |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
17 |
* |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
18 |
* - Redistributions in binary form must reproduce the above |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
19 |
* copyright notice, this list of conditions and the following |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
20 |
* disclaimer in the documentation and/or other materials |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
21 |
* provided with the distribution. |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
22 |
* |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
23 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
24 |
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
25 |
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
26 |
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
27 |
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
28 |
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
29 |
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
30 |
* SOFTWARE. |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
31 |
*/ |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
32 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
33 |
/* |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
34 |
* OFED Solaris wrapper |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
35 |
*/ |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
36 |
#if defined(__SVR4) && defined(__sun) |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
37 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
38 |
#include <stdio.h> |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
39 |
#include <stdlib.h> |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
40 |
#include <errno.h> |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
41 |
#include <unistd.h> |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
42 |
#include <sys/types.h> |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
43 |
#include <sys/stat.h> |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
44 |
#include <fcntl.h> |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
45 |
#include <ctype.h> |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
46 |
#include <string.h> |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
47 |
#include <strings.h> |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
48 |
#include <getopt.h> |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
49 |
#include <sys/utsname.h> |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
50 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
51 |
#include <infiniband/verbs.h> |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
52 |
#include <infiniband/arch.h> |
3679
c058dce9610f
18117487 saquery -m -t 50000 failed with multiple VFs created
boris.chiu@oracle.com
parents:
715
diff
changeset
|
53 |
#include <infiniband/umad.h> |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
54 |
#include "ibdiag_common.h" |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
55 |
#include <sys/ib/clients/of/sol_uverbs/sol_uverbs_ioctl.h> |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
56 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
57 |
/* |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
58 |
* Local defines for sol_uverbs IOCTLs, used while |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
59 |
* building on build system without the change in |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
60 |
* header files. |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
61 |
*/ |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
62 |
#ifndef UVERBS_NODEDESC_UPDATE_STRING |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
63 |
#define UVERBS_IOCTL_GET_NODEDESC ('v' << 8) | 0x04 |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
64 |
#define UVERBS_IOCTL_SET_NODEDESC ('v' << 8) | 0x05 |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
65 |
#define UVERBS_NODEDESC_UPDATE_STRING 0x00000001 |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
66 |
#define UVERBS_NODEDESC_UPDATE_HCA_STRING 0x00000002 |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
67 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
68 |
typedef struct sol_uverbs_nodedesc_s { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
69 |
int32_t uverbs_solaris_abi_version; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
70 |
char node_desc_str[64]; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
71 |
uint32_t node_desc_update_flag; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
72 |
} sol_uverbs_nodedesc_t; |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
73 |
#endif |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
74 |
|
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
75 |
/* |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
76 |
* Override verbs abi version. |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
77 |
* If the build system doesn't have the intended |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
78 |
* header file then override with the intended abi version. |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
79 |
* These changes can be deleted once the build system has |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
80 |
* the correct header file. |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
81 |
*/ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
82 |
#if (IB_USER_VERBS_SOLARIS_ABI_VERSION == 2) |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
83 |
#undef IB_USER_VERBS_SOLARIS_ABI_VERSION |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
84 |
#define IB_USER_VERBS_SOLARIS_ABI_VERSION 3 |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
85 |
#endif |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
86 |
|
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
87 |
#define NODEDESC_READ 0x80000000 |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
88 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
89 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
90 |
char *argv0 = "solaris_set_nodedesc"; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
91 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
92 |
static struct nodedesc_read_info_s { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
93 |
boolean_t info_valid; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
94 |
uint64_t guid; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
95 |
char nd_string[64]; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
96 |
boolean_t ofuv_name_valid; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
97 |
char ofuv_name[64]; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
98 |
} nd_read_info_arr[MAX_HCAS]; |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
99 |
int nd_read_info_cnt = 0; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
100 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
101 |
static int |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
102 |
read_nodedesc_ioctl(struct ibv_context *context, |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
103 |
sol_uverbs_nodedesc_t *nodedesc); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
104 |
static int |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
105 |
write_nodedesc_ioctl(struct ibv_context *context, |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
106 |
sol_uverbs_nodedesc_t *nodedesc); |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
107 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
108 |
static void |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
109 |
print_read_info() |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
110 |
{ |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
111 |
int j; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
112 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
113 |
for (j = 0; j < nd_read_info_cnt; j++) { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
114 |
if (nd_read_info_arr[j].info_valid == B_FALSE || |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
115 |
nd_read_info_arr[j].ofuv_name_valid == B_FALSE) |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
116 |
continue; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
117 |
printf("%s: %-16s\n", |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
118 |
nd_read_info_arr[j].ofuv_name, |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
119 |
nd_read_info_arr[j].nd_string); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
120 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
121 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
122 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
123 |
static void |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
124 |
update_read_info_hwnames(struct ibv_device **dev_list, int num_devices) |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
125 |
{ |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
126 |
int i; |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
127 |
uint64_t dev_guid; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
128 |
char *dev_name; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
129 |
size_t dev_name_len; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
130 |
|
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
131 |
for (i = 0; dev_list[i] != 0 && i < num_devices; ++i) { |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
132 |
int j; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
133 |
|
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
134 |
dev_guid = (uint64_t)ntohll( |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
135 |
ibv_get_device_guid(dev_list[i])); |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
136 |
dev_name = (char *)ibv_get_device_name(dev_list[i]); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
137 |
dev_name_len = strlen(dev_name) + 1; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
138 |
for (j = 0; j < nd_read_info_cnt; j++) { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
139 |
if (nd_read_info_arr[j].info_valid == B_TRUE && |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
140 |
nd_read_info_arr[j].guid == dev_guid) { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
141 |
memcpy(nd_read_info_arr[j].ofuv_name, |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
142 |
dev_name, dev_name_len); |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
143 |
nd_read_info_arr[j].ofuv_name_valid = |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
144 |
B_TRUE; |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
145 |
break; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
146 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
147 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
148 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
149 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
150 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
151 |
static void |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
152 |
add_read_info_arr(char *nd_str, uint64_t guid) |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
153 |
{ |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
154 |
size_t nd_len; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
155 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
156 |
nd_len = strlen(nd_str) + 1; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
157 |
nd_read_info_arr[nd_read_info_cnt].info_valid = B_TRUE; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
158 |
nd_read_info_arr[nd_read_info_cnt].guid = guid; |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
159 |
memcpy(nd_read_info_arr[nd_read_info_cnt].nd_string, |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
160 |
nd_str, nd_len); |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
161 |
nd_read_info_cnt++; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
162 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
163 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
164 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
165 |
static void |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
166 |
do_driver_read_ioctl(struct ibv_device *device) |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
167 |
{ |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
168 |
int rc; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
169 |
uint64_t hca_guid; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
170 |
struct ibv_context *context; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
171 |
sol_uverbs_nodedesc_t *nodedescp; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
172 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
173 |
/* Get the context for the device */ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
174 |
context = ibv_open_device(device); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
175 |
if (!context) { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
176 |
IBERROR("Unable to open the device.\n"); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
177 |
/* NOTREACHED */ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
178 |
} |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
179 |
|
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
180 |
if (context->device != device) { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
181 |
IBERROR("Device not set.\n"); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
182 |
/* NOTREACHED */ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
183 |
} |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
184 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
185 |
/* Allocate the memory for node descriptor */ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
186 |
nodedescp = (sol_uverbs_nodedesc_t *)malloc( |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
187 |
sizeof (sol_uverbs_nodedesc_t)); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
188 |
if (nodedescp == NULL) { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
189 |
IBERROR("Memory allocation failed.\n"); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
190 |
/* NOTREACHED */ |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
191 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
192 |
|
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
193 |
nodedescp->uverbs_solaris_abi_version = |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
194 |
IB_USER_VERBS_SOLARIS_ABI_VERSION; |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
195 |
|
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
196 |
/* Get the guid for the device */ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
197 |
hca_guid = (uint64_t)ntohll(ibv_get_device_guid(device)); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
198 |
if (!hca_guid) { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
199 |
IBERROR("ibv_get_device_guid failed.\n"); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
200 |
/* NOTREACHED */ |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
201 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
202 |
|
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
203 |
/* Read node descriptor */ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
204 |
rc = read_nodedesc_ioctl(context, nodedescp); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
205 |
if (rc != 0) { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
206 |
IBERROR("Failed to read node descriptor.\n"); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
207 |
/* NOTREACHED */ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
208 |
} |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
209 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
210 |
add_read_info_arr((char *)nodedescp->node_desc_str, |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
211 |
hca_guid); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
212 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
213 |
read_nodedesc_exit_1: |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
214 |
/* release the allocated memory */ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
215 |
free(nodedescp); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
216 |
read_nodedesc_exit_2: |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
217 |
/* Close the device */ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
218 |
ibv_close_device(context); |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
219 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
220 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
221 |
static int |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
222 |
do_driver_update_ioctl(struct ibv_device *device, char *node_desc, |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
223 |
char *hca_desc, uint32_t update_flag) |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
224 |
{ |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
225 |
int rc; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
226 |
struct ibv_context *context; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
227 |
sol_uverbs_nodedesc_t *nodedescp; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
228 |
char *desc_str; |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
229 |
|
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
230 |
desc_str = (node_desc ? node_desc : hca_desc); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
231 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
232 |
/* Get context for the device */ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
233 |
context = ibv_open_device(device); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
234 |
if (!context) { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
235 |
IBERROR("Unable to open the device.\n"); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
236 |
/* NOTREACHED */ |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
237 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
238 |
|
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
239 |
if (context->device != device) { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
240 |
IBERROR("Device not set.\n"); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
241 |
/* NOTREACHED */ |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
242 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
243 |
|
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
244 |
/* Allocate the memory for node descriptor */ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
245 |
nodedescp = (sol_uverbs_nodedesc_t *)malloc( |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
246 |
sizeof (sol_uverbs_nodedesc_t)); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
247 |
if (nodedescp == NULL) { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
248 |
IBERROR("Memory allocation failed.\n"); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
249 |
/* NOTREACHED */ |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
250 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
251 |
|
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
252 |
strncpy(nodedescp->node_desc_str, desc_str, 64); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
253 |
nodedescp->node_desc_update_flag = update_flag; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
254 |
nodedescp->uverbs_solaris_abi_version = |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
255 |
IB_USER_VERBS_SOLARIS_ABI_VERSION; |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
256 |
|
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
257 |
rc = write_nodedesc_ioctl(context, nodedescp); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
258 |
if (rc != 0) |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
259 |
IBERROR("Failed to set node descriptor.\n"); |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
260 |
|
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
261 |
free(nodedescp); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
262 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
263 |
write_nodedesc_exit: |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
264 |
ibv_close_device(context); |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
265 |
return (rc); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
266 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
267 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
268 |
static void |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
269 |
read_nodedesc(struct ibv_device **device_list, int num_devices) |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
270 |
{ |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
271 |
int i; |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
272 |
|
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
273 |
for (i = 0; device_list[i] != 0 && i < num_devices; i++) |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
274 |
do_driver_read_ioctl(device_list[i]); |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
275 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
276 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
277 |
static int |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
278 |
update_nodedesc(struct ibv_device **device_list, int num_devices, |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
279 |
char *cmn_nodedesc, char *hca_nodedesc, uint64_t guid, |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
280 |
uint32_t update_flag) |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
281 |
{ |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
282 |
int i, rc = -1; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
283 |
uint64_t dev_guid; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
284 |
boolean_t matched = B_FALSE; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
285 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
286 |
if (cmn_nodedesc && hca_nodedesc == NULL) { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
287 |
for (i = 0; i < num_devices; i++) { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
288 |
rc = do_driver_update_ioctl(device_list[i], |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
289 |
cmn_nodedesc, hca_nodedesc, update_flag); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
290 |
if (rc != 0) |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
291 |
continue; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
292 |
else |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
293 |
break; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
294 |
} |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
295 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
296 |
if (rc != 0 && i == num_devices) |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
297 |
IBERROR("Failed to set the node descriptor.\n"); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
298 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
299 |
return (rc); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
300 |
} |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
301 |
|
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
302 |
if (hca_nodedesc && guid) { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
303 |
for (i = 0; i < num_devices; i++) { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
304 |
dev_guid = (uint64_t)ntohll(ibv_get_device_guid( |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
305 |
device_list[i])); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
306 |
if (!dev_guid) { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
307 |
continue; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
308 |
} |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
309 |
if (dev_guid == guid) { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
310 |
matched = B_TRUE; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
311 |
rc = do_driver_update_ioctl(device_list[i], |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
312 |
cmn_nodedesc, hca_nodedesc, update_flag); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
313 |
break; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
314 |
} else { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
315 |
continue; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
316 |
} |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
317 |
} |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
318 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
319 |
if (matched == B_FALSE) { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
320 |
IBERROR("No guid matched.\n"); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
321 |
/* NOTREACHED */ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
322 |
} |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
323 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
324 |
if (rc != 0) { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
325 |
IBERROR("Failed to set the node descriptor.\n"); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
326 |
/* NOTREACHED */ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
327 |
} |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
328 |
} |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
329 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
330 |
return (rc); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
331 |
} |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
332 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
333 |
static int |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
334 |
read_nodedesc_ioctl(struct ibv_context *context, |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
335 |
sol_uverbs_nodedesc_t *nodedesc) |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
336 |
{ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
337 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
338 |
int ret; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
339 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
340 |
/* |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
341 |
* Use ioctl call to sol_uverbs module. |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
342 |
*/ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
343 |
if (!context || !nodedesc) { |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
344 |
return (-1); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
345 |
} |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
346 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
347 |
ret = ioctl(context->cmd_fd, UVERBS_IOCTL_GET_NODEDESC, nodedesc); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
348 |
if (ret != 0) { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
349 |
if (ret == EINVAL) |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
350 |
IBERROR("ABI version check failed.\n"); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
351 |
else |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
352 |
IBERROR("UVERBS_IOCTL_GET_NODEDESC ioctl failed.\n"); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
353 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
354 |
/* NOTREACHED */ |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
355 |
} |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
356 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
357 |
return (0); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
358 |
} |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
359 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
360 |
static int |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
361 |
write_nodedesc_ioctl(struct ibv_context *context, |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
362 |
sol_uverbs_nodedesc_t *nodedesc) |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
363 |
{ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
364 |
int ret; |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
365 |
|
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
366 |
/* |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
367 |
* Use ioctl call to sol_uverbs module. |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
368 |
*/ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
369 |
if (!context || !nodedesc) |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
370 |
return (-1); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
371 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
372 |
ret = ioctl(context->cmd_fd, UVERBS_IOCTL_SET_NODEDESC, nodedesc); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
373 |
if (ret != 0) { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
374 |
if (ret == EINVAL) |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
375 |
IBERROR("ABI version check failed.\n"); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
376 |
else |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
377 |
IBERROR("UVERBS_IOCTL_SET_NODEDESC ioctl failed.\n"); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
378 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
379 |
/* NOTREACHED */ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
380 |
} |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
381 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
382 |
return (0); |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
383 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
384 |
|
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
385 |
|
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
386 |
static void |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
387 |
usage(void) |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
388 |
{ |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
389 |
char *basename; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
390 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
391 |
if (!(basename = strrchr(argv0, '/'))) |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
392 |
basename = argv0; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
393 |
else |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
394 |
basename++; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
395 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
396 |
fprintf(stderr, "Usage: %s \n", basename); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
397 |
fprintf(stderr, "\t\t %s [-N(ode_Descriptor) CmnString]\n", |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
398 |
basename); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
399 |
fprintf(stderr, "\t\t %s [-H(CA_Description) HCAString " |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
400 |
"-G(UID) HCA_GUID]\n", basename); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
401 |
fprintf(stderr, "\t\t %s [-H(CA_Description) HCAString " |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
402 |
"-G(UID) HCA_GUID -N(ode_Descriptor) CmnString]\n", |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
403 |
basename); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
404 |
fprintf(stderr, "\t\t %s [-v]\n", basename); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
405 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
406 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
407 |
/* |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
408 |
* Return the Node descriptor string by concatinating |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
409 |
* many substrings. The first substring is "optarg" and |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
410 |
* the index of the last sub-string is "optind". |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
411 |
* |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
412 |
* For common nodedescription, add a space at the end, |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
413 |
* if there is none. |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
414 |
*/ |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
415 |
static char * |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
416 |
nodedesc_substr_cat(char **argv, int argc, boolean_t space_at_end) |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
417 |
{ |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
418 |
int i, start_opt, end_opt; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
419 |
char *nodedesc_str; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
420 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
421 |
/* Get the index for first sub-string. */ |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
422 |
for (start_opt = 0, i = optind; i; i--) { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
423 |
if (argv[i] == NULL) |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
424 |
continue; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
425 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
426 |
if (strcmp(argv[i], optarg) == 0) { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
427 |
start_opt = i; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
428 |
break; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
429 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
430 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
431 |
if (start_opt == 0) |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
432 |
return (NULL); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
433 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
434 |
/* Get the index for last sub-string */ |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
435 |
for (end_opt = 0, i = optind; i <= argc; i++) { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
436 |
if (i == argc || argv[i][0] == '-') { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
437 |
end_opt = i - 1; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
438 |
break; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
439 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
440 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
441 |
if (end_opt == 0) |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
442 |
return (NULL); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
443 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
444 |
nodedesc_str = malloc(64); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
445 |
strncpy(nodedesc_str, optarg, 64); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
446 |
start_opt++; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
447 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
448 |
/* |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
449 |
* strcat a space string and then strcat the |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
450 |
* next sub-string. |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
451 |
*/ |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
452 |
for (i = start_opt; i <= end_opt; i++) { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
453 |
strncat(nodedesc_str, " ", 64); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
454 |
strncat(nodedesc_str, argv[i], 64); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
455 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
456 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
457 |
/* |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
458 |
* Add a space at the end, if the caller has set |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
459 |
* space_at_end and the nodedesc string doesn't |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
460 |
* contain a space at the end. |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
461 |
*/ |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
462 |
if (space_at_end == B_TRUE && |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
463 |
nodedesc_str[strlen(nodedesc_str)] != ' ') |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
464 |
strncat(nodedesc_str, " ", 64); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
465 |
return (nodedesc_str); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
466 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
467 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
468 |
int |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
469 |
main(int argc, char **argv) |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
470 |
{ |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
471 |
int rc; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
472 |
char *nodedesc = NULL; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
473 |
char *hcadesc = NULL; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
474 |
uint32_t update_flag = 0; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
475 |
struct utsname uts_name; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
476 |
uint64_t hca_guid; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
477 |
boolean_t guid_inited = B_FALSE; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
478 |
extern int ibdebug; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
479 |
char nodename[64]; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
480 |
struct ibv_device **device_list = NULL; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
481 |
int num_devices = 0; |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
482 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
483 |
static char const str_opts[] = "N:H:G:vd"; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
484 |
static const struct option long_opts[] = { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
485 |
{ "Node_Descriptor", 1, 0, 'N'}, |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
486 |
{ "HCA_Description", 1, 0, 'H'}, |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
487 |
{ "GUID", 1, 0, 'G'}, |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
488 |
{ "verbose", 0, 0, 'v'}, |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
489 |
{ "debug", 0, 0, 'd'}, |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
490 |
{ } |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
491 |
}; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
492 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
493 |
argv0 = argv[0]; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
494 |
while (1) { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
495 |
int ch = getopt_long(argc, argv, str_opts, |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
496 |
long_opts, NULL); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
497 |
if (ch == -1) |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
498 |
break; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
499 |
switch (ch) { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
500 |
case 'N': |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
501 |
nodedesc = nodedesc_substr_cat(argv, argc, B_TRUE); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
502 |
if (!nodedesc) { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
503 |
usage(); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
504 |
rc = -1; |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
505 |
goto free_and_ret_2; |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
506 |
} |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
507 |
update_flag |= UVERBS_NODEDESC_UPDATE_STRING; |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
508 |
break; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
509 |
case 'H': |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
510 |
hcadesc = nodedesc_substr_cat(argv, argc, B_FALSE); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
511 |
if (!hcadesc) { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
512 |
usage(); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
513 |
rc = -1; |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
514 |
goto free_and_ret_2; |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
515 |
} |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
516 |
update_flag |= UVERBS_NODEDESC_UPDATE_HCA_STRING; |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
517 |
break; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
518 |
case 'G': |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
519 |
guid_inited = B_TRUE; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
520 |
hca_guid = (uint64_t)strtoull(optarg, 0, 0); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
521 |
break; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
522 |
case 'v' : |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
523 |
update_flag |= NODEDESC_READ; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
524 |
break; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
525 |
case 'd': |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
526 |
ibdebug++; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
527 |
break; |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
528 |
default: |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
529 |
usage(); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
530 |
rc = -1; |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
531 |
goto free_and_ret_2; |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
532 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
533 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
534 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
535 |
if (update_flag & NODEDESC_READ) { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
536 |
if (nodedesc || hcadesc || guid_inited == B_TRUE) { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
537 |
usage(); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
538 |
rc = -1; |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
539 |
goto free_and_ret_2; |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
540 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
541 |
|
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
542 |
device_list = ibv_get_device_list(&num_devices); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
543 |
if (!device_list) { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
544 |
IBERROR("ibv_get_device_list failed.\n"); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
545 |
/* NOTREACHED */ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
546 |
} |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
547 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
548 |
read_nodedesc(device_list, num_devices); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
549 |
update_read_info_hwnames(device_list, num_devices); |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
550 |
print_read_info(); |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
551 |
rc = 0; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
552 |
goto free_and_ret_1; |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
553 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
554 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
555 |
if (hcadesc && guid_inited == B_FALSE) { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
556 |
IBERROR("No GUID specified for HCA Node descriptor"); |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
557 |
/* NOTREACHED */ |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
558 |
} |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
559 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
560 |
device_list = ibv_get_device_list(&num_devices); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
561 |
if (!device_list) { |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
562 |
IBERROR("ibv_get_device_list failed.\n"); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
563 |
/* NOTREACHED */ |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
564 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
565 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
566 |
if (nodedesc) { |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
567 |
rc = update_nodedesc(device_list, num_devices, |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
568 |
nodedesc, NULL, 0, UVERBS_NODEDESC_UPDATE_STRING); |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
569 |
if (rc) { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
570 |
IBERROR("write common node descriptor " |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
571 |
"failed"); |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
572 |
/* NOTREACHED */ |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
573 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
574 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
575 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
576 |
if (hcadesc) { |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
577 |
rc = update_nodedesc(device_list, num_devices, |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
578 |
NULL, hcadesc, hca_guid, |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
579 |
UVERBS_NODEDESC_UPDATE_HCA_STRING); |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
580 |
if (rc) { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
581 |
IBERROR("update_hca_noddesc failed"); |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
582 |
/* NOTREACHED */ |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
583 |
} |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
584 |
rc = 0; |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
585 |
goto free_and_ret_1; |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
586 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
587 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
588 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
589 |
if (nodedesc == NULL) { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
590 |
if (uname(&uts_name) < 0) { |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
591 |
IBERROR("Node descriptor unspecified" |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
592 |
"& uts_name failed"); |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
593 |
/* NOTREACHED */ |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
594 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
595 |
|
715
eed3ed08f692
6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents:
636
diff
changeset
|
596 |
/* |
eed3ed08f692
6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents:
636
diff
changeset
|
597 |
* The common nodedesc string can have max 64 chars. |
eed3ed08f692
6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents:
636
diff
changeset
|
598 |
* We can accomodate 63 chars from uname and alike |
eed3ed08f692
6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents:
636
diff
changeset
|
599 |
* option -N, we append a space to the nodename. |
eed3ed08f692
6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents:
636
diff
changeset
|
600 |
*/ |
eed3ed08f692
6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents:
636
diff
changeset
|
601 |
(void) strncpy(nodename, uts_name.nodename, 63); |
eed3ed08f692
6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents:
636
diff
changeset
|
602 |
if (nodename[strlen(nodename)] != ' ') |
eed3ed08f692
6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents:
636
diff
changeset
|
603 |
(void) strncat(nodename, " ", 1); |
eed3ed08f692
6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents:
636
diff
changeset
|
604 |
|
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
605 |
rc = update_nodedesc(device_list, num_devices, |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
606 |
nodename, NULL, 0, |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
607 |
UVERBS_NODEDESC_UPDATE_STRING); |
715
eed3ed08f692
6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents:
636
diff
changeset
|
608 |
if (rc) { |
eed3ed08f692
6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents:
636
diff
changeset
|
609 |
IBERROR("write common node descriptor failed"); |
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
610 |
/* NOTREACHED */ |
715
eed3ed08f692
6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents:
636
diff
changeset
|
611 |
} |
eed3ed08f692
6926434 ib_read_bw, ib_read_lat: OFED utilities sometimes hang when using "-e" (event) flag
Boris Chiu <Boris.Chiu@oracle.COM>
parents:
636
diff
changeset
|
612 |
} |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
613 |
|
5950
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
614 |
free_and_ret_1: |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
615 |
ibv_free_device_list(device_list); |
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
616 |
|
9032c8d91972
PSARC/2016/182 IB HCA driver interface and other updates
boris.chiu@oracle.com
parents:
3679
diff
changeset
|
617 |
free_and_ret_2: |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
618 |
if (nodedesc) |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
619 |
free(nodedesc); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
620 |
if (hcadesc) |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
621 |
free(hcadesc); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
622 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
623 |
return (rc); |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
624 |
} |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
625 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
626 |
#endif |