aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/link.c16
-rw-r--r--net/tipc/msg.c16
-rw-r--r--net/tipc/msg.h19
-rw-r--r--net/tipc/port.c5
4 files changed, 27 insertions, 29 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index cefa99824c58..a42f43430101 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -2832,15 +2832,15 @@ static void link_set_supervision_props(struct link *l_ptr, u32 tolerance)
2832void tipc_link_set_queue_limits(struct link *l_ptr, u32 window) 2832void tipc_link_set_queue_limits(struct link *l_ptr, u32 window)
2833{ 2833{
2834 /* Data messages from this node, inclusive FIRST_FRAGM */ 2834 /* Data messages from this node, inclusive FIRST_FRAGM */
2835 l_ptr->queue_limit[DATA_LOW] = window; 2835 l_ptr->queue_limit[TIPC_LOW_IMPORTANCE] = window;
2836 l_ptr->queue_limit[DATA_MEDIUM] = (window / 3) * 4; 2836 l_ptr->queue_limit[TIPC_MEDIUM_IMPORTANCE] = (window / 3) * 4;
2837 l_ptr->queue_limit[DATA_HIGH] = (window / 3) * 5; 2837 l_ptr->queue_limit[TIPC_HIGH_IMPORTANCE] = (window / 3) * 5;
2838 l_ptr->queue_limit[DATA_CRITICAL] = (window / 3) * 6; 2838 l_ptr->queue_limit[TIPC_CRITICAL_IMPORTANCE] = (window / 3) * 6;
2839 /* Transiting data messages,inclusive FIRST_FRAGM */ 2839 /* Transiting data messages,inclusive FIRST_FRAGM */
2840 l_ptr->queue_limit[DATA_LOW + 4] = 300; 2840 l_ptr->queue_limit[TIPC_LOW_IMPORTANCE + 4] = 300;
2841 l_ptr->queue_limit[DATA_MEDIUM + 4] = 600; 2841 l_ptr->queue_limit[TIPC_MEDIUM_IMPORTANCE + 4] = 600;
2842 l_ptr->queue_limit[DATA_HIGH + 4] = 900; 2842 l_ptr->queue_limit[TIPC_HIGH_IMPORTANCE + 4] = 900;
2843 l_ptr->queue_limit[DATA_CRITICAL + 4] = 1200; 2843 l_ptr->queue_limit[TIPC_CRITICAL_IMPORTANCE + 4] = 1200;
2844 l_ptr->queue_limit[CONN_MANAGER] = 1200; 2844 l_ptr->queue_limit[CONN_MANAGER] = 1200;
2845 l_ptr->queue_limit[ROUTE_DISTRIBUTOR] = 1200; 2845 l_ptr->queue_limit[ROUTE_DISTRIBUTOR] = 1200;
2846 l_ptr->queue_limit[CHANGEOVER_PROTOCOL] = 2500; 2846 l_ptr->queue_limit[CHANGEOVER_PROTOCOL] = 2500;
diff --git a/net/tipc/msg.c b/net/tipc/msg.c
index 782485468fb2..696a8633df75 100644
--- a/net/tipc/msg.c
+++ b/net/tipc/msg.c
@@ -73,10 +73,10 @@ void tipc_msg_print(struct print_buf *buf, struct tipc_msg *msg, const char *str
73 tipc_printf(buf, "NO(%u/%u):",msg_long_msgno(msg), 73 tipc_printf(buf, "NO(%u/%u):",msg_long_msgno(msg),
74 msg_fragm_no(msg)); 74 msg_fragm_no(msg));
75 break; 75 break;
76 case DATA_LOW: 76 case TIPC_LOW_IMPORTANCE:
77 case DATA_MEDIUM: 77 case TIPC_MEDIUM_IMPORTANCE:
78 case DATA_HIGH: 78 case TIPC_HIGH_IMPORTANCE:
79 case DATA_CRITICAL: 79 case TIPC_CRITICAL_IMPORTANCE:
80 tipc_printf(buf, "DAT%u:", msg_user(msg)); 80 tipc_printf(buf, "DAT%u:", msg_user(msg));
81 if (msg_short(msg)) { 81 if (msg_short(msg)) {
82 tipc_printf(buf, "CON:"); 82 tipc_printf(buf, "CON:");
@@ -229,10 +229,10 @@ void tipc_msg_print(struct print_buf *buf, struct tipc_msg *msg, const char *str
229 switch (usr) { 229 switch (usr) {
230 case CONN_MANAGER: 230 case CONN_MANAGER:
231 case NAME_DISTRIBUTOR: 231 case NAME_DISTRIBUTOR:
232 case DATA_LOW: 232 case TIPC_LOW_IMPORTANCE:
233 case DATA_MEDIUM: 233 case TIPC_MEDIUM_IMPORTANCE:
234 case DATA_HIGH: 234 case TIPC_HIGH_IMPORTANCE:
235 case DATA_CRITICAL: 235 case TIPC_CRITICAL_IMPORTANCE:
236 if (msg_short(msg)) 236 if (msg_short(msg))
237 break; /* No error */ 237 break; /* No error */
238 switch (msg_errcode(msg)) { 238 switch (msg_errcode(msg)) {
diff --git a/net/tipc/msg.h b/net/tipc/msg.h
index 12f8945e8a54..5cf76a4f28e4 100644
--- a/net/tipc/msg.h
+++ b/net/tipc/msg.h
@@ -40,18 +40,16 @@
40#include "core.h" 40#include "core.h"
41 41
42#define TIPC_VERSION 2 42#define TIPC_VERSION 2
43#define DATA_LOW TIPC_LOW_IMPORTANCE 43
44#define DATA_MEDIUM TIPC_MEDIUM_IMPORTANCE 44#define SHORT_H_SIZE 24 /* Connected, in-cluster messages */
45#define DATA_HIGH TIPC_HIGH_IMPORTANCE
46#define DATA_CRITICAL TIPC_CRITICAL_IMPORTANCE
47#define SHORT_H_SIZE 24 /* Connected,in cluster */
48#define DIR_MSG_H_SIZE 32 /* Directly addressed messages */ 45#define DIR_MSG_H_SIZE 32 /* Directly addressed messages */
49#define CONN_MSG_H_SIZE 36 /* Routed connected msgs*/ 46#define LONG_H_SIZE 40 /* Named messages */
50#define LONG_H_SIZE 40 /* Named Messages */
51#define MCAST_H_SIZE 44 /* Multicast messages */ 47#define MCAST_H_SIZE 44 /* Multicast messages */
52#define MAX_H_SIZE 60 /* Inclusive full options */ 48#define INT_H_SIZE 40 /* Internal messages */
49#define MIN_H_SIZE 24 /* Smallest legal TIPC header size */
50#define MAX_H_SIZE 60 /* Largest possible TIPC header size */
51
53#define MAX_MSG_SIZE (MAX_H_SIZE + TIPC_MAX_USER_MSG_SIZE) 52#define MAX_MSG_SIZE (MAX_H_SIZE + TIPC_MAX_USER_MSG_SIZE)
54#define LINK_CONFIG 13
55 53
56 54
57/* 55/*
@@ -97,7 +95,7 @@ static inline u32 msg_user(struct tipc_msg *m)
97 95
98static inline u32 msg_isdata(struct tipc_msg *m) 96static inline u32 msg_isdata(struct tipc_msg *m)
99{ 97{
100 return (msg_user(m) <= DATA_CRITICAL); 98 return (msg_user(m) <= TIPC_CRITICAL_IMPORTANCE);
101} 99}
102 100
103static inline void msg_set_user(struct tipc_msg *m, u32 n) 101static inline void msg_set_user(struct tipc_msg *m, u32 n)
@@ -365,7 +363,6 @@ static inline struct tipc_msg *msg_get_wrapped(struct tipc_msg *m)
365#define NAME_DISTRIBUTOR 11 363#define NAME_DISTRIBUTOR 11
366#define MSG_FRAGMENTER 12 364#define MSG_FRAGMENTER 12
367#define LINK_CONFIG 13 365#define LINK_CONFIG 13
368#define INT_H_SIZE 40
369#define DSC_H_SIZE 40 366#define DSC_H_SIZE 40
370 367
371/* 368/*
diff --git a/net/tipc/port.c b/net/tipc/port.c
index 2a16ca43e953..e2646a96935d 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -242,7 +242,8 @@ u32 tipc_createport_raw(void *usr_handle,
242 p_ptr->publ.max_pkt = MAX_PKT_DEFAULT; 242 p_ptr->publ.max_pkt = MAX_PKT_DEFAULT;
243 p_ptr->publ.ref = ref; 243 p_ptr->publ.ref = ref;
244 msg = &p_ptr->publ.phdr; 244 msg = &p_ptr->publ.phdr;
245 msg_init(msg, DATA_LOW, TIPC_NAMED_MSG, TIPC_OK, LONG_H_SIZE, 0); 245 msg_init(msg, TIPC_LOW_IMPORTANCE, TIPC_NAMED_MSG, TIPC_OK, LONG_H_SIZE,
246 0);
246 msg_set_orignode(msg, tipc_own_addr); 247 msg_set_orignode(msg, tipc_own_addr);
247 msg_set_prevnode(msg, tipc_own_addr); 248 msg_set_prevnode(msg, tipc_own_addr);
248 msg_set_origport(msg, ref); 249 msg_set_origport(msg, ref);
@@ -625,7 +626,7 @@ void tipc_port_recv_proto_msg(struct sk_buff *buf)
625 msg_orignode(msg), 626 msg_orignode(msg),
626 msg_destport(msg), 627 msg_destport(msg),
627 tipc_own_addr, 628 tipc_own_addr,
628 DATA_HIGH, 629 TIPC_HIGH_IMPORTANCE,
629 TIPC_CONN_MSG, 630 TIPC_CONN_MSG,
630 err, 631 err,
631 0, 632 0,