{"action":"created","comment":{"url":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments/131783629","pull_request_review_id":54795989,"id":131783629,"diff_hunk":"@@ -0,0 +1,738 @@\n+/*\n+ * Copyright (c) 2017 Intel Corporation, Inc.  All rights reserved.\n+ *\n+ * This software is available to you under a choice of one of two\n+ * licenses.  You may choose to be licensed under the terms of the GNU\n+ * General Public License (GPL) Version 2, available from the file\n+ * COPYING in the main directory of this source tree, or the\n+ * BSD license below:\n+ *\n+ *     Redistribution and use in source and binary forms, with or\n+ *     without modification, are permitted provided that the following\n+ *     conditions are met:\n+ *\n+ *      - Redistributions of source code must retain the above\n+ *        copyright notice, this list of conditions and the following\n+ *        disclaimer.\n+ *\n+ *      - Redistributions in binary form must reproduce the above\n+ *        copyright notice, this list of conditions and the following\n+ *        disclaimer in the documentation and/or other materials\n+ *        provided with the distribution.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n+ * SOFTWARE.\n+ */\n+\n+#ifndef _OFI_VERBS_UD_H_\n+#define _OFI_VERBS_UD_H_\n+\n+#if HAVE_CONFIG_H\n+#  include <config.h>\n+#endif /* HAVE_CONFIG_H */\n+\n+#include <infiniband/verbs.h>\n+#include <rdma/rdma_cma.h>\n+\n+#include <fi_util.h>\n+\n+#include <inttypes.h>\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif /* __cplusplus */\n+\n+#define OFI_VERBS_UD_MAJOR_VERSION 1\n+#define OFI_VERBS_UD_MINOR_VERSION 5\n+\n+#define OFI_VERBS_UD_PRIMARY_CAPS (FI_MSG | FI_RMA |\t\\\n+\t\t\t\t   FI_SEND | FI_RECV)\n+\n+#define OFI_VERBS_UD_CAPS OFI_VERBS_UD_PRIMARY_CAPS\n+\n+#define VERBS_UD_MSG_IOV_LIMIT\t256\n+#define VERBS_UD_DEF_CQ_SIZE\t1024\n+\n+#define OFI_VERBS_UD_MR_IOV_LIMIT\t1\n+\n+#define VERBS_IB_FABRIC_PREFIX\t\"IB-0x\"\n+#define VERBS_IWARP_FABRIC\t\"Ethernet-iWARP\"\n+#define VERBS_ANY_FABRIC\t\"RDMA-Fabric\"\n+\n+#define OFI_VERBS_UD_ANY_SERVICE\t0\n+\n+/*\n+ * useful macros\n+ */\n+#ifndef likely\n+#define likely(x) __builtin_expect((x), 1)\n+#endif\n+#ifndef unlikely\n+#define unlikely(x) __builtin_expect((x), 0)\n+#endif\n+\n+/* Helper macro */\n+#define OFI_FID_OPS(_fid) (*_fid)->fid.ops\n+#define OFI_OPS(_fid) (*_fid)->ops\n+\n+#define OFI_VERBS_UD_GET_INSTANCE_OF_OBJ(ofi_obj_name,\t\t\t\t\\\n+\t\t\t\t\t inst)\t\t\t\t\t\\\n+do {\t\t\t\t\t\t\t\t\t\t\\\n+\tinst = container_of(ofi_obj_name##_fid,\t\t\t\t\t\\\n+\t\t\t    struct ofi_verbs_ud_##ofi_obj_name,\t\t\t\\\n+ \t\t\t    util_##ofi_obj_name.ofi_obj_name##_fid);\t\t\\\n+} while (0)\n+\n+#define OFI_VERBS_UD_GET_INSTANCE_OF(ofi_obj_name,\t\t\t\t\\\n+\t\t\t\t     inst)\t\t\t\t\t\\\n+do {\t\t\t\t\t\t\t\t\t\t\\\n+\tinst = container_of(ofi_obj_name##_fid,\t\t\t\t\t\\\n+\t\t\t    struct ofi_verbs_ud_##ofi_obj_name,\t\t\t\\\n+ \t\t\t    util_##ofi_obj_name.ofi_obj_name##_fid.fid);\t\\\n+} while (0)\n+\n+#define VERBS_UD_MR_LOCAL(info)\t\t\t\t\t\t\t\\\n+\t((FI_VERSION(info->fabric_attr->api_version, FI_VERSION(1,5)) &&\t\\\n+\t  (info->mode & FI_LOCAL_MR)) ||\t\t\t\t\t\\\n+\t (info->domain_attr->mr_mode & FI_MR_LOCAL))\n+/* ~Helper macro */\n+\n+#define VERBS_UD_ATTR_INIT\t\t\t\t\t\\\n+/* Notes: */\t\t\t\t\t\t\t\\\n+/* - inject_size, size, iov_limit, rma_iov_limit */\t\t\\\n+/*   are assigned at run-time in @ofi_verbs_ud_info_init */\t\\\n+static struct fi_tx_attr ofi_verbs_ud_tx_attr = {\t\t\\\n+\t.caps = FI_MSG | FI_SEND,\t\t\t\t\\\n+\t.comp_order = FI_ORDER_STRICT,\t\t\t\t\\\n+\t.iov_limit = VERBS_UD_MSG_IOV_LIMIT,\t\t\t\\\n+\t.rma_iov_limit = VERBS_UD_MSG_IOV_LIMIT\t\t\t\\\n+};\t\t\t\t\t\t\t\t\\\n+\t\t\t\t\t\t\t\t\\\n+/* Notes: */\t\t\t\t\t\t\t\\\n+/* - size, iov_limit are assigned at run-time */\t\t\\\n+/*   in @ofi_verbs_ud_info_init */\t\t\t\t\\\n+static struct fi_rx_attr ofi_verbs_ud_rx_attr = {\t\t\\\n+\t.caps = FI_MSG | FI_RECV,\t\t\t\t\\\n+\t.comp_order = FI_ORDER_STRICT,\t\t\t\t\\\n+\t.iov_limit = VERBS_UD_MSG_IOV_LIMIT\t\t\t\\\n+};\t\t\t\t\t\t\t\t\\\n+\t\t\t\t\t\t\t\t\\\n+/* Notes: */\t\t\t\t\t\t\t\\\n+/* - name is assigned at run-time in @ofi_verbs_ud_info_init */\t\\\n+static struct fi_fabric_attr ofi_verbs_ud_fabric_attr = {\t\\\n+\t.prov_version = FI_VERSION(OFI_VERBS_UD_MAJOR_VERSION,\t\\\n+\t\t\t\t   OFI_VERBS_UD_MINOR_VERSION)\t\\\n+};\t\t\t\t\t\t\t\t\\\n+\t\t\t\t\t\t\t\t\\\n+/* Notes: */\t\t\t\t\t\t\t\\\n+/* - cq_cnt, ep_cnt, max_ep_tx|rx_ctx, tx|rx_ctx_cnt */\t\t\\\n+/*   are assigned at run-time in @ofi_verbs_ud_info_init */\t\\\n+static struct fi_domain_attr ofi_verbs_ud_domain_attr = {\t\\\n+\t.threading\t\t= FI_THREAD_SAFE,\t\t\\\n+\t.control_progress\t= FI_PROGRESS_AUTO,\t\t\\\n+\t.data_progress\t\t= FI_PROGRESS_AUTO,\t\t\\\n+\t.resource_mgmt\t\t= FI_RM_DISABLED,\t\t\\\n+\t.mr_mode\t\t= OFI_MR_BASIC_MAP |\t\t\\\n+\t\t\t\t  FI_MR_LOCAL | FI_MR_BASIC,\t\\\n+\t.mr_key_size\t\t= sizeof_field(struct ibv_sge,\t\\\n+\t\t\t\t\t       lkey),\t\t\\\n+\t.cq_data_size\t\t= sizeof_field(\t\t\t\\\n+\t\t\t\t\tstruct ibv_send_wr,\t\\\n+\t\t\t\t\timm_data),\t\t\\\n+\t.tx_ctx_cnt\t\t= 1024, /* TODO: const */\t\\\n+\t.rx_ctx_cnt\t\t= 1024,\t\t\t\t\\\n+\t.mr_iov_limit\t\t= VERBS_UD_MSG_IOV_LIMIT,\t\\\n+\t/* max_err_data is size of ibv_wc::vendor_err */\t\\\n+\t/*for CQ, 0 - for EQ */\t\t\t\t\t\\\n+\t.max_err_data\t\t= sizeof_field(struct ibv_wc,\t\\\n+\t\t\t\t\t       vendor_err),\t\\\n+};\t\t\t\t\t\t\t\t\\\n+\t\t\t\t\t\t\t\t\\\n+/* Notes: */\t\t\t\t\t\t\t\\\n+/* - max_msg_size, max_order_raw_size, max_order_waw_size, */\t\\\n+/*   protocol */\t\t\t\t\t\t\\\n+/*   are assigned at run-time in @ofi_verbs_ud_info_init */\t\\\n+static struct fi_ep_attr ofi_verbs_ud_ep_attr = {\t\t\\\n+\t.type = FI_EP_DGRAM,\t\t\t\t\t\\\n+\t.protocol = FI_PROTO_IB_UD,\t\t\t\t\\\n+\t.protocol_version = 0\t\t\t\t\t\\\n+}\n+\n+#define VERBS_UD_INJECT_FLAGS(ep, len, flags)\t\t\t\\\n+\t(((flags & FI_INJECT) ||\t\t\t\t\\\n+\t  (len <= ep->info->tx_attr->inject_size)) ?\t\t\\\n+\t IBV_SEND_INLINE : 0)\n+#define VERBS_UD_INJECT(ep, len)\t\t\t\t\\\n+\tVERBS__UD_INJECT_FLAGS(ep, len,\t\t\t\t\\\n+\t\t\t       ep->info->tx_attr->op_flags)\n+\n+#define VERBS_UD_SELECTIVE_COMP(ep)\t\t\t\t\\\n+\t(ep->ep_flags & FI_SELECTIVE_COMPLETION)\n+#define VERBS_UD_COMP_FLAGS(ep, flags)\t\t\t\t\\\n+\t((!VERBS_UD_SELECTIVE_COMP(ep) ||\t\t\t\\\n+\t  (flags & (FI_COMPLETION | FI_TRANSMIT_COMPLETE))) ?\t\\\n+\t IBV_SEND_SIGNALED : 0)\n+#define VERBS_UD_COMP(ep)\t\t\t\t\t\\\n+\tVERBS_UD_COMP_FLAGS(ep, ep->info->tx_attr->op_flags)\n+\n+#define OFI_IBV_MTU_TYPE(bytes, ret_bytes)\t\t\\\n+\tcase IBV_MTU_##bytes:\t\t\t\\\n+\t\tret_bytes = bytes;\t\t\\\n+\t\tbreak\n+\n+static inline\n+size_t ofi_verbs_ud_mtu_type_to_len(enum ibv_mtu mtu_type)\n+{\n+\tsize_t bytes = 0;\n+\n+\tswitch (mtu_type) {\n+\tOFI_IBV_MTU_TYPE(256, bytes);\n+\tOFI_IBV_MTU_TYPE(512, bytes);\n+\tOFI_IBV_MTU_TYPE(1024, bytes);\n+\tOFI_IBV_MTU_TYPE(2048, bytes);\n+\tOFI_IBV_MTU_TYPE(4096, bytes);\n+\t}\n+\n+\treturn bytes;\n+}\n+#define OFI_VERBS_UD_MTU_TYPE_TO_LEN(mtu_type)\t\\\n+do {\t\t\t\t\t\t\\\n+\tswitch ((enum ibv_mtu) mtu_type) {\t\\\n+\tcase IBV_MTU_256:\t\t\t\\\n+\tcase IBV_MTU_512:\t\t\t\\\n+\tcase IBV_MTU_1024:\t\t\t\\\n+\tcase IBV_MTU_2048:\t\t\t\\\n+\tcase IBV_MTU_4096:\t\t\t\\\n+\tdefault:\t\t\t\t\\\n+\t\tassert(0);\t\t\t\\\n+\t}\t\t\t\t\t\\\n+} while (0)\n+\n+struct ofi_verbs_ud_buf_pool;\n+\n+typedef void(*ofi_verbs_ud_pool_entry_cancel_hndlr) (struct ofi_verbs_ud_buf_pool *);\n+\n+struct ofi_verbs_ud_buf_pool {\n+\tstruct util_buf_pool\t*pool;\n+\tstruct dlist_entry\tbuf_list;\n+\n+\tofi_verbs_ud_pool_entry_cancel_hndlr cancel_hndlr;\n+};\n+\n+/*\n+ * fields of Infiniband packet headers that are used to\n+ * represent OFI EP address\n+ * - LRH (Local Route Header) - Link Layer:\n+ *   - LID - destination Local Identifier\n+ *   - SL - Service Level\n+ * - GRH (Global Route Header) - Network Layer:\n+ *   - GID - destination Global Identifier\n+ * - BTH (Base Transport Header) - Transport Layer:\n+ *   - QPN - destination Queue Oair number\n+ *   - PSN - Packet Serial Number\n+ *   - P_key - Partition Key\n+ *\n+ * Note: DON'T change the placement of the fields in the structure.\n+ *       The placement is to keep structure size = 256 bits (32 byte).\n+ */\n+struct ofi_ib_ud_ep_name {\n+\tunion ibv_gid\tgid; /* 64-bit GUID + 64-bit EUI - GRH */\n+\n+\tuint32_t\tqpn; /* BTH */\n+\tuint32_t\tpsn; /* SQ PSN - BTH */\n+\n+\tuint16_t\tlid; /* LRH */\n+\tuint16_t\tpkey; /* BTH */\n+\tuint16_t\tservice; /* for NS src addr, 0 means any */\n+\n+\tuint8_t \tsl; /* LRH */\n+\tuint8_t\t\tpadding; /* forced padding to 256 bits (32 byte) */\n+}; /* 256 bits */\n+\n+struct ofi_verbs_ud_fabric {\n+\tstruct util_fabric\tutil_fabric;\n+\tstruct util_ns\t\tname_server;\n+};\n+\n+struct ofi_verbs_ud_domain {\n+\tstruct util_domain\tutil_domain;\n+\tstruct util_av\t\t*av;\n+    \tstruct fi_info\t\t*info;\n+\tstruct ibv_comp_channel\t*ibv_comp_channel;\n+\tstruct ibv_context\t*ibv_device_ctx;\n+\tint\t\t\tport_number;\n+\tstruct ibv_port_attr\t*port_attr;\n+\tstruct ibv_pd\t\t*ibv_pd;\n+\t/* NULL if gl_data::separate_send_recv_cq = 1 */\n+\tstruct ibv_cq\t\t*ibv_shared_cq;\n+};\n+\n+struct ofi_verbs_ud_ep {\n+\tstruct util_ep\t\t\tutil_ep;\n+\tstruct ibv_qp\t\t\t*ibv_qp;\n+\tstruct fi_info\t\t\t*info;\n+\tstruct ofi_verbs_ud_av\t\t*av;\n+\tstruct ofi_verbs_ud_domain\t*domain;\n+\tstruct ibv_cq\t\t\t*ibv_shared_cq;\n+\tstruct ibv_cq\t\t\t*ibv_send_cq;\n+    \tstruct ibv_cq\t\t\t*ibv_recv_cq;\n+\tstruct ofi_verbs_ud_buf_pool\tgrh_pool;\n+\tstruct ofi_ib_ud_ep_name\tep_name;\n+\tint\t\t\t\tservice;\n+\tint\t\t\t\tep_flags;\n+\tstruct ibv_wc\t\t\t*multiple_wcs;\n+};\n+\n+struct ofi_verbs_ud_cq {\n+\tstruct util_cq\tutil_cq;\n+\tstruct ibv_cq\t*ibv_cq;\n+};\n+\n+struct ofi_verbs_ud_mem_desc {\n+\tstruct fid_mr\t\t\tmr_fid;\n+\tstruct ibv_mr\t\t\t*mr;\n+\tstruct ofi_verbs_ud_domain\t*domain;\n+};\n+\n+struct ofi_verbs_ud_av {\n+\tstruct util_av\tutil_av;\n+\tRbtHandle\taddr_map;\n+};\n+\n+struct ofi_verbs_ud_av_entry {\n+\tstruct ofi_ib_ud_ep_name\t*addr;\n+\tstruct ibv_ah\t\t\t*ah;\n+};\n+\n+extern struct util_prov ofi_verbs_ud_util_prov;\n+extern struct fi_provider ofi_verbs_ud_prov;\n+\n+extern const char ofi_verbs_ud_prov_name[];\n+extern const char ofi_verbs_ud_fab_name[];\n+extern const char ofi_verbs_ud_domain_name[];\n+\n+#define VERBS_UD_WARN(subsys, ...)\t\t\t\t\t\\\n+\tFI_WARN(&ofi_verbs_ud_prov, subsys, __VA_ARGS__)\n+#define VERBS_UD_DBG(subsys, ...)\t\t\t\t\t\\\n+\tFI_DBG(&ofi_verbs_ud_prov, subsys, __VA_ARGS__)\n+#define VERBS_UD_INFO(subsys, ...)\t\t\t\t\t\\\n+\tFI_INFO(&ofi_verbs_ud_prov, subsys, __VA_ARGS__)\n+#define VERBS_UD_INFO_ERRNO(subsys, fn, errno)\t\t\t\t\\\n+\tVERBS_UD_INFO(subsys, fn \": %s(%d)\\n\", strerror(errno), errno)\n+\n+/* Verbs UD Pool functionality */\n+struct ofi_verbs_ud_wr_entry_hdr {\n+\tstruct dlist_entry\tentry;\n+\tvoid\t\t\t*desc;\n+\tstruct ofi_verbs_ud_ep\t*ep;\n+\tvoid\t\t\t*context;\n+\tuint64_t\t\tflags;\n+};\n+\n+struct ofi_verbs_ud_pool_attr {\n+\tsize_t\tcount;\n+\tsize_t\tsize;\n+\tvoid\t*pool_ctx;\n+\n+\tofi_verbs_ud_pool_entry_cancel_hndlr cancel_hndlr;\n+\n+\tutil_buf_region_alloc_hndlr\talloc_hndlr;\n+\tutil_buf_region_free_hndlr\tfree_hndlr;\n+};\n+\n+\n+/*\n+ * The Global Routing Header (GRH) of the incoming message\n+ * will be placed in the first 40 bytes of the buffer(s)\n+ * in the scatter list.\n+ * @note If no GRH is present in the incoming message,\n+ *       then the first bytes will be undefined.\n+ * This means that in all cases, the actual data of the\n+ * incoming message will start at an offset of 40 bytes\n+ * into the buffer(s) in the scatter list.\n+ */\n+#define OFI_VERBS_UD_GRH_LENGTH 40\n+\n+struct ofi_verbs_ud_wr_entry {\n+\tstruct ofi_verbs_ud_wr_entry_hdr\thdr;\n+\tchar\t\t\t\t\tgrh_buf[];\n+};\n+\n+static inline struct ofi_verbs_ud_wr_entry_hdr*\n+ofi_verbs_ud_wr_entry_get(struct ofi_verbs_ud_buf_pool *pool)\n+{\n+\tstruct ofi_verbs_ud_wr_entry_hdr *buf;\n+\tstruct fid_mr *mr = NULL;\n+\n+\tbuf = util_buf_alloc_ex(pool->pool, (void **)&mr);\n+\tif (unlikely(!buf))\n+\t\treturn NULL;\n+\tbuf->desc = fi_mr_desc(mr);\n+\tdlist_insert_tail(&buf->entry, &pool->buf_list);\n+\n+\treturn buf;\n+}\n+\n+static inline void\n+ofi_verbs_ud_wr_entry_release(struct ofi_verbs_ud_buf_pool *pool,\n+\t\t\t      struct ofi_verbs_ud_wr_entry_hdr *buf)\n+{\n+\tdlist_remove(&buf->entry);\n+\tutil_buf_release(pool->pool, buf);\n+}\n+\n+#define OFI_VERBS_UD_WR_ENTRY_SIZE\t\t\t\t\t\\\n+\t(sizeof(struct ofi_verbs_ud_wr_entry) + OFI_VERBS_UD_GRH_LENGTH)\n+\n+static inline void\n+ofi_verbs_ud_mr_buf_close(void *pool_ctx, void *context)\n+{\n+\t/* We would get a (fid_mr *) in context but\n+\t * it is safe to cast it into (fid *) */\n+\tfi_close((struct fid *)context);\n+}\n+\n+static inline int\n+ofi_verbs_ud_mr_buf_reg(void *pool_ctx, void *addr,\n+\t\t\tsize_t len, void **context)\n+{\n+\tint ret;\n+\tstruct fid_mr *mr;\n+\tstruct fid_domain *domain = (struct fid_domain *)pool_ctx;\n+\n+\tret = fi_mr_reg(domain, addr, len,\n+\t\t\tFI_SEND | FI_RECV | FI_READ | FI_WRITE,\n+\t\t\t0, 0, 0, &mr, NULL);\n+\t*context = mr;\n+\treturn ret;\n+}\n+\n+static inline void\n+ofi_verbs_ud_pool_wr_entry_cancel(struct ofi_verbs_ud_buf_pool *pool)\n+{\n+\tstruct dlist_entry *entry;\n+\tstruct ofi_verbs_ud_wr_entry_hdr *buf;\n+\tentry = pool->buf_list.next;\n+\tbuf = container_of(entry, struct ofi_verbs_ud_wr_entry_hdr,\n+\t\t\t   entry);\n+\tofi_verbs_ud_wr_entry_release(pool, buf);\n+\t\n+}\n+\n+static inline void\n+ofi_verbs_ud_pool_destroy(struct ofi_verbs_ud_buf_pool *pool)\n+{\n+\tif (pool->cancel_hndlr) {\n+\t\twhile (!dlist_empty(&pool->buf_list))\n+\t\t\tpool->cancel_hndlr(pool);\n+\t}\n+\n+\tutil_buf_pool_destroy(pool->pool);\n+}\n+\n+static inline int\n+ofi_verbs_ud_pool_create(struct ofi_verbs_ud_pool_attr *attr,\n+\t\t\t struct ofi_verbs_ud_buf_pool *pool)\n+{\n+\tpool->pool = util_buf_pool_create_ex(\n+\t\t\tattr->size, 16, 0, attr->count,\n+\t\t\tattr->alloc_hndlr, attr->free_hndlr,\n+\t\t\tattr->pool_ctx\n+\t);\n+\tif (!pool->pool) {\n+\t\tVERBS_UD_WARN(FI_LOG_EP_DATA,\n+\t\t\t      \"Unable to create buf pool\\n\");\n+\t\treturn -FI_ENOMEM;\n+\t}\n+\tpool->cancel_hndlr = attr->cancel_hndlr;\n+\tdlist_init(&pool->buf_list);\n+\n+\treturn FI_SUCCESS;\n+}\n+\n+/* ~Verbs UD Pool functionality */\n+\n+#define OFI_VERBS_UD_DEFAULT_NS_PORT\t5678\n+\n+extern struct gl_data {\n+\tint\tfork_unsafe;\n+\tstruct {\n+\t\tchar\t*device_name;\n+\t\tint\tport_number;\n+\t} device;\n+\tint\tdef_inject_size;\n+\tint\tdef_tx_ctx_size;\n+    \tint\tdef_rx_ctx_size;\n+\tint\tdef_tx_iov_limit;\n+\tint\tdef_rx_iov_limit;\n+\tchar\t*interface_name;\n+\tint\tuse_ipoib_dev_only;\n+\tint\tuse_name_server;\n+\tint\tname_server_port;\n+\tint\tseparate_send_recv_cq;\n+\tint\tnum_poll_multiple_wcs;\n+} gl_data;\n+\n+/* Init devices structures */\n+\n+/* IPoIB devices structures */\n+\n+typedef struct ofi_verbs_ud_dev_addr_ipoib_t {\n+\tstruct dlist_entry list_entry;\n+\tstruct rdma_addrinfo *rai;\n+} ofi_verbs_ud_dev_addr_ipoib_t;\n+\n+typedef struct ofi_verbs_ud_dev_addrs_ipoib_t {\n+\tstruct dlist_entry ipv4_addrs_list;\n+\tstruct dlist_entry ipv6_addrs_list;\n+} ofi_verbs_ud_dev_addrs_ipoib_t;\n+\n+typedef struct ofi_verbs_ud_device_ipoib_t {\n+\tstruct dlist_entry list_entry;\n+\tstruct ibv_context *ibv_ctx;\n+\tstruct ibv_device_attr *attr;\n+\tstruct ibv_qp_init_attr *qp_init_attr;\n+\tstruct ibv_port_attr *port_attr;\n+\tofi_verbs_ud_dev_addrs_ipoib_t *dev_addrs;\n+} ofi_verbs_ud_device_ipoib_t;\n+\n+typedef struct ofi_verbs_ud_devices_ipoib_t {\n+\t/* Common info about devices */\n+\tstruct ibv_context **ibv_ctx_list;\n+\tint num_devices;\n+\t/* The list of devices that are active */\n+\tstruct dlist_entry devices_list;\n+} ofi_verbs_ud_devices_ipoib_t;\n+\n+typedef struct ofi_verbs_ud_infra_ipoib_t {\n+\tofi_verbs_ud_devices_ipoib_t *devices;\n+} ofi_verbs_ud_infra_ipoib_t;\n+\n+/* ~IPoIB devices structures */\n+\n+/* All active HW devices structures */\n+\n+typedef struct ofi_verbs_ud_dev_port_hw_t {\n+\tstruct dlist_entry list_entry;\n+\tint port_number;\n+\tstruct ibv_port_attr *attr;\n+} ofi_verbs_ud_dev_port_hw_t;\n+\n+typedef struct ofi_verbs_ud_dev_ports_hw_t {\n+\t/* Common info about ports */\n+\tint num_ports;\n+\t/* The list of ports that are active */\n+\tstruct dlist_entry hw_ports_list;\n+} ofi_verbs_ud_dev_ports_hw_t;\n+\n+typedef struct ofi_verbs_ud_device_hw_t {\n+\tstruct dlist_entry list_entry;\n+\tstruct ibv_context *ibv_ctx;\n+\tstruct ibv_device_attr *attr;\n+\tstruct ibv_qp_init_attr *qp_init_attr;\n+\tofi_verbs_ud_dev_ports_hw_t *ports;\n+} ofi_verbs_ud_device_hw_t;\n+\n+typedef struct ofi_verbs_ud_devices_hw_t {\n+\t/* Common info about devices */\n+\tstruct ibv_context **ibv_ctx_list;\n+\tint num_devices;\n+\t/* The list of devices that are active */\n+\tstruct dlist_entry devices_list;\n+} ofi_verbs_ud_devices_hw_t;\n+\n+typedef struct ofi_verbs_ud_infra_hw_t {\n+\tofi_verbs_ud_devices_hw_t *devices;\n+} ofi_verbs_ud_infra_hw_t;\n+\n+/* ~All active HW devices structures */\n+\n+/* ~Init devices structures */\n+\n+int ofi_verbs_ud_fabric(struct fi_fabric_attr *attr,\n+\t\t\tstruct fid_fabric **fabric_fid,\n+\t\t\tvoid *context);\n+int ofi_verbs_ud_domain_open(struct fid_fabric *fabric_fid,\n+\t\t\t     struct fi_info *info,\n+\t\t\t     struct fid_domain **domain_fid,\n+\t\t\t     void *context);\n+int ofi_verbs_ud_endpoint_open(struct fid_domain *domain_fid,\n+\t\t\t       struct fi_info *info,\n+\t\t\t       struct fid_ep **ep_fid,\n+\t\t\t       void *context);\n+int ofi_verbs_ud_cq_open(struct fid_domain *domain_fid,\n+\t\t\t struct fi_cq_attr *attr,\n+\t\t\t struct fid_cq **cq_fid,\n+\t\t\t void *context);\n+int ofi_verbs_ud_av_open(struct fid_domain *domain_fid,\n+\t\t\t struct fi_av_attr *attr,\n+\t\t\t struct fid_av **av_fid, void *context);\n+struct fi_ops_mr *ofi_verbs_ud_get_domain_mr_ops(void);\n+struct fi_ops_msg *ofi_verbs_ud_get_ep_msg_ops(void);\n+\n+void ofi_verbs_ud_fini(void);\n+\n+/* Init functions */\n+\n+int ofi_verbs_ud_query_qp_attrs(struct ibv_context *ctx,\n+\t\t\t\tstruct ibv_device_attr *device_attr,\n+\t\t\t\tstruct ibv_qp_init_attr *init_attr);\n+int ofi_verbs_ud_get_matching_info(uint32_t version, const char *dev_name,\n+\t\t\t\t   const struct fi_info *hints,\n+\t\t\t\t   struct fi_info **info,\n+\t\t\t\t   const struct fi_info *prov_info);\n+\n+static inline\n+void ofi_verbs_ud_fork_init(void)\n+{\n+\tint ret = FI_SUCCESS;\n+\n+\tif (!gl_data.fork_unsafe) {\n+\t\tret = ibv_fork_init();\n+\t\tif (ret) {\n+\t\t\tVERBS_UD_WARN(FI_LOG_CORE,\n+\t\t\t\t      \"Enabling IB fork support failed: \"\n+\t\t\t\t      \"%s (%d)\\n\", strerror(ret), ret);\n+\t\t}\n+\t\tVERBS_UD_INFO(FI_LOG_CORE, \"IB fork support \"\n+\t\t\t      \"is enabled\\n\");\n+\t} else {\n+\t\tVERBS_UD_INFO(FI_LOG_CORE, \"IB fork support wasn't requested, \"\n+\t\t\t      \"not enabled it\\n\");\n+\t}\n+}\n+\n+static inline\n+int ofi_verbs_ud_have_device(void)\n+{\n+\tstruct ibv_device **devices;\n+\tstruct ibv_context *verbs;\n+\tint found = 0, num_devices = 0, i;\n+\n+\tdevices = ibv_get_device_list(&num_devices);\n+\tif (!devices || !num_devices)\n+\t\treturn found;\n+\n+\tfor (i = 0; i < num_devices; i++) {\n+\t\tverbs = ibv_open_device(devices[i]);\n+\t\tif (verbs) {\n+\t\t\tibv_close_device(verbs);\n+\t\t\tfound = 1;\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n+\tibv_free_device_list(devices);\n+\treturn found;\n+}\n+\n+/* IPoIB devices */\n+\n+ofi_verbs_ud_infra_ipoib_t *ofi_verbs_ud_get_infra_ipoib(void);\n+int ofi_verbs_ud_init_ipoib(void);\n+int ofi_verbs_ud_add_addr_to_dev_list(struct dlist_entry *verbs_devs,\n+\t\t\t\t      struct sockaddr *addr);\n+int ofi_verbs_ud_getinfo_ipoib(uint32_t version, const char *node,\n+\t\t\t       const char *service, uint64_t flags,\n+\t\t\t       struct fi_info *hints, struct fi_info **info);\n+void ofi_verbs_ud_dev_cleanup_ipoib(void);\n+void ofi_verbs_ud_fini_ipoib(void);\n+\n+/* ~IPoIB devices */\n+\n+/* All active hw devices */\n+\n+ofi_verbs_ud_infra_hw_t *ofi_verbs_ud_get_infra_hw(void);\n+int ofi_verbs_ud_init_hw(void);\n+int ofi_verbs_ud_getinfo_hw(uint32_t version, const char *node,\n+\t\t\t    const char *service, uint64_t flags,\n+\t\t\t    struct fi_info *hints, struct fi_info **info);\n+void ofi_verbs_ud_dev_cleanup_hw(void);\n+void ofi_verbs_ud_fini_hw(void);\n+\n+/* ~All actrive hw devices */\n+\n+/* ~Init functions */\n+\n+static inline int\n+ofi_verbs_ud_get_port_info(struct ibv_context *context, int port,\n+\t\t\t   struct ibv_port_attr *attr)\n+{\n+\treturn ibv_query_port(context, port, attr);\n+}\n+\n+static inline uint16_t\n+ofi_verbs_ud_get_local_lid(struct ibv_context *context, int port)\n+{\n+\tstruct ibv_port_attr attr;\n+\n+\treturn ((ofi_verbs_ud_get_port_info(context, port, &attr)) ?\n+\t\t 0 : attr.lid);\n+}\n+\n+#define OFI_INSTANTIATE_UTIL(prov_name, ofi_obj_name)\t\t\t\\\n+static inline int ofi_##prov_name##_##ofi_obj_name##_instantiate(\t\\\n+\tstruct ofi_##prov_name##_##ofi_obj_name **native_inst,\t\t\\\n+\tstruct util_##ofi_obj_name **util_inst)\t\t\t\t\\\n+{\t\t\t\t\t\t\t\t\t\\\n+\t*native_inst = (struct ofi_##prov_name##_##ofi_obj_name *)\t\\\n+\t\tcalloc(1, sizeof(**native_inst));\t\t\t\\\n+\tif (!(*(native_inst)))\t\t\t\t\t\t\\\n+\t\treturn -FI_ENOMEM;\t\t\t\t\t\\\n+\tif (util_inst)\t\t\t\t\t\t\t\\\n+\t\t*(util_inst) = &(*(native_inst))->util_##ofi_obj_name;\t\\\n+\treturn FI_SUCCESS;\t\t\t\t\t\t\\\n+}\t\t\t\t\t\t\t\t\t\\\n+static inline void ofi_##prov_name##_##ofi_obj_name##_cleanup(\t\t\\\n+\tstruct ofi_##prov_name##_##ofi_obj_name *native_inst)\t\t\\\n+{\t\t\t\t\t\t\t\t\t\\\n+\tfree(native_inst);\t\t\t\t\t\t\\\n+}","path":"prov/verbs_ud/src/verbs_ud.h","position":696,"original_position":696,"commit_id":"059aa861bc6edaafb195734b59f53117c63ec8ea","original_commit_id":"059aa861bc6edaafb195734b59f53117c63ec8ea","user":{"login":"shefty","id":3967608,"avatar_url":"https://avatars0.githubusercontent.com/u/3967608?v=4","gravatar_id":"","url":"https://api.github.com/users/shefty","html_url":"https://github.com/shefty","followers_url":"https://api.github.com/users/shefty/followers","following_url":"https://api.github.com/users/shefty/following{/other_user}","gists_url":"https://api.github.com/users/shefty/gists{/gist_id}","starred_url":"https://api.github.com/users/shefty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shefty/subscriptions","organizations_url":"https://api.github.com/users/shefty/orgs","repos_url":"https://api.github.com/users/shefty/repos","events_url":"https://api.github.com/users/shefty/events{/privacy}","received_events_url":"https://api.github.com/users/shefty/received_events","type":"User","site_admin":false},"body":"These macros don't look needed.  The second one in particular just obfuscates the code.","created_at":"2017-08-07T22:51:07Z","updated_at":"2017-08-07T22:51:07Z","html_url":"https://github.com/ofiwg/libfabric/pull/3199#discussion_r131783629","pull_request_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/3199","_links":{"self":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments/131783629"},"html":{"href":"https://github.com/ofiwg/libfabric/pull/3199#discussion_r131783629"},"pull_request":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/3199"}}},"pull_request":{"url":"https://api.github.com/repos/ofiwg/libfabric/pulls/3199","id":134508257,"html_url":"https://github.com/ofiwg/libfabric/pull/3199","diff_url":"https://github.com/ofiwg/libfabric/pull/3199.diff","patch_url":"https://github.com/ofiwg/libfabric/pull/3199.patch","issue_url":"https://api.github.com/repos/ofiwg/libfabric/issues/3199","number":3199,"state":"open","locked":false,"title":"prov/verbs_ud: Implementation of new provider","user":{"login":"gladkovdmitry17","id":11650339,"avatar_url":"https://avatars1.githubusercontent.com/u/11650339?v=4","gravatar_id":"","url":"https://api.github.com/users/gladkovdmitry17","html_url":"https://github.com/gladkovdmitry17","followers_url":"https://api.github.com/users/gladkovdmitry17/followers","following_url":"https://api.github.com/users/gladkovdmitry17/following{/other_user}","gists_url":"https://api.github.com/users/gladkovdmitry17/gists{/gist_id}","starred_url":"https://api.github.com/users/gladkovdmitry17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gladkovdmitry17/subscriptions","organizations_url":"https://api.github.com/users/gladkovdmitry17/orgs","repos_url":"https://api.github.com/users/gladkovdmitry17/repos","events_url":"https://api.github.com/users/gladkovdmitry17/events{/privacy}","received_events_url":"https://api.github.com/users/gladkovdmitry17/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Dmitry Gladkov <dmitry.gladkov@intel.com>","created_at":"2017-08-07T19:22:13Z","updated_at":"2017-08-07T22:51:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"012d490e5793ad958ed837f659a9d9bd7d1d721b","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/3199/commits","review_comments_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/3199/comments","review_comment_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ofiwg/libfabric/issues/3199/comments","statuses_url":"https://api.github.com/repos/ofiwg/libfabric/statuses/059aa861bc6edaafb195734b59f53117c63ec8ea","head":{"label":"gladkovdmitry17:verbs_ud_dev","ref":"verbs_ud_dev","sha":"059aa861bc6edaafb195734b59f53117c63ec8ea","user":{"login":"gladkovdmitry17","id":11650339,"avatar_url":"https://avatars1.githubusercontent.com/u/11650339?v=4","gravatar_id":"","url":"https://api.github.com/users/gladkovdmitry17","html_url":"https://github.com/gladkovdmitry17","followers_url":"https://api.github.com/users/gladkovdmitry17/followers","following_url":"https://api.github.com/users/gladkovdmitry17/following{/other_user}","gists_url":"https://api.github.com/users/gladkovdmitry17/gists{/gist_id}","starred_url":"https://api.github.com/users/gladkovdmitry17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gladkovdmitry17/subscriptions","organizations_url":"https://api.github.com/users/gladkovdmitry17/orgs","repos_url":"https://api.github.com/users/gladkovdmitry17/repos","events_url":"https://api.github.com/users/gladkovdmitry17/events{/privacy}","received_events_url":"https://api.github.com/users/gladkovdmitry17/received_events","type":"User","site_admin":false},"repo":{"id":80634217,"name":"libfabric","full_name":"gladkovdmitry17/libfabric","owner":{"login":"gladkovdmitry17","id":11650339,"avatar_url":"https://avatars1.githubusercontent.com/u/11650339?v=4","gravatar_id":"","url":"https://api.github.com/users/gladkovdmitry17","html_url":"https://github.com/gladkovdmitry17","followers_url":"https://api.github.com/users/gladkovdmitry17/followers","following_url":"https://api.github.com/users/gladkovdmitry17/following{/other_user}","gists_url":"https://api.github.com/users/gladkovdmitry17/gists{/gist_id}","starred_url":"https://api.github.com/users/gladkovdmitry17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gladkovdmitry17/subscriptions","organizations_url":"https://api.github.com/users/gladkovdmitry17/orgs","repos_url":"https://api.github.com/users/gladkovdmitry17/repos","events_url":"https://api.github.com/users/gladkovdmitry17/events{/privacy}","received_events_url":"https://api.github.com/users/gladkovdmitry17/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gladkovdmitry17/libfabric","description":"Open Fabric Interfaces","fork":true,"url":"https://api.github.com/repos/gladkovdmitry17/libfabric","forks_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/forks","keys_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/teams","hooks_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/hooks","issue_events_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/issues/events{/number}","events_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/events","assignees_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/assignees{/user}","branches_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/branches{/branch}","tags_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/tags","blobs_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/git/refs{/sha}","trees_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/statuses/{sha}","languages_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/languages","stargazers_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/stargazers","contributors_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/contributors","subscribers_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/subscribers","subscription_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/subscription","commits_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/commits{/sha}","git_commits_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/git/commits{/sha}","comments_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/comments{/number}","issue_comment_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/issues/comments{/number}","contents_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/contents/{+path}","compare_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/merges","archive_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/downloads","issues_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/issues{/number}","pulls_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/pulls{/number}","milestones_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/milestones{/number}","notifications_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/labels{/name}","releases_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/releases{/id}","deployments_url":"https://api.github.com/repos/gladkovdmitry17/libfabric/deployments","created_at":"2017-02-01T15:37:30Z","updated_at":"2017-04-26T04:19:52Z","pushed_at":"2017-08-07T19:21:41Z","git_url":"git://github.com/gladkovdmitry17/libfabric.git","ssh_url":"git@github.com:gladkovdmitry17/libfabric.git","clone_url":"https://github.com/gladkovdmitry17/libfabric.git","svn_url":"https://github.com/gladkovdmitry17/libfabric","homepage":"http://ofiwg.github.io/libfabric/","size":15811,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ofiwg:master","ref":"master","sha":"92bea02e0ec65c5c6f1e53b12b6a247a56c168f5","user":{"login":"ofiwg","id":8459445,"avatar_url":"https://avatars1.githubusercontent.com/u/8459445?v=4","gravatar_id":"","url":"https://api.github.com/users/ofiwg","html_url":"https://github.com/ofiwg","followers_url":"https://api.github.com/users/ofiwg/followers","following_url":"https://api.github.com/users/ofiwg/following{/other_user}","gists_url":"https://api.github.com/users/ofiwg/gists{/gist_id}","starred_url":"https://api.github.com/users/ofiwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ofiwg/subscriptions","organizations_url":"https://api.github.com/users/ofiwg/orgs","repos_url":"https://api.github.com/users/ofiwg/repos","events_url":"https://api.github.com/users/ofiwg/events{/privacy}","received_events_url":"https://api.github.com/users/ofiwg/received_events","type":"Organization","site_admin":false},"repo":{"id":22996097,"name":"libfabric","full_name":"ofiwg/libfabric","owner":{"login":"ofiwg","id":8459445,"avatar_url":"https://avatars1.githubusercontent.com/u/8459445?v=4","gravatar_id":"","url":"https://api.github.com/users/ofiwg","html_url":"https://github.com/ofiwg","followers_url":"https://api.github.com/users/ofiwg/followers","following_url":"https://api.github.com/users/ofiwg/following{/other_user}","gists_url":"https://api.github.com/users/ofiwg/gists{/gist_id}","starred_url":"https://api.github.com/users/ofiwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ofiwg/subscriptions","organizations_url":"https://api.github.com/users/ofiwg/orgs","repos_url":"https://api.github.com/users/ofiwg/repos","events_url":"https://api.github.com/users/ofiwg/events{/privacy}","received_events_url":"https://api.github.com/users/ofiwg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ofiwg/libfabric","description":"Open Fabric Interfaces","fork":false,"url":"https://api.github.com/repos/ofiwg/libfabric","forks_url":"https://api.github.com/repos/ofiwg/libfabric/forks","keys_url":"https://api.github.com/repos/ofiwg/libfabric/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ofiwg/libfabric/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ofiwg/libfabric/teams","hooks_url":"https://api.github.com/repos/ofiwg/libfabric/hooks","issue_events_url":"https://api.github.com/repos/ofiwg/libfabric/issues/events{/number}","events_url":"https://api.github.com/repos/ofiwg/libfabric/events","assignees_url":"https://api.github.com/repos/ofiwg/libfabric/assignees{/user}","branches_url":"https://api.github.com/repos/ofiwg/libfabric/branches{/branch}","tags_url":"https://api.github.com/repos/ofiwg/libfabric/tags","blobs_url":"https://api.github.com/repos/ofiwg/libfabric/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ofiwg/libfabric/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ofiwg/libfabric/git/refs{/sha}","trees_url":"https://api.github.com/repos/ofiwg/libfabric/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ofiwg/libfabric/statuses/{sha}","languages_url":"https://api.github.com/repos/ofiwg/libfabric/languages","stargazers_url":"https://api.github.com/repos/ofiwg/libfabric/stargazers","contributors_url":"https://api.github.com/repos/ofiwg/libfabric/contributors","subscribers_url":"https://api.github.com/repos/ofiwg/libfabric/subscribers","subscription_url":"https://api.github.com/repos/ofiwg/libfabric/subscription","commits_url":"https://api.github.com/repos/ofiwg/libfabric/commits{/sha}","git_commits_url":"https://api.github.com/repos/ofiwg/libfabric/git/commits{/sha}","comments_url":"https://api.github.com/repos/ofiwg/libfabric/comments{/number}","issue_comment_url":"https://api.github.com/repos/ofiwg/libfabric/issues/comments{/number}","contents_url":"https://api.github.com/repos/ofiwg/libfabric/contents/{+path}","compare_url":"https://api.github.com/repos/ofiwg/libfabric/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ofiwg/libfabric/merges","archive_url":"https://api.github.com/repos/ofiwg/libfabric/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ofiwg/libfabric/downloads","issues_url":"https://api.github.com/repos/ofiwg/libfabric/issues{/number}","pulls_url":"https://api.github.com/repos/ofiwg/libfabric/pulls{/number}","milestones_url":"https://api.github.com/repos/ofiwg/libfabric/milestones{/number}","notifications_url":"https://api.github.com/repos/ofiwg/libfabric/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ofiwg/libfabric/labels{/name}","releases_url":"https://api.github.com/repos/ofiwg/libfabric/releases{/id}","deployments_url":"https://api.github.com/repos/ofiwg/libfabric/deployments","created_at":"2014-08-15T16:45:53Z","updated_at":"2017-08-07T16:09:22Z","pushed_at":"2017-08-07T21:52:48Z","git_url":"git://github.com/ofiwg/libfabric.git","ssh_url":"git@github.com:ofiwg/libfabric.git","clone_url":"https://github.com/ofiwg/libfabric.git","svn_url":"https://github.com/ofiwg/libfabric","homepage":"http://libfabric.org/","size":15772,"stargazers_count":113,"watchers_count":113,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":113,"mirror_url":null,"open_issues_count":108,"forks":113,"open_issues":108,"watchers":113,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/3199"},"html":{"href":"https://github.com/ofiwg/libfabric/pull/3199"},"issue":{"href":"https://api.github.com/repos/ofiwg/libfabric/issues/3199"},"comments":{"href":"https://api.github.com/repos/ofiwg/libfabric/issues/3199/comments"},"review_comments":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/3199/comments"},"review_comment":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/3199/commits"},"statuses":{"href":"https://api.github.com/repos/ofiwg/libfabric/statuses/059aa861bc6edaafb195734b59f53117c63ec8ea"}}}}
{"actor":{"display_login":"shefty"}}