]> git.openfabrics.org - ~shefty/libibverbs.git/commitdiff
Factor out some common code in pingpong examples
authorRoland Dreier <rolandd@cisco.com>
Sat, 21 Jan 2006 00:53:08 +0000 (00:53 +0000)
committerRoland Dreier <rolandd@cisco.com>
Thu, 9 Nov 2006 19:35:58 +0000 (11:35 -0800)
- Create pingpong.c/pingpong.h to hold common code for pingpong examples.
- Add option to set path MTU for connected transport pingpong examples.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
ChangeLog
Makefile.am
examples/pingpong.c [new file with mode: 0644]
examples/pingpong.h [new file with mode: 0644]
examples/rc_pingpong.c
examples/srq_pingpong.c
examples/uc_pingpong.c
examples/ud_pingpong.c

index 94691569be3f53672cf68401ca6b90eaca4f07f4..c5423f5298b9ce00db7f10ceff4b391f4a480c4e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2006-01-20  Roland Dreier  <rdreier@cisco.com>
+
+       * examples/rc_pingpong.c, examples/uc_pingpong.c,
+       examples/srq_pingpong.c: Add "-m/--mtu=" option to set path MTU.
+       (Based on a patch from Ralph Campbell <ralphc@pathscale.com>)
+
+       * examples/pingpong.c, examples/pingpong.h: Create generic
+       pingpong files so that we can start factoring out common code from
+       the pingpong examples.  Start with functions to convert MTU to an
+       IBV enum value.
+
 2006-01-17  Ralph Campbell  <ralphc@pathscale.com>
 
        * examples/rc_pingpong.c (main), examples/srq_pingpong.c (main),
index 0f8121ffe8b630046fa156a869eb5e07deb6d11a..e038d8db7667135d7fb6cccbaa93341abd100327 100644 (file)
@@ -27,13 +27,13 @@ examples_ibv_devices_SOURCES = examples/device_list.c
 examples_ibv_devices_LDADD = $(top_builddir)/src/libibverbs.la
 examples_ibv_devinfo_SOURCES = examples/devinfo.c
 examples_ibv_devinfo_LDADD = $(top_builddir)/src/libibverbs.la
-examples_ibv_rc_pingpong_SOURCES = examples/rc_pingpong.c
+examples_ibv_rc_pingpong_SOURCES = examples/rc_pingpong.c examples/pingpong.c
 examples_ibv_rc_pingpong_LDADD = $(top_builddir)/src/libibverbs.la
-examples_ibv_uc_pingpong_SOURCES = examples/uc_pingpong.c
+examples_ibv_uc_pingpong_SOURCES = examples/uc_pingpong.c examples/pingpong.c
 examples_ibv_uc_pingpong_LDADD = $(top_builddir)/src/libibverbs.la
-examples_ibv_ud_pingpong_SOURCES = examples/ud_pingpong.c
+examples_ibv_ud_pingpong_SOURCES = examples/ud_pingpong.c examples/pingpong.c
 examples_ibv_ud_pingpong_LDADD = $(top_builddir)/src/libibverbs.la
-examples_ibv_srq_pingpong_SOURCES = examples/srq_pingpong.c
+examples_ibv_srq_pingpong_SOURCES = examples/srq_pingpong.c examples/pingpong.c
 examples_ibv_srq_pingpong_LDADD = $(top_builddir)/src/libibverbs.la
 examples_ibv_asyncwatch_SOURCES = examples/asyncwatch.c
 examples_ibv_asyncwatch_LDADD = $(top_builddir)/src/libibverbs.la
@@ -54,8 +54,9 @@ DEBIAN = debian/changelog debian/compat debian/control debian/copyright \
     debian/rules
 
 EXTRA_DIST = include/infiniband/driver.h include/infiniband/kern-abi.h \
-    include/infiniband/opcode.h include/infiniband/verbs.h src/ibverbs.h \
-    include/infiniband/marshall.h include/infiniband/sa-kern-abi.h include/infiniband/sa.h \
+    include/infiniband/opcode.h include/infiniband/verbs.h include/infiniband/marshall.h \
+    include/infiniband/sa-kern-abi.h include/infiniband/sa.h \
+    src/ibverbs.h examples/pingpong.h \
     src/libibverbs.map libibverbs.spec.in $(man_MANS) $(DEBIAN)
 
 dist-hook: libibverbs.spec
diff --git a/examples/pingpong.c b/examples/pingpong.c
new file mode 100644 (file)
index 0000000..b6d637d
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2006 Cisco Systems.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or 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 AND
+ * 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.
+ *
+ * $Id$
+ */
+
+#include "pingpong.h"
+
+enum ibv_mtu pp_mtu_to_enum(int mtu)
+{
+       switch (mtu) {
+       case 256:  return IBV_MTU_256;
+       case 512:  return IBV_MTU_512;
+       case 1024: return IBV_MTU_1024;
+       case 2048: return IBV_MTU_2048;
+       case 4096: return IBV_MTU_4096;
+       default:   return -1;
+       }
+}
diff --git a/examples/pingpong.h b/examples/pingpong.h
new file mode 100644 (file)
index 0000000..67ec641
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2006 Cisco Systems.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or 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 AND
+ * 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.
+ *
+ * $Id$
+ */
+
+#ifndef IBV_PINGPONG_H
+#define IBV_PINGPONG_H
+
+#include <infiniband/verbs.h>
+
+enum ibv_mtu pp_mtu_to_enum(int mtu);
+
+#endif /* IBV_PINGPONG_H */
index 6c4ef9d62c8b6f7f1fdcfaac2286dbe26bd77ee7..41630c6413935c597d0dbdacb1a64a69522de9f7 100644 (file)
@@ -49,9 +49,7 @@
 #include <arpa/inet.h>
 #include <time.h>
 
-#include <sysfs/libsysfs.h>
-
-#include <infiniband/verbs.h>
+#include "pingpong.h"
 
 enum {
        PINGPONG_RECV_WRID = 1,
@@ -90,11 +88,11 @@ static uint16_t pp_get_local_lid(struct pingpong_context *ctx, int port)
 }
 
 static int pp_connect_ctx(struct pingpong_context *ctx, int port, int my_psn,
-                         struct pingpong_dest *dest)
+                         enum ibv_mtu mtu, struct pingpong_dest *dest)
 {
        struct ibv_qp_attr attr = {
                .qp_state               = IBV_QPS_RTR,
-               .path_mtu               = IBV_MTU_1024,
+               .path_mtu               = mtu,
                .dest_qp_num            = dest->qpn,
                .rq_psn                 = dest->psn,
                .max_dest_rd_atomic     = 1,
@@ -204,7 +202,7 @@ out:
 }
 
 static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,
-                                                int ib_port, int port,
+                                                int ib_port, enum ibv_mtu mtu, int port,
                                                 const struct pingpong_dest *my_dest)
 {
        struct addrinfo *res, *t;
@@ -269,7 +267,7 @@ static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,
 
        sscanf(msg, "%x:%x:%x", &rem_dest->lid, &rem_dest->qpn, &rem_dest->psn);
 
-       if (pp_connect_ctx(ctx, ib_port, my_dest->psn, rem_dest)) {
+       if (pp_connect_ctx(ctx, ib_port, my_dest->psn, mtu, rem_dest)) {
                fprintf(stderr, "Couldn't connect to remote QP\n");
                free(rem_dest);
                rem_dest = NULL;
@@ -440,6 +438,7 @@ static void usage(const char *argv0)
        printf("  -d, --ib-dev=<dev>     use IB device <dev> (default first device found)\n");
        printf("  -i, --ib-port=<port>   use port <port> of IB device (default 1)\n");
        printf("  -s, --size=<size>      size of message to exchange (default 4096)\n");
+       printf("  -m, --mtu=<size>       path MTU (default 1024)\n");
        printf("  -r, --rx-depth=<dep>   number of receives to post at a time (default 500)\n");
        printf("  -n, --iters=<iters>    number of exchanges (default 1000)\n");
        printf("  -e, --events           sleep on CQ events (default poll)\n");
@@ -458,6 +457,7 @@ int main(int argc, char *argv[])
        int                      port = 18515;
        int                      ib_port = 1;
        int                      size = 4096;
+       enum ibv_mtu             mtu = IBV_MTU_1024;
        int                      rx_depth = 500;
        int                      iters = 1000;
        int                      use_event = 0;
@@ -474,13 +474,14 @@ int main(int argc, char *argv[])
                        { .name = "ib-dev",   .has_arg = 1, .val = 'd' },
                        { .name = "ib-port",  .has_arg = 1, .val = 'i' },
                        { .name = "size",     .has_arg = 1, .val = 's' },
+                       { .name = "mtu",      .has_arg = 1, .val = 'm' },
                        { .name = "rx-depth", .has_arg = 1, .val = 'r' },
                        { .name = "iters",    .has_arg = 1, .val = 'n' },
                        { .name = "events",   .has_arg = 0, .val = 'e' },
                        { 0 }
                };
 
-               c = getopt_long(argc, argv, "p:d:i:s:r:n:e", long_options, NULL);
+               c = getopt_long(argc, argv, "p:d:i:s:m:r:n:e", long_options, NULL);
                if (c == -1)
                        break;
 
@@ -509,6 +510,13 @@ int main(int argc, char *argv[])
                        size = strtol(optarg, NULL, 0);
                        break;
 
+               case 'm':
+                       mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0));
+                       if (mtu < 0) {
+                               usage(argv[0]);
+                               return 1;
+                       }
+
                case 'r':
                        rx_depth = strtol(optarg, NULL, 0);
                        break;
