--- /dev/null
+/*
+ * Copyright (c) 2014 Intel Corporation. All rights reserved.
+ *
+ * This software is available to you under the OpenFabrics.org BSD license
+ * below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AWV
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#if !defined(ACM_PROV_H)
+#define ACM_PROV_H
+
+#include <infiniband/acm.h>
+
+struct acm_endpoint {
+ void *prov_context;
+ uint64_t dev_guid;
+ uint8_t port_num;
+ uint16_t pkey;
+};
+
+#endif /* ACM_PROV_H */
#include <sys/time.h>
#include <fcntl.h>
#include <infiniband/acm.h>
+#include <infiniband/acm_prov.h>
#include <infiniband/umad.h>
#include <infiniband/verbs.h>
#include <dlist.h>
struct acm_dest mc_dest[MAX_EP_MC];
int mc_cnt;
uint16_t pkey_index;
- uint16_t pkey;
+ uint16_t pkey;
+ struct acm_endpoint endpoint;
lock_t lock;
struct acm_send_queue resolve_queue;
struct acm_send_queue sa_queue;
}
if (!stricmp(dev_name, dev) && (ep->port->port_num == (uint8_t) port) &&
- (ep->pkey == pkey)) {
+ (ep->pkey == pkey)) {
acm_log(1, "assigning %s\n", addr);
if ((ret = acm_ep_insert_addr(ep, (uint8_t *)&ip_addr, addr_len, type)) != 0) {
sprintf(ep->id_string, "%s-%d-0x%x", port->dev->verbs->device->name,
port->port_num, pkey);
+ ep->endpoint.dev_guid = port->dev->guid;
+ ep->endpoint.port_num = port->port_num;
+ ep->endpoint.pkey = pkey;
+
return ep;
}