aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.h
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2012-07-11 09:40:43 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2012-07-12 09:53:57 -0400
commit7e9cab58e8e0b5e52af28145ffa70de329adc459 (patch)
treef8d2dd8f35ca4040a42968d3c11c609633088749 /net/tipc/link.h
parent48ee3569f31d91084dc694fef5517eb782428083 (diff)
tipc: factor stats struct out of the larger link struct
This is done to improve readability, and so that we can give the struct a name that will allow us to declare a local pointer to it in code, instead of having to always redirect through the link struct to get to it. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/link.h')
-rw-r--r--net/tipc/link.h62
1 files changed, 32 insertions, 30 deletions
diff --git a/net/tipc/link.h b/net/tipc/link.h
index d6a60a963ce6..8024a56a1ebc 100644
--- a/net/tipc/link.h
+++ b/net/tipc/link.h
@@ -63,6 +63,37 @@
63 */ 63 */
64#define MAX_PKT_DEFAULT 1500 64#define MAX_PKT_DEFAULT 1500
65 65
66struct tipc_stats {
67 u32 sent_info; /* used in counting # sent packets */
68 u32 recv_info; /* used in counting # recv'd packets */
69 u32 sent_states;
70 u32 recv_states;
71 u32 sent_probes;
72 u32 recv_probes;
73 u32 sent_nacks;
74 u32 recv_nacks;
75 u32 sent_acks;
76 u32 sent_bundled;
77 u32 sent_bundles;
78 u32 recv_bundled;
79 u32 recv_bundles;
80 u32 retransmitted;
81 u32 sent_fragmented;
82 u32 sent_fragments;
83 u32 recv_fragmented;
84 u32 recv_fragments;
85 u32 link_congs; /* # port sends blocked by congestion */
86 u32 bearer_congs;
87 u32 deferred_recv;
88 u32 duplicates;
89 u32 max_queue_sz; /* send queue size high water mark */
90 u32 accu_queue_sz; /* used for send queue size profiling */
91 u32 queue_sz_counts; /* used for send queue size profiling */
92 u32 msg_length_counts; /* used for message length profiling */
93 u32 msg_lengths_total; /* used for message length profiling */
94 u32 msg_length_profile[7]; /* used for msg. length profiling */
95};
96
66/** 97/**
67 * struct tipc_link - TIPC link data structure 98 * struct tipc_link - TIPC link data structure
68 * @addr: network address of link's peer node 99 * @addr: network address of link's peer node
@@ -175,36 +206,7 @@ struct tipc_link {
175 struct sk_buff *defragm_buf; 206 struct sk_buff *defragm_buf;
176 207
177 /* Statistics */ 208 /* Statistics */
178 struct { 209 struct tipc_stats stats;
179 u32 sent_info; /* used in counting # sent packets */
180 u32 recv_info; /* used in counting # recv'd packets */
181 u32 sent_states;
182 u32 recv_states;
183 u32 sent_probes;
184 u32 recv_probes;
185 u32 sent_nacks;
186 u32 recv_nacks;
187 u32 sent_acks;
188 u32 sent_bundled;
189 u32 sent_bundles;
190 u32 recv_bundled;
191 u32 recv_bundles;
192 u32 retransmitted;
193 u32 sent_fragmented;
194 u32 sent_fragments;
195 u32 recv_fragmented;
196 u32 recv_fragments;
197 u32 link_congs; /* # port sends blocked by congestion */
198 u32 bearer_congs;
199 u32 deferred_recv;
200 u32 duplicates;
201 u32 max_queue_sz; /* send queue size high water mark */
202 u32 accu_queue_sz; /* used for send queue size profiling */
203 u32 queue_sz_counts; /* used for send queue size profiling */
204 u32 msg_length_counts; /* used for message length profiling */
205 u32 msg_lengths_total; /* used for message length profiling */
206 u32 msg_length_profile[7]; /* used for msg. length profiling */
207 } stats;
208}; 210};
209 211
210struct tipc_port; 212struct tipc_port;