aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/config.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-02 16:38:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-02 16:38:27 -0400
commitaecdc33e111b2c447b622e287c6003726daa1426 (patch)
tree3e7657eae4b785e1a1fb5dfb225dbae0b2f0cfc6 /net/tipc/config.c
parenta20acf99f75e49271381d65db097c9763060a1e8 (diff)
parenta3a6cab5ea10cca64d036851fe0d932448f2fe4f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking changes from David Miller: 1) GRE now works over ipv6, from Dmitry Kozlov. 2) Make SCTP more network namespace aware, from Eric Biederman. 3) TEAM driver now works with non-ethernet devices, from Jiri Pirko. 4) Make openvswitch network namespace aware, from Pravin B Shelar. 5) IPV6 NAT implementation, from Patrick McHardy. 6) Server side support for TCP Fast Open, from Jerry Chu and others. 7) Packet BPF filter supports MOD and XOR, from Eric Dumazet and Daniel Borkmann. 8) Increate the loopback default MTU to 64K, from Eric Dumazet. 9) Use a per-task rather than per-socket page fragment allocator for outgoing networking traffic. This benefits processes that have very many mostly idle sockets, which is quite common. From Eric Dumazet. 10) Use up to 32K for page fragment allocations, with fallbacks to smaller sizes when higher order page allocations fail. Benefits are a) less segments for driver to process b) less calls to page allocator c) less waste of space. From Eric Dumazet. 11) Allow GRO to be used on GRE tunnels, from Eric Dumazet. 12) VXLAN device driver, one way to handle VLAN issues such as the limitation of 4096 VLAN IDs yet still have some level of isolation. From Stephen Hemminger. 13) As usual there is a large boatload of driver changes, with the scale perhaps tilted towards the wireless side this time around. Fix up various fairly trivial conflicts, mostly caused by the user namespace changes. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1012 commits) hyperv: Add buffer for extended info after the RNDIS response message. hyperv: Report actual status in receive completion packet hyperv: Remove extra allocated space for recv_pkt_list elements hyperv: Fix page buffer handling in rndis_filter_send_request() hyperv: Fix the missing return value in rndis_filter_set_packet_filter() hyperv: Fix the max_xfer_size in RNDIS initialization vxlan: put UDP socket in correct namespace vxlan: Depend on CONFIG_INET sfc: Fix the reported priorities of different filter types sfc: Remove EFX_FILTER_FLAG_RX_OVERRIDE_IP sfc: Fix loopback self-test with separate_tx_channels=1 sfc: Fix MCDI structure field lookup sfc: Add parentheses around use of bitfield macro arguments sfc: Fix null function pointer in efx_sriov_channel_type vxlan: virtual extensible lan igmp: export symbol ip_mc_leave_group netlink: add attributes to fdb interface tg3: unconditionally select HWMON support when tg3 is enabled. Revert "net: ti cpsw ethernet: allow reading phy interface mode from DT" gre: fix sparse warning ...
Diffstat (limited to 'net/tipc/config.c')
-rw-r--r--net/tipc/config.c48
1 files changed, 5 insertions, 43 deletions
diff --git a/net/tipc/config.c b/net/tipc/config.c
index a056a3852f71..f67866c765dd 100644
--- a/net/tipc/config.c
+++ b/net/tipc/config.c
@@ -2,7 +2,7 @@
2 * net/tipc/config.c: TIPC configuration management code 2 * net/tipc/config.c: TIPC configuration management code
3 * 3 *
4 * Copyright (c) 2002-2006, Ericsson AB 4 * Copyright (c) 2002-2006, Ericsson AB
5 * Copyright (c) 2004-2007, 2010-2011, Wind River Systems 5 * Copyright (c) 2004-2007, 2010-2012, Wind River Systems
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
@@ -208,36 +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_subscriptions(void)
227{
228 u32 value;
229
230 if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED))
231 return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR);
232
233 value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area));
234 if (value < 1 || value > 65535)
235 return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE
236 " (max subscriptions must be 1-65535");
237 tipc_max_subscriptions = value;
238 return tipc_cfg_reply_none();
239}
240
241static struct sk_buff *cfg_set_max_ports(void) 211static struct sk_buff *cfg_set_max_ports(void)
242{ 212{
243 u32 value; 213 u32 value;
@@ -357,12 +327,6 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area
357 case TIPC_CMD_SET_MAX_PORTS: 327 case TIPC_CMD_SET_MAX_PORTS:
358 rep_tlv_buf = cfg_set_max_ports(); 328 rep_tlv_buf = cfg_set_max_ports();
359 break; 329 break;
360 case TIPC_CMD_SET_MAX_PUBL:
361 rep_tlv_buf = cfg_set_max_publications();
362 break;
363 case TIPC_CMD_SET_MAX_SUBSCR:
364 rep_tlv_buf = cfg_set_max_subscriptions();
365 break;
366 case TIPC_CMD_SET_NETID: 330 case TIPC_CMD_SET_NETID:
367 rep_tlv_buf = cfg_set_netid(); 331 rep_tlv_buf = cfg_set_netid();
368 break; 332 break;
@@ -372,12 +336,6 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area
372 case TIPC_CMD_GET_MAX_PORTS: 336 case TIPC_CMD_GET_MAX_PORTS:
373 rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_max_ports); 337 rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_max_ports);
374 break; 338 break;
375 case TIPC_CMD_GET_MAX_PUBL:
376 rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_max_publications);
377 break;
378 case TIPC_CMD_GET_MAX_SUBSCR:
379 rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_max_subscriptions);
380 break;
381 case TIPC_CMD_GET_NETID: 339 case TIPC_CMD_GET_NETID:
382 rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_net_id); 340 rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_net_id);
383 break; 341 break;
@@ -393,6 +351,10 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area
393 case TIPC_CMD_GET_MAX_CLUSTERS: 351 case TIPC_CMD_GET_MAX_CLUSTERS:
394 case TIPC_CMD_SET_MAX_NODES: 352 case TIPC_CMD_SET_MAX_NODES:
395 case TIPC_CMD_GET_MAX_NODES: 353 case TIPC_CMD_GET_MAX_NODES:
354 case TIPC_CMD_SET_MAX_SUBSCR:
355 case TIPC_CMD_GET_MAX_SUBSCR:
356 case TIPC_CMD_SET_MAX_PUBL:
357 case TIPC_CMD_GET_MAX_PUBL:
396 case TIPC_CMD_SET_LOG_SIZE: 358 case TIPC_CMD_SET_LOG_SIZE:
397 case TIPC_CMD_DUMP_LOG: 359 case TIPC_CMD_DUMP_LOG:
398 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