@@ -588,7 +596,7 @@ int main(int argc, char *argv[])
        if (servername)
                rem_dest = pp_client_exch_dest(servername, port, &my_dest);
        else
-               rem_dest = pp_server_exch_dest(ctx, ib_port, port, &my_dest);
+               rem_dest = pp_server_exch_dest(ctx, ib_port, mtu, port, &my_dest);
 
        if (!rem_dest)
                return 1;
@@ -597,7 +605,7 @@ int main(int argc, char *argv[])
               rem_dest->lid, rem_dest->qpn, rem_dest->psn);
 
        if (servername)
-               if (pp_connect_ctx(ctx, ib_port, my_dest.psn, rem_dest))
+               if (pp_connect_ctx(ctx, ib_port, my_dest.psn, mtu, rem_dest))
                        return 1;
 
        ctx->pending = PINGPONG_RECV_WRID;
index bc1d2e6dd51641715d4648d57be10d7aee211335..48e1ca9fdcded7e239182dfcf72ab1994a4ce76a 100644 (file)
@@ -49,9 +49,7 @@
 #include <arpa/inet.h>
 #include <time.h>
 
-#include <sysfs/libsysfs.h>
-
-#include <infiniband/verbs.h>
+#include "pingpong.h"
 
 enum {
        PINGPONG_RECV_WRID = 1,
@@ -93,7 +91,7 @@ static uint16_t pp_get_local_lid(struct pingpong_context *ctx, int port)
        return attr.lid;
 }
 
