Version: 1
-Previous: 257a9c977a4d1758deabfe73fabc23a2f6bd4b49
-Head: 5a3d5f9abb7d045c6de5409428bbeec552ca438f
+Previous: 0b44c563a06d21f1758fd95c799d323839f9e43f
+Head: 56b48d895e0e9077a5066069e227e53ad34e05e0
Applied:
- ex-ib: b1c807086340df1f91b296812d1e7f5cc77b228c
- refresh-temp: 5a3d5f9abb7d045c6de5409428bbeec552ca438f
+ ex-ib: 56b48d895e0e9077a5066069e227e53ad34e05e0
Unapplied:
afib: ea79ee5d40967c071a420e282c15a198a434de51
seterr: 47eb0c419687c2690292c1910acae83a46e5388c
Bottom: fdd78452d7e02d706c88b4821b9ff48bc33218cb
-Top: fdd78452d7e02d706c88b4821b9ff48bc33218cb
+Top: dea28249bab2900df7671c13af22955206666c9e
Author: Sean Hefty <sean.hefty@intel.com>
Date: 2013-05-23 17:49:57 -0700
-examples: Support GID addresses
+cmatose: Support GID addresses
-Allow a user to specify a GID address as input to the example
-programs. This allows the examples to use native IB addresses
-via AF_IB support.
+Allow a user to specify a GID address as input into cmatose.
+This allows the use of native IB addresses via AF_IB support.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
---
-
+diff --git a/examples/cmatose.c b/examples/cmatose.c
+index 2b6b2b1..ca92f11 100644
+--- a/examples/cmatose.c
++++ b/examples/cmatose.c
+@@ -81,6 +81,7 @@ static uint8_t tos;
+ static uint8_t migrate = 0;
+ static char *dst_addr;
+ static char *src_addr;
++static char addr_type = 'u';
+
+ static int create_message(struct cmatest_node *node)
+ {
+@@ -508,7 +509,11 @@ static int run_server(void)
+ }
+
+ memset(&hints, 0, sizeof hints);
+- hints.ai_flags = RAI_PASSIVE;
++ if (addr_type == 'g') {
++ hints.ai_flags = RAI_FAMILY;
++ hints.ai_family = AF_IB;
++ }
++ hints.ai_flags |= RAI_PASSIVE;
+ hints.ai_port_space = RDMA_PS_TCP;
+ ret = get_rdma_addr(src_addr, dst_addr, port, &hints, &test.rai);
+ if (ret) {
+@@ -585,6 +590,10 @@ static int run_client(void)
+ printf("cmatose: starting client\n");
+
+ memset(&hints, 0, sizeof hints);
++ if (addr_type == 'g') {
++ hints.ai_flags = RAI_FAMILY;
++ hints.ai_family = AF_IB;
++ }
+ hints.ai_port_space = RDMA_PS_TCP;
+ ret = get_rdma_addr(src_addr, dst_addr, port, &hints, &test.rai);
+ if (ret) {
+@@ -679,6 +688,8 @@ int main(int argc, char **argv)
+ printf("\t[-t type_of_service]\n");
+ printf("\t[-p port_number]\n");
+ printf("\t[-m(igrate)]\n");
++ printf("\t[-f addr_format] - i(p), n(ame), l(id), g(gid), or u(nspecified)\n");
++ printf("\t address format for -s and -b options, default: 'u'\n");
+ exit(1);
+ }
+ }
+++ /dev/null
-Bottom: fdd78452d7e02d706c88b4821b9ff48bc33218cb
-Top: dea28249bab2900df7671c13af22955206666c9e
-Author: Sean Hefty <sean.hefty@intel.com>
-Date: 2013-05-23 18:08:07 -0700
-
-Refresh of ex-ib
-
----
-
-diff --git a/examples/cmatose.c b/examples/cmatose.c
-index 2b6b2b1..ca92f11 100644
---- a/examples/cmatose.c
-+++ b/examples/cmatose.c
-@@ -81,6 +81,7 @@ static uint8_t tos;
- static uint8_t migrate = 0;
- static char *dst_addr;
- static char *src_addr;
-+static char addr_type = 'u';
-
- static int create_message(struct cmatest_node *node)
- {
-@@ -508,7 +509,11 @@ static int run_server(void)
- }
-
- memset(&hints, 0, sizeof hints);
-- hints.ai_flags = RAI_PASSIVE;
-+ if (addr_type == 'g') {
-+ hints.ai_flags = RAI_FAMILY;
-+ hints.ai_family = AF_IB;
-+ }
-+ hints.ai_flags |= RAI_PASSIVE;
- hints.ai_port_space = RDMA_PS_TCP;
- ret = get_rdma_addr(src_addr, dst_addr, port, &hints, &test.rai);
- if (ret) {
-@@ -585,6 +590,10 @@ static int run_client(void)
- printf("cmatose: starting client\n");
-
- memset(&hints, 0, sizeof hints);
-+ if (addr_type == 'g') {
-+ hints.ai_flags = RAI_FAMILY;
-+ hints.ai_family = AF_IB;
-+ }
- hints.ai_port_space = RDMA_PS_TCP;
- ret = get_rdma_addr(src_addr, dst_addr, port, &hints, &test.rai);
- if (ret) {
-@@ -679,6 +688,8 @@ int main(int argc, char **argv)
- printf("\t[-t type_of_service]\n");
- printf("\t[-p port_number]\n");
- printf("\t[-m(igrate)]\n");
-+ printf("\t[-f addr_format] - i(p), n(ame), l(id), g(gid), or u(nspecified)\n");
-+ printf("\t address format for -s and -b options, default: 'u'\n");
- exit(1);
- }
- }