From: Sean Hefty Date: Mon, 16 Aug 2010 20:57:19 +0000 (-0700) Subject: refresh X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=995d69ac5f581291511983834e06f36e81e83191;p=~shefty%2Frdma-win.git refresh --- diff --git a/meta b/meta index 01ffd11a..f75b008d 100644 --- a/meta +++ b/meta @@ -1,6 +1,6 @@ Version: 1 -Previous: a8da47d446c7ff3e8a0bbe7a42f78467dcbf6585 -Head: aa1cfd2a51c36c98b9eaa4498f8af78aed4e7fa8 +Previous: 3ecfe06a18a9e407c0aa25bf9964b670401c6102 +Head: e9cf209dc778105199ae5d189f750657ca942353 Applied: sync: 452ce3b051e10e10363baa77834962a89267e052 pre-af-ib: 73504ef1f812bea6d1fd59f194f90e5194ca2efa @@ -11,8 +11,7 @@ Applied: gai: 9730577d0bf4f053ec4c96eaa6d894144a75ce58 getreq: 1ef2ab06b60a1192a1b2af253d75e187ecc68381 ep: 47348de149bd19aa0f7d1ee293e5c2157c181c26 - samples: 4e087d88aa125e7ec3005c5068eb653b38e8d016 - refresh-temp: aa1cfd2a51c36c98b9eaa4498f8af78aed4e7fa8 + samples: e9cf209dc778105199ae5d189f750657ca942353 Unapplied: cq-status: d4535a68c8d41302c9ee9d44b98a75ea19b4f172 wv-rm-ioctl: 2c4f8b27f89993bc9c1215e8c358046b2934f755 diff --git a/patches/refresh-temp b/patches/refresh-temp deleted file mode 100644 index a23ae6e2..00000000 --- a/patches/refresh-temp +++ /dev/null @@ -1,275 +0,0 @@ -Bottom: 28d8bb207d0f8506947f38bdbd0f4dfa73bb28b7 -Top: d976191e98895ad330bb596fea1ba14ef7f4332e -Author: Sean Hefty -Date: 2010-08-16 13:57:14 -0700 - -Refresh of samples - ---- - -diff --git a/trunk/ulp/librdmacm/examples/rdma_client/rdma_client.c b/trunk/ulp/librdmacm/examples/rdma_client/rdma_client.c -index 438493d..2e33cf6 100644 ---- a/trunk/ulp/librdmacm/examples/rdma_client/rdma_client.c -+++ b/trunk/ulp/librdmacm/examples/rdma_client/rdma_client.c -@@ -1,32 +1,32 @@ --/* -- * Copyright (c) 2010 Intel Corporation. All rights reserved. -- * -- * This software is available to you under the OpenIB.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. -- */ -- -+/* -+ * Copyright (c) 2010 Intel Corporation. All rights reserved. -+ * -+ * This software is available to you under the OpenIB.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. -+ */ -+ - #include - #include - #include -@@ -34,101 +34,101 @@ - #include "..\..\..\..\etc\user\getopt.c" - #include - #include -- --static char *server = "127.0.0.1"; --static char *port = "7471"; -- --struct rdma_cm_id *id; --struct ibv_mr *mr; --uint8_t send_msg[16]; --uint8_t recv_msg[16]; -- --static int run(void) --{ -- struct rdma_addrinfo hints, *res; -- struct ibv_qp_init_attr attr; -- struct ibv_wc wc; -- int ret; -- -- memset(&hints, 0, sizeof hints); -- hints.ai_port_space = RDMA_PS_TCP; -- ret = rdma_getaddrinfo(server, port, &hints, &res); -- if (ret) { -- printf("rdma_getaddrinfo %d\n", errno); -- return ret; -- } -- -- memset(&attr, 0, sizeof attr); -- attr.cap.max_send_wr = attr.cap.max_recv_wr = 1; -- attr.cap.max_send_sge = attr.cap.max_recv_sge = 1; -- attr.cap.max_inline_data = 16; -- attr.qp_context = id; -- attr.sq_sig_all = 1; -- ret = rdma_create_ep(&id, res, NULL, &attr); -- rdma_freeaddrinfo(res); -- if (ret) { -- printf("rdma_create_ep %d\n", errno); -- return ret; -- } -- -- mr = rdma_reg_msgs(id, recv_msg, 16); -- if (!mr) { -- printf("rdma_reg_msgs %d\n", errno); -- return ret; -- } -- -- ret = rdma_post_recv(id, NULL, recv_msg, 16, mr); -- if (ret) { -- printf("rdma_post_recv %d\n", errno); -- return ret; -- } -- -- ret = rdma_connect(id, NULL); -- if (ret) { -- printf("rdma_connect %d\n", errno); -- return ret; -- } -- -- ret = rdma_post_send(id, NULL, send_msg, 16, NULL, IBV_SEND_INLINE); -- if (ret) { -- printf("rdma_post_send %d\n", errno); -- return ret; -- } -- -- ret = rdma_get_recv_comp(id, &wc); -- if (ret <= 0) { -- printf("rdma_get_recv_comp %d\n", ret); -- return ret; -- } -- -- rdma_disconnect(id); -- rdma_dereg_mr(mr); -- rdma_destroy_ep(id); -- return 0; --} -- --int main(int argc, char **argv) --{ -- int op, ret; -- -- while ((op = getopt(argc, argv, "s:p:")) != -1) { -- switch (op) { -- case 's': -- server = optarg; -- break; -- case 'p': -- port = optarg; -- break; -- default: -- printf("usage: %s\n", argv[0]); -- printf("\t[-s server_address]\n"); -- printf("\t[-p port_number]\n"); -- exit(1); -- } -- } -- -- printf("rdma_client: start\n"); -- ret = run(); -- printf("rdma_client: end %d\n", ret); -- return ret; --} -+ -+static char *server = "127.0.0.1"; -+static char *port = "7471"; -+ -+struct rdma_cm_id *id; -+struct ibv_mr *mr; -+uint8_t send_msg[16]; -+uint8_t recv_msg[16]; -+ -+static int run(void) -+{ -+ struct rdma_addrinfo hints, *res; -+ struct ibv_qp_init_attr attr; -+ struct ibv_wc wc; -+ int ret; -+ -+ memset(&hints, 0, sizeof hints); -+ hints.ai_port_space = RDMA_PS_TCP; -+ ret = rdma_getaddrinfo(server, port, &hints, &res); -+ if (ret) { -+ printf("rdma_getaddrinfo %d\n", errno); -+ return ret; -+ } -+ -+ memset(&attr, 0, sizeof attr); -+ attr.cap.max_send_wr = attr.cap.max_recv_wr = 1; -+ attr.cap.max_send_sge = attr.cap.max_recv_sge = 1; -+ attr.cap.max_inline_data = 16; -+ attr.qp_context = id; -+ attr.sq_sig_all = 1; -+ ret = rdma_create_ep(&id, res, NULL, &attr); -+ rdma_freeaddrinfo(res); -+ if (ret) { -+ printf("rdma_create_ep %d\n", errno); -+ return ret; -+ } -+ -+ mr = rdma_reg_msgs(id, recv_msg, 16); -+ if (!mr) { -+ printf("rdma_reg_msgs %d\n", errno); -+ return ret; -+ } -+ -+ ret = rdma_post_recv(id, NULL, recv_msg, 16, mr); -+ if (ret) { -+ printf("rdma_post_recv %d\n", errno); -+ return ret; -+ } -+ -+ ret = rdma_connect(id, NULL); -+ if (ret) { -+ printf("rdma_connect %d\n", errno); -+ return ret; -+ } -+ -+ ret = rdma_post_send(id, NULL, send_msg, 16, NULL, IBV_SEND_INLINE); -+ if (ret) { -+ printf("rdma_post_send %d\n", errno); -+ return ret; -+ } -+ -+ ret = rdma_get_recv_comp(id, &wc); -+ if (ret <= 0) { -+ printf("rdma_get_recv_comp %d\n", ret); -+ return ret; -+ } -+ -+ rdma_disconnect(id); -+ rdma_dereg_mr(mr); -+ rdma_destroy_ep(id); -+ return 0; -+} -+ -+int main(int argc, char **argv) -+{ -+ int op, ret; -+ -+ while ((op = getopt(argc, argv, "s:p:")) != -1) { -+ switch (op) { -+ case 's': -+ server = optarg; -+ break; -+ case 'p': -+ port = optarg; -+ break; -+ default: -+ printf("usage: %s\n", argv[0]); -+ printf("\t[-s server_address]\n"); -+ printf("\t[-p port_number]\n"); -+ exit(1); -+ } -+ } -+ -+ printf("rdma_client: start\n"); -+ ret = run(); -+ printf("rdma_client: end %d\n", ret); -+ return ret; -+} diff --git a/patches/samples b/patches/samples index dce29145..dd6bb19e 100644 --- a/patches/samples +++ b/patches/samples @@ -1,5 +1,5 @@ Bottom: 20a010e4b9995e87e5aa659a2021d1dc6550af60 -Top: 28d8bb207d0f8506947f38bdbd0f4dfa73bb28b7 +Top: d976191e98895ad330bb596fea1ba14ef7f4332e Author: Sean Hefty Date: 2010-08-16 12:05:39 -0700 @@ -67,39 +67,39 @@ index 0000000..a0c0627 +!INCLUDE ..\..\..\..\inc\openib.def diff --git a/trunk/ulp/librdmacm/examples/rdma_client/rdma_client.c b/trunk/ulp/librdmacm/examples/rdma_client/rdma_client.c new file mode 100644 -index 0000000..438493d +index 0000000..2e33cf6 --- /dev/null +++ b/trunk/ulp/librdmacm/examples/rdma_client/rdma_client.c @@ -0,0 +1,134 @@ -+/* -+ * Copyright (c) 2010 Intel Corporation. All rights reserved. -+ * -+ * This software is available to you under the OpenIB.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. -+ */ -+ ++/* ++ * Copyright (c) 2010 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the OpenIB.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. ++ */ ++ +#include +#include +#include @@ -107,104 +107,104 @@ index 0000000..438493d +#include "..\..\..\..\etc\user\getopt.c" +#include +#include -+ -+static char *server = "127.0.0.1"; -+static char *port = "7471"; -+ -+struct rdma_cm_id *id; -+struct ibv_mr *mr; -+uint8_t send_msg[16]; -+uint8_t recv_msg[16]; -+ -+static int run(void) -+{ -+ struct rdma_addrinfo hints, *res; -+ struct ibv_qp_init_attr attr; -+ struct ibv_wc wc; -+ int ret; -+ -+ memset(&hints, 0, sizeof hints); -+ hints.ai_port_space = RDMA_PS_TCP; -+ ret = rdma_getaddrinfo(server, port, &hints, &res); -+ if (ret) { -+ printf("rdma_getaddrinfo %d\n", errno); -+ return ret; -+ } -+ -+ memset(&attr, 0, sizeof attr); -+ attr.cap.max_send_wr = attr.cap.max_recv_wr = 1; -+ attr.cap.max_send_sge = attr.cap.max_recv_sge = 1; -+ attr.cap.max_inline_data = 16; -+ attr.qp_context = id; -+ attr.sq_sig_all = 1; -+ ret = rdma_create_ep(&id, res, NULL, &attr); -+ rdma_freeaddrinfo(res); -+ if (ret) { -+ printf("rdma_create_ep %d\n", errno); -+ return ret; -+ } -+ -+ mr = rdma_reg_msgs(id, recv_msg, 16); -+ if (!mr) { -+ printf("rdma_reg_msgs %d\n", errno); -+ return ret; -+ } -+ -+ ret = rdma_post_recv(id, NULL, recv_msg, 16, mr); -+ if (ret) { -+ printf("rdma_post_recv %d\n", errno); -+ return ret; -+ } -+ -+ ret = rdma_connect(id, NULL); -+ if (ret) { -+ printf("rdma_connect %d\n", errno); -+ return ret; -+ } -+ -+ ret = rdma_post_send(id, NULL, send_msg, 16, NULL, IBV_SEND_INLINE); -+ if (ret) { -+ printf("rdma_post_send %d\n", errno); -+ return ret; -+ } -+ -+ ret = rdma_get_recv_comp(id, &wc); -+ if (ret <= 0) { -+ printf("rdma_get_recv_comp %d\n", ret); -+ return ret; -+ } -+ -+ rdma_disconnect(id); -+ rdma_dereg_mr(mr); -+ rdma_destroy_ep(id); -+ return 0; -+} -+ -+int main(int argc, char **argv) -+{ -+ int op, ret; -+ -+ while ((op = getopt(argc, argv, "s:p:")) != -1) { -+ switch (op) { -+ case 's': -+ server = optarg; -+ break; -+ case 'p': -+ port = optarg; -+ break; -+ default: -+ printf("usage: %s\n", argv[0]); -+ printf("\t[-s server_address]\n"); -+ printf("\t[-p port_number]\n"); -+ exit(1); -+ } -+ } -+ -+ printf("rdma_client: start\n"); -+ ret = run(); -+ printf("rdma_client: end %d\n", ret); -+ return ret; -+} ++ ++static char *server = "127.0.0.1"; ++static char *port = "7471"; ++ ++struct rdma_cm_id *id; ++struct ibv_mr *mr; ++uint8_t send_msg[16]; ++uint8_t recv_msg[16]; ++ ++static int run(void) ++{ ++ struct rdma_addrinfo hints, *res; ++ struct ibv_qp_init_attr attr; ++ struct ibv_wc wc; ++ int ret; ++ ++ memset(&hints, 0, sizeof hints); ++ hints.ai_port_space = RDMA_PS_TCP; ++ ret = rdma_getaddrinfo(server, port, &hints, &res); ++ if (ret) { ++ printf("rdma_getaddrinfo %d\n", errno); ++ return ret; ++ } ++ ++ memset(&attr, 0, sizeof attr); ++ attr.cap.max_send_wr = attr.cap.max_recv_wr = 1; ++ attr.cap.max_send_sge = attr.cap.max_recv_sge = 1; ++ attr.cap.max_inline_data = 16; ++ attr.qp_context = id; ++ attr.sq_sig_all = 1; ++ ret = rdma_create_ep(&id, res, NULL, &attr); ++ rdma_freeaddrinfo(res); ++ if (ret) { ++ printf("rdma_create_ep %d\n", errno); ++ return ret; ++ } ++ ++ mr = rdma_reg_msgs(id, recv_msg, 16); ++ if (!mr) { ++ printf("rdma_reg_msgs %d\n", errno); ++ return ret; ++ } ++ ++ ret = rdma_post_recv(id, NULL, recv_msg, 16, mr); ++ if (ret) { ++ printf("rdma_post_recv %d\n", errno); ++ return ret; ++ } ++ ++ ret = rdma_connect(id, NULL); ++ if (ret) { ++ printf("rdma_connect %d\n", errno); ++ return ret; ++ } ++ ++ ret = rdma_post_send(id, NULL, send_msg, 16, NULL, IBV_SEND_INLINE); ++ if (ret) { ++ printf("rdma_post_send %d\n", errno); ++ return ret; ++ } ++ ++ ret = rdma_get_recv_comp(id, &wc); ++ if (ret <= 0) { ++ printf("rdma_get_recv_comp %d\n", ret); ++ return ret; ++ } ++ ++ rdma_disconnect(id); ++ rdma_dereg_mr(mr); ++ rdma_destroy_ep(id); ++ return 0; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ while ((op = getopt(argc, argv, "s:p:")) != -1) { ++ switch (op) { ++ case 's': ++ server = optarg; ++ break; ++ case 'p': ++ port = optarg; ++ break; ++ default: ++ printf("usage: %s\n", argv[0]); ++ printf("\t[-s server_address]\n"); ++ printf("\t[-p port_number]\n"); ++ exit(1); ++ } ++ } ++ ++ printf("rdma_client: start\n"); ++ ret = run(); ++ printf("rdma_client: end %d\n", ret); ++ return ret; ++} diff --git a/trunk/ulp/librdmacm/examples/rdma_server/SOURCES b/trunk/ulp/librdmacm/examples/rdma_server/SOURCES new file mode 100644 index 0000000..70396d0