summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorRamaswamy Tummala <Ramaswamy.Tummala@Sun.COM>2009-07-15 11:12:55 -0700
committerRamaswamy Tummala <Ramaswamy.Tummala@Sun.COM>2009-07-15 11:12:55 -0700
commite8174f4e2380e6f86f1f916e0617342e8a977885 (patch)
tree7bb9005de6fb9c43694c91cff311d16f5041da07 /usr/src
parent9c9988502dccf49ce11876e0d3740e96e52f2616 (diff)
downloadillumos-gate-e8174f4e2380e6f86f1f916e0617342e8a977885.tar.gz
6857725 Add device path to IBNEX_CTL_QUERY_HCA return data
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/io/ib/ibnex/ibnex_ioctl.c251
-rw-r--r--usr/src/uts/common/io/ib/ibtl/ibtl_ibnex.c6
-rw-r--r--usr/src/uts/common/sys/ib/ibnex/ibnex_devctl.h137
-rw-r--r--usr/src/uts/common/sys/ib/ibtl/impl/ibtl_ibnex.h5
4 files changed, 308 insertions, 91 deletions
diff --git a/usr/src/uts/common/io/ib/ibnex/ibnex_ioctl.c b/usr/src/uts/common/io/ib/ibnex/ibnex_ioctl.c
index a905d45b91..11c4fdbafb 100644
--- a/usr/src/uts/common/io/ib/ibnex/ibnex_ioctl.c
+++ b/usr/src/uts/common/io/ib/ibnex/ibnex_ioctl.c
@@ -2880,6 +2880,72 @@ out:
return (rv);
}
+#define IBNEX_CTL_CP_HCA_INFO(x, y, driver_name, instance, device_path, \
+ device_path_alloc_sz, device_path_len) \
+{ \
+ (x)->hca_node_guid = (y)->hca_node_guid; \
+ (x)->hca_si_guid = (y)->hca_si_guid; \
+ (x)->hca_nports = (y)->hca_nports; \
+ (x)->hca_flags = (y)->hca_flags; \
+ (x)->hca_flags2 = (y)->hca_flags2; \
+ (x)->hca_vendor_id = (y)->hca_vendor_id; \
+ (x)->hca_device_id = (y)->hca_device_id; \
+ (x)->hca_version_id = (y)->hca_version_id; \
+ (x)->hca_max_chans = (y)->hca_max_chans; \
+ (x)->hca_max_chan_sz = (y)->hca_max_chan_sz; \
+ (x)->hca_max_sgl = (y)->hca_max_sgl; \
+ (x)->hca_max_cq = (y)->hca_max_cq; \
+ (x)->hca_max_cq_sz = (y)->hca_max_cq_sz; \
+ (x)->hca_page_sz = (y)->hca_page_sz; \
+ (x)->hca_max_memr = (y)->hca_max_memr; \
+ (x)->hca_max_memr_len = (y)->hca_max_memr_len; \
+ (x)->hca_max_mem_win = (y)->hca_max_mem_win; \
+ (x)->hca_max_rsc = (y)->hca_max_rsc; \
+ (x)->hca_max_rdma_in_chan = (y)->hca_max_rdma_in_chan; \
+ (x)->hca_max_rdma_out_chan = (y)->hca_max_rdma_out_chan; \
+ (x)->hca_max_ipv6_chan = (y)->hca_max_ipv6_chan; \
+ (x)->hca_max_ether_chan = (y)->hca_max_ether_chan; \
+ (x)->hca_max_mcg_chans = (y)->hca_max_mcg_chans; \
+ (x)->hca_max_mcg = (y)->hca_max_mcg; \
+ (x)->hca_max_chan_per_mcg = (y)->hca_max_chan_per_mcg; \
+ (x)->hca_max_partitions = (y)->hca_max_partitions; \
+ (x)->hca_local_ack_delay = (y)->hca_local_ack_delay; \
+ (x)->hca_max_port_sgid_tbl_sz = (y)->hca_max_port_sgid_tbl_sz; \
+ (x)->hca_max_port_pkey_tbl_sz = (y)->hca_max_port_pkey_tbl_sz; \
+ (x)->hca_max_pd = (y)->hca_max_pd; \
+ (x)->hca_max_ud_dest = (y)->hca_max_ud_dest; \
+ (x)->hca_max_srqs = (y)->hca_max_srqs; \
+ (x)->hca_max_srqs_sz = (y)->hca_max_srqs_sz; \
+ (x)->hca_max_srq_sgl = (y)->hca_max_srq_sgl; \
+ (x)->hca_max_cq_handlers = (y)->hca_max_cq_handlers; \
+ (x)->hca_reserved_lkey = (y)->hca_reserved_lkey; \
+ (x)->hca_max_fmrs = (y)->hca_max_fmrs; \
+ (x)->hca_max_lso_size = (y)->hca_max_lso_size; \
+ (x)->hca_max_lso_hdr_size = (y)->hca_max_lso_hdr_size; \
+ (x)->hca_max_inline_size = (y)->hca_max_inline_size; \
+ (x)->hca_max_cq_mod_count = (y)->hca_max_cq_mod_count; \
+ (x)->hca_max_cq_mod_usec = (y)->hca_max_cq_mod_usec; \
+ (x)->hca_fw_major_version = (y)->hca_fw_major_version; \
+ (x)->hca_fw_minor_version = (y)->hca_fw_minor_version; \
+ (x)->hca_fw_micro_version = (y)->hca_fw_micro_version; \
+ (x)->hca_ud_send_inline_sz = (y)->hca_ud_send_inline_sz; \
+ (x)->hca_conn_send_inline_sz = (y)->hca_conn_send_inline_sz; \
+ (x)->hca_conn_rdmaw_inline_overhead = \
+ (y)->hca_conn_rdmaw_inline_overhead; \
+ (x)->hca_recv_sgl_sz = (y)->hca_recv_sgl_sz; \
+ (x)->hca_ud_send_sgl_sz = (y)->hca_ud_send_sgl_sz; \
+ (x)->hca_conn_send_sgl_sz = (y)->hca_conn_send_sgl_sz; \
+ (x)->hca_conn_rdma_sgl_overhead = (y)->hca_conn_rdma_sgl_overhead; \
+ \
+ (void) strlcpy((x)->hca_driver_name, (driver_name), \
+ MAX_HCA_DRVNAME_LEN); \
+ (x)->hca_driver_instance = (instance); \
+ \
+ (x)->hca_device_path = ((device_path_alloc_sz) >= (device_path_len)) \
+ ? (device_path) : NULL; \
+ (x)->hca_device_path_len = (device_path_len); \
+}
+
/*
* IOCTL implementation to query HCA attributes
*/
@@ -2888,110 +2954,121 @@ ibnex_ctl_query_hca(dev_t dev, int cmd, intptr_t arg, int mode,
cred_t *credp, int *rvalp)
{
int rv = 0;
- ibnex_ctl_hca_info_t *hca_info;
- ibnex_ctl_query_hca_t *query_hca;
- ibt_hca_attr_t *hca_attr;
+ ibnex_ctl_query_hca_t *query_hca = NULL;
+ ibnex_ctl_query_hca_32_t *query_hca_32 = NULL;
+ ibt_hca_attr_t *hca_attr = NULL;
char driver_name[MAX_HCA_DRVNAME_LEN];
int instance;
+ ib_guid_t hca_guid;
+ char *device_path;
+ uint_t device_path_alloc_sz, hca_device_path_len;
+ char *hca_device_path = NULL;
IBTF_DPRINTF_L4("ibnex", "\tctl_query_hca: cmd=%x, arg=%p, "
"mode=%x, cred=%p, rval=%p, dev=0x%x", cmd, arg, mode, credp,
rvalp, dev);
- /*
- * NOTE: 32-bit versions of the structures for ibnex_ctl_query_hca_t
- * and ibnex_ctl_hca_info_t are not defined because the alignment
- * of fields for these structures happen to be the same for both
- * 64-bit and 32-bit cases.
- */
+#ifdef _MULTI_DATAMODEL
+ if (ddi_model_convert_from(mode & FMODELS) == DDI_MODEL_ILP32) {
+ query_hca_32 = kmem_zalloc(
+ sizeof (ibnex_ctl_query_hca_32_t), KM_SLEEP);
- query_hca = kmem_zalloc(sizeof (ibnex_ctl_query_hca_t), KM_SLEEP);
- hca_attr = kmem_zalloc(sizeof (ibt_hca_attr_t), KM_SLEEP);
+ if (ddi_copyin((void *)arg, query_hca_32,
+ sizeof (ibnex_ctl_query_hca_32_t), mode) != 0) {
+ IBTF_DPRINTF_L2("ibnex",
+ "\tctl_query_hca: ddi_copyin err 1");
+ rv = EFAULT;
+ goto out;
+ }
- if (ddi_copyin((void *)arg, query_hca,
- sizeof (ibnex_ctl_query_hca_t), mode) != 0) {
- IBTF_DPRINTF_L2("ibnex", "\tctl_query_hca: ddi_copyin err");
- rv = EFAULT;
- goto out;
+ hca_guid = query_hca_32->hca_guid;
+ device_path = (char *)(uintptr_t)query_hca_32->hca_device_path;
+ device_path_alloc_sz = query_hca_32->hca_device_path_alloc_sz;
+ } else
+#endif
+ {
+ query_hca = kmem_zalloc(sizeof (ibnex_ctl_query_hca_t),
+ KM_SLEEP);
+
+ if (ddi_copyin((void *)arg, query_hca,
+ sizeof (ibnex_ctl_query_hca_t), mode) != 0) {
+ IBTF_DPRINTF_L2("ibnex",
+ "\tctl_query_hca: ddi_copyin err 2");
+ rv = EFAULT;
+ goto out;
+ }
+
+ hca_guid = query_hca->hca_guid;
+ device_path = query_hca->hca_device_path;
+ device_path_alloc_sz = query_hca->hca_device_path_alloc_sz;
}
- if (ibtl_ibnex_query_hca_byguid(query_hca->hca_guid, hca_attr,
- driver_name, sizeof (driver_name), &instance) != IBT_SUCCESS) {
+ hca_attr = kmem_zalloc(sizeof (ibt_hca_attr_t), KM_SLEEP);
+ hca_device_path = kmem_zalloc(MAXPATHLEN, KM_SLEEP);
+
+ if (ibtl_ibnex_query_hca_byguid(hca_guid, hca_attr,
+ driver_name, sizeof (driver_name), &instance, hca_device_path)
+ != IBT_SUCCESS) {
rv = ENXIO;
goto out;
}
- hca_info = &query_hca->hca_info;
-
- hca_info->hca_node_guid = hca_attr->hca_node_guid;
- hca_info->hca_si_guid = hca_attr->hca_si_guid;
- hca_info->hca_nports = hca_attr->hca_nports;
- hca_info->hca_flags = hca_attr->hca_flags;
- hca_info->hca_flags2 = hca_attr->hca_flags2;
- hca_info->hca_vendor_id = hca_attr->hca_vendor_id;
- hca_info->hca_device_id = hca_attr->hca_device_id;
- hca_info->hca_version_id = hca_attr->hca_version_id;
- hca_info->hca_max_chans = hca_attr->hca_max_chans;
- hca_info->hca_max_chan_sz = hca_attr->hca_max_chan_sz;
- hca_info->hca_max_sgl = hca_attr->hca_max_sgl;
- hca_info->hca_max_cq = hca_attr->hca_max_cq;
- hca_info->hca_max_cq_sz = hca_attr->hca_max_cq_sz;
- hca_info->hca_page_sz = hca_attr->hca_page_sz;
- hca_info->hca_max_memr = hca_attr->hca_max_memr;
- hca_info->hca_max_memr_len = hca_attr->hca_max_memr_len;
- hca_info->hca_max_mem_win = hca_attr->hca_max_mem_win;
- hca_info->hca_max_rsc = hca_attr->hca_max_rsc;
- hca_info->hca_max_rdma_in_chan = hca_attr->hca_max_rdma_in_chan;
- hca_info->hca_max_rdma_out_chan = hca_attr->hca_max_rdma_out_chan;
- hca_info->hca_max_ipv6_chan = hca_attr->hca_max_ipv6_chan;
- hca_info->hca_max_ether_chan = hca_attr->hca_max_ether_chan;
- hca_info->hca_max_mcg_chans = hca_attr->hca_max_mcg_chans;
- hca_info->hca_max_mcg = hca_attr->hca_max_mcg;
- hca_info->hca_max_chan_per_mcg = hca_attr->hca_max_chan_per_mcg;
- hca_info->hca_max_partitions = hca_attr->hca_max_partitions;
- hca_info->hca_local_ack_delay = hca_attr->hca_local_ack_delay;
- hca_info->hca_max_port_sgid_tbl_sz = hca_attr->hca_max_port_sgid_tbl_sz;
- hca_info->hca_max_port_pkey_tbl_sz = hca_attr->hca_max_port_pkey_tbl_sz;
- hca_info->hca_max_pd = hca_attr->hca_max_pd;
- hca_info->hca_max_ud_dest = hca_attr->hca_max_ud_dest;
- hca_info->hca_max_srqs = hca_attr->hca_max_srqs;
- hca_info->hca_max_srqs_sz = hca_attr->hca_max_srqs_sz;
- hca_info->hca_max_srq_sgl = hca_attr->hca_max_srq_sgl;
- hca_info->hca_max_cq_handlers = hca_attr->hca_max_cq_handlers;
- hca_info->hca_reserved_lkey = hca_attr->hca_reserved_lkey;
- hca_info->hca_max_fmrs = hca_attr->hca_max_fmrs;
- hca_info->hca_max_lso_size = hca_attr->hca_max_lso_size;
- hca_info->hca_max_lso_hdr_size = hca_attr->hca_max_lso_hdr_size;
- hca_info->hca_max_inline_size = hca_attr->hca_max_inline_size;
- hca_info->hca_max_cq_mod_count = hca_attr->hca_max_cq_mod_count;
- hca_info->hca_max_cq_mod_usec = hca_attr->hca_max_cq_mod_usec;
- hca_info->hca_fw_major_version = hca_attr->hca_fw_major_version;
- hca_info->hca_fw_minor_version = hca_attr->hca_fw_minor_version;
- hca_info->hca_fw_micro_version = hca_attr->hca_fw_micro_version;
- hca_info->hca_ud_send_inline_sz = hca_attr->hca_ud_send_inline_sz;
- hca_info->hca_conn_send_inline_sz = hca_attr->hca_conn_send_inline_sz;
- hca_info->hca_conn_rdmaw_inline_overhead =
- hca_attr->hca_conn_rdmaw_inline_overhead;
- hca_info->hca_recv_sgl_sz = hca_attr->hca_recv_sgl_sz;
- hca_info->hca_ud_send_sgl_sz = hca_attr->hca_ud_send_sgl_sz;
- hca_info->hca_conn_send_sgl_sz = hca_attr->hca_conn_send_sgl_sz;
- hca_info->hca_conn_rdma_sgl_overhead =
- hca_attr->hca_conn_rdma_sgl_overhead;
-
- (void) strlcpy(hca_info->hca_driver_name, driver_name,
- MAX_HCA_DRVNAME_LEN);
- hca_info->hca_driver_instance = instance;
-
- /* copy hca information to the user space */
- if (ddi_copyout(hca_info, &((ibnex_ctl_query_hca_t *)arg)->hca_info,
- sizeof (ibnex_ctl_hca_info_t), mode) != 0) {
- IBTF_DPRINTF_L2("ibnex", "\tctl_query_hca: ddi_copyout err");
- rv = EFAULT;
+ hca_device_path_len = strlen(hca_device_path) + 1;
+
+#ifdef _MULTI_DATAMODEL
+ if (ddi_model_convert_from(mode & FMODELS) == DDI_MODEL_ILP32) {
+
+ IBNEX_CTL_CP_HCA_INFO(&query_hca_32->hca_info, hca_attr,
+ driver_name, instance, query_hca_32->hca_device_path,
+ device_path_alloc_sz, hca_device_path_len);
+
+ /* copy hca information to the user space */
+ if (ddi_copyout(&query_hca_32->hca_info,
+ &((ibnex_ctl_query_hca_32_t *)arg)->hca_info,
+ sizeof (ibnex_ctl_hca_info_32_t), mode) != 0) {
+ IBTF_DPRINTF_L2("ibnex",
+ "\tctl_query_hca: ddi_copyout err 1");
+ rv = EFAULT;
+ goto out;
+ }
+ } else
+#endif
+ {
+ IBNEX_CTL_CP_HCA_INFO(&query_hca->hca_info, hca_attr,
+ driver_name, instance, device_path,
+ device_path_alloc_sz, hca_device_path_len);
+
+ /* copy hca information to the user space */
+ if (ddi_copyout(&query_hca->hca_info,
+ &((ibnex_ctl_query_hca_t *)arg)->hca_info,
+ sizeof (ibnex_ctl_hca_info_t), mode) != 0) {
+ IBTF_DPRINTF_L2("ibnex",
+ "\tctl_query_hca: ddi_copyout err 2");
+ rv = EFAULT;
+ goto out;
+ }
+ }
+
+ if (device_path_alloc_sz >= hca_device_path_len) {
+ if (ddi_copyout(hca_device_path,
+ device_path,
+ hca_device_path_len, mode) != 0) {
+ IBTF_DPRINTF_L2("ibnex", "\tctl_query_hca: "
+ "ddi_copyout err copying device path");
+ rv = EFAULT;
+ }
}
out:
- kmem_free(query_hca, sizeof (ibnex_ctl_query_hca_t));
- kmem_free(hca_attr, sizeof (ibt_hca_attr_t));
+ if (query_hca)
+ kmem_free(query_hca, sizeof (ibnex_ctl_query_hca_t));
+ if (query_hca_32)
+ kmem_free(query_hca_32, sizeof (ibnex_ctl_query_hca_32_t));
+ if (hca_attr)
+ kmem_free(hca_attr, sizeof (ibt_hca_attr_t));
+ if (hca_device_path)
+ kmem_free(hca_device_path, MAXPATHLEN);
+
return (rv);
}
@@ -3056,7 +3133,7 @@ ibnex_ctl_query_hca_port(dev_t dev, int cmd, intptr_t arg, int mode,
if (ddi_copyin((void *)arg, query_hca_port_32,
sizeof (ibnex_ctl_query_hca_port_32_t), mode) != 0) {
IBTF_DPRINTF_L2("ibnex",
- "\tctl_query_hca_port: ddi_copyin err 2");
+ "\tctl_query_hca_port: ddi_copyin err 1");
rv = EFAULT;
goto out;
}
diff --git a/usr/src/uts/common/io/ib/ibtl/ibtl_ibnex.c b/usr/src/uts/common/io/ib/ibtl/ibtl_ibnex.c
index d9bc16df76..486518ebdd 100644
--- a/usr/src/uts/common/io/ib/ibtl/ibtl_ibnex.c
+++ b/usr/src/uts/common/io/ib/ibtl/ibtl_ibnex.c
@@ -635,6 +635,8 @@ ibtl_ibnex_phci_unregister(dev_info_t *hca_dip)
* driver_name - caller allocated buffer which will contain
* HCA driver name upon success
* driver_instance - HCA driver instance
+ * hca_device_path - caller allocated buffer of size MAXPATHLEN which
+ * will contain hca device path upon success.
* Returns:
* IBT_SUCCESS/IBT_FAILURE
* Description:
@@ -643,7 +645,8 @@ ibtl_ibnex_phci_unregister(dev_info_t *hca_dip)
*/
ibt_status_t
ibtl_ibnex_query_hca_byguid(ib_guid_t hca_guid, ibt_hca_attr_t *hca_attrs,
- char *driver_name, size_t driver_name_size, int *driver_instance)
+ char *driver_name, size_t driver_name_size, int *driver_instance,
+ char *hca_device_path)
{
ibtl_hca_devinfo_t *hca_devp;
@@ -667,6 +670,7 @@ ibtl_ibnex_query_hca_byguid(ib_guid_t hca_guid, ibt_hca_attr_t *hca_attrs,
return (IBT_INSUFF_KERNEL_RESOURCE);
}
+ (void) ddi_pathname(hca_devp->hd_hca_dip, hca_device_path);
*driver_instance = ddi_get_instance(hca_devp->hd_hca_dip);
bcopy(hca_devp->hd_hca_attr, hca_attrs, sizeof (ibt_hca_attr_t));
diff --git a/usr/src/uts/common/sys/ib/ibnex/ibnex_devctl.h b/usr/src/uts/common/sys/ib/ibnex/ibnex_devctl.h
index d30f8e5b7c..2dc49eeb3d 100644
--- a/usr/src/uts/common/sys/ib/ibnex/ibnex_devctl.h
+++ b/usr/src/uts/common/sys/ib/ibnex/ibnex_devctl.h
@@ -184,8 +184,17 @@ typedef struct ibnex_ioctl_data_32 {
*
* Caller sets hca_guid field of this structure.
*
+ * Caller allocates memory for hca device path. Sets hca_device_path to point
+ * to the allocated memory and hca_device_path_alloc_sz to the number of bytes
+ * allocated.
+ *
* Upon successful return from the IOCTL, hca_info will contain HCA attributes
- * for the specified GUID.
+ * for the specified GUID. hca_info.hca_device_path_len will contain the actual
+ * string length of the hca device path plus the terminating null character.
+ * hca_info.hca_device_path will point to null terminated hca device path
+ * string if the caller allocated memory for the hca device path is large
+ * enough to hold the hca device path and the terminating null character.
+ * Otherwise hca_info.hca_device_path will be set to NULL.
*
*
* IBNEX_CTL_QUERY_HCA_PORT
@@ -281,6 +290,14 @@ typedef struct ibnex_ctl_hca_info_s {
char hca_driver_name[MAX_HCA_DRVNAME_LEN];
int hca_driver_instance;
+ /*
+ * hca device path and the length.
+ * hca_device_path_len is string length of the actual hca device path
+ * plus the terminating null character.
+ */
+ char *hca_device_path;
+ uint_t hca_device_path_len;
+
ibt_hca_flags_t hca_flags; /* HCA capabilities etc */
ibt_hca_flags2_t hca_flags2; /* HCA capabilities etc */
@@ -359,14 +376,130 @@ typedef struct ibnex_ctl_hca_info_s {
int32_t hca_pad;
} ibnex_ctl_hca_info_t;
+typedef struct ibnex_ctl_hca_info_32_s {
+ ib_guid_t hca_node_guid; /* Node GUID */
+ ib_guid_t hca_si_guid; /* Optional System Image GUID */
+ uint_t hca_nports; /* Number of physical ports */
+
+ /* HCA driver name and instance number */
+ char hca_driver_name[MAX_HCA_DRVNAME_LEN];
+ int hca_driver_instance;
+
+ /*
+ * hca device path and the length.
+ * hca_device_path_len is string length of the actual hca device path
+ * plus the terminating null character.
+ */
+ caddr32_t hca_device_path;
+ uint_t hca_device_path_len;
+
+ ibt_hca_flags_t hca_flags; /* HCA capabilities etc */
+ ibt_hca_flags2_t hca_flags2; /* HCA capabilities etc */
+
+ uint32_t hca_vendor_id; /* Vendor ID */
+ uint16_t hca_device_id; /* Device ID */
+ uint32_t hca_version_id; /* Version ID */
+
+ uint_t hca_max_chans; /* Max channels supported */
+ uint_t hca_max_chan_sz; /* Max outstanding WRs on any */
+ /* channel */
+
+ uint_t hca_max_sgl; /* Max SGL entries per WR */
+
+ uint_t hca_max_cq; /* Max num of CQs supported */
+ uint_t hca_max_cq_sz; /* Max capacity of each CQ */
+
+ ibt_page_sizes_t hca_page_sz; /* Bit mask of page sizes */
+
+ uint_t hca_max_memr; /* Max num of HCA mem regions */
+ ib_memlen_t hca_max_memr_len; /* Largest block, in bytes of */
+ /* mem that can be registered */
+ uint_t hca_max_mem_win; /* Max Memory windows in HCA */
+
+ uint_t hca_max_rsc; /* Max Responder Resources of */
+ /* this HCA for RDMAR/Atomics */
+ /* with this HCA as target. */
+ uint8_t hca_max_rdma_in_chan; /* Max RDMAR/Atomics in per */
+ /* chan this HCA as target. */
+ uint8_t hca_max_rdma_out_chan; /* Max RDMA Reads/Atomics out */
+ /* per channel by this HCA */
+ uint_t hca_max_ipv6_chan; /* Max IPV6 channels in HCA */
+ uint_t hca_max_ether_chan; /* Max Ether channels in HCA */
+
+ uint_t hca_max_mcg_chans; /* Max number of channels */
+ /* that can join multicast */
+ /* groups */
+ uint_t hca_max_mcg; /* Max multicast groups */
+ uint_t hca_max_chan_per_mcg; /* Max number of channels per */
+ /* Multicast group in HCA */
+ uint16_t hca_max_partitions; /* Max partitions in HCA */
+
+ ib_time_t hca_local_ack_delay;
+
+ uint_t hca_max_port_sgid_tbl_sz;
+ uint16_t hca_max_port_pkey_tbl_sz;
+ uint_t hca_max_pd; /* Max# of Protection Domains */
+
+ uint_t hca_max_ud_dest;
+ uint_t hca_max_srqs; /* Max SRQs supported */
+ uint_t hca_max_srqs_sz; /* Max outstanding WRs on any */
+ /* SRQ */
+ uint_t hca_max_srq_sgl; /* Max SGL entries per SRQ WR */
+ uint_t hca_max_cq_handlers;
+ ibt_lkey_t hca_reserved_lkey; /* Reserved L_Key value */
+ uint_t hca_max_fmrs; /* Max FMR Supported */
+
+ uint_t hca_max_lso_size;
+ uint_t hca_max_lso_hdr_size;
+ uint_t hca_max_inline_size;
+
+ uint_t hca_max_cq_mod_count; /* CQ notify moderation */
+ uint_t hca_max_cq_mod_usec;
+
+ uint32_t hca_fw_major_version; /* firmware version */
+ uint16_t hca_fw_minor_version;
+ uint16_t hca_fw_micro_version;
+
+ /* detailed WQE size info */
+ uint_t hca_ud_send_inline_sz; /* inline size in bytes */
+ uint_t hca_conn_send_inline_sz;
+ uint_t hca_conn_rdmaw_inline_overhead;
+ uint_t hca_recv_sgl_sz; /* detailed SGL sizes */
+ uint_t hca_ud_send_sgl_sz;
+ uint_t hca_conn_send_sgl_sz;
+ uint_t hca_conn_rdma_sgl_overhead;
+ int32_t hca_pad;
+} ibnex_ctl_hca_info_32_t;
+
/*
* Data structure for IBNEX_CTL_QUERY_HCA
*/
typedef struct ibnex_ctl_query_hca_s {
- ib_guid_t hca_guid; /* in: HCA GUID */
+ ib_guid_t hca_guid; /* in: HCA GUID */
+
+ /*
+ * in: user allocated memory pointer for hca device path and number of
+ * bytes allocated for the hca device path.
+ */
+ char *hca_device_path;
+ uint_t hca_device_path_alloc_sz;
+
ibnex_ctl_hca_info_t hca_info; /* out: HCA information */
} ibnex_ctl_query_hca_t;
+typedef struct ibnex_ctl_query_hca_32_s {
+ ib_guid_t hca_guid; /* in: HCA GUID */
+
+ /*
+ * in: user allocated memory pointer for hca device path and number of
+ * bytes allocated for the hca device path.
+ */
+ caddr32_t hca_device_path;
+ uint_t hca_device_path_alloc_sz;
+
+ ibnex_ctl_hca_info_32_t hca_info; /* out: HCA information */
+} ibnex_ctl_query_hca_32_t;
+
/*
* HCA port information structure
*/
diff --git a/usr/src/uts/common/sys/ib/ibtl/impl/ibtl_ibnex.h b/usr/src/uts/common/sys/ib/ibtl/impl/ibtl_ibnex.h
index 4f1ac51908..824d692306 100644
--- a/usr/src/uts/common/sys/ib/ibtl/impl/ibtl_ibnex.h
+++ b/usr/src/uts/common/sys/ib/ibtl/impl/ibtl_ibnex.h
@@ -238,6 +238,8 @@ ibt_status_t ibtl_ibnex_phci_unregister(dev_info_t *hca_dip);
* driver_name - caller allocated buffer which will contain
* HCA driver name upon success
* driver_instance - HCA driver instance
+ * hca_device_path - caller allocated buffer of size MAXPATHLEN which
+ * will contain hca device path upon success.
* Returns:
* IBT_SUCCESS/IBT_FAILURE
* Description:
@@ -245,7 +247,8 @@ ibt_status_t ibtl_ibnex_phci_unregister(dev_info_t *hca_dip);
* specified HCA.
*/
ibt_status_t
-ibtl_ibnex_query_hca_byguid(ib_guid_t, ibt_hca_attr_t *, char *, size_t, int *);
+ibtl_ibnex_query_hca_byguid(ib_guid_t, ibt_hca_attr_t *, char *, size_t, int *,
+ char *);
#ifdef __cplusplus
}