]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
refresh (create temporary patch)
authorSean Hefty <sean.hefty@intel.com>
Tue, 18 Dec 2012 23:54:44 +0000 (15:54 -0800)
committerSean Hefty <sean.hefty@intel.com>
Tue, 18 Dec 2012 23:54:44 +0000 (15:54 -0800)
meta
patches/refresh-temp [new file with mode: 0644]

diff --git a/meta b/meta
index 04b242727a51996d33e0d6fea881edfc3a12cab1..2e12051abf135c0af95ec824e5edacbd10bf15e0 100644 (file)
--- a/meta
+++ b/meta
@@ -1,8 +1,9 @@
 Version: 1
-Previous: b9918fbe6452a80f470274e768eb32f78b2884fd
-Head: e8e442a6b71f4ea1c9d421b4549a8a09790ed9d2
+Previous: 9f2dea55a3bf77479dc1fe93aec6cf09f3a91743
+Head: 89036106565af28d53b3aa502fa63b0d818a6a8e
 Applied:
   dsocket: e8e442a6b71f4ea1c9d421b4549a8a09790ed9d2
+  refresh-temp: 89036106565af28d53b3aa502fa63b0d818a6a8e
 Unapplied:
   udpong: a003dda8e0d2f6ea134932bdd8bf5a5f29b7bfce
   test-udp: f6c78ad2a26f452cf166aff1baa7b76160bd8bf7
diff --git a/patches/refresh-temp b/patches/refresh-temp
new file mode 100644 (file)
index 0000000..1bd5387
--- /dev/null
@@ -0,0 +1,143 @@
+Bottom: c4d4709d52e2de492239ded2a4b74e4ebde0db7a
+Top:    a51fe46dbaa58743e3254a4ef2288b4490ff5d13
+Author: Sean Hefty <sean.hefty@intel.com>
+Date:   2012-12-18 15:54:44 -0800
+
+Refresh of dsocket
+
+---
+
+diff --git a/docs/rsocket b/docs/rsocket
+index 4192450..f453c1b 100644
+--- a/docs/rsocket
++++ b/docs/rsocket
+@@ -220,4 +220,60 @@ A service thread is used to process messages received on the UDP socket.  This
+ thread updates the rsocket lookup tables with the remote QPN and path record
+ data.  The service thread forwards data received on the UDP socket to an
+ rsocket QP.  After the remote QPN and path records have been resolved, datagram
+-communication between two nodes are done over the UD QP.
+\ No newline at end of file
++communication between two nodes are done over the UD QP.
++
++UDP Message Format
++------------------
++Rsockets uses messages exchanged over UDP sockets to resolve remote QP numbers.
++If a user sends a datagram to a remote service and the local rsocket is not
++yet configured to send directly to a remote UD QP, the user data is sent over
++a UDP socket with the following header inserted before the user data. 
++
++struct ds_udp_header {
++      uint32_t          tag;
++      uint8_t           version;
++      uint8_t           op;
++      uint8_t           length;
++      uint8_t           reserved;
++      uint32_t          qpn;  /* lower 8-bits reserved */
++      union {
++              uint32_t  ipv4;
++              uint8_t   ipv6[16];
++      } addr;
++};
++
++Tag - Marker used to help identify that the UDP header is present.
++#define DS_UDP_TAG 0x55555555
++
++Version - IP address version, either 4 or 6
++Op - Indicates message type, used to control the receiver's operation.
++     Valid operations are RS_OP_DATA and RS_OP_CTRL.  Data messages
++     carry user data, while control messages are used to reply with the
++     local QP number.
++Length - Size of the UDP header.
++QPN - UD QP number associated with sender's IP address and port.
++      The sender's address and port is extracted from the received UDP
++      datagram.
++Addr - Target IP address of the sent datagram.
++
++Once the remote QP information has been resolved, data is sent directly
++between UD QPs.  The following header is inserted before any user data that
++is transferred over a UD QP.
++
++struct ds_header {
++      uint8_t              version;
++      uint8_t              length;
++      uint16_t             port;
++      union {
++              uint32_t     ipv4;
++              struct {
++                      uint32_t flowinfo;
++                      uint8_t  addr[16];
++              } ipv6;
++      } addr;
++};
++
++Verion - IP address version
++Length - Size of the header
++Port - Associated source address UDP port
++Addr - Associated source IP address 
+\ No newline at end of file
+diff --git a/src/rsocket.c b/src/rsocket.c
+index 42a28d2..954e42b 100644
+--- a/src/rsocket.c
++++ b/src/rsocket.c
+@@ -405,11 +405,6 @@ static int rs_modify_svcs(struct rsocket *rs, int svcs)
+       ret = rdma_seterrno(msg.status);
+       if (svc_cnt)
+               goto unlock;
+-//    if (ret && !svc_cnt)
+-//            goto join;
+-//
+-//    pthread_mutex_unlock(&mut);
+-//    return ret;
+       pthread_join(svc_id, NULL);
+ closepair:
+@@ -420,29 +415,6 @@ unlock:
+       return ret;
+ }
+-//static void rs_remove_from_svc(struct rsocket *rs)
+-//{
+-//    struct rs_svc_msg msg;
+-//    int ret;
+-//
+-//    pthread_mutex_lock(&mut);
+-//    if (svc_cnt) {
+-//            msg.op = RS_SVC_REMOVE;
+-//            msg.status = EINVAL;
+-//            msg.rs = rs;
+-//            write(svc_sock[0], &msg, sizeof msg);
+-//            read(svc_sock[0], &msg, sizeof msg);
+-//    }
+-//
+-//    if (!svc_cnt) {
+-//            pthread_join(svc_id, NULL);
+-//            close(svc_sock[0]);
+-//            close(svc_sock[1]);
+-//    }
+-//
+-//    pthread_mutex_unlock(&mut);
+-//}
+-
+ static int ds_compare_addr(const void *dst1, const void *dst2)
+ {
+       const struct sockaddr *sa1, *sa2;
+@@ -1982,11 +1954,6 @@ static int ds_get_cq_event(struct rsocket *rs)
+       return ret;
+ }
+-static int rs_have_rdata(struct rsocket *rs);
+-static int ds_can_send(struct rsocket *rs);
+-static int rs_poll_all(struct rsocket *rs);
+-static int ds_all_sends_done(struct rsocket *rs);
+-
+ static int ds_process_cqs(struct rsocket *rs, int nonblock, int (*test)(struct rsocket *rs))
+ {
+       int ret = 0;
+@@ -2833,7 +2800,6 @@ static int rs_poll_arm(struct pollfd *rfds, struct pollfd *fds, nfds_t nfds)
+                               else
+                                       rfds[i].fd = rs->cm_id->channel->fd;
+                       } else {
+-                              printf("%s ready to poll epfd\n", __func__);
+                               rfds[i].fd = rs->epfd;
+                       }
+                       rfds[i].events = POLLIN;