4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
32 #include <sys/types.h>
33 #include <sys/ib/ib_types.h>
35 #define MAXPKEYSTRSZ 968
37 #define IBGUIDSTRLEN 16
38 #define IBPORTSTRLEN 5
40 #define DLADM_PART_FORCE_CREATE 0x1
42 typedef struct dladm_ib_attr_s
{
43 datalink_id_t dia_physlinkid
; /* IB Phys link datalink ID */
44 datalink_id_t dia_partlinkid
; /* IB Partition datalink ID */
45 ib_pkey_t dia_pkey
; /* IB partitions P_Key */
47 uint_t dia_portnum
; /* IB Phys link's HCA port number */
48 int dia_instance
; /* IP over IB driver instance number */
49 ib_guid_t dia_hca_guid
; /* IB HCA GUID */
50 ib_guid_t dia_port_guid
; /* IB HCA Port GUID */
51 uint_t dia_port_pkey_tbl_sz
;
52 ib_pkey_t
*dia_port_pkeys
; /* Ptr to the P_Key table */
55 typedef struct dladm_ib_attr_s dladm_part_attr_t
;
58 DLADM_PART_UD_MODE
= 0,
60 } dladm_part_linkmode_t
;
62 extern dladm_status_t
dladm_part_create(dladm_handle_t
, datalink_id_t
,
63 ib_pkey_t
, uint32_t, char *, datalink_id_t
*, dladm_arg_list_t
*);
64 extern dladm_status_t
dladm_part_delete(dladm_handle_t
, datalink_id_t
, int);
65 extern dladm_status_t
dladm_part_up(dladm_handle_t
, datalink_id_t
, uint32_t);
66 extern dladm_status_t
dladm_part_info(dladm_handle_t
, datalink_id_t
,
67 dladm_part_attr_t
*, uint32_t);
68 extern dladm_status_t
dladm_ib_info(dladm_handle_t
, datalink_id_t
,
69 dladm_ib_attr_t
*, uint32_t);
70 extern void dladm_free_ib_info(dladm_ib_attr_t
*);
76 #endif /* _LIBDLIB_H */