From: Sean Hefty Date: Sat, 22 Sep 2012 00:11:08 +0000 (-0700) Subject: refresh (create temporary patch) X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=814bd50409e11ae89bae93959de624911aec6b83;p=~shefty%2Flibrdmacm.git refresh (create temporary patch) --- diff --git a/meta b/meta index c33fb7fa..9cb0d9e0 100644 --- a/meta +++ b/meta @@ -1,8 +1,9 @@ Version: 1 -Previous: aac6101116bb6f52e4ad32728b362f63b6abbe5c -Head: 57095fc6d60e6e1605bb38575884c3f1946846f8 +Previous: 55b36bdadb39de044156cbd7dcd87af6a179684f +Head: beca4aa89e9a3d54e7bccc6bea2dddf66d6b97c5 Applied: af-ib-conn: 57095fc6d60e6e1605bb38575884c3f1946846f8 + refresh-temp: beca4aa89e9a3d54e7bccc6bea2dddf66d6b97c5 Unapplied: addrtype: 066c2615bf5399848088a9771093a76c5e205bf1 dbg-fork: 5679a32af8305db3c0406f9abb961259304a384a diff --git a/patches/refresh-temp b/patches/refresh-temp new file mode 100644 index 00000000..5a996df9 --- /dev/null +++ b/patches/refresh-temp @@ -0,0 +1,99 @@ +Bottom: 2eca3cd3b24997915efff050cef4f004a68a9b56 +Top: 70740cf339f3221216acd355b9e423de6dd18b8b +Author: Sean Hefty +Date: 2012-09-21 17:11:08 -0700 + +Refresh of af-ib-conn + +--- + +diff --git a/include/rdma/rdma_cma.h b/include/rdma/rdma_cma.h +index 4c4a057..70f7f6b 100755 +--- a/include/rdma/rdma_cma.h ++++ b/include/rdma/rdma_cma.h +@@ -38,6 +38,7 @@ + #include + #include + #include ++#include + + #ifdef __cplusplus + extern "C" { +@@ -96,12 +97,14 @@ struct rdma_addr { + struct sockaddr src_addr; + struct sockaddr_in src_sin; + struct sockaddr_in6 src_sin6; ++ struct sockaddr_ib src_ib; + struct sockaddr_storage src_storage; + }; + union { + struct sockaddr dst_addr; + struct sockaddr_in dst_sin; + struct sockaddr_in6 dst_sin6; ++ struct sockaddr_ib dst_ib; + struct sockaddr_storage dst_storage; + }; + union { +diff --git a/src/acm.c b/src/acm.c +index eec5826..4b17043 100755 +--- a/src/acm.c ++++ b/src/acm.c +@@ -64,18 +64,6 @@ static pthread_mutex_t acm_lock = PTHREAD_MUTEX_INITIALIZER; + static int sock = -1; + static short server_port = 6125; + +-struct ib_connect_hdr { +- uint8_t cma_version; +- uint8_t ip_version; /* IP version: 7:4 */ +- uint16_t port; +- uint32_t src_addr[4]; +- uint32_t dst_addr[4]; +-#define cma_src_ip4 src_addr[3] +-#define cma_src_ip6 src_addr[0] +-#define cma_dst_ip4 dst_addr[3] +-#define cma_dst_ip6 dst_addr[0] +-}; +- + static void ucma_set_server_port(void) + { + FILE *f; +diff --git a/src/cma.c b/src/cma.c +index d168df6..bd18993 100755 +--- a/src/cma.c ++++ b/src/cma.c +@@ -1288,6 +1288,12 @@ static void ucma_copy_conn_param_to_kern(struct cma_id_private *id_priv, + if (id_priv->connect_len) { + memcpy(dst->private_data, id_priv->connect, id_priv->connect_len); + dst->private_data_len = id_priv->connect_len; ++ } else if (id_priv->id.route.addr.src_addr.sa_family == AF_IB) { ++ struct ib_connect_hdr *hdr = (struct ib_connect_hdr *) dst->private_data; ++ hdr->ip_version = 6 << 4; ++ memcpy(&hdr->cma_src_ip6, &id_priv->id.route.addr.src_ib.sib_addr, 16); ++ memcpy(&hdr->cma_dst_ip6, &id_priv->id.route.addr.dst_ib.sib_addr, 16); ++ dst->private_data_len = sizeof(*hdr); + } + + if (src) { +diff --git a/src/cma.h b/src/cma.h +index 6a1cd75..5a38679 100644 +--- a/src/cma.h ++++ b/src/cma.h +@@ -162,6 +162,18 @@ void ucma_ib_resolve(struct rdma_addrinfo **rai, struct rdma_addrinfo *hints); + #define ucma_ib_resolve(x, y) + #endif + ++struct ib_connect_hdr { ++ uint8_t cma_version; ++ uint8_t ip_version; /* IP version: 7:4 */ ++ uint16_t port; ++ uint32_t src_addr[4]; ++ uint32_t dst_addr[4]; ++#define cma_src_ip4 src_addr[3] ++#define cma_src_ip6 src_addr[0] ++#define cma_dst_ip4 dst_addr[3] ++#define cma_dst_ip6 dst_addr[0] ++}; ++ + /* Define path record definition if using older version of libibverbs */ + #ifdef DEFINE_PATH_RECORD + #define IBV_PATH_RECORD_REVERSIBLE 0x80