linux-2.6
16 years ago[NETNS]: Add namespace to API for routing /proc entries creation.
Denis V. Lunev [Thu, 10 Jan 2008 11:21:09 +0000 (03:21 -0800)] 
[NETNS]: Add namespace to API for routing /proc entries creation.

This adds netns parameter to fib_proc_init/exit and replaces __init
specifier with __net_init. After this, we will not yet have these proc
files show info from the specific namespace - this will be done when
these tables become namespaced.

Acked-by: Benjamin Thery <benjamin.thery@bull.net>
Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Namespacing in the generic fib rules code.
Denis V. Lunev [Thu, 10 Jan 2008 11:20:28 +0000 (03:20 -0800)] 
[NETNS]: Namespacing in the generic fib rules code.

Move static rules_ops & rules_mod_lock to the struct net, register the
pernet subsys to init them and enjoy the fact that the core rules
infrastructure works in the namespace.

Real IPv4 fib rules virtualization requires fib tables support in the
namespace and will be done seriously later in the patchset.

Acked-by: Benjamin Thery <benjamin.thery@bull.net>
Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Pass fib_rules_ops into default_pref method.
Denis V. Lunev [Thu, 10 Jan 2008 11:18:25 +0000 (03:18 -0800)] 
[NETNS]: Pass fib_rules_ops into default_pref method.

fib_rules_ops contains operations and the list of configured rules. ops will
become per/namespace soon, so we need them to be known in the default_pref
callback.

Acked-by: Benjamin Thery <benjamin.thery@bull.net>
Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Add netns parameter to fib_rules_(un)register.
Denis V. Lunev [Thu, 10 Jan 2008 11:17:29 +0000 (03:17 -0800)] 
[NETNS]: Add netns parameter to fib_rules_(un)register.

The patch extends the different fib rules API in order to pass the
network namespace pointer. That will allow to access the different
tables from a namespace relative object. As usual, the pointer to the
init_net variable is passed as parameter so we don't break the
network.

Acked-by: Benjamin Thery <benjamin.thery@bull.net>
Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6]: Make icmpv6_time sysctl per namespace.
Daniel Lezcano [Thu, 10 Jan 2008 11:02:40 +0000 (03:02 -0800)] 
[NETNS][IPV6]: Make icmpv6_time sysctl per namespace.

This patch moves the icmpv6_time sysctl to the network namespace
structure.

Because the ipv6 protocol is not yet per namespace, the variable is
accessed relatively to the initial network namespace.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6]: Make sysctls route per namespace.
Daniel Lezcano [Thu, 10 Jan 2008 11:01:01 +0000 (03:01 -0800)] 
[NETNS][IPV6]: Make sysctls route per namespace.

All the sysctl concerning the routes are moved to the network
namespace structure. A helper function is called to initialize the
variables.

Because the ipv6 protocol is not yet per namespace, the variables are
accessed relatively from the network namespace.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6]: Make mld_max_msf readonly in other namespaces.
Daniel Lezcano [Thu, 10 Jan 2008 10:57:43 +0000 (02:57 -0800)] 
[NETNS][IPV6]: Make mld_max_msf readonly in other namespaces.

The mld_max_msf protects the system with a maximum allowed multicast
source filters. Making this variable per namespace can be potentially
an problem if someone inside a namespace set it to a big value, that
will impact the whole system including other namespaces.

I don't see any benefits to have it per namespace for now, so in order
to keep a directory entry in a newly created namespace, I make it
read-only when we are not in the initial network namespace.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6]: Make ip6_frags per namespace.
Daniel Lezcano [Thu, 10 Jan 2008 10:56:03 +0000 (02:56 -0800)] 
[NETNS][IPV6]: Make ip6_frags per namespace.

The ip6_frags is moved to the network namespace structure.  Because
there can be multiple instances of the network namespaces, and the
ip6_frags is no longer a global static variable, a helper function has
been added to facilitate the initialization of the variables.

Until the ipv6 protocol is not per namespace, the variables are
accessed relatively from the initial network namespace.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6]: Make bindv6only sysctl per namespace.
Daniel Lezcano [Thu, 10 Jan 2008 10:54:53 +0000 (02:54 -0800)] 
[NETNS][IPV6]: Make bindv6only sysctl per namespace.

This patch moves the bindv6only sysctl to the network namespace
structure. Until the ipv6 protocol is not per namespace, the sysctl
variable is always from the initial network namespace.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6]: Make multiple instance of sysctl tables.
Daniel Lezcano [Thu, 10 Jan 2008 10:53:43 +0000 (02:53 -0800)] 
[NETNS][IPV6]: Make multiple instance of sysctl tables.

Each network namespace wants its own set of sysctl value, eg. we
should not be able from a namespace to set a sysctl value for another
namespace , especially for the initial network namespace.

This patch duplicates the sysctl table when we register a new network
namespace for ipv6. The duplicated table are postfixed with the
"template" word to notify the developper the table is cloned.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6]: Make the ipv6 sysctl to be a netns subsystem.
Daniel Lezcano [Thu, 10 Jan 2008 10:49:34 +0000 (02:49 -0800)] 
[NETNS][IPV6]: Make the ipv6 sysctl to be a netns subsystem.

The initialization of the sysctl for the ipv6 protocol is changed to a
network namespace subsystem. That means when a new network namespace
is created the initialization function for the sysctl will be called.

That do not change the behavior of the sysctl in case of the kernel
with the network namespace disabled.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6]: Add ipv6 structure for netns.
Daniel Lezcano [Thu, 10 Jan 2008 10:49:06 +0000 (02:49 -0800)] 
[NETNS][IPV6]: Add ipv6 structure for netns.

Like the ipv4 part, this patch adds an ipv6 structure in the net
structure to aggregate the different resources to make ipv6 per
namespace.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6]: Make a subsystem for af_inet6.
Daniel Lezcano [Thu, 10 Jan 2008 10:48:33 +0000 (02:48 -0800)] 
[NETNS][IPV6]: Make a subsystem for af_inet6.