-static int pp_connect_ctx(struct pingpong_context *ctx, int port,
+static int pp_connect_ctx(struct pingpong_context *ctx, int port, enum ibv_mtu mtu,
                          const struct pingpong_dest *my_dest,
                          const struct pingpong_dest *dest)
 {
@@ -102,7 +100,7 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port,
        for (i = 0; i < ctx->num_qp; ++i) {
                struct ibv_qp_attr attr = {
                        .qp_state               = IBV_QPS_RTR,
-                       .path_mtu               = IBV_MTU_1024,
+                       .path_mtu               = mtu,
                        .dest_qp_num            = dest[i].qpn,
                        .rq_psn                 = dest[i].psn,
                        .max_dest_rd_atomic     = 1,
@@ -226,7 +224,7 @@ out:
 }
 
 static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,
-                                                int ib_port, int port,
+                                                int ib_port, enum ibv_mtu mtu, int port,
                                                 const struct pingpong_dest *my_dest)
 {
        struct addrinfo *res, *t;
@@ -301,7 +299,7 @@ static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,
                       &rem_dest[i].lid, &rem_dest[i].qpn, &rem_dest[i].psn);
        }
 
-       if (pp_connect_ctx(ctx, ib_port, my_dest, rem_dest)) {
+       if (pp_connect_ctx(ctx, ib_port, mtu, my_dest, rem_dest)) {
                fprintf(stderr, "Couldn't connect to remote QP\n");
                free(rem_dest);
                rem_dest = NULL;
@@ -501,6 +499,7 @@ static void usage(const char *argv0)
        printf("  -d, --ib-dev=<dev>     use IB device <dev> (default first device found)\n");
        printf("  -i, --ib-port=<port>   use port <port> of IB device (default 1)\n");
        printf("  -s, --size=<size>      size of message to exchange (default 4096)\n");
+       printf("  -m, --mtu=<size>       path MTU (default 1024)\n");
        printf("  -q, --num-qp=<num>     number of QPs to use (default 16)\n");
        printf("  -r, --rx-depth=<dep>   number of receives to post at a time (default 500)\n");
        printf("  -n, --iters=<iters>    number of exchanges per QP(default 1000)\n");
@@ -521,6 +520,7 @@ int main(int argc, char *argv[])
        int                      port = 18515;
        int                      ib_port = 1;
        int                      size = 4096;
+       enum ibv_mtu             mtu = IBV_MTU_1024;
        int                      num_qp = 16;
        int                      rx_depth = 500;
        int                      iters = 1000;
@@ -540,6 +540,7 @@ int main(int argc, char *argv[])
                        { .name = "ib-dev",   .has_arg = 1, .val = 'd' },
                        { .name = "ib-port",  .has_arg = 1, .val = 'i' },
                        { .name = "size",     .has_arg = 1, .val = 's' },
+                       { .name = "mtu",      .has_arg = 1, .val = 'm' },
                        { .name = "num-qp",   .has_arg = 1, .val = 'q' },
                        { .name = "rx-depth", .has_arg = 1, .val = 'r' },
                        { .name = "iters",    .has_arg = 1, .val = 'n' },
@@ -547,7 +548,7 @@ int main(int argc, char *argv[])
                        { 0 }
                };
 
-               c = getopt_long(argc, argv, "p:d:i:s:q:r:n:e", long_options, NULL);
+               c = getopt_long(argc, argv, "p:d:i:s:m:q:r:n:e", long_options, NULL);
                if (c == -1)
                        break;
 
@@ -576,6 +577,13 @@ int main(int argc, char *argv[])
                        size = strtol(optarg, NULL, 0);
                        break;
 
+               case 'm':
+                       mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0));
+                       if (mtu < 0) {
+                               usage(argv[0]);
+                               return 1;
+                       }
+
                case 'q':
                        num_qp = strtol(optarg, NULL, 0);
                        break;
@@ -673,7 +681,7 @@ int main(int argc, char *argv[])
        if (servername)
                rem_dest = pp_client_exch_dest(servername, port, my_dest);
        else
-               rem_dest = pp_server_exch_dest(ctx, ib_port, port, my_dest);
+               rem_dest = pp_server_exch_dest(ctx, ib_port, mtu, port, my_dest);
 
        if (!rem_dest)
                return 1;
@@ -683,7 +691,7 @@ int main(int argc, char *argv[])
                       rem_dest[i].lid, rem_dest[i].qpn, rem_dest[i].psn);
 
        if (servername)
-               if (pp_connect_ctx(ctx, ib_port, my_dest, rem_dest))
+               if (pp_connect_ctx(ctx, ib_port, mtu, my_dest, rem_dest))
                        return 1;
 
        if (servername)
index 08266d492f0893671baa0bab9985fe479a474191..aeeb871e580fa5b7674f6a7ffe8e64d426d63b12 100644 (file)
@@ -49,9 +49,7 @@
 #include <arpa/inet.h>
 #include <time.h>
 
-#include <sysfs/libsysfs.h>
-
-#include <infiniband/verbs.h>
+#include "pingpong.h"
 
 enum {
        PINGPONG_RECV_WRID = 1,
@@ -90,11 +88,11 @@ static uint16_t pp_get_local_lid(struct pingpong_context *ctx, int port)
 }
 
 static int pp_connect_ctx(struct pingpong_context *ctx, int port, int my_psn,
-                         struct pingpong_dest *dest)
+                         enum ibv_mtu mtu, struct pingpong_dest *dest)
 {
        struct ibv_qp_attr attr = {
                .qp_state               = IBV_QPS_RTR,
-               .path_mtu               = IBV_MTU_1024,
+               .path_mtu               = mtu,
                .dest_qp_num            = dest->qpn,
                .rq_psn                 = dest->psn,
                .ah_attr                = {
@@ -192,7 +190,7 @@ out:
 }
 
 static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,
-                                                int ib_port, int port,
+                                                int ib_port, enum ibv_mtu mtu, int port,
                                                 const struct pingpong_dest *my_dest)
 {
        struct addrinfo *res, *t;
@@ -257,7 +255,7 @@ static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,
 
        sscanf(msg, "%x:%x:%x", &rem_dest->lid, &rem_dest->qpn, &rem_dest->psn);
 
-       if (pp_connect_ctx(ctx, ib_port, my_dest->psn, rem_dest)) {
+       if (pp_connect_ctx(ctx, ib_port, my_dest->psn, mtu, rem_dest)) {
                fprintf(stderr, "Couldn't connect to remote QP\n");
                free(rem_dest);
                rem_dest = NULL;
@@ -428,6 +426,7 @@ static void usage(const char *argv0)
        printf("  -d, --ib-dev=<dev>     use IB device <dev> (default first device found)\n");
        printf("  -i, --ib-port=<port>   use port <port> of IB device (default 1)\n");
        printf("  -s, --size=<size>      size of message to exchange (default 4096)\n");
+       printf("  -m, --mtu=<size>       path MTU (default 1024)\n");
        printf("  -r, --rx-depth=<dep>   number of receives to post at a time (default 500)\n");
        printf("  -n, --iters=<iters>    number of exchanges (default 1000)\n");
        printf("  -e, --events           sleep on CQ events (default poll)\n");
@@ -446,6 +445,7 @@ int main(int argc, char *argv[])
        int                      port = 18515;
        int                      ib_port = 1;
        int                      size = 4096;
+       enum ibv_mtu             mtu = IBV_MTU_1024;
        int                      rx_depth = 500;
        int                      iters = 1000;
        int                      use_event = 0;
@@ -462,13 +462,14 @@ int main(int argc, char *argv[])
                        { .name = "ib-dev",   .has_arg = 1, .val = 'd' },
                        { .name = "ib-port",  .has_arg = 1, .val = 'i' },
                        { .name = "size",     .has_arg = 1, .val = 's' },
+                       { .name = "mtu",      .has_arg = 1, .val = 'm' },
                        { .name = "rx-depth", .has_arg = 1, .val = 'r' },
                        { .name = "iters",    .has_arg = 1, .val = 'n' },
                        { .name = "events",   .has_arg = 0, .val = 'e' },
                        { 0 }
                };
 
-               c = getopt_long(argc, argv, "p:d:i:s:r:n:e", long_options, NULL);
+               c = getopt_long(argc, argv, "p:d:i:s:m:r:n:e", long_options, NULL);
                if (c == -1)
                        break;
 
@@ -497,6 +498,13 @@ int main(int argc, char *argv[])
                        size = strtol(optarg, NULL, 0);
                        break;
 
+               case 'm':
+                       mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0));
+                       if (mtu < 0) {
+                               usage(argv[0]);
+                               return 1;
+                       }
+
                case 'r':
                        rx_depth = strtol(optarg, NULL, 0);
                        break;
@@ -576,7 +584,7 @@ int main(int argc, char *argv[])
        if (servername)
                rem_dest = pp_client_exch_dest(servername, port, &my_dest);
        else
-               rem_dest = pp_server_exch_dest(ctx, ib_port, port, &my_dest);
+               rem_dest = pp_server_exch_dest(ctx, ib_port, mtu, port, &my_dest);
 
        if (!rem_dest)
                return 1;
@@ -585,7 +593,7 @@ int main(int argc, char *argv[])
               rem_dest->lid, rem_dest->qpn, rem_dest->psn);
 
        if (servername)
-               if (pp_connect_ctx(ctx, ib_port, my_dest.psn, rem_dest))
+               if (pp_connect_ctx(ctx, ib_port, my_dest.psn, mtu, rem_dest))
                        return 1;
 
        ctx->pending = PINGPONG_RECV_WRID;
index fd9bd4229fb5bb99ddb47fd2fc347df0ad4db052..fbaa3f11b832a7cd14376c8b4bd896e2c7ab2df4 100644 (file)
@@ -49,9 +49,7 @@
 #include <arpa/inet.h>
 #include <time.h>
 
-#include <sysfs/libsysfs.h>
-
-#include <infiniband/verbs.h>
+#include "pingpong.h"
 
 enum {
        PINGPONG_RECV_WRID = 1,