Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327553
b: refs/heads/master
c: 34f256c
h: refs/heads/master
i:
  327551: 6d63e39
v: v3
  • Loading branch information
Ying Xue authored and David S. Miller committed Aug 20, 2012
1 parent b03329b commit 27296ea
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 31 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 61cdd4d80b29cfdee45920238eea2d1fbb51f922
refs/heads/master: 34f256cc7962a44537a0d33877cd93c89873098e
4 changes: 2 additions & 2 deletions trunk/include/linux/tipc_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
#define TIPC_CMD_GET_REMOTE_MNG 0x4003 /* tx none, rx unsigned */
#define TIPC_CMD_GET_MAX_PORTS 0x4004 /* tx none, rx unsigned */
#define TIPC_CMD_GET_MAX_PUBL 0x4005 /* tx none, rx unsigned */
#define TIPC_CMD_GET_MAX_SUBSCR 0x4006 /* tx none, rx unsigned */
#define TIPC_CMD_GET_MAX_SUBSCR 0x4006 /* obsoleted */
#define TIPC_CMD_GET_MAX_ZONES 0x4007 /* obsoleted */
#define TIPC_CMD_GET_MAX_CLUSTERS 0x4008 /* obsoleted */
#define TIPC_CMD_GET_MAX_NODES 0x4009 /* obsoleted */
Expand All @@ -116,7 +116,7 @@
#define TIPC_CMD_SET_REMOTE_MNG 0x8003 /* tx unsigned, rx none */
#define TIPC_CMD_SET_MAX_PORTS 0x8004 /* tx unsigned, rx none */
#define TIPC_CMD_SET_MAX_PUBL 0x8005 /* tx unsigned, rx none */
#define TIPC_CMD_SET_MAX_SUBSCR 0x8006 /* tx unsigned, rx none */
#define TIPC_CMD_SET_MAX_SUBSCR 0x8006 /* obsoleted */
#define TIPC_CMD_SET_MAX_ZONES 0x8007 /* obsoleted */
#define TIPC_CMD_SET_MAX_CLUSTERS 0x8008 /* obsoleted */
#define TIPC_CMD_SET_MAX_NODES 0x8009 /* obsoleted */
Expand Down
25 changes: 3 additions & 22 deletions trunk/net/tipc/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* net/tipc/config.c: TIPC configuration management code
*
* Copyright (c) 2002-2006, Ericsson AB
* Copyright (c) 2004-2007, 2010-2011, Wind River Systems
* Copyright (c) 2004-2007, 2010-2012, Wind River Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -223,21 +223,6 @@ static struct sk_buff *cfg_set_max_publications(void)
return tipc_cfg_reply_none();
}

static struct sk_buff *cfg_set_max_subscriptions(void)
{
u32 value;

if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))
return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);

value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));
if (value < 1 || value > 65535)
return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE
" (max subscriptions must be 1-65535");
tipc_max_subscriptions = value;
return tipc_cfg_reply_none();
}

static struct sk_buff *cfg_set_max_ports(void)
{
u32 value;
Expand Down Expand Up @@ -360,9 +345,6 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area
case TIPC_CMD_SET_MAX_PUBL:
rep_tlv_buf = cfg_set_max_publications();
break;
case TIPC_CMD_SET_MAX_SUBSCR:
rep_tlv_buf = cfg_set_max_subscriptions();
break;
case TIPC_CMD_SET_NETID:
rep_tlv_buf = cfg_set_netid();
break;
Expand All @@ -375,9 +357,6 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area
case TIPC_CMD_GET_MAX_PUBL:
rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_max_publications);
break;
case TIPC_CMD_GET_MAX_SUBSCR:
rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_max_subscriptions);
break;
case TIPC_CMD_GET_NETID:
rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_net_id);
break;
Expand All @@ -393,6 +372,8 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area
case TIPC_CMD_GET_MAX_CLUSTERS:
case TIPC_CMD_SET_MAX_NODES:
case TIPC_CMD_GET_MAX_NODES:
case TIPC_CMD_SET_MAX_SUBSCR:
case TIPC_CMD_GET_MAX_SUBSCR:
case TIPC_CMD_SET_LOG_SIZE:
case TIPC_CMD_DUMP_LOG:
rep_tlv_buf = tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED
Expand Down
2 changes: 0 additions & 2 deletions trunk/net/tipc/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ int tipc_random __read_mostly;
/* configurable TIPC parameters */
u32 tipc_own_addr __read_mostly;
int tipc_max_ports __read_mostly;
int tipc_max_subscriptions;
int tipc_max_publications;
int tipc_net_id __read_mostly;
int tipc_remote_management __read_mostly;
Expand Down Expand Up @@ -157,7 +156,6 @@ static int __init tipc_init(void)
tipc_own_addr = 0;
tipc_remote_management = 1;
tipc_max_publications = 10000;
tipc_max_subscriptions = 2000;
tipc_max_ports = CONFIG_TIPC_PORTS;
tipc_net_id = 4711;

Expand Down
4 changes: 2 additions & 2 deletions trunk/net/tipc/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@

#define TIPC_MOD_VER "2.0.0"

#define ULTRA_STRING_MAX_LEN 32768
#define ULTRA_STRING_MAX_LEN 32768
#define TIPC_MAX_SUBSCRIPTIONS 65535

struct tipc_msg; /* msg.h */

Expand All @@ -76,7 +77,6 @@ int tipc_snprintf(char *buf, int len, const char *fmt, ...);
*/
extern u32 tipc_own_addr __read_mostly;
extern int tipc_max_ports __read_mostly;
extern int tipc_max_subscriptions;
extern int tipc_max_publications;
extern int tipc_net_id __read_mostly;
extern int tipc_remote_management __read_mostly;
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/tipc/subscr.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,9 @@ static struct tipc_subscription *subscr_subscribe(struct tipc_subscr *s,
}

/* Refuse subscription if global limit exceeded */
if (atomic_read(&topsrv.subscription_count) >= tipc_max_subscriptions) {
if (atomic_read(&topsrv.subscription_count) >= TIPC_MAX_SUBSCRIPTIONS) {
pr_warn("Subscription rejected, limit reached (%u)\n",
tipc_max_subscriptions);
TIPC_MAX_SUBSCRIPTIONS);
subscr_terminate(subscriber);
return NULL;
}
Expand Down

0 comments on commit 27296ea

Please sign in to comment.