From patchwork Fri Nov 23 15:40:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Haakon Bugge X-Patchwork-Id: 10696107 X-Patchwork-Delegate: leon@leon.nu Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D6D815A4 for ; Fri, 23 Nov 2018 15:40:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C47FA2BC9D for ; Fri, 23 Nov 2018 15:40:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B82F12BEA1; Fri, 23 Nov 2018 15:40:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CF422BE9E for ; Fri, 23 Nov 2018 15:40:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436679AbeKXCZV (ORCPT ); Fri, 23 Nov 2018 21:25:21 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:36268 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440273AbeKXCZU (ORCPT ); Fri, 23 Nov 2018 21:25:20 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wANFOM6c171767; Fri, 23 Nov 2018 15:40:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=1/ZYBYa+xeMV+eZvcdyX8IXgxBptj4j3RPb6KTwE5vM=; b=VDNLGyJG17I/Wz4ou3y3W6e/yspnK/nwqFk9wSVDOLYNiTBs7kqqd+VrJPucVhEwWRK4 dVZ3IowCONnONWn/Jt3pU3YqdoKi9Aneg7n/1UUYuz2/xQ2jZIzPybCRp/URSKP2z1if hx10rFzslpiCPjqv1KkcpP1j0R2hzk24ZaB7GTMsP+UDJCab75/jYT+Z/Aj0BdVxAN/w Q0cI6brCoj3KL11Urs5uTGj5ON0oEGyHCUrhYn3g2XUhXUsLAh3QjJ51MSEXaOyK73hR hByz6mjj05Bfsm5ADY4d5p3qp6DSP/vqF/FCOz5LE0DCxaTc3aGhZh0/J8axwcaoK65m mw== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2ntbmr3b4c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Nov 2018 15:40:30 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id wANFeThK014059 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Nov 2018 15:40:29 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wANFeT6x030926; Fri, 23 Nov 2018 15:40:29 GMT Received: from lab02.no.oracle.com (/10.172.144.56) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 23 Nov 2018 07:40:28 -0800 From: =?utf-8?q?H=C3=A5kon_Bugge?= To: Sean Hefty , Hal Rosenstock Cc: Doug Ledford , Leon Romanovsky , Jason Gunthorpe , linux-rdma@vger.kernel.org Subject: [PATCH ibacm 1/4] ibacm: Allocate end-point addresses dynamically - v2 Date: Fri, 23 Nov 2018 16:40:14 +0100 Message-Id: X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9085 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811230128 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ibacm has a fixed number (4) of end-point addresses. An endpoint is associated with the node GUID. Hence, if a system is brought up with VFs enabled, ibacm will not be able to handle the end-point addresses. When adding an address, the default provider, acmp, saves a pointer into ibacm's acmc_ep addr_info attribute. But this may now be re-allocated. Its generally a bad idea to have pointers in the provider(s) pointing into acm's data structures. This is fixed in acmp by changing struct acmp_addr to contain struct acm_address instead of a pointer to it, and copying the address, similar to how the info struct is handled. In acm_svr_ep_query(), dynamic allocation and conditional reallocating is implemented, in the case the number of end-point addresses exceeds the fixed size of struct acm_msg. A re-factoring in acm_nl_process_resolve() and in the acm_svr_foo_bar() functions was necessary to accommodate the dynamic allocation of struct acm_msg. In acm_if_iter_sys(), the number of struct ifreq's was increased to 256, in order to be able to test with up-to 256 addresses when ibacm starts. Finally, in ib_acm_enum_ep(), the read() was split in two, first read the hdr, then determine the size of the rest of the data, allocate it, and read them. To avoid endian conversion to/from the same structure, two structures were allocated for simplicity. Signed-off-by: Håkon Bugge --- ibacm/prov/acmp/src/acmp.c | 6 +- ibacm/src/acm.c | 155 +++++++++++++++++++++++++++++++-------------- ibacm/src/acm_util.c | 2 +- ibacm/src/libacm.c | 50 ++++++++++----- 4 files changed, 145 insertions(+), 68 deletions(-) diff --git a/ibacm/prov/acmp/src/acmp.c b/ibacm/prov/acmp/src/acmp.c index c10e62c0..f63f1dbf 100644 --- a/ibacm/prov/acmp/src/acmp.c +++ b/ibacm/prov/acmp/src/acmp.c @@ -166,7 +166,7 @@ struct acmp_send_queue { struct acmp_addr { uint16_t type; union acm_ep_info info; - struct acm_address *addr; + struct acm_address addr; struct acmp_ep *ep; }; @@ -2379,7 +2379,7 @@ static int acmp_add_addr(const struct acm_address *addr, void *ep_context, } ep->addr_info[i].type = addr->type; memcpy(&ep->addr_info[i].info, &addr->info, sizeof(addr->info)); - ep->addr_info[i].addr = (struct acm_address *) addr; + memcpy(&ep->addr_info[i].addr, addr, sizeof(*addr)); ep->addr_info[i].ep = ep; if (loopback_prot != ACMP_LOOPBACK_PROT_LOCAL) { @@ -2439,7 +2439,7 @@ static void acmp_remove_addr(void *addr_context) pthread_mutex_lock(&port->lock); list_for_each(&port->ep_list, ep, entry) { pthread_mutex_unlock(&port->lock); - dest = acmp_get_dest(ep, address->type, address->addr->info.addr); + dest = acmp_get_dest(ep, address->type, address->addr.info.addr); if (dest) { acm_log(2, "Found a dest addr, deleting it\n"); pthread_mutex_lock(&ep->lock); diff --git a/ibacm/src/acm.c b/ibacm/src/acm.c index 182e89d9..6a02f33d 100644 --- a/ibacm/src/acm.c +++ b/ibacm/src/acm.c @@ -72,7 +72,6 @@ #define src_index data[1] #define dst_index data[2] -#define MAX_EP_ADDR 4 #define NL_MSG_BUF_SIZE 4096 #define ACM_PROV_NAME_SIZE 64 #define NL_CLIENT_INDEX 0 @@ -139,7 +138,8 @@ struct acmc_ep { struct acmc_port *port; struct acm_endpoint endpoint; void *prov_ep_context; - struct acmc_addr addr_info[MAX_EP_ADDR]; + int nmbr_ep_addrs; + struct acmc_addr *addr_info; struct list_node entry; }; @@ -421,7 +421,7 @@ static void acm_mark_addr_invalid(struct acmc_ep *ep, { int i; - for (i = 0; i < MAX_EP_ADDR; i++) { + for (i = 0; i < ep->nmbr_ep_addrs; i++) { if (!acm_addr_cmp(&ep->addr_info[i].addr, data->info.addr, data->type)) { ep->addr_info[i].addr.type = ACM_ADDRESS_INVALID; ep->port->prov->remove_address(ep->addr_info[i].prov_addr_context); @@ -437,7 +437,7 @@ acm_addr_lookup(const struct acm_endpoint *endpoint, uint8_t *addr, uint8_t addr int i; ep = container_of(endpoint, struct acmc_ep, endpoint); - for (i = 0; i < MAX_EP_ADDR; i++) + for (i = 0; i < ep->nmbr_ep_addrs; i++) if (!acm_addr_cmp(&ep->addr_info[i].addr, addr, addr_type)) return &ep->addr_info[i].addr; @@ -838,7 +838,7 @@ acm_get_port_ep_address(struct acmc_port *port, struct acm_ep_addr_data *data) if ((data->type == ACM_EP_INFO_PATH) && (!data->info.path.pkey || (be16toh(data->info.path.pkey) == ep->endpoint.pkey))) { - for (i = 0; i < MAX_EP_ADDR; i++) { + for (i = 0; i < ep->nmbr_ep_addrs; i++) { if (ep->addr_info[i].addr.type) return &ep->addr_info[i]; } @@ -1118,17 +1118,22 @@ acm_svr_resolve_path(struct acmc_client *client, struct acm_msg *msg) static int acm_svr_resolve(struct acmc_client *client, struct acm_msg *msg) { + int ret = 0; + (void) atomic_inc(&client->refcnt); if (msg->resolve_data[0].type == ACM_EP_INFO_PATH) { if (msg->resolve_data[0].flags & ACM_FLAGS_QUERY_SA) { - return acm_svr_query_path(client, msg); + ret = acm_svr_query_path(client, msg); } else { - return acm_svr_resolve_path(client, msg); + ret = acm_svr_resolve_path(client, msg); } } else { - return acm_svr_resolve_dest(client, msg); + ret = acm_svr_resolve_dest(client, msg); } + + free(msg); + return ret; } static int acm_svr_perf_query(struct acmc_client *client, struct acm_msg *msg) @@ -1181,15 +1186,48 @@ static int acm_svr_perf_query(struct acmc_client *client, struct acm_msg *msg) else ret = 0; + free(msg); return ret; } +static int may_be_realloc(struct acm_msg **msg_ptr, + int len, + int cnt, + int *cur_msg_siz_ptr, + int max_msg_siz) +{ + + /* Check if a new address exceeds the protocol constrained max size */ + if (len + (cnt + 1) * ACM_MAX_ADDRESS > max_msg_siz) { + acm_log(0, "ERROR - unable to amend more addresses to acm_msg due to protocol constraints\n"); + return ENOMEM; + } + + /* Check if a new address exeeds current size of msg */ + if (len + (cnt + 1) * ACM_MAX_ADDRESS > *cur_msg_siz_ptr) { + const size_t chunk_size = 16 * ACM_MAX_ADDRESS; + struct acm_msg *new_msg = realloc(*msg_ptr, *cur_msg_siz_ptr + chunk_size); + + if (!new_msg) { + acm_log(0, "ERROR - failed to allocate longer acm_msg\n"); + return ENOMEM; + } + + *msg_ptr = new_msg; + *cur_msg_siz_ptr += chunk_size; + } + + return 0; +} + static int acm_svr_ep_query(struct acmc_client *client, struct acm_msg *msg) { int ret, i; uint16_t len; struct acmc_ep *ep; int index, cnt = 0; + int cur_msg_siz = sizeof(*msg); + int max_msg_siz = USHRT_MAX; acm_log(2, "client %d\n", client->index); index = msg->hdr.data[0]; @@ -1203,8 +1241,10 @@ static int acm_svr_ep_query(struct acmc_client *client, struct acm_msg *msg) ACM_MAX_PROV_NAME - 1); msg->ep_data[0].prov_name[ACM_MAX_PROV_NAME - 1] = '\0'; len = ACM_MSG_HDR_LENGTH + sizeof(struct acm_ep_config_data); - for (i = 0; i < MAX_EP_ADDR; i++) { + for (i = 0; i < ep->nmbr_ep_addrs; i++) { if (ep->addr_info[i].addr.type != ACM_ADDRESS_INVALID) { + if (may_be_realloc(&msg, len, cnt, &cur_msg_siz, max_msg_siz)) + break; memcpy(msg->ep_data[0].addrs[cnt++].name, ep->addr_info[i].string_buf, ACM_MAX_ADDRESS); @@ -1227,6 +1267,7 @@ static int acm_svr_ep_query(struct acmc_client *client, struct acm_msg *msg) else ret = 0; + free(msg); return ret; } @@ -1238,38 +1279,47 @@ static int acm_msg_length(struct acm_msg *msg) static void acm_svr_receive(struct acmc_client *client) { - struct acm_msg msg; + struct acm_msg *msg = malloc(sizeof(*msg)); int ret; + if (!msg) { + acm_log(0, "ERROR - Unable to alloc acm_msg\n"); + ret = ENOMEM; + goto out; + } + acm_log(2, "client %d\n", client->index); - ret = recv(client->sock, (char *) &msg, sizeof msg, 0); - if (ret <= 0 || ret != acm_msg_length(&msg)) { + ret = recv(client->sock, (char *) msg, sizeof(*msg), 0); + if (ret <= 0 || ret != acm_msg_length(msg)) { acm_log(2, "client disconnected\n"); ret = ACM_STATUS_ENOTCONN; - goto out; + goto out_free; } - if (msg.hdr.version != ACM_VERSION) { - acm_log(0, "ERROR - unsupported version %d\n", msg.hdr.version); - goto out; + if (msg->hdr.version != ACM_VERSION) { + acm_log(0, "ERROR - unsupported version %d\n", msg->hdr.version); + goto out_free; } - switch (msg.hdr.opcode & ACM_OP_MASK) { + switch (msg->hdr.opcode & ACM_OP_MASK) { case ACM_OP_RESOLVE: atomic_inc(&counter[ACM_CNTR_RESOLVE]); - ret = acm_svr_resolve(client, &msg); - break; + ret = acm_svr_resolve(client, msg); + goto out; case ACM_OP_PERF_QUERY: - ret = acm_svr_perf_query(client, &msg); - break; + ret = acm_svr_perf_query(client, msg); + goto out; case ACM_OP_EP_QUERY: - ret = acm_svr_ep_query(client, &msg); - break; + ret = acm_svr_ep_query(client, msg); + goto out; default: - acm_log(0, "ERROR - unknown opcode 0x%x\n", msg.hdr.opcode); + acm_log(0, "ERROR - unknown opcode 0x%x\n", msg->hdr.opcode); break; } +out_free: + free(msg); + out: if (ret) acm_disconnect_client(client); @@ -1412,7 +1462,7 @@ static int resync_system_ips(void) port = &dev->port[cnt]; list_for_each(&port->ep_list, ep, entry) { - for (i = 0; i < MAX_EP_ADDR; i++) { + for (i = 0; i < ep->nmbr_ep_addrs; i++) { if (ep->addr_info[i].addr.type == ACM_ADDRESS_IP || ep->addr_info[i].addr.type == ACM_ADDRESS_IP6) ep->addr_info[i].addr.type = ACM_ADDRESS_INVALID; @@ -1672,7 +1722,7 @@ static void acm_nl_process_invalid_request(struct acmc_client *client, static void acm_nl_process_resolve(struct acmc_client *client, struct acm_nl_msg *acmnlmsg) { - struct acm_msg msg; + struct acm_msg *msg = malloc(sizeof(*msg)); struct nlattr *attr; int payload_len; int resolve_hdr_len; @@ -1681,21 +1731,26 @@ static void acm_nl_process_resolve(struct acmc_client *client, int status; unsigned char *data; - memset(&msg, 0, sizeof(msg)); - msg.hdr.opcode = ACM_OP_RESOLVE; - msg.hdr.version = ACM_VERSION; - msg.hdr.length = ACM_MSG_HDR_LENGTH + ACM_MSG_EP_LENGTH; - msg.hdr.status = ACM_STATUS_SUCCESS; - msg.hdr.tid = (uintptr_t) acmnlmsg; - msg.resolve_data[0].type = ACM_EP_INFO_PATH; + if (!msg) { + acm_log(0, "ERROR - Unable to allocate msg\n"); + return; + } + + memset(msg, 0, sizeof(*msg)); + msg->hdr.opcode = ACM_OP_RESOLVE; + msg->hdr.version = ACM_VERSION; + msg->hdr.length = ACM_MSG_HDR_LENGTH + ACM_MSG_EP_LENGTH; + msg->hdr.status = ACM_STATUS_SUCCESS; + msg->hdr.tid = (uintptr_t) acmnlmsg; + msg->resolve_data[0].type = ACM_EP_INFO_PATH; /* We support only one pathrecord */ acm_log(2, "path use 0x%x\n", acmnlmsg->resolve_header.path_use); if (acmnlmsg->resolve_header.path_use == LS_RESOLVE_PATH_USE_UNIDIRECTIONAL) - msg.resolve_data[0].info.path.reversible_numpath = 1; + msg->resolve_data[0].info.path.reversible_numpath = 1; else - msg.resolve_data[0].info.path.reversible_numpath = + msg->resolve_data[0].info.path.reversible_numpath = IBV_PATH_RECORD_REVERSIBLE | 1; data = (unsigned char *) &acmnlmsg->nlmsg_header + NLMSG_HDRLEN; @@ -1710,7 +1765,7 @@ static void acm_nl_process_resolve(struct acmc_client *client, attr->nla_len > rem) break; - status = acm_nl_parse_path_attr(attr, &msg.resolve_data[0]); + status = acm_nl_parse_path_attr(attr, &msg->resolve_data[0]); if (status) { acm_nl_process_invalid_request(client, acmnlmsg); return; @@ -1723,7 +1778,7 @@ static void acm_nl_process_resolve(struct acmc_client *client, } atomic_inc(&counter[ACM_CNTR_RESOLVE]); - acm_svr_resolve(client, &msg); + acm_svr_resolve(client, msg); } static int acm_nl_is_valid_resolve_request(struct acm_nl_msg *acmnlmsg) @@ -2018,12 +2073,21 @@ acm_ep_insert_addr(struct acmc_ep *ep, const char *name, uint8_t *addr, memcpy(tmp, addr, acm_addr_len(addr_type)); if (!acm_addr_lookup(&ep->endpoint, addr, addr_type)) { - for (i = 0; (i < MAX_EP_ADDR) && + for (i = 0; (i < ep->nmbr_ep_addrs) && (ep->addr_info[i].addr.type != ACM_ADDRESS_INVALID); i++) ; - if (i == MAX_EP_ADDR) { - ret = ENOMEM; - goto out; + if (i == ep->nmbr_ep_addrs) { + ++ep->nmbr_ep_addrs; + ep->addr_info = realloc(ep->addr_info, ep->nmbr_ep_addrs * sizeof(*ep->addr_info)); + if (!ep->addr_info) { + ret = ENOMEM; + --ep->nmbr_ep_addrs; + goto out; + } + /* Added memory is not initialized */ + memset(ep->addr_info + i, 0, sizeof(*ep->addr_info)); + ep->addr_info[i].addr.endpoint = &ep->endpoint; + ep->addr_info[i].addr.id_string = ep->addr_info[i].string_buf; } /* Open the provider endpoint only if at least a name or @@ -2194,7 +2258,7 @@ static void acm_ep_down(struct acmc_ep *ep) acm_log(1, "%s %d pkey 0x%04x\n", ep->port->dev->device.verbs->device->name, ep->port->port.port_num, ep->endpoint.pkey); - for (i = 0; i < MAX_EP_ADDR; i++) { + for (i = 0; i < ep->nmbr_ep_addrs; i++) { if (ep->addr_info[i].addr.type && ep->addr_info[i].prov_addr_context) ep->port->prov->remove_address(ep->addr_info[i]. @@ -2211,7 +2275,6 @@ static struct acmc_ep * acm_alloc_ep(struct acmc_port *port, uint16_t pkey) { struct acmc_ep *ep; - int i; acm_log(1, "\n"); ep = calloc(1, sizeof *ep); @@ -2221,11 +2284,7 @@ acm_alloc_ep(struct acmc_port *port, uint16_t pkey) ep->port = port; ep->endpoint.port = &port->port; ep->endpoint.pkey = pkey; - - for (i = 0; i < MAX_EP_ADDR; i++) { - ep->addr_info[i].addr.endpoint = &ep->endpoint; - ep->addr_info[i].addr.id_string = ep->addr_info[i].string_buf; - } + ep->nmbr_ep_addrs = 0; return ep; } diff --git a/ibacm/src/acm_util.c b/ibacm/src/acm_util.c index f4654f12..0cc23304 100644 --- a/ibacm/src/acm_util.c +++ b/ibacm/src/acm_util.c @@ -143,7 +143,7 @@ int acm_if_iter_sys(acm_if_iter_cb cb, void *ctx) return -1; } - len = sizeof(*ifc) + sizeof(*ifr) * 64; + len = sizeof(*ifc) + sizeof(*ifr) * 256; ifc = malloc(len); if (!ifc) { ret = -1; diff --git a/ibacm/src/libacm.c b/ibacm/src/libacm.c index 1d9d7145..8f0bfc2a 100644 --- a/ibacm/src/libacm.c +++ b/ibacm/src/libacm.c @@ -384,11 +384,13 @@ out: int ib_acm_enum_ep(int index, struct acm_ep_config_data **data) { + struct acm_ep_config_data *netw_edata = NULL; + struct acm_ep_config_data *host_edata = NULL; struct acm_msg msg; + struct acm_hdr hdr; int ret; int len; - int cnt; - struct acm_ep_config_data *edata; + int i; pthread_mutex_lock(&acm_lock); memset(&msg, 0, sizeof msg); @@ -401,33 +403,49 @@ int ib_acm_enum_ep(int index, struct acm_ep_config_data **data) if (ret != ACM_MSG_HDR_LENGTH) goto out; - ret = recv(sock, (char *) &msg, sizeof msg, 0); - if (ret < ACM_MSG_HDR_LENGTH || ret != be16toh(msg.hdr.length)) { + ret = recv(sock, (char *) &hdr, sizeof(hdr), 0); + if (ret != sizeof(hdr)) { ret = ACM_STATUS_EINVAL; goto out; } - if (msg.hdr.status) { - ret = acm_error(msg.hdr.status); + if (hdr.status) { + ret = acm_error(hdr.status); goto out; } - cnt = be16toh(msg.ep_data[0].addr_cnt); - len = sizeof(struct acm_ep_config_data) + - ACM_MAX_ADDRESS * cnt; - edata = malloc(len); - if (!edata) { + len = be16toh(hdr.length) - sizeof(hdr); + netw_edata = (struct acm_ep_config_data *)malloc(len); + host_edata = (struct acm_ep_config_data *)malloc(len); + if (!netw_edata || !host_edata) { ret = ACM_STATUS_ENOMEM; goto out; } - memcpy(edata, &msg.ep_data[0], len); - edata->dev_guid = be64toh(msg.ep_data[0].dev_guid); - edata->pkey = be16toh(msg.ep_data[0].pkey); - edata->addr_cnt = cnt; - *data = edata; + ret = recv(sock, (char *)netw_edata, len, 0); + if (ret != len) { + ret = ACM_STATUS_EINVAL; + goto out; + } + + host_edata->dev_guid = be64toh(netw_edata->dev_guid); + host_edata->port_num = netw_edata->port_num; + host_edata->pkey = be16toh(netw_edata->pkey); + host_edata->addr_cnt = be16toh(netw_edata->addr_cnt); + + memcpy(host_edata->prov_name, netw_edata->prov_name, + sizeof(host_edata->prov_name)); + + for (i = 0; i < host_edata->addr_cnt; ++i) + host_edata->addrs[i] = netw_edata->addrs[i]; + + *data = host_edata; ret = 0; out: + if (ret) + free(host_edata); + free(netw_edata); + pthread_mutex_unlock(&acm_lock); return ret; } From patchwork Fri Nov 23 15:40:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Haakon Bugge X-Patchwork-Id: 10696105 X-Patchwork-Delegate: leon@leon.nu Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7ADFE16B1 for ; Fri, 23 Nov 2018 15:40:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A7C42BC9D for ; Fri, 23 Nov 2018 15:40:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E88A2C06D; Fri, 23 Nov 2018 15:40:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 219822BC9D for ; Fri, 23 Nov 2018 15:40:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2440286AbeKXCZU (ORCPT ); Fri, 23 Nov 2018 21:25:20 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:36258 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436679AbeKXCZU (ORCPT ); Fri, 23 Nov 2018 21:25:20 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wANFOZB0171832; Fri, 23 Nov 2018 15:40:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=0HpIiftItMgjRGAmfe+yqWoguSPNCqR1zaFFSHUMjzk=; b=UTIVfAzjwKM81rS1i5B/5x2bhxV0NDvqAv1nuDoG6M89jpQ6J5t/NtpmSii2g/WkstPP l8nVaHnb7WWlKyBD/FZoKtmVXR2QbbR4X3vj481nz3o7AWlS+4GUiDlL8hw8Q9CFjLaD Agh9sVq0vG9sJzit7a2J8qhsgbxE0an9cH32J7nmOAW38IipWy8UzYAb7PIv/g6HzOrH BElICd54Cnx/yewnje5XGzTH7h/nAdHr9Kkf22qwxGxlefzxfaI2ATbMSVOdWC2vom6O m++/WNSiIndRLGqoEADLV20e9ngMGIcHZ5U4OxPVH6s/jzuvhbwFQYCYm8NpQ7VbgM20 CA== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2ntbmr3b4h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Nov 2018 15:40:31 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wANFeUDh000860 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Nov 2018 15:40:30 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wANFeUcH030935; Fri, 23 Nov 2018 15:40:30 GMT Received: from lab02.no.oracle.com (/10.172.144.56) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 23 Nov 2018 07:40:30 -0800 From: =?utf-8?q?H=C3=A5kon_Bugge?= To: Sean Hefty , Hal Rosenstock Cc: Doug Ledford , Leon Romanovsky , Jason Gunthorpe , linux-rdma@vger.kernel.org Subject: [PATCH ibacm 2/4] ibacm: Allocate end-point addresses dynamically in provider - v2 Date: Fri, 23 Nov 2018 16:40:15 +0100 Message-Id: <32c3841ec2229e225d00e1915f4c3743f3aac1a1.1542987254.git.Haakon.Bugge@oracle.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9085 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811230128 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ibacm's default provider has a fixed number (4) of end-point addresses. An endpoint is associated with the node GUID. Hence, if a system is brought up with VFs enabled, the default provider will not be able to handle the end-point addresses. acmp uses the address of a particular addr_info entry in struct acmp_ep as its addr_context, stored ibacm's data structures. However, since these addresses now may change, due to realloc(), we change the addr_context to a small struct containing a pointer to the end-point and an addr_inx. This way, we can safely get the correct address of a realloc'd addr_info entry. Signed-off-by: Håkon Bugge --- ibacm/prov/acmp/src/acmp.c | 49 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/ibacm/prov/acmp/src/acmp.c b/ibacm/prov/acmp/src/acmp.c index f63f1dbf..15316573 100644 --- a/ibacm/prov/acmp/src/acmp.c +++ b/ibacm/prov/acmp/src/acmp.c @@ -68,7 +68,6 @@ #define IB_LID_MCAST_START 0xc000 -#define MAX_EP_ADDR 4 #define MAX_EP_MC 2 enum acmp_state { @@ -170,6 +169,11 @@ struct acmp_addr { struct acmp_ep *ep; }; +struct acmp_addr_ctx { + struct acmp_ep *ep; + int addr_inx; +}; + struct acmp_ep { struct acmp_port *port; struct ibv_cq *cq; @@ -190,7 +194,8 @@ struct acmp_ep { struct list_head active_queue; struct list_head wait_queue; enum acmp_state state; - struct acmp_addr addr_info[MAX_EP_ADDR]; + int nmbr_ep_addrs; + struct acmp_addr *addr_info; atomic_t counters[ACM_MAX_COUNTER]; }; @@ -1046,7 +1051,7 @@ acmp_addr_lookup(struct acmp_ep *ep, uint8_t *addr, uint16_t type) { int i; - for (i = 0; i < MAX_EP_ADDR; i++) { + for (i = 0; i < ep->nmbr_ep_addrs; i++) { if (ep->addr_info[i].type != type) continue; @@ -1602,7 +1607,8 @@ acmp_query(void *addr_context, struct acm_msg *msg, uint64_t id) { struct acmp_request *req; struct ib_sa_mad *mad; - struct acmp_addr *address = addr_context; + struct acmp_addr_ctx *addr_ctx = addr_context; + struct acmp_addr *address = addr_ctx->ep->addr_info + addr_ctx->addr_inx; struct acmp_ep *ep = address->ep; uint8_t status; struct acm_sa_mad *sa_mad; @@ -1944,7 +1950,8 @@ put: static int acmp_resolve(void *addr_context, struct acm_msg *msg, uint64_t id) { - struct acmp_addr *address = addr_context; + struct acmp_addr_ctx *addr_ctx = addr_context; + struct acmp_addr *address = addr_ctx->ep->addr_info + addr_ctx->addr_inx; struct acmp_ep *ep = address->ep; if (ep->state != ACMP_READY) { @@ -2365,25 +2372,41 @@ static int acmp_add_addr(const struct acm_address *addr, void *ep_context, { struct acmp_ep *ep = ep_context; struct acmp_dest *dest; + struct acmp_addr_ctx *addr_ctx; int i; acm_log(2, "\n"); - for (i = 0; (i < MAX_EP_ADDR) && + for (i = 0; (i < ep->nmbr_ep_addrs) && (ep->addr_info[i].type != ACM_ADDRESS_INVALID); i++) ; - if (i == MAX_EP_ADDR) { - acm_log(0, "ERROR - no more space for local address\n"); - return -1; + if (i == ep->nmbr_ep_addrs) { + ++ep->nmbr_ep_addrs; + ep->addr_info = realloc(ep->addr_info, ep->nmbr_ep_addrs * sizeof(*ep->addr_info)); + if (!ep->addr_info) { + --ep->nmbr_ep_addrs; + acm_log(0, "ERROR - no more space for local address\n"); + return -1; + } + /* Added memory is not initialized */ + memset(ep->addr_info + i, 0, sizeof(*ep->addr_info)); } ep->addr_info[i].type = addr->type; memcpy(&ep->addr_info[i].info, &addr->info, sizeof(addr->info)); memcpy(&ep->addr_info[i].addr, addr, sizeof(*addr)); ep->addr_info[i].ep = ep; + addr_ctx = malloc(sizeof(*addr_ctx)); + if (!addr_ctx) { + acm_log(0, "ERROR - unable to alloc address context struct\n"); + return -1; + } + addr_ctx->ep = ep; + addr_ctx->addr_inx = i; + if (loopback_prot != ACMP_LOOPBACK_PROT_LOCAL) { - *addr_context = &ep->addr_info[i]; + *addr_context = addr_ctx; return 0; } @@ -2408,7 +2431,7 @@ static int acmp_add_addr(const struct acm_address *addr, void *ep_context, dest->route_timeout = (uint64_t) ~0ULL; dest->state = ACMP_READY; acmp_put_dest(dest); - *addr_context = &ep->addr_info[i]; + *addr_context = addr_ctx; acm_log(1, "added loopback dest %s\n", dest->name); return 0; @@ -2416,7 +2439,8 @@ static int acmp_add_addr(const struct acm_address *addr, void *ep_context, static void acmp_remove_addr(void *addr_context) { - struct acmp_addr *address = addr_context; + struct acmp_addr_ctx *addr_ctx = addr_context; + struct acmp_addr *address = addr_ctx->ep->addr_info + addr_ctx->addr_inx; struct acmp_device *dev; struct acmp_dest *dest; struct acmp_ep *ep; @@ -2455,6 +2479,7 @@ static void acmp_remove_addr(void *addr_context) pthread_mutex_unlock(&acmp_dev_lock); memset(address, 0, sizeof(*address)); + free(addr_ctx); } static struct acmp_port *acmp_get_port(struct acm_endpoint *endpoint) From patchwork Fri Nov 23 15:40:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Haakon Bugge X-Patchwork-Id: 10696111 X-Patchwork-Delegate: leon@leon.nu Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 613225A4 for ; Fri, 23 Nov 2018 15:40:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5003A2BC9D for ; Fri, 23 Nov 2018 15:40:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44A1E2BEA1; Fri, 23 Nov 2018 15:40:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C50F32BC9D for ; Fri, 23 Nov 2018 15:40:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2440272AbeKXCZ0 (ORCPT ); Fri, 23 Nov 2018 21:25:26 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:32934 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440273AbeKXCZ0 (ORCPT ); Fri, 23 Nov 2018 21:25:26 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wANFP680016927; Fri, 23 Nov 2018 15:40:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=CJ0u+2tL45c0j8scc63LF27vQn//AWtwOX4wiOx9O7o=; b=BOQo8ahdk5mL6stBRSaDuZCWi8bJ5znhzkU9fid0kJVo7VX6A0mKgbKNn0UrK85k0wRY UQz7MCljjZwGNNwChnGpDUaDYzOznBjD1ZWVGH7H0gYT752hzh7MXyMF6CFlwTzJVVxq ggRDAHSjhNsSU+Zhy0Y1un2DCd5QAEvSaGp06VZYzWPPPZuNVqzdE9s8OWLGciS2vTpM RciJV/tHrd3Z4eWR54mLPg3alBmY7PyKoycTB5CYDg1fpk52eGlf+ILLTciYwbr9syw/ wqB5bfVq8mC/9iMg63jzR1rlcmVvSKNw6dQpdA1XXX9bdbfYHuj+//RfMG2ObKIcqSj3 AQ== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2ntadubeqd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Nov 2018 15:40:38 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wANFeW6p000914 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Nov 2018 15:40:32 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wANFeW7Z024415; Fri, 23 Nov 2018 15:40:32 GMT Received: from lab02.no.oracle.com (/10.172.144.56) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 23 Nov 2018 07:40:32 -0800 From: =?utf-8?q?H=C3=A5kon_Bugge?= To: Sean Hefty , Hal Rosenstock Cc: Doug Ledford , Leon Romanovsky , Jason Gunthorpe , linux-rdma@vger.kernel.org Subject: [PATCH ibacm 3/4] ibacm: Remove trailing blanks Date: Fri, 23 Nov 2018 16:40:16 +0100 Message-Id: X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9085 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811230128 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Håkon Bugge --- ibacm/man/ibacm.1 | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ibacm/man/ibacm.1 b/ibacm/man/ibacm.1 index 733dc64d..f3901e71 100644 --- a/ibacm/man/ibacm.1 +++ b/ibacm/man/ibacm.1 @@ -16,7 +16,7 @@ needed to establish a connection, but does not implement the CM protocol. .P A primary user of the ibacm service is the librdmacm library. This enables applications to make use of the ibacm service without code -changes or needing to be aware that the service is in use. +changes or needing to be aware that the service is in use. librdmacm versions 1.0.12 - 1.0.15 can invoke IB ACM services when built using the --with-ib_acm option. Version 1.0.16 and newer of librdmacm will automatically use the IB ACM if it is installed. The IB ACM services tie in under the @@ -26,7 +26,7 @@ however existing applications should still see significant connection scaling benefits using the calls available in librdmacm 1.0.11 and previous releases. .P -The IB ACM is focused on being scalable, efficient, and extensible. It implements +The IB ACM is focused on being scalable, efficient, and extensible. It implements a plugin architecture that allows a vendor to supply its proprietary provider in addition to the default provider. The current default provider implementation ibacmp limits network traffic, SA interactions, and centralized @@ -34,8 +34,8 @@ services. Ibacmp supports multiple resolution protocols in order to handle different fabric topologies. .P The IB ACM package is comprised of three components: the ibacm core service, -the default provider ibacmp shared library, and a test/configuration utility -- ib_acme. All three are userspace components and are available for Linux. +the default provider ibacmp shared library, and a test/configuration utility +- ib_acme. All three are userspace components and are available for Linux. Additional details are given below. .SH "OPTIONS" .TP @@ -90,15 +90,15 @@ The ibacm service relies on two configuration files. .P The ibacm_addr.cfg file contains name and address mappings for each IB endpoint. Although the names in the ibacm_addr.cfg -file can be anything, ib_acme maps the host name to the IB endpoints. IP -addresses, on the other hand, are assigned dynamically. If the address file -cannot be found, the ibacm service will attempt to create one using default +file can be anything, ib_acme maps the host name to the IB endpoints. IP +addresses, on the other hand, are assigned dynamically. If the address file +cannot be found, the ibacm service will attempt to create one using default values. .P The ibacm_opts.cfg file provides a set of configurable options for the ibacm core service and default provider, such as timeout, number of retries, -logging level, etc. ib_acme generates the ibacm_opts.cfg file using static -information. If an option file cannot be found, ibacm will use default values. +logging level, etc. ib_acme generates the ibacm_opts.cfg file using static +information. If an option file cannot be found, ibacm will use default values. .P ibacm: .P @@ -131,8 +131,8 @@ and destination names or addresses as input to the service, and receive as output path record data. .P The service maps a client's source name/address to a local IB endpoint. -If the destination name/address is not cached locally in the default provider, -it sends a multicast request out on the lowest priority multicast group on the +If the destination name/address is not cached locally in the default provider, +it sends a multicast request out on the lowest priority multicast group on the local endpoint. The request carries a list of multicast groups that the sender can use. The recipient of the request selects the highest priority multicast group that it can use as well and returns that information directly to the sender. From patchwork Fri Nov 23 15:40:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Haakon Bugge X-Patchwork-Id: 10696109 X-Patchwork-Delegate: leon@leon.nu Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9A7C616B1 for ; Fri, 23 Nov 2018 15:40:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88C852BC9D for ; Fri, 23 Nov 2018 15:40:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A5442BEA1; Fri, 23 Nov 2018 15:40:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07DB12BC9D for ; Fri, 23 Nov 2018 15:40:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2440289AbeKXCZX (ORCPT ); Fri, 23 Nov 2018 21:25:23 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:32888 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440273AbeKXCZX (ORCPT ); Fri, 23 Nov 2018 21:25:23 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wANFON1e016452; Fri, 23 Nov 2018 15:40:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=u/1C+0gV17tH7cwFvurJHmJceBFuJUTB+LriTjFxNYs=; b=NLcp7EJ7y/qleMMeatsLPQMBzIokzwV+LFAgEYRQNUzUarv5oZjgBpAjmX1CfvbVbp0k DFRkMRpugcZqH1CBV2z4T36MIpyyoiaOzsLwU/cc2jJf8zZ57nByeURiKnXmuLoxrOl8 V1ZbqPVjUTkDStyyb+KGQS8BpkuqTFQr1Nqg2jEAByJ8wiIsk7j79slJSKCScX581QU/ MfgeIKFf0mQebkQMbzu3ADWnH62wOsZrW6N4yasUlwP1nxzSkCF43JytnaRm2CF2yNXX 54aEb0YdBPcc1jyxUdKH4T5MGfCkTMGDwFv5dLceWX8OMQX0NF/i+rnS4iKfn+sij0an sg== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2ntadubeq5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Nov 2018 15:40:34 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wANFeYWs021614 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Nov 2018 15:40:34 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wANFeYi4031000; Fri, 23 Nov 2018 15:40:34 GMT Received: from lab02.no.oracle.com (/10.172.144.56) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 23 Nov 2018 07:40:33 -0800 From: =?utf-8?q?H=C3=A5kon_Bugge?= To: Sean Hefty , Hal Rosenstock Cc: Doug Ledford , Leon Romanovsky , Jason Gunthorpe , linux-rdma@vger.kernel.org Subject: [PATCH ibacm 4/4] ibacm: Update documentation Date: Fri, 23 Nov 2018 16:40:17 +0100 Message-Id: <4506a6100461a1ec95badff7b580637f9acf48e1.1542987254.git.Haakon.Bugge@oracle.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9085 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=724 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811230128 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Håkon Bugge ibacm now supports an arbitrary number of addresses per endpoint. Also, removed the limitation that the caches doesn't time out. Signed-off-by: Håkon Bugge --- ibacm/man/ibacm.1 | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ibacm/man/ibacm.1 b/ibacm/man/ibacm.1 index f3901e71..3b94f1e3 100644 --- a/ibacm/man/ibacm.1 +++ b/ibacm/man/ibacm.1 @@ -146,14 +146,8 @@ The current implementation of the provider ibacmp has several additional restric - The ibacmp is limited in its handling of dynamic changes. ibacm must be stopped and restarted if a cluster is reconfigured. .P -- Cached data does not timed out and is only updated if a new resolution -request is received from a different QPN than a cached request. -.P - Support for IPv6 has not been verified. .P -- The number of addresses that can be assigned to a single endpoint is -limited to 4. -.P - The number of multicast groups that an endpoint can support is limited to 2. .P The ibacmp contains several internal caches. These include caches for GID