aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/bearer.h
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-10-18 11:34:29 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-12-27 11:33:39 -0500
commit5c216e1d28c82332db0fa53e30536577fb6130c6 (patch)
tree66bc9a4653495c1fddf87cc5fd3d88ab1d14a3a7 /net/tipc/bearer.h
parentd6d4577ae48bcfde06894540ea793abf076e1643 (diff)
tipc: Allow run-time alteration of default link settings
Permits run-time alteration of default link settings on a per-media and per-bearer basis, in addition to the existing per-link basis. The following syntax can now be used: tipc-config -lt=<link-name|bearer-name|media-name>/<tolerance> tipc-config -lp=<link-name|bearer-name|media-name>/<priority> tipc-config -lw=<link-name|bearer-name|media-name>/<window> Note that changes to the default settings for a given media type has no effect on the default settings used by existing bearers. Similarly, changes to default bearer settings has no effect on existing link endpoints that utilize that interface. Thanks to Florian Westphal <fw@strlen.de> for his contributions to the development of this enhancement. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/bearer.h')
-rw-r--r--net/tipc/bearer.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h
index 54a5a575d69a..cfe77c4b20f9 100644
--- a/net/tipc/bearer.h
+++ b/net/tipc/bearer.h
@@ -118,6 +118,8 @@ struct media {
118 * @name: bearer name (format = media:interface) 118 * @name: bearer name (format = media:interface)
119 * @media: ptr to media structure associated with bearer 119 * @media: ptr to media structure associated with bearer
120 * @priority: default link priority for bearer 120 * @priority: default link priority for bearer
121 * @window: default window size for bearer
122 * @tolerance: default link tolerance for bearer
121 * @identity: array index of this bearer within TIPC bearer array 123 * @identity: array index of this bearer within TIPC bearer array
122 * @link_req: ptr to (optional) structure making periodic link setup requests 124 * @link_req: ptr to (optional) structure making periodic link setup requests
123 * @links: list of non-congested links associated with bearer 125 * @links: list of non-congested links associated with bearer
@@ -139,6 +141,8 @@ struct tipc_bearer {
139 spinlock_t lock; 141 spinlock_t lock;
140 struct media *media; 142 struct media *media;
141 u32 priority; 143 u32 priority;
144 u32 window;
145 u32 tolerance;
142 u32 identity; 146 u32 identity;
143 struct link_req *link_req; 147 struct link_req *link_req;
144 struct list_head links; 148 struct list_head links;
@@ -176,6 +180,8 @@ int tipc_disable_bearer(const char *name);
176int tipc_eth_media_start(void); 180int tipc_eth_media_start(void);
177void tipc_eth_media_stop(void); 181void tipc_eth_media_stop(void);
178 182
183int tipc_media_set_priority(const char *name, u32 new_value);
184int tipc_media_set_window(const char *name, u32 new_value);
179void tipc_media_addr_printf(struct print_buf *pb, struct tipc_media_addr *a); 185void tipc_media_addr_printf(struct print_buf *pb, struct tipc_media_addr *a);
180struct sk_buff *tipc_media_get_names(void); 186struct sk_buff *tipc_media_get_names(void);
181 187
@@ -183,7 +189,9 @@ struct sk_buff *tipc_bearer_get_names(void);
183void tipc_bearer_add_dest(struct tipc_bearer *b_ptr, u32 dest); 189void tipc_bearer_add_dest(struct tipc_bearer *b_ptr, u32 dest);
184void tipc_bearer_remove_dest(struct tipc_bearer *b_ptr, u32 dest); 190void tipc_bearer_remove_dest(struct tipc_bearer *b_ptr, u32 dest);
185void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct link *l_ptr); 191void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct link *l_ptr);
192struct tipc_bearer *tipc_bearer_find(const char *name);
186struct tipc_bearer *tipc_bearer_find_interface(const char *if_name); 193struct tipc_bearer *tipc_bearer_find_interface(const char *if_name);
194struct media *tipc_media_find(const char *name);
187int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr, struct link *l_ptr); 195int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr, struct link *l_ptr);
188int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct link *l_ptr); 196int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct link *l_ptr);
189void tipc_bearer_stop(void); 197void tipc_bearer_stop(void);