This patch add a network namespace subsystem for the af_inet6 module.
It does nothing right now, but one of its purpose is to receive the
different variables for sysctl in order to initialize them.

When the sysctl variable will be moved to the network namespace
structure, they will be no longer initialized as global static
variables, so we must find a place to initialize them. Because the
sysctl can be disabled, it has no sense to store them in the
sysctl_net_ipv6 file.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6]: Make ipv6_sysctl_register to return a value.
Daniel Lezcano [Thu, 10 Jan 2008 10:47:55 +0000 (02:47 -0800)] 
[NETNS][IPV6]: Make ipv6_sysctl_register to return a value.

This patch makes the function ipv6_sysctl_register to return a
value. The af_inet6 init function is now able to handle an error and
catch it from the initialization of the sysctl.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[XFRM]: Remove ifdef crypto.
Sebastian Siewior [Wed, 9 Jan 2008 08:36:17 +0000 (00:36 -0800)] 
[XFRM]: Remove ifdef crypto.

and select the crypto subsystem if neccessary

Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BRIDGE]: Remove unused macros from ebt_vlan.c
Rami Rosen [Wed, 9 Jan 2008 08:35:12 +0000 (00:35 -0800)] 
[BRIDGE]: Remove unused macros from ebt_vlan.c

Remove two unused macros, INV_FLAG and SET_BITMASK
from net/bridge/netfilter/ebt_vlan.c.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: Use the ctl paths instead of hand-made analogue
Pavel Emelyanov [Wed, 9 Jan 2008 08:34:02 +0000 (00:34 -0800)] 
[NETFILTER]: Use the ctl paths instead of hand-made analogue

The conntracks subsystem has a similar infrastructure
to maintain ctl_paths, but since we already have it
on the generic level, I think it's OK to switch to
using it.

So, basically, this patch just replaces the ctl_table-s
with ctl_path-s, nf_register_sysctl_table with
register_sysctl_paths() and removes no longer needed code.

After this the net/netfilter/nf_sysctl.c file contains
the paths only.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: Switch to using ctl_paths in nf_queue and conntrack modules
Pavel Emelyanov [Wed, 9 Jan 2008 08:33:11 +0000 (00:33 -0800)] 
[NETFILTER]: Switch to using ctl_paths in nf_queue and conntrack modules

This includes the most simple cases for netfilter.

The first part is tne queue modules for ipv4 and ipv6,
on which the net/ipv4/ and net/ipv6/ paths are reused
from the appropriate ipv4 and ipv6 code.

The conntrack module is also patched, but this hunk is
very small and simple.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[AX25]: Switch to using ctl_paths.
Pavel Emelyanov [Wed, 9 Jan 2008 08:32:21 +0000 (00:32 -0800)] 
[AX25]: Switch to using ctl_paths.

This one is almost the same as the hunks in the
first patch, but ax25 tables are created dynamically.

So this patch differs a bit to handle this case.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[DECNET]: Switch to using ctl_paths.
Pavel Emelyanov [Wed, 9 Jan 2008 08:31:49 +0000 (00:31 -0800)] 
[DECNET]: Switch to using ctl_paths.

The decnet includes two places to patch. The first one is
the net/decnet table itself, and it is patched just like
other subsystems in the first patch in this series.

The second place is a bit more complex - it is the
net/decnet/conf/xxx entries,. similar to those in
ipv4/devinet.c and ipv6/addrconf.c. This code is made similar
to those in ipv[46].

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPVS]: Switch to using ctl_paths.
Pavel Emelyanov [Sat, 12 Jan 2008 10:33:50 +0000 (02:33 -0800)] 
[IPVS]: Switch to using ctl_paths.

The feature of ipvs ctls is that the net/ipv4/vs path
is common for core ipvs ctls and for two schedulers,
so I make it exported and re-use it in modules.

Two other .c files required linux/sysctl.h to make the
extern declaration of this path compile well.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: Simple ctl_table to ctl_path conversions.
Pavel Emelyanov [Wed, 9 Jan 2008 08:30:05 +0000 (00:30 -0800)] 
[NET]: Simple ctl_table to ctl_path conversions.

This patch includes many places, that only required
replacing the ctl_table-s with appropriate ctl_paths
and call register_sysctl_paths().

Nothing special was done with them.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: Remove unsupported DNAT (RTCF_NAT and RTCF_NAT) in IPV4
Rami Rosen [Wed, 9 Jan 2008 08:18:24 +0000 (00:18 -0800)] 
[IPV4]: Remove unsupported DNAT (RTCF_NAT and RTCF_NAT) in IPV4

- The DNAT (Destination NAT) is not implemented in IPV4.

- This patch remove the code which checks these flags
in net/ipv4/arp.c and net/ipv4/route.c.

The RTCF_NAT and RTCF_NAT should stay in the header (linux/in_route.h)
because they are used in DECnet.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Avoid expensive divides
Eric Dumazet [Wed, 9 Jan 2008 07:54:43 +0000 (23:54 -0800)] 
[VLAN]: Avoid expensive divides

We can avoid divides (as seen with CONFIG_CC_OPTIMIZE_FOR_SIZE=y on
x86) changing vlan_group_get_device()/vlan_group_set_device() id
parameter from signed to unsigned.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TIPC]: Use tipc_port_unlock
Julia Lawall [Wed, 9 Jan 2008 07:48:20 +0000 (23:48 -0800)] 
[TIPC]: Use tipc_port_unlock

The file net/tipc/port.c takes a lock using the function tipc_port_lock and
then releases the lock sometimes using tipc_port_unlock and sometimes using
spin_unlock_bh(p_ptr->publ.lock).  tipc_port_unlock simply does the
spin_unlock_bh, but it seems cleaner to use it everywhere.

The problem was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
struct port *p_ptr;
@@

   p_ptr = tipc_port_lock(...)
   ...
(
   p_ptr = tipc_port_lock(...);
|
?- spin_unlock_bh(p_ptr->publ.lock);
+  tipc_port_unlock(p_ptr);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Jon Paul Maloy <maloy@donjonn.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomac80211: Add radio led trigger
Ivo van Doorn [Mon, 7 Jan 2008 18:45:24 +0000 (19:45 +0100)] 
mac80211: Add radio led trigger

Some devices have a seperate LED which indicates if the radio is
enabled or not. This adds a LED trigger to mac80211 where drivers
can hook into when they are interested in radio status changes.

v2: Check hw.conf.radio_enabled when calling start().

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agorc80211_pid should respect fixed rates.
Andrew Lutomirski [Fri, 4 Jan 2008 05:05:37 +0000 (21:05 -0800)] 
rc80211_pid should respect fixed rates.

I would argue that mac80211 should handle fixed rates outside the rate
control code, which would also allow them to take effect immediately
instead of during the rate control callback, but this is pretty close
to correct.

Signed-Off-By: Andy Lutomirski <luto@myrealbox.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomac80211: better rate control algorithm selection
Johannes Berg [Wed, 2 Jan 2008 14:17:03 +0000 (15:17 +0100)] 
mac80211: better rate control algorithm selection

This patch changes mac80211's Kconfig/Makefile to:
 * select between the PID and the SIMPLE rate control
   algorithm as default
 * always allow tri-state for the rate control algorithms,
   building those that are selected 'y' into the mac80211
   module (if that is a module, otherwise all into the kernel)
 * force the default rate control algorithm to be built into
   mac80211

It also makes both rate control algorithms proper modules again
with MODULE_LICENSE etc.

Only if EMBEDDED is the user allowed to select "NONE" as default
which will cause no algorithm to be selected, this will work
only when the driver brings one itself (e.g. iwlwifi drivers).

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomac80211: A-MPDU Rx handling DELBA requests
Ron Rindjunsky [Tue, 25 Dec 2007 15:00:37 +0000 (17:00 +0200)] 
mac80211: A-MPDU Rx handling DELBA requests

This patch opens the flow to DELBA management frames, and handles end
of A-MPDU session produced by this event.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomac80211: A-MPDU Rx adding BAR handling capability
Ron Rindjunsky [Tue, 25 Dec 2007 15:00:36 +0000 (17:00 +0200)] 
mac80211: A-MPDU Rx adding BAR handling capability

This patch adds the ability to handle Block Ack Request

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomac80211: A-MPDU Rx handling aggregation reordering
Ron Rindjunsky [Tue, 25 Dec 2007 15:00:35 +0000 (17:00 +0200)] 
mac80211: A-MPDU Rx handling aggregation reordering

This patch handles the reordering of the Rx A-MPDU.
This issue occurs when the sequence of the internal MPDUs is not in the
right order. such a case can be encountered for example when some MPDUs from
previous aggregations were recieved, while others failed, so current A-MPDU
will contain a mix of re-transmited MPDUs and new ones.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomac80211: A-MPDU Rx MLME data initialization
Ron Rindjunsky [Tue, 25 Dec 2007 15:00:34 +0000 (17:00 +0200)] 
mac80211: A-MPDU Rx MLME data initialization

This patch initialize A-MPDU MLME data for Rx sessions.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomac80211: A-MPDU Rx adding basic functionality
Ron Rindjunsky [Tue, 25 Dec 2007 15:00:33 +0000 (17:00 +0200)] 
mac80211: A-MPDU Rx adding basic functionality

This patch adds the basic needed abilities and functions for A-MPDU Rx session
changed functions:
 - ieee80211_sta_process_addba_request - Rx A-MPDU initialization enabled
 - ieee80211_stop - stops all A-MPDU Rx in case interface goes down
added functions:
 - ieee80211_send_delba - used for sending out Del BA in A-MPDU sessions
 - ieee80211_sta_stop_rx_BA_session - stopping Rx A-MPDU session
 - sta_rx_agg_session_timer_expired - stops A-MPDU Rx use if load is too
low

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomac80211: A-MPDU Rx add MLME structures
Ron Rindjunsky [Tue, 25 Dec 2007 15:00:32 +0000 (17:00 +0200)] 
mac80211: A-MPDU Rx add MLME structures

This patch adds the needed structures to describe the Rx aggregation MLME per STA
new:
 - struct tid_ampdu_rx: TID aggregation information (Rx)
 - struct sta_ampdu_mlme: MLME aggregation information for STA
changed:
 - struct sta_info: ampdu_mlme added to describe A-MPDU MLME per STA,
    and timer_to_tid added to map timer id into TID

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomac80211: A-MPDU Rx add low level driver API
Ron Rindjunsky [Tue, 25 Dec 2007 15:00:31 +0000 (17:00 +0200)] 
mac80211: A-MPDU Rx add low level driver API

This patch adds the API to perform A-MPDU actions between mac80211 and low
level driver.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomac80211: restructure __ieee80211_rx
Ron Rindjunsky [Mon, 24 Dec 2007 11:36:39 +0000 (13:36 +0200)] 
mac80211: restructure __ieee80211_rx

This patch makes a separation between Rx frame pre-handling which stays in
__ieee80211_rx and Rx frame handlers, moving to __ieee80211_rx_handle_packet.
Although this separation has no affect in regular mode of operation, this kind
of mechanism will be used in A-MPDU frames reordering as it allows accumulation
of frames during pre-handling, dispatching them to later handling when necessary.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomac80211: make rc_pid_fop_events static
Johannes Berg [Sun, 23 Dec 2007 21:05:25 +0000 (22:05 +0100)] 
mac80211: make rc_pid_fop_events static

No need to not be.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agorc80211-pid: fix definition of rate control interval
Stefano Brivio [Sun, 23 Dec 2007 16:49:00 +0000 (17:49 +0100)] 
rc80211-pid: fix definition of rate control interval

Fix the rate control interval definition. Thanks to Mattias Nissler for
spotting this out.

Cc: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomac80211: remove misleading 'res' variable
Johannes Berg [Sun, 23 Dec 2007 09:11:55 +0000 (10:11 +0100)] 
mac80211: remove misleading 'res' variable

When this function returns != CONTINUE, it needs to put the
station struct it has acquired. Hence, having this unused
variable is not just superfluous but also misleading.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agorc80211-pid: add MAINTAINERS entry
Stefano Brivio [Sun, 23 Dec 2007 03:46:27 +0000 (04:46 +0100)] 
rc80211-pid: add MAINTAINERS entry

Add an entry in MAINTAINERS for rc80211-pid.

Cc: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agorc80211-pid: pf_target tuning
Stefano Brivio [Sun, 23 Dec 2007 03:44:56 +0000 (04:44 +0100)] 
rc80211-pid: pf_target tuning

Set a better value for percentage target for failed frames. The previous value
slowed down too much rate increases in case of permanently low activity. While
at it, increase readability.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agorc80211-pid: fix sta_info refcounting
Stefano Brivio [Sun, 23 Dec 2007 03:43:57 +0000 (04:43 +0100)] 
rc80211-pid: fix sta_info refcounting

Fix a bug which caused uncorrect refcounting of PHYs in mac80211. Thanks to
Johannes Berg for spotting this out.

Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agorc80211-pid: simplify and fix shift_adjust
Stefano Brivio [Sun, 23 Dec 2007 03:41:19 +0000 (04:41 +0100)] 
rc80211-pid: simplify and fix shift_adjust

Simplify and fix rate_control_pid_shift_adjust(). A bug prevented correct
mapping of sorted rates, and readability was seriously flawed.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agorc80211-pid: add kerneldoc for tunable parameters
Stefano Brivio [Sun, 23 Dec 2007 03:40:32 +0000 (04:40 +0100)] 
rc80211-pid: add kerneldoc for tunable parameters

Add a kerneldoc description for parameters which are tunable through debugfs.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agorc80211-pid: export human-readable target_pf value to debugfs
Stefano Brivio [Sun, 23 Dec 2007 03:39:17 +0000 (04:39 +0100)] 
rc80211-pid: export human-readable target_pf value to debugfs

Export the non-shifted target_pf value to debugfs, so that it's human-readable.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomac80211: Restore rx.fc before every invocation of ieee80211_invoke_rx_handlers
Helmut Schaa [Fri, 21 Dec 2007 14:16:35 +0000 (15:16 +0100)] 
mac80211: Restore rx.fc before every invocation of ieee80211_invoke_rx_handlers

This patch fixes a problem with rx handling on multiple interfaces. Especially
when using hardware-scanning and a wireless driver (i.e. iwlwifi) which is
able to receive data while scanning.

The rx handlers can modify the skb and the frame control field (see
ieee80211_rx_h_remove_qos_control) but since every interface gets its own
copy of the skb each should get its own copy of rx.fc too.

In my case the wlan0-interface did not remove the qos-control from the frame
because the corresponding flag in rx.fc was already removed while processing
the frame on the master interface. Therefore somehow corrupted frames were
passed to the userspace.

Signed-off-by: Helmut Schaa <hschaa@suse.de>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[XFRM]: xfrm_state_clone() should be static, not exported
Eric Dumazet [Tue, 8 Jan 2008 09:35:52 +0000 (01:35 -0800)] 
[XFRM]: xfrm_state_clone() should be static, not exported

xfrm_state_clone() is not used outside of net/xfrm/xfrm_state.c
There is no need to export it.

Spoted by sparse checker.
   CHECK   net/xfrm/xfrm_state.c
net/xfrm/xfrm_state.c:1103:19: warning: symbol 'xfrm_state_clone' was not
declared. Should it be static?

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PACKET]: Fix sparse warnings in af_packet.c
Eric Dumazet [Tue, 8 Jan 2008 06:39:57 +0000 (22:39 -0800)] 
[PACKET]: Fix sparse warnings in af_packet.c

  CHECK   net/packet/af_packet.c
net/packet/af_packet.c:1876:14: warning: context imbalance in 'packet_seq_start' - wrong count at exit
net/packet/af_packet.c:1888:13: warning: context imbalance in 'packet_seq_stop' - unexpected unlock

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BLUETOOTH]: Use sockfd_put()
Julia Lawall [Tue, 8 Jan 2008 06:38:42 +0000 (22:38 -0800)] 
[BLUETOOTH]: Use sockfd_put()

The function sockfd_lookup uses fget on the value that is stored in
the file field of the returned structure, so fput should ultimately be
applied to this value.  This can be done directly, but it seems better
to use the specific macro sockfd_put, which does the same thing.

The problem was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression s;
@@

   s = sockfd_lookup(...)
   ...
+  sockfd_put(s);
?- fput(s->file);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: Remove unused member of dst_entry
Rami Rosen [Tue, 8 Jan 2008 06:36:54 +0000 (22:36 -0800)] 
[NET]: Remove unused member of dst_entry

The info placeholder member of dst_entry seems to be unused in the
network stack.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[XFRM] xfrm_policy_destroy: Rename and relative fixes.
WANG Cong [Tue, 8 Jan 2008 06:34:29 +0000 (22:34 -0800)] 
[XFRM] xfrm_policy_destroy: Rename and relative fixes.

Since __xfrm_policy_destroy is used to destory the resources
allocated by xfrm_policy_alloc. So using the name
__xfrm_policy_destroy is not correspond with xfrm_policy_alloc.
Rename it to xfrm_policy_destroy.

And along with some instances that call xfrm_policy_alloc
but not using xfrm_policy_destroy to destroy the resource,
fix them.

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[XFRM] Statistics: Add outbound-dropping error.
Masahide NAKAMURA [Tue, 8 Jan 2008 05:46:15 +0000 (21:46 -0800)] 
[XFRM] Statistics: Add outbound-dropping error.

o Increment PolError counter when flow_cache_lookup() returns
  errored pointer.

o Increment NoStates counter at larval-drop.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: Remove obsolete comment
Ilpo Järvinen [Sun, 6 Jan 2008 07:17:49 +0000 (23:17 -0800)] 
[NET]: Remove obsolete comment

It seems that ip_build_xmit is no longer used in here and
ip_append_data is used.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[CCID3]: Kill some bloat
Ilpo Järvinen [Sun, 6 Jan 2008 07:13:58 +0000 (23:13 -0800)] 
[CCID3]: Kill some bloat

Without a number of CONFIG.*DEBUG:

net/dccp/ccids/ccid3.c:
  ccid3_hc_tx_update_x          | -170
  ccid3_hc_tx_packet_sent       | -175
  ccid3_hc_tx_packet_recv       | -169
  ccid3_hc_tx_no_feedback_timer | -192
  ccid3_hc_tx_send_packet       | -144
 5 functions changed, 850 bytes removed, diff: -850

net/dccp/ccids/ccid3.c:
  ccid3_update_send_interval | +191
 1 function changed, 191 bytes added, diff: +191

net/dccp/ccids/ccid3.o:
 6 functions changed, 191 bytes added, 850 bytes removed, diff: -659

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[XFRM]: Kill some bloat
Ilpo Järvinen [Sun, 6 Jan 2008 07:13:20 +0000 (23:13 -0800)] 
[XFRM]: Kill some bloat

net/xfrm/xfrm_state.c:
  xfrm_audit_state_delete          | -589
  xfrm_replay_check                | -542
  xfrm_audit_state_icvfail         | -520
  xfrm_audit_state_add             | -589
  xfrm_audit_state_replay_overflow | -523
  xfrm_audit_state_notfound_simple | -509
  xfrm_audit_state_notfound        | -521
 7 functions changed, 3793 bytes removed, diff: -3793

net/xfrm/xfrm_state.c:
  xfrm_audit_helper_pktinfo | +522
  xfrm_audit_helper_sainfo  | +598
 2 functions changed, 1120 bytes added, diff: +1120

net/xfrm/xfrm_state.o:
 9 functions changed, 1120 bytes added, 3793 bytes removed, diff: -2673

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPVS]: Kill some bloat
Ilpo Järvinen [Sun, 6 Jan 2008 07:12:40 +0000 (23:12 -0800)] 
[IPVS]: Kill some bloat

net/ipv4/ipvs/ip_vs_xmit.c:
  ip_vs_icmp_xmit   | -638
  ip_vs_tunnel_xmit | -674
  ip_vs_nat_xmit    | -716
  ip_vs_dr_xmit     | -682
 4 functions changed, 2710 bytes removed, diff: -2710

net/ipv4/ipvs/ip_vs_xmit.c:
  __ip_vs_get_out_rt | +595
 1 function changed, 595 bytes added, diff: +595

net/ipv4/ipvs/ip_vs_xmit.o:
 5 functions changed, 595 bytes added, 2710 bytes removed, diff: -2115

Without some CONFIG.*DEBUGs:

net/ipv4/ipvs/ip_vs_xmit.o:
 5 functions changed, 383 bytes added, 1513 bytes removed, diff: -1130

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: Kill some supper dupper bloatry
Ilpo Järvinen [Sun, 6 Jan 2008 07:11:31 +0000 (23:11 -0800)] 
[NETFILTER]: Kill some supper dupper bloatry

/me awards the bloatiest-of-all-net/-.c-code award to
nf_conntrack_netlink.c, congratulations to all the authors :-/!

Hall of (unquestionable) fame (measured per inline, top 10 under
net/):
  -4496 ctnetlink_parse_tuple        netfilter/nf_conntrack_netlink.c
  -2165 ctnetlink_dump_tuples        netfilter/nf_conntrack_netlink.c
  -2115 __ip_vs_get_out_rt           ipv4/ipvs/ip_vs_xmit.c
  -1924 xfrm_audit_helper_pktinfo    xfrm/xfrm_state.c
  -1799 ctnetlink_parse_tuple_proto  netfilter/nf_conntrack_netlink.c
  -1268 ctnetlink_parse_tuple_ip     netfilter/nf_conntrack_netlink.c
  -1093 ctnetlink_exp_dump_expect    netfilter/nf_conntrack_netlink.c
  -1060 void ccid3_update_send_interval  dccp/ccids/ccid3.c
  -983  ctnetlink_dump_tuples_proto  netfilter/nf_conntrack_netlink.c
  -827  ctnetlink_exp_dump_tuple     netfilter/nf_conntrack_netlink.c

  (i386 / gcc (GCC) 4.1.2 20070626 (Red Hat 4.1.2-13) /
   allyesconfig except CONFIG_FORCED_INLINING)

...and I left < 200 byte gains as future work item.

After iterative inline removal, I finally have this:

net/netfilter/nf_conntrack_netlink.c:
  ctnetlink_exp_fill_info   | -1104
  ctnetlink_new_expect      | -1572
  ctnetlink_fill_info       | -1303
  ctnetlink_new_conntrack   | -2230
  ctnetlink_get_expect      | -341
  ctnetlink_del_expect      | -352
  ctnetlink_expect_event    | -1110
  ctnetlink_conntrack_event | -1548
  ctnetlink_del_conntrack   | -729
  ctnetlink_get_conntrack   | -728
 10 functions changed, 11017 bytes removed, diff: -11017

net/netfilter/nf_conntrack_netlink.c:
  ctnetlink_parse_tuple     | +419
  dump_nat_seq_adj          | +183
  ctnetlink_dump_counters   | +166
  ctnetlink_dump_tuples     | +261
  ctnetlink_exp_dump_expect | +633
  ctnetlink_change_status   | +460
 6 functions changed, 2122 bytes added, diff: +2122

net/netfilter/nf_conntrack_netlink.o:
 16 functions changed, 2122 bytes added, 11017 bytes removed, diff: -8895

Without a number of CONFIG.*DEBUGs, I got this:
net/netfilter/nf_conntrack_netlink.o:
 16 functions changed, 2122 bytes added, 11029 bytes removed, diff: -8907

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Should build with CONFIG_SYSCTL=n
Eric Dumazet [Sun, 6 Jan 2008 07:08:49 +0000 (23:08 -0800)] 
[NETNS]: Should build with CONFIG_SYSCTL=n

Previous NETNS patches broke CONFIG_SYSCTL=n case

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[CONNECTOR]: Cleanup struct cn_callback_entry
Li Zefan [Fri, 4 Jan 2008 09:59:42 +0000 (01:59 -0800)] 
[CONNECTOR]: Cleanup struct cn_callback_entry

- 'cb' is a fake struct member. In a previous patch struct cn_callback
was renamed to cn_callback_id, so 'cb' should have been deleted at that
time.

- 'nls' isn't used and is redundant, we can retrieve this data through
cn_callback_entry.pdev->nls.

- 'seq' and 'group' should be u32, as they are declared to be u32 in
other places.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[CONNECTOR]: Cleanup struct cn_queue_dev
Li Zefan [Fri, 4 Jan 2008 09:59:20 +0000 (01:59 -0800)] 
[CONNECTOR]: Cleanup struct cn_queue_dev

Struct member netlink_groups is never used, and I don't see how it can
be useful.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[CONNECTOR]: clean up {,__}cn_rx_skb()
Li Zefan [Fri, 4 Jan 2008 09:55:01 +0000 (01:55 -0800)] 
[CONNECTOR]: clean up {,__}cn_rx_skb()

- __cn_rx_skb() does nothing but calls cn_call_callback(), it doesn't
check skb and msg sizes as the comment suggests, but cn_rx_skb() checks
those sizes.

- In cn_rx_skb() Local variable 'len' is not used. 'len' is probably
intended to be passed to skb_pull(), but here skb_pull() is not needed,
instead skb_free() is called.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[CONNECTOR]: add a missing break in cn_netlink_send()
Li Zefan [Fri, 4 Jan 2008 09:54:38 +0000 (01:54 -0800)] 
[CONNECTOR]: add a missing break in cn_netlink_send()

Each entry in the list has a unique id, so just break out of the
loop if the matched id is found.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ICMP]: Avoid sparse warnings in net/ipv4/icmp.c
Eric Dumazet [Thu, 24 Jan 2008 08:15:42 +0000 (00:15 -0800)] 
[ICMP]: Avoid sparse warnings in net/ipv4/icmp.c

   CHECK   net/ipv4/icmp.c
net/ipv4/icmp.c:249:13: warning: context imbalance in 'icmp_xmit_unlock' -
unexpected unlock
net/ipv4/icmp.c:376:13: warning: context imbalance in 'icmp_reply' - different
lock contexts for basic block
net/ipv4/icmp.c:430:6: warning: context imbalance in 'icmp_send' - different
lock contexts for basic block

Solution is to declare both icmp_xmit_lock() and icmp_xmit_unlock() as inline

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: prot_inuse cleanups and optimizations
Eric Dumazet [Fri, 4 Jan 2008 04:46:48 +0000 (20:46 -0800)] 
[NET]: prot_inuse cleanups and optimizations

1) Cleanups (all functions are prefixed by sock_prot_inuse)

sock_prot_inc_use(prot) -> sock_prot_inuse_add(prot,-1)
sock_prot_dec_use(prot) -> sock_prot_inuse_add(prot,-1)
sock_prot_inuse()       -> sock_prot_inuse_get()

New functions :

sock_prot_inuse_init() and sock_prot_inuse_free() to abstract pcounter use.

2) if CONFIG_PROC_FS=n, we can zap 'inuse' member from "struct proto",
since nobody wants to read the inuse value.

This saves 1372 bytes on i386/SMP and some cpu cycles.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[LIB] pcounter : unline too big functions
Eric Dumazet [Fri, 4 Jan 2008 04:41:28 +0000 (20:41 -0800)] 
[LIB] pcounter : unline too big functions

Before pushing pcounter to Linus tree, I would like to make some adjustments.

Goal is to reduce kernel text size, by unlining too big functions.

When a pcounter is bound to a statically defined per_cpu variable,
we define two small helpers functions. (No more folding function
using the fat for_each_possible_cpu(cpu) ... )

static DEFINE_PER_CPU(int, NAME##_pcounter_values);
static void NAME##_pcounter_add(struct pcounter *self, int val)
{
       __get_cpu_var(NAME##_pcounter_values) += val;
}
static int NAME##_pcounter_getval(const struct pcounter *self, int cpu)
{
       return per_cpu(NAME##_pcounter_values, cpu);
}

Fast path is therefore unchanged, while folding/alloc/free is now unlined.

This saves 228 bytes on i386

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: Avoid divides in net/core/gen_estimator.c
Eric Dumazet [Fri, 4 Jan 2008 04:40:01 +0000 (20:40 -0800)] 
[NET]: Avoid divides in net/core/gen_estimator.c

We can void divides (as seen with CONFIG_CC_OPTIMIZE_FOR_SIZE=y on x86)
changing ((HZ<<idx)/4) to ((HZ/4) << idx)

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TCP]: Perform setting of common control fields in one place
Ilpo Järvinen [Fri, 4 Jan 2008 04:39:01 +0000 (20:39 -0800)] 
[TCP]: Perform setting of common control fields in one place

In case of segments which are purely for control without any
data (SYN/ACK/FIN/RST), many fields are set to common values
in multiple places.

i386 results:

$ gcc --version
gcc (GCC) 4.1.2 20070626 (Red Hat 4.1.2-13)

$ codiff tcp_output.o.old tcp_output.o.new
net/ipv4/tcp_output.c:
  tcp_xmit_probe_skb    |  -48
  tcp_send_ack          |  -56
  tcp_retransmit_skb    |  -79
  tcp_connect           |  -43
  tcp_send_active_reset |  -35
  tcp_make_synack       |  -42
  tcp_send_fin          |  -48
 7 functions changed, 351 bytes removed

net/ipv4/tcp_output.c:
  tcp_init_nondata_skb |  +90
 1 function changed, 90 bytes added

tcp_output.o.mid:
 8 functions changed, 90 bytes added, 351 bytes removed, diff: -261

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TCP]: Urgent parameter effect can be simplified.
Ilpo Järvinen [Fri, 4 Jan 2008 04:38:05 +0000 (20:38 -0800)] 
[TCP]: Urgent parameter effect can be simplified.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TCP]: cleanup tcp_parse_options deep indented switch
Ilpo Järvinen [Fri, 4 Jan 2008 04:36:55 +0000 (20:36 -0800)] 
[TCP]: cleanup tcp_parse_options deep indented switch

Removed case indentation level & combined some nested ifs, mostly
within 80 lines now. This is a leftover from indent patch, it
just had to be done manually to avoid messing it up completely.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPSEC]: Return EOVERFLOW when output sequence number overflows
Herbert Xu [Wed, 2 Jan 2008 07:52:59 +0000 (23:52 -0800)] 
[IPSEC]: Return EOVERFLOW when output sequence number overflows

Previously we made it an error on the output path if the sequence number
overflowed.  However we did not set the err variable accordingly.  This
patch sets err to -EOVERFLOW in that case.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: Add some acquires/releases sparse annotations.
Eric Dumazet [Wed, 2 Jan 2008 05:58:02 +0000 (21:58 -0800)] 
[NET]: Add some acquires/releases sparse annotations.

Add __acquires() and __releases() annotations to suppress some sparse
warnings.

example of warnings :

net/ipv4/udp.c:1555:14: warning: context imbalance in 'udp_seq_start' - wrong
count at exit
net/ipv4/udp.c:1571:13: warning: context imbalance in 'udp_seq_stop' -
unexpected unlock

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPVS]: Remove declaration of unimplemented method and remove unused definition from...
Rami Rosen [Wed, 2 Jan 2008 05:17:19 +0000 (21:17 -0800)] 
[IPVS]: Remove declaration of unimplemented method and remove unused definition from include/net/ip_vs.h

In include/net/ip_vs.h:
- The ip_vs_secure_tcp_set() method is not implemented anywhere.
- IP_VS_APP_TYPE_FTP is an unused definition.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: Remove three declarations of unimplemented methods and correct a typo in...
Rami Rosen [Wed, 2 Jan 2008 05:13:09 +0000 (21:13 -0800)] 
[IPV4]: Remove three declarations of unimplemented methods and correct a typo in include/net/ip.h

These three declarations in include/net/ip.h are not implemented
anywhere:

ip_mc_dropsocket(), ip_mc_dropdevice() and ip_net_unreachable().

Also, correct a comment to be "Functions provided by ip_fragment.c"
(instead of by ip_fragment.o) in consistency with the other comments
in this header.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SHAPER]: The scheduled shaper removal.
Adrian Bunk [Mon, 28 Jan 2008 07:04:43 +0000 (23:04 -0800)] 
[SHAPER]: The scheduled shaper removal.

This patch contains the scheduled removal of the shaper driver.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPSEC]: Kill duplicate xfrm_policy_flush prototype
Herbert Xu [Wed, 2 Jan 2008 03:07:50 +0000 (19:07 -0800)] 
[IPSEC]: Kill duplicate xfrm_policy_flush prototype

For five years we had two xfrm_policy_flush prototypes and every time that
function's signature changed people have been diligently updating both of
them without noticing :)

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PATCH] use SK_MEM_QUANTUM_SHIFT in __sk_mem_reclaim()
Eric Dumazet [Mon, 31 Dec 2007 23:00:50 +0000 (15:00 -0800)] 
[PATCH] use SK_MEM_QUANTUM_SHIFT in __sk_mem_reclaim()

Avoid an expensive divide (as done in commit
18030477e70a826b91608aee40a987bbd368fec6 but lost in commit
23821d2653111d20e75472c8c5003df1a55309a8)

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TCP]: Remove unnecessary local variable
Ilpo Järvinen [Mon, 31 Dec 2007 22:58:00 +0000 (14:58 -0800)] 
[TCP]: Remove unnecessary local variable

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TCP]: Code duplication removal, added tcp_bound_to_half_wnd()
Ilpo Järvinen [Mon, 31 Dec 2007 22:57:40 +0000 (14:57 -0800)] 
[TCP]: Code duplication removal, added tcp_bound_to_half_wnd()

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TCP]: cleanup tcp_{in,out}put.c style
Ilpo Järvinen [Mon, 31 Dec 2007 22:57:14 +0000 (14:57 -0800)] 
[TCP]: cleanup tcp_{in,out}put.c style

These were manually selected from indent's results which as is
are too noisy to be of any use without human reason. In addition,
some extra newlines between function and its comment were removed
too.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TCP]: reduce tcp_output's indentation levels a bit
Ilpo Järvinen [Mon, 31 Dec 2007 12:51:11 +0000 (04:51 -0800)] 
[TCP]: reduce tcp_output's indentation levels a bit

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TCP]: Remove TCPCB_URG & TCPCB_AT_TAIL as unnecessary
Ilpo Järvinen [Mon, 31 Dec 2007 12:50:19 +0000 (04:50 -0800)] 
[TCP]: Remove TCPCB_URG & TCPCB_AT_TAIL as unnecessary

The snd_up check should be enough. I suspect this has been
there to provide a minor optimization in clean_rtx_queue which
used to have a small if (!->sacked) block which could skip
snd_up check among the other work.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TCP]: Dropped unnecessary skb/sacked accessing in reneging
Ilpo Järvinen [Mon, 31 Dec 2007 12:49:21 +0000 (04:49 -0800)] 
[TCP]: Dropped unnecessary skb/sacked accessing in reneging

SACK reneging can be precalculated to a FLAG in clean_rtx_queue
which has the right skb looked up. This will help a bit in
future because skb->sacked access will be changed eventually,
changing it already won't hurt any.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TCP]: Introduce tcp_wnd_end() to reduce line lengths
Ilpo Järvinen [Mon, 31 Dec 2007 12:48:41 +0000 (04:48 -0800)] 
[TCP]: Introduce tcp_wnd_end() to reduce line lengths

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TCP]: Rename update_send_head & include related increment to it
Ilpo Järvinen [Mon, 31 Dec 2007 12:43:57 +0000 (04:43 -0800)] 
[TCP]: Rename update_send_head & include related increment to it

There's very little need to have the packets_out incrementing in
a separate function. Also name the combined function
appropriately.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TCP]: Make invariant check complain about invalid sacked_out
Ilpo Järvinen [Mon, 31 Dec 2007 12:43:32 +0000 (04:43 -0800)] 
[TCP]: Make invariant check complain about invalid sacked_out

Earlier resolution for NewReno's sacked_out should now keep
it small enough for this to become invariant-like check.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: Remove unused multipath cached routing defintion in net/flow.h
Rami Rosen [Mon, 31 Dec 2007 12:22:09 +0000 (04:22 -0800)] 
[IPV4]: Remove unused multipath cached routing defintion in net/flow.h

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[UDP]: Add memory accounting.
Hideo Aoki [Mon, 31 Dec 2007 08:29:24 +0000 (00:29 -0800)] 
[UDP]: Add memory accounting.

Signed-off-by: Takahiro Yasui <tyasui@redhat.com>
Signed-off-by: Hideo Aoki <haoki@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET] CORE: Introducing new memory accounting interface.
Hideo Aoki [Mon, 31 Dec 2007 08:11:19 +0000 (00:11 -0800)] 
[NET] CORE: Introducing new memory accounting interface.

This patch introduces new memory accounting functions for each network
protocol. Most of them are renamed from memory accounting functions
for stream protocols. At the same time, some stream memory accounting
functions are removed since other functions do same thing.

Renaming:
sk_stream_free_skb() -> sk_wmem_free_skb()
__sk_stream_mem_reclaim() -> __sk_mem_reclaim()
sk_stream_mem_reclaim() -> sk_mem_reclaim()
sk_stream_mem_schedule  ->     __sk_mem_schedule()
sk_stream_pages()       -> sk_mem_pages()
sk_stream_rmem_schedule() -> sk_rmem_schedule()
sk_stream_wmem_schedule() -> sk_wmem_schedule()
sk_charge_skb() -> sk_mem_charge()

Removeing
sk_stream_rfree(): consolidates into sock_rfree()
sk_stream_set_owner_r(): consolidates into skb_set_owner_r()
sk_stream_mem_schedule()

The following functions are added.
     sk_has_account(): check if the protocol supports accounting
sk_mem_uncharge(): do the opposite of sk_mem_charge()

In addition, to achieve consolidation, updating sk_wmem_queued is
removed from sk_mem_charge().

Next, to consolidate memory accounting functions, this patch adds
memory accounting calls to network core functions. Moreover, present
memory accounting call is renamed to new accounting call.

Finally we replace present memory accounting calls with new interface
in TCP and SCTP.

Signed-off-by: Takahiro Yasui <tyasui@redhat.com>
Signed-off-by: Hideo Aoki <haoki@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: Remove useless code from fib6_del_route().
Gui Jianfeng [Mon, 31 Dec 2007 07:27:10 +0000 (23:27 -0800)] 
[IPV6]: Remove useless code from fib6_del_route().

There are useless codes in fib6_del_route(). The following patch has
been tested, every thing looks fine, as usual.

Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NEIGH]: Remove unused method from include/net/neighbour.h
Rami Rosen [Mon, 31 Dec 2007 07:25:31 +0000 (23:25 -0800)] 
[NEIGH]: Remove unused method from include/net/neighbour.h

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: Remove unused define in include/net/arp.h (HAVE_ARP_CREATE)
Rami Rosen [Mon, 31 Dec 2007 07:23:02 +0000 (23:23 -0800)] 
[IPV4]: Remove unused define in include/net/arp.h (HAVE_ARP_CREATE)

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ATM]: [he] fixing compilation when you define USE_RBPS_POOL/USE_RBPL_POOL
Jorge Boncompte [Mon, 31 Dec 2007 07:20:08 +0000 (23:20 -0800)] 
[ATM]: [he] fixing compilation when you define USE_RBPS_POOL/USE_RBPL_POOL

Signed-off-by: Jorge Boncompte <jorge@dti2.net>
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ATM]: [ambassador] kmalloc + memset conversion to kzalloc
Joonwoo Park [Mon, 31 Dec 2007 07:19:26 +0000 (23:19 -0800)] 
[ATM]: [ambassador] kmalloc + memset conversion to kzalloc

Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ATM]: [br2864] whitespace cleanup
Chas Williams [Mon, 31 Dec 2007 07:18:29 +0000 (23:18 -0800)] 
[ATM]: [br2864] whitespace cleanup

Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ATM]: [br2864] routed support
Eric Kinzie [Mon, 31 Dec 2007 07:17:53 +0000 (23:17 -0800)] 
[ATM]: [br2864] routed support

Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ATM]: [he] This patch removes the ancient version string.
Adrian Bunk [Mon, 31 Dec 2007 07:16:45 +0000 (23:16 -0800)] 
[ATM]: [he] This patch removes the ancient version string.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ATM]: Convert struct class_device to struct device
Kay Sievers [Mon, 31 Dec 2007 07:16:06 +0000 (23:16 -0800)] 
[ATM]: Convert struct class_device to struct device

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
16 years ago[ATM]: atm is no longer experimental
Robert P. J. Day [Mon, 31 Dec 2007 07:15:15 +0000 (23:15 -0800)] 
[ATM]: atm is no longer experimental

Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPSEC]: Move all calls to xfrm_audit_state_icvfail to xfrm_input
Herbert Xu [Mon, 31 Dec 2007 05:10:30 +0000 (21:10 -0800)] 
[IPSEC]: Move all calls to xfrm_audit_state_icvfail to xfrm_input

Let's nip the code duplication in the bud :)

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPSEC]: Fix transport-mode async resume on intput without netfilter
Herbert Xu [Mon, 31 Dec 2007 05:10:14 +0000 (21:10 -0800)] 
[IPSEC]: Fix transport-mode async resume on intput without netfilter

When netfilter is off the transport-mode async resumption doesn't work
because we don't push back the IP header.  This patch fixes that by
moving most of the code outside of ifdef NETFILTER since the only part
that's not common is the short-circuit in the protocol handler.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>