aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/config.c
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2012-08-16 08:09:14 -0400
committerDavid S. Miller <davem@davemloft.net>2012-08-20 05:26:31 -0400
commite6a04b1d3ff9d5af219b2fcaebe0ef04733d597c (patch)
tree7e529abf881c3169400fbe9f716d46f579deaa62 /net/tipc/config.c
parent34f256cc7962a44537a0d33877cd93c89873098e (diff)
tipc: eliminate configuration for maximum number of name publications
Gets rid of the need for users to specify the maximum number of name publications supported by TIPC. TIPC now automatically provides support for the maximum number of name publications to 65535. Signed-off-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/config.c')
-rw-r--r--net/tipc/config.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/net/tipc/config.c b/net/tipc/config.c
index 7a1275863c8a..f67866c765dd 100644
--- a/net/tipc/config.c
+++ b/net/tipc/config.c
@@ -208,21 +208,6 @@ static struct sk_buff *cfg_set_remote_mng(void)
208 return tipc_cfg_reply_none(); 208 return tipc_cfg_reply_none();
209} 209}
210 210
211static struct sk_buff *cfg_set_max_publications(void)
212{
213 u32 value;
214
215 if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))
216 return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);
217
218 value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));
219 if (value < 1 || value > 65535)
220 return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE
221 " (max publications must be 1-65535)");
222 tipc_max_publications = value;
223 return tipc_cfg_reply_none();
224}
225
226static struct sk_buff *cfg_set_max_ports(void) 211static struct sk_buff *cfg_set_max_ports(void)
227{ 212{
228 u32 value; 213 u32 value;
@@ -342,9 +327,6 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area
342 case TIPC_CMD_SET_MAX_PORTS: 327 case TIPC_CMD_SET_MAX_PORTS:
343 rep_tlv_buf = cfg_set_max_ports(); 328 rep_tlv_buf = cfg_set_max_ports();
344 break; 329 break;
345 case TIPC_CMD_SET_MAX_PUBL:
346 rep_tlv_buf = cfg_set_max_publications();
347 break;
348 case TIPC_CMD_SET_NETID: 330 case TIPC_CMD_SET_NETID:
349 rep_tlv_buf = cfg_set_netid(); 331 rep_tlv_buf = cfg_set_netid();
350 break; 332 break;
@@ -354,9 +336,6 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area
354 case TIPC_CMD_GET_MAX_PORTS: 336 case TIPC_CMD_GET_MAX_PORTS:
355 rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_max_ports); 337 rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_max_ports);
356 break; 338 break;
357 case TIPC_CMD_GET_MAX_PUBL:
358 rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_max_publications);
359 break;
360 case TIPC_CMD_GET_NETID: 339 case TIPC_CMD_GET_NETID:
361 rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_net_id); 340 rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_net_id);
362 break; 341 break;
@@ -374,6 +353,8 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area
374 case TIPC_CMD_GET_MAX_NODES: 353 case TIPC_CMD_GET_MAX_NODES:
375 case TIPC_CMD_SET_MAX_SUBSCR: 354 case TIPC_CMD_SET_MAX_SUBSCR:
376 case TIPC_CMD_GET_MAX_SUBSCR: 355 case TIPC_CMD_GET_MAX_SUBSCR:
356 case TIPC_CMD_SET_MAX_PUBL:
357 case TIPC_CMD_GET_MAX_PUBL:
377 case TIPC_CMD_SET_LOG_SIZE: 358 case TIPC_CMD_SET_LOG_SIZE:
378 case TIPC_CMD_DUMP_LOG: 359 case TIPC_CMD_DUMP_LOG:
379 rep_tlv_buf = tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED 360 rep_tlv_buf = tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED