aboutsummaryrefslogtreecommitdiff
path: root/net
AgeCommit message (Collapse)AuthorFilesLines
2011-03-13tipc: Eliminate timestamp from link protocol messagesAllan Stephens3-12/+0
Removes support for the timestamp field of TIPC's link protocol messages. This field was previously used to hold an OS-dependent timestamp value that was used to assist in debugging early versions of TIPC. The field has now been deemed unnecessary and has been removed from the latest TIPC specification. This change has no impact on the operation of TIPC since the field was set by TIPC, but never referenced. Signed-off-by: Allan Stephens <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]>
2011-03-13tipc: manually inline net_start/stop, make assoc. vars staticAllan Stephens3-23/+6
Relocates network-related variables into the subsystem files where they are now primarily used (following the recent rework of TIPC's node table), and converts globals into locals where possible. Changes the initialization of tipc_num_links from run-time to compile-time, and eliminates the net_start routine that becomes empty as a result. Also eliminates the corresponding net_stop routine by moving its (trivial) content into the one location that called the routine. Signed-off-by: Allan Stephens <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]>
2011-03-13tipc: Convert node object array to a hash tableAllan Stephens5-55/+70
Replaces the dynamically allocated array of pointers to the cluster's node objects with a static hash table. Hash collisions are resolved using chaining, with a typical hash chain having only a single node, to avoid degrading performance during processing of incoming packets. The conversion to a hash table reduces the memory requirements for TIPC's node table to approximately the same size it had prior to the previous commit. In addition to the hash table itself, TIPC now also maintains a linked list for the node objects, sorted by ascending network address. This list allows TIPC to continue sending responses to user space applications that request node and link information in sorted order. The list also improves performance when name table update messages are sent by making it easier to identify the nodes that must be notified. Signed-off-by: Allan Stephens <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]>
2011-03-13tipc: Eliminate configuration for maximum number of cluster nodesAllan Stephens6-55/+7
Gets rid of the need for users to specify the maximum number of cluster nodes supported by TIPC. TIPC now automatically provides support for all 4K nodes allowed by its addressing scheme. Note: This change sets TIPC's memory usage to the amount used by a maximum size node table with 4K entries. An upcoming patch that converts the node table from a linear array to a hash table will compact the node table to a more efficient design, but for clarity it is nice to have all the Kconfig infrastruture go away separately. Signed-off-by: Allan Stephens <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]>
2011-03-13tipc: Split up unified structure of network-related variablesAllan Stephens5-42/+33
Converts the fields of the global "tipc_net" structure into individual variables. Since the struct was never referenced as a complete unit, its existence was pointless. This will facilitate upcoming changes to TIPC's node table and simpify upcoming relocation of the variables so they are only visible to the files that actually use them. This change is essentially cosmetic in nature, and doesn't affect the operation of TIPC. Signed-off-by: Allan Stephens <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]>
2011-03-13tipc: Fix problem with missing link in "tipc-config -l" outputAllan Stephens3-6/+8
Removes a race condition that could cause TIPC's internal counter of the number of links it has to neighboring nodes to have the incorrect value if two independent threads of control simultaneously create new link endpoints connecting to two different nodes using two different bearers. Such under counting would result in TIPC failing to list the final link(s) in its response to a configuration request to list all of the node's links. The counter is now updated atomically to ensure that simultaneous increments do not interfere with each other. Thanks go to Peter Butler <[email protected]> for his assistance in diagnosing and fixing this problem. Signed-off-by: Allan Stephens <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]>
2011-03-13tipc: Add support for SO_RCVTIMEO socket optionAllan Stephens1-15/+17
Adds support for the SO_RCVTIMEO socket option to TIPC's socket receive routines. Thanks go out to Raj Hegde <[email protected]> for his contribution to the development and testing this enhancement. Signed-off-by: Allan Stephens <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]>
2011-03-13tipc: Cosmetic changes to node subscription codeAllan Stephens4-13/+27
Relocates the code that notifies users of node subscriptions so that it is adjacent to the rest of the routines that implement TIPC's node subscription capability. Renames the name table routine that is invoked by a node subscription to better reflect its purpose and to be consistent with other, similar name table routines. These changes are cosmetic in nature, and do not alter the behavior of TIPC. Signed-off-by: Allan Stephens <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]>
2011-03-13tipc: Prevent null pointer error when removing a node subscriptionAllan Stephens2-8/+10
Prevents a null pointer dereference from occurring if a node subscription is triggered at the same time that the subscribing port or publication is terminating the subscription. The problem arises if the triggering routine asynchronously activates and deregisters the node subscription while deregistration is already underway -- the deregistration routine may find that the pointer it has just verified to be non-NULL is now NULL. To avoid this race condition the triggering routine now simply marks the node subscription as defunct (to prevent it from re-activating) instead of deregistering it. The subscription is now both deregistered and destroyed only when the subscribing port or publication code terminates the node subscription. Signed-off-by: Allan Stephens <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]>
2011-03-13tipc: Add network address mask helper routinesAllan Stephens3-7/+16
Introduces a pair of helper routines that convert the network address for a TIPC node into the network address for its cluster or zone. This is a cosmetic change designed to avoid future errors caused by the incorrect use of address bitmasks, and does not alter the existing operation of TIPC. Signed-off-by: Allan Stephens <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]>
2011-03-13tipc: Correct broadcast link peer info when displaying linksAllan Stephens1-1/+1
Fixes a typo in the calculation of the network address of a node's own cluster when generating a response to the configuration command that lists all of the node's links. The correct mask value for a <Z.C.N> network address uses 1's for the 8-bit zone and 12-bit cluster parts and 0's for the 12-bit node part. Signed-off-by: Allan Stephens <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]>
2011-03-13tipc: Allow receiving into iovec containing multiple entriesAllan Stephens1-23/+15
Enhances TIPC's socket receive routines to support iovec structures containing more than a single entry. This change leverages existing sk_buff routines to do most of the work; the only significant change to TIPC itself is that an sk_buff now records how much data has been already consumed as an numeric offset, rather than as a pointer to the first unread data byte. Signed-off-by: Allan Stephens <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]>
2011-03-12decnet: Convert to use flowidn where applicable.David S. Miller6-170/+177
Signed-off-by: David S. Miller <[email protected]>
2011-03-12net: Put fl6_* macros to struct flowi6 and use them again.David S. Miller12-51/+51
Signed-off-by: David S. Miller <[email protected]>
2011-03-12ipv6: Convert to use flowi6 where applicable.David S. Miller28-600/+602
Signed-off-by: David S. Miller <[email protected]>
2011-03-12net: Put fl4_* macros to struct flowi4 and use them again.David S. Miller10-32/+32
Signed-off-by: David S. Miller <[email protected]>
2011-03-12ipv4: Kill fib_semantic_match declaration from fib_lookup.hDavid S. Miller1-3/+0
This function no longer exists. Signed-off-by: David S. Miller <[email protected]>
2011-03-12net: Use flowi4 and flowi6 in xfrm layer.David S. Miller5-64/+77
Signed-off-by: David S. Miller <[email protected]>
2011-03-12netfilter: Use flowi4 and flowi6 in xt_TCPMSSDavid S. Miller1-5/+10
Signed-off-by: David S. Miller <[email protected]>
2011-03-12netfilter: Use flowi4 and flowi6 in nf_conntrack_h323_mainDavid S. Miller1-12/+20
Signed-off-by: David S. Miller <[email protected]>
2011-03-12ipv4: Use flowi4 in UDPDavid S. Miller1-6/+8
Signed-off-by: David S. Miller <[email protected]>
2011-03-12netfilter: Use flowi4 in nf_nat_standalone.cDavid S. Miller1-4/+5
Signed-off-by: David S. Miller <[email protected]>
2011-03-12ipv4: Use flowi4 in ipmr code.David S. Miller1-16/+17
Signed-off-by: David S. Miller <[email protected]>
2011-03-12ipv4: Use flowi4 in FIB layer.David S. Miller3-30/+31
Signed-off-by: David S. Miller <[email protected]>
2011-03-12ipv4: Use flowi4 in public route lookup interfaces.David S. Miller13-165/+172
Signed-off-by: David S. Miller <[email protected]>
2011-03-12ipv4: Use struct flowi4 internally in routing lookups.David S. Miller1-115/+115
We will change the externally visible APIs next. Signed-off-by: David S. Miller <[email protected]>
2011-03-12ipv4: Pass ipv4 flow objects into fib_lookup() paths.David S. Miller5-17/+17
To start doing these conversions, we need to add some temporary flow4_* macros which will eventually go away when all the protocol code paths are changed to work on AF specific flowi objects. Signed-off-by: David S. Miller <[email protected]>
2011-03-12net: Break struct flowi out into AF specific instances.David S. Miller4-10/+10
Now we have struct flowi4, flowi6, and flowidn for each address family. And struct flowi is just a union of them all. It might have been troublesome to convert flow_cache_uli_match() but as it turns out this function is completely unused and therefore can be simply removed. Signed-off-by: David S. Miller <[email protected]>
2011-03-12net: Make flowi ports AF dependent.David S. Miller25-93/+93
Create two sets of port member accessors, one set prefixed by fl4_* and the other prefixed by fl6_* This will let us to create AF optimal flow instances. It will work because every context in which we access the ports, we have to be fully aware of which AF the flowi is anyways. Signed-off-by: David S. Miller <[email protected]>
2011-03-12net: Put flowi_* prefix on AF independent members of struct flowiDavid S. Miller47-311/+325
I intend to turn struct flowi into a union of AF specific flowi structs. There will be a common structure that each variant includes first, much like struct sock_common. This is the first step to move in that direction. Signed-off-by: David S. Miller <[email protected]>
2011-03-12xfrm: Eliminate "fl" and "pol" args to xfrm_bundle_ok().David S. Miller1-19/+3
There is only one caller of xfrm_bundle_ok(), and that always passes these parameters as NULL. Signed-off-by: David S. Miller <[email protected]>
2011-03-12ipv4: Create and use route lookup helpers.David S. Miller14-218/+118
The idea here is this minimizes the number of places one has to edit in order to make changes to how flows are defined and used. Signed-off-by: David S. Miller <[email protected]>
2011-03-11mac80211: implement support for cfg80211_ops->{get,set}_ringparamJohn W. Linville3-0/+95
Signed-off-by: John W. Linville <[email protected]>
2011-03-11wireless: add support for ethtool_ops->{get,set}_ringparamJohn W. Linville1-0/+33
Signed-off-by: John W. Linville <[email protected]>
2011-03-11mac80211: do not enable ps if 802.1x controlled port is unblockedJason Young2-5/+36
If dynamic_ps is disabled, enabling power save before the 4-way handshake completes may delay the station from being authorized to send/receive traffic, i.e. increase roaming times. It also may result in a failed 4-way handshake depending on the AP's timing requirements and beacon interval, and the station's listen interval. To fix this, prevent power save from being enabled while the station isn't authorized and recalculate power save whenever the station's authorized state changes. Signed-off-by: Jason Young <[email protected]> Acked-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-03-11Merge branch 'master' of ↵John W. Linville15-338/+647
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
2011-03-10ipv4: Kill flowi arg to fib_select_multipath()David S. Miller2-3/+3
Completely unused. Signed-off-by: David S. Miller <[email protected]>
2011-03-10ipv4: Remove unnecessary test from ip_mkroute_input()David S. Miller1-1/+1
fl->oif will always be zero on the input path, so there is no reason to test for that. Signed-off-by: David S. Miller <[email protected]>
2011-03-10ipv4: Remove redundant RCU locking in ip_check_mc().David S. Miller2-7/+6
All callers are under rcu_read_lock() protection already. Rename to ip_check_mc_rcu() to make it even more clear. Signed-off-by: David S. Miller <[email protected]>
2011-03-10Merge branch 'master' of ↵David S. Miller15-43/+115
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/bnx2x/bnx2x_cmn.c
2011-03-10ip6ip6: autoload ip6 tunnelstephen hemminger1-0/+1
Add necessary alias to autoload ip6ip6 tunnel module. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-10Merge branch 'master' of /home/davem/src/GIT/linux-2.6/David S. Miller6-27/+80
2011-03-10net: bridge builtin vs. ipv6 modularRandy Dunlap1-0/+1
When configs BRIDGE=y and IPV6=m, this build error occurs: br_multicast.c:(.text+0xa3341): undefined reference to `ipv6_dev_get_saddr' BRIDGE_IGMP_SNOOPING is boolean; if it were tristate, then adding depends on IPV6 || IPV6=n to BRIDGE_IGMP_SNOOPING would be a good fix. As it is currently, making BRIDGE depend on the IPV6 config works. Reported-by: Patrick Schaaf <[email protected]> Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-10sunrpc: Propagate errors from xs_bind() through xs_create_sock()Ben Hutchings1-1/+2
xs_create_sock() is supposed to return a pointer or an ERR_PTR-encoded error, but it currently returns 0 if xs_bind() fails. Signed-off-by: Ben Hutchings <[email protected]> Cc: [email protected] [v2.6.37] Signed-off-by: Trond Myklebust <[email protected]>
2011-03-10SUNRPC: Remove resource leak in svc_rdma_send_error()Jesper Juhl1-0/+1
We leak the memory allocated to 'ctxt' when we return after 'ib_dma_mapping_error()' returns !=0. Signed-off-by: Jesper Juhl <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2011-03-10SUNRPC: Close a race in __rpc_wait_for_completion_task()Trond Myklebust1-14/+61
Although they run as rpciod background tasks, under normal operation (i.e. no SIGKILL), functions like nfs_sillyrename(), nfs4_proc_unlck() and nfs4_do_close() want to be fully synchronous. This means that when we exit, we want all references to the rpc_task to be gone, and we want any dentry references etc. held by that task to be released. For this reason these functions call __rpc_wait_for_completion_task(), followed by rpc_put_task() in the expectation that the latter will be releasing the last reference to the rpc_task, and thus ensuring that the callback_ops->rpc_release() has been called synchronously. This patch fixes a race which exists due to the fact that rpciod calls rpc_complete_task() (in order to wake up the callers of __rpc_wait_for_completion_task()) and then subsequently calls rpc_put_task() without ensuring that these two steps are done atomically. In order to avoid adding new spin locks, the patch uses the existing waitqueue spin lock to order the rpc_task reference count releases between the waiting process and rpciod. The common case where nobody is waiting for completion is optimised for by checking if the RPC_TASK_ASYNC flag is cleared and/or if the rpc_task reference count is 1: in those cases we drop trying to grab the spin lock, and immediately free up the rpc_task. Those few processes that need to put the rpc_task from inside an asynchronous context and that do not care about ordering are given a new helper: rpc_put_task_async(). Signed-off-by: Trond Myklebust <[email protected]>
2011-03-10tcp: mark tcp_congestion_ops read_mostlyStephen Hemminger12-12/+12
Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-09ipv4: Optimize flow initialization in fib_validate_source().David S. Miller1-7/+9
Like in commit 44713b67db10c774f14280c129b0d5fd13c70cf2 ("ipv4: Optimize flow initialization in output route lookup." we can optimize the on-stack flow setup to only initialize the members which are actually used. Otherwise we bzero the entire structure, then initialize explicitly the first half of it. Signed-off-by: David S. Miller <[email protected]>
2011-03-09ipv4: Optimize flow initialization in input route lookup.David S. Miller1-6/+8
Like in commit 44713b67db10c774f14280c129b0d5fd13c70cf2 ("ipv4: Optimize flow initialization in output route lookup." we can optimize the on-stack flow setup to only initialize the members which are actually used. Otherwise we bzero the entire structure, then initialize explicitly the first half of it. Signed-off-by: David S. Miller <[email protected]>
2011-03-09ipv6: Don't create clones of host routes.David S. Miller1-1/+3
Addresses https://bugzilla.kernel.org/show_bug.cgi?id=29252 Addresses https://bugzilla.kernel.org/show_bug.cgi?id=30462 In commit d80bc0fd262ef840ed4e82593ad6416fa1ba3fc4 ("ipv6: Always clone offlink routes.") we forced the kernel to always clone offlink routes. The reason we do that is to make sure we never bind an inetpeer to a prefixed route. The logic turned on here has existed in the tree for many years, but was always off due to a protecting CPP define. So perhaps it's no surprise that there is a logic bug here. The problem is that we canot clone a route that is already a host route (ie. has DST_HOST set). Because if we do, an identical entry already exists in the routing tree and therefore the ip6_rt_ins() call is going to fail. This sets off a series of failures and high cpu usage, because when ip6_rt_ins() fails we loop retrying this operation a few times in order to handle a race between two threads trying to clone and insert the same host route at the same time. Fix this by simply using the route as-is when DST_HOST is set. Reported-by: [email protected] Reported-by: Ernst Sjöstrand <[email protected]> Signed-off-by: David S. Miller <[email protected]>