Skip to content

Commit 626e94b

Browse files
committed
oob/tcp: make mca_oob_tcp_msg_type_t an uint8_t
so no conversion is required when heterogeneous mode is enabled Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
1 parent c36b9e8 commit 626e94b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

orte/mca/oob/tcp/oob_tcp_hdr.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* All rights reserved.
1414
* Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved.
1515
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
16+
* Copyright (c) 2017 Research Organization for Information Science
17+
* and Technology (RIST). All rights reserved.
1618
*
1719
* $COPYRIGHT$
1820
*
@@ -32,12 +34,12 @@
3234
* the message came from an external (to
3335
* this component) source
3436
*/
35-
typedef enum {
36-
MCA_OOB_TCP_IDENT,
37-
MCA_OOB_TCP_PROBE,
38-
MCA_OOB_TCP_PING,
39-
MCA_OOB_TCP_USER
40-
} mca_oob_tcp_msg_type_t;
37+
typedef uint8_t mca_oob_tcp_msg_type_t;
38+
39+
#define MCA_OOB_TCP_IDENT 1
40+
#define MCA_OOB_TCP_PROBE 2
41+
#define MCA_OOB_TCP_PING 3
42+
#define MCA_OOB_TCP_USER 4
4143

4244
#define ORTE_MAX_RTD_SIZE 31
4345

@@ -54,14 +56,14 @@ typedef struct {
5456
* and let some other module try to send it
5557
*/
5658
orte_process_name_t dst;
57-
/* type of message */
58-
mca_oob_tcp_msg_type_t type;
5959
/* the rml tag where this message is headed */
6060
orte_rml_tag_t tag;
6161
/* the seq number of this message */
6262
uint32_t seq_num;
6363
/* number of bytes in message */
6464
uint32_t nbytes;
65+
/* type of message */
66+
mca_oob_tcp_msg_type_t type;
6567
/* routed module to be used */
6668
char routed[ORTE_MAX_RTD_SIZE+1];
6769
} mca_oob_tcp_hdr_t;
@@ -71,7 +73,6 @@ typedef struct {
7173
#define MCA_OOB_TCP_HDR_NTOH(h) \
7274
ORTE_PROCESS_NAME_NTOH((h)->origin); \
7375
ORTE_PROCESS_NAME_NTOH((h)->dst); \
74-
(h)->type = ntohl((h)->type); \
7576
(h)->tag = ORTE_RML_TAG_NTOH((h)->tag); \
7677
(h)->nbytes = ntohl((h)->nbytes);
7778

@@ -81,7 +82,6 @@ typedef struct {
8182
#define MCA_OOB_TCP_HDR_HTON(h) \
8283
ORTE_PROCESS_NAME_HTON((h)->origin); \
8384
ORTE_PROCESS_NAME_HTON((h)->dst); \
84-
(h)->type = htonl((h)->type); \
8585
(h)->tag = ORTE_RML_TAG_HTON((h)->tag); \
8686
(h)->nbytes = htonl((h)->nbytes);
8787

0 commit comments

Comments
 (0)