GitHub/LineageOS/android_kernel_motorola_exynos9610.git
17 years ago[NETFILTER]: ipt_ULOG: add compat conversion functions
Patrick McHardy [Fri, 13 Apr 2007 05:17:05 +0000 (22:17 -0700)]
[NETFILTER]: ipt_ULOG: add compat conversion functions

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: nfnetlink_log: remove fallback to group 0
Patrick McHardy [Fri, 13 Apr 2007 05:16:38 +0000 (22:16 -0700)]
[NETFILTER]: nfnetlink_log: remove fallback to group 0

Don't fallback to group 0 if no instance can be found for the given group.
This potentially confuses the listener and is not what the user configured.
Also remove the ring buffer spamming that happens when rules are set up
before the logging daemon is started.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: {eb,ip6,ip}t_LOG: remove remains of LOG target overloading
Patrick McHardy [Fri, 13 Apr 2007 05:16:18 +0000 (22:16 -0700)]
[NETFILTER]: {eb,ip6,ip}t_LOG: remove remains of LOG target overloading

All LOG targets always use their internal logging function nowadays, so
remove the incorrect error message and handle real errors (!= -EEXIST)
by failing to load.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: nf_nat: use HW checksumming when possible
Patrick McHardy [Fri, 13 Apr 2007 05:15:50 +0000 (22:15 -0700)]
[NETFILTER]: nf_nat: use HW checksumming when possible

When mangling packets forwarded to a HW checksumming capable device,
offload recalculation of the checksum instead of doing it in software.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: ebt_arp: add gratuitous arp filtering
Bart De Schuymer [Fri, 13 Apr 2007 05:15:06 +0000 (22:15 -0700)]
[NETFILTER]: ebt_arp: add gratuitous arp filtering

The attached patch adds gratuitous arp filtering, more precisely: it
allows checking that the IPv4 source address matches the IPv4
destination address inside the ARP header. It also adds a check for the
hardware address type when matching MAC addresses (nothing critical,
just for better consistency).

Signed-off-by: Bart De Schuymer <bdschuym@pandora.be>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: bridge-nf: filter bridged IPv4/IPv6 encapsulated in pppoe traffic
Michael Milner [Fri, 13 Apr 2007 05:14:23 +0000 (22:14 -0700)]
[NETFILTER]: bridge-nf: filter bridged IPv4/IPv6 encapsulated in pppoe traffic

The attached patch by Michael Milner adds support for using iptables and
ip6tables on bridged traffic encapsulated in ppoe frames, similar to
what's already supported for vlan.

Signed-off-by: Michael Milner <milner@blissisland.ca>
Signed-off-by: Bart De Schuymer <bdschuym@pandora.be>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[DCCP]: Complete documentation of dccp_sock
Gerrit Renker [Fri, 20 Apr 2007 20:57:21 +0000 (13:57 -0700)]
[DCCP]: Complete documentation of dccp_sock

This fills in missing documentation for dccp_sock fields.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[DCCP]: Debug statements for Elapsed Time option
Gerrit Renker [Fri, 20 Apr 2007 20:56:47 +0000 (13:56 -0700)]
[DCCP]: Debug statements for Elapsed Time option

This prints the value of the parsed Elapsed Time when received via a
Timestamp Echo option [RFC 4342, 13.3].

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[DCCP]: Fix bug in the calculation of very low sending rates
Gerrit Renker [Fri, 20 Apr 2007 20:02:55 +0000 (13:02 -0700)]
[DCCP]: Fix bug in the calculation of very low sending rates

This fixes an error in the calculation of t_ipi when X converges towards
very low sending rates (between 1 and 64 bytes per second).

Although this case may not sound likely, it can be reproduced by connecting,
hitting enter (1 byte sent) and waiting for some time, during which the
nofeedback timer halves the sending rate until finally it reaches the region
1..64 bytes/sec. Computing X is handled correctly (tested separately); but by
dividing X _before_ entering the calculation of t_ipi, X becomes zero as
a result.  This in turn triggers a BUG condition caught in scaled_div().

Fixed by replacing with equivalent statement and explicit typecast for good
measure.

Calculation verified and effect of patch tested - reduced never below 1 byte
per 64 seconds afterwards, i.e. not allowing divide-by-zero.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[S390]: Fix build on 31-bit.
David S. Miller [Wed, 11 Apr 2007 05:10:39 +0000 (22:10 -0700)]
[S390]: Fix build on 31-bit.

Allow s390 to properly override the generic
__div64_32() implementation by:

1) Using obj-y for div64.o in s390's makefile instead
   of lib-y

2) Adding the weak attribute to the generic implementation.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SK_BUFF]: Fix missing offset adjustment in skb_copy_expand
Patrick McHardy [Wed, 11 Apr 2007 01:30:09 +0000 (18:30 -0700)]
[SK_BUFF]: Fix missing offset adjustment in skb_copy_expand

skb_copy_expand changes the headroom, so it needs to adjust the header
offsets by the difference between the old and the new value.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET]: loopback driver can use loopback_dev integrated net_device_stats
Eric Dumazet [Tue, 10 Apr 2007 20:25:40 +0000 (13:25 -0700)]
[NET]: loopback driver can use loopback_dev integrated net_device_stats

Rusty added a new 'stats' field to struct net_device.

loopback driver can use it instead of declaring another struct
net_device_stats This saves some memory.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agobridge: check kmem_cache_create() error
Akinobu Mita [Sat, 7 Apr 2007 09:57:07 +0000 (18:57 +0900)]
bridge: check kmem_cache_create() error

This patch checks kmem_cache_create() error and aborts loading module
on failure.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agobridge: allow changing hardware address to any valid address
Stephen Hemminger [Mon, 9 Apr 2007 18:49:58 +0000 (11:49 -0700)]
bridge: allow changing hardware address to any valid address

For case of bridging pseudo devices, the get created/destroyed (Xen)
need to allow setting address to any valid value.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agobridge: change when netlink events go to STP
Stephen Hemminger [Thu, 22 Mar 2007 21:08:46 +0000 (14:08 -0700)]
bridge: change when netlink events go to STP

Need to tell STP daemon about more events, like any time a
device is added even when it is down.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agobridge: add support for user mode STP
Stephen Hemminger [Wed, 21 Mar 2007 21:22:44 +0000 (14:22 -0700)]
bridge: add support for user mode STP

This patchset based on work by Aji_Srinivas@emc.com provides allows
spanning tree to be controled from userspace.  Like hotplug, it
uses call_usermodehelper when spanning tree is enabled so there
is no visible API change. If call to start usermode STP fails
it falls back to existing kernel STP.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agobridge: add sysfs hook to flush forwarding table
Stephen Hemminger [Mon, 9 Apr 2007 19:57:54 +0000 (12:57 -0700)]
bridge: add sysfs hook to flush forwarding table

The RSTP daemon needs to be able to flush all dynamic forwarding
entries in the case of topology change.

This is a temporary interface. It will change to a netlink interface
before RSTP daemon is officially released.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agobridge: simpler hash with salt
Stephen Hemminger [Wed, 21 Mar 2007 20:42:33 +0000 (13:42 -0700)]
bridge: simpler hash with salt

Instead of hashing the whole Ethernet address, it should be faster
to just use the last 4 bytes. Add a random salt value to the hash
to make it more difficult to construct worst case DoS hash chains.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agobridge: don't route packets while learning
Stephen Hemminger [Wed, 21 Mar 2007 20:42:06 +0000 (13:42 -0700)]
bridge: don't route packets while learning

While in the STP learning state, don't route packets; wait until
forwarding delay has expired. The purpose of the forwarding delay
is to detect loops in the network, and if a brouter started up
and started forwarding, it could cause a flood.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years agobridge: eliminate call by reference
Stephen Hemminger [Wed, 21 Mar 2007 20:38:47 +0000 (13:38 -0700)]
bridge: eliminate call by reference

Change the bridging hook to be simple function with return value
rather than modifying the skb argument. This could generate better
code and is cleaner.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
17 years ago[NET]: Treat CHECKSUM_PARTIAL as CHECKSUM_UNNECESSARY
Herbert Xu [Mon, 9 Apr 2007 18:59:39 +0000 (11:59 -0700)]
[NET]: Treat CHECKSUM_PARTIAL as CHECKSUM_UNNECESSARY

When a transmitted packet is looped back directly, CHECKSUM_PARTIAL
maps to the semantics of CHECKSUM_UNNECESSARY.  Therefore we should
treat it as such in the stack.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETDRV]: Perform missing csum_offset conversions
Herbert Xu [Tue, 24 Apr 2007 00:06:40 +0000 (17:06 -0700)]
[NETDRV]: Perform missing csum_offset conversions

When csum_offset was introduced we did a conversion from csum to
csum_offset where applicable.  A couple of drivers were missed in
this process.

It was harmless to begin with since the two fields coincided.  Now
that we've made them different with the addition of csum_start, the
missed drivers must be converted or they can't send packets out at
all that require checksum offload.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET]: Use csum_start offset instead of skb_transport_header
Herbert Xu [Mon, 9 Apr 2007 18:59:07 +0000 (11:59 -0700)]
[NET]: Use csum_start offset instead of skb_transport_header

The skb transport pointer is currently used to specify the start
of the checksum region for transmit checksum offload.  Unfortunately,
the same pointer is also used during receive side processing.

This creates a problem when we want to retransmit a received
packet with partial checksums since the skb transport pointer
would be overwritten.

This patch solves this problem by creating a new 16-bit csum_start
offset value to replace the skb transport header for the purpose
of checksums.  This offset is calculated from skb->head so that
it does not have to change when skb->data changes.

No extra space is required since csum_offset itself fits within
a 16-bit word so we can use the other 16 bits for csum_start.

For backwards compatibility, just before we push a packet with
partial checksums off into the device driver, we set the skb
transport header to what it would have been under the old scheme.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[XFRM]: beet: fix worst case header_len calculation
Patrick McHardy [Mon, 9 Apr 2007 18:47:58 +0000 (11:47 -0700)]
[XFRM]: beet: fix worst case header_len calculation

esp_init_state doesn't account for the beet pseudo header in the header_len
calculation, which may result in undersized skbs hitting xfrm4_beet_output,
causing unnecessary reallocations in ip_finish_output2.

The skbs should still always have enough room to avoid causing
skb_under_panic in skb_push since we have at least 16 bytes available
from LL_RESERVED_SPACE in xfrm_state_check_space.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[XFRM]: Optimize MTU calculation
Patrick McHardy [Mon, 9 Apr 2007 18:47:18 +0000 (11:47 -0700)]
[XFRM]: Optimize MTU calculation

Replace the probing based MTU estimation, which usually takes 2-3 iterations
to find a fitting value and may underestimate the MTU, by an exact calculation.

Also fix underestimation of the XFRM trailer_len, which causes unnecessary
reallocations.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[XFRM]: esp: fix skb_tail_pointer conversion bug
Patrick McHardy [Mon, 9 Apr 2007 18:46:17 +0000 (11:46 -0700)]
[XFRM]: esp: fix skb_tail_pointer conversion bug

Fix incorrect switch of "trailer" skb by "skb" during skb_tail_pointer
conversion:

-       *(u8*)(trailer->tail - 1) = top_iph->protocol;
+       *(skb_tail_pointer(skb) - 1) = top_iph->protocol;

-       *(u8 *)(trailer->tail - 1) = *skb_network_header(skb);
+       *(skb_tail_pointer(skb) - 1) = *skb_network_header(skb);

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SK_BUFF]: Fix missing offset adjustment in pskb_expand_head
Patrick McHardy [Mon, 9 Apr 2007 18:45:04 +0000 (11:45 -0700)]
[SK_BUFF]: Fix missing offset adjustment in pskb_expand_head

Since we're increasing the headroom, the header offsets need to be
increased by the same amount as well.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPV6] FIB6RULE: Find source address during looking up route.
YOSHIFUJI Hideaki [Fri, 6 Apr 2007 18:45:39 +0000 (11:45 -0700)]
[IPV6] FIB6RULE: Find source address during looking up route.

When looking up route for destination with rules with
source address restrictions, we may need to find a source
address for the traffic if not given.

Based on patch from Noriaki TAKAMIYA <takamiya@po.ntts.co.jp>.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[XFRM]: beet: minor cleanups
Patrick McHardy [Thu, 5 Apr 2007 23:04:04 +0000 (16:04 -0700)]
[XFRM]: beet: minor cleanups

Remove unnecessary initialization/variable.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[RTNL]: Improve error codes for unsupported operations
Thomas Graf [Thu, 5 Apr 2007 21:35:52 +0000 (14:35 -0700)]
[RTNL]: Improve error codes for unsupported operations

The most common trigger of these errors is that the
config option hasn't been enable wich would make the
functionality available. Therefore returning EOPNOTSUPP
gives a better idea on what is going wrong.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET]: Move generic skbuff stuff from XFRM code to generic code
David Howells [Tue, 3 Apr 2007 03:19:53 +0000 (20:19 -0700)]
[NET]: Move generic skbuff stuff from XFRM code to generic code

Move generic skbuff stuff from XFRM code to generic code so that
AF_RXRPC can use it too.

The kdoc comments I've attached to the functions needs to be checked
by whoever wrote them as I had to make some guesses about the workings
of these functions.

Signed-off-By: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[CREDITS]: Update Arnaldo entry
Arnaldo Carvalho de Melo [Sat, 31 Mar 2007 15:05:49 +0000 (12:05 -0300)]
[CREDITS]: Update Arnaldo entry

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
17 years ago[SK_BUFF]: Some more conversions to skb_copy_from_linear_data
Arnaldo Carvalho de Melo [Sat, 31 Mar 2007 14:55:45 +0000 (11:55 -0300)]
[SK_BUFF]: Some more conversions to skb_copy_from_linear_data

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
17 years ago[SK_BUFF]: Introduce skb_copy_to_linear_data{_offset}
Arnaldo Carvalho de Melo [Sat, 31 Mar 2007 14:55:19 +0000 (11:55 -0300)]
[SK_BUFF]: Introduce skb_copy_to_linear_data{_offset}

To clearly state the intent of copying to linear sk_buffs, _offset being a
overly long variant but interesting for the sake of saving some bytes.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
17 years ago[NET]: Fix warnings in 3c523.c and ni52.c
David S. Miller [Fri, 30 Mar 2007 02:16:03 +0000 (19:16 -0700)]
[NET]: Fix warnings in 3c523.c and ni52.c

We have to put back the cast to "char *" because these
pointers are volatile.

Reported by Andrew Morton.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET]: Inline net_device_stats
Rusty Russell [Wed, 28 Mar 2007 21:29:08 +0000 (14:29 -0700)]
[NET]: Inline net_device_stats

Network drivers which keep stats allocate their own stats structure
then write a get_stats() function to return them.  It would be nice if
this were done by default.

1) Add a new "stats" field to "struct net_device".
2) Add a new feature field to say "this driver uses the internal one"
3) Have a default "get_stats" which returns NULL if that feature not set.
4) Change callers to check result of get_stats call for NULL, not if
   ->get_stats is set.

This should not break backwards compatibility with older drivers, yet
allow modern drivers to shed some boilerplate code.

Lightly tested: works for a modified lguest network driver.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET]: random functions can use nsec resolution instead of usec
Eric Dumazet [Wed, 28 Mar 2007 21:22:33 +0000 (14:22 -0700)]
[NET]: random functions can use nsec resolution instead of usec

In order to get more randomness for secure_tcpv6_sequence_number(),
secure_tcp_sequence_number(), secure_dccp_sequence_number() functions,
we can use the high resolution time services, providing nanosec
resolution.

I've also done two kmalloc()/kzalloc() conversions.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET] fib_rules: delay route cache flush by ip_rt_min_delay
Thomas Graf [Wed, 28 Mar 2007 21:18:52 +0000 (14:18 -0700)]
[NET] fib_rules: delay route cache flush by ip_rt_min_delay

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}
Arnaldo Carvalho de Melo [Tue, 27 Mar 2007 21:55:52 +0000 (18:55 -0300)]
[SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}

To clearly state the intent of copying from linear sk_buffs, _offset being a
overly long variant but interesting for the sake of saving some bytes.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
17 years ago[BLUETOOTH]: Introduce skb->data accessor methods for hci_{acl,event,sco}_hdr
Arnaldo Carvalho de Melo [Tue, 27 Mar 2007 21:38:07 +0000 (18:38 -0300)]
[BLUETOOTH]: Introduce skb->data accessor methods for hci_{acl,event,sco}_hdr

For consistency with other skb data accessors, reducing the number of direct
accesses to skb->data.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
17 years ago[IPV4]: align inet_protos[] on SMP
Eric Dumazet [Tue, 27 Mar 2007 21:18:34 +0000 (14:18 -0700)]
[IPV4]: align inet_protos[] on SMP

As IPPROTO_TCP is 6, it makes sense to make sure inet_protos[] array
is properly cache line aligned to avoid false sharing on SMP.

c0680540 b peer_total
c0680544 b inet_peer_unused_head
c0680560 B inet_protos

On i386 this example, we can see that inet_protos[IPPROTO_TCP] shares
a potentially hot (and modified) cache line.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP]: tcp_memory_pressure and tcp_socket are__read_mostly candidates
Eric Dumazet [Tue, 27 Mar 2007 20:58:31 +0000 (13:58 -0700)]
[TCP]: tcp_memory_pressure and tcp_socket are__read_mostly candidates

tcp_memory_pressure and tcp_socket currently share a cache line with tcp_memory_allocated, tcp_sockets_allocated.
(Very hot cache line)
It makes sense to declare these variables as __read_mostly, to avoid false sharing on SMP.

ffffffff8081d9c0 B tcp_orphan_count
ffffffff8081d9c4 B tcp_memory_allocated
ffffffff8081d9c8 B tcp_sockets_allocated
ffffffff8081d9cc B tcp_memory_pressure
ffffffff8081d9d0 b tcp_md5sig_users
ffffffff8081d9d8 b tcp_md5sig_pool
ffffffff8081d9e0 b warntime.31570
ffffffff8081d9e8 b tcp_socket

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET] fib_rules: Flush route cache after rule modifications
Thomas Graf [Tue, 27 Mar 2007 20:56:52 +0000 (13:56 -0700)]
[NET] fib_rules: Flush route cache after rule modifications

The results of FIB rules lookups are cached in the routing cache
except for IPv6 as no such cache exists. So far, it was the
responsibility of the user to flush the cache after modifying any
rules. This lead to many false bug reports due to misunderstanding
of this concept.

This patch automatically flushes the route cache after inserting
or deleting a rule.

Thanks to Muli Ben-Yehuda <muli@il.ibm.com> for catching a bug
in the previous patch.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET]: inet_ehash_secret should be __read_mostly and set only once
Eric Dumazet [Tue, 27 Mar 2007 20:53:04 +0000 (13:53 -0700)]
[NET]: inet_ehash_secret should be __read_mostly and set only once

There is a very tiny probability that build_ehash_secret() is called
at the same time by different CPUS.

Also, using __read_mostly is a must for inet_ehash_secret

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET]: Allow forwarding of ip_summed except CHECKSUM_COMPLETE
Herbert Xu [Tue, 27 Mar 2007 06:22:20 +0000 (23:22 -0700)]
[NET]: Allow forwarding of ip_summed except CHECKSUM_COMPLETE

Right now Xen has a horrible hack that lets it forward packets with
partial checksums.  One of the reasons that CHECKSUM_PARTIAL and
CHECKSUM_COMPLETE were added is so that we can get rid of this hack
(where it creates two extra bits in the skbuff to essentially mirror
ip_summed without being destroyed by the forwarding code).

I had forgotten that I've already gone through all the deivce drivers
last time around to make sure that they're looking at ip_summed ==
CHECKSUM_PARTIAL rather than ip_summed != 0 on transmit.  In any case,
I've now done that again so it should definitely be safe.

Unfortunately nobody has yet added any code to update CHECKSUM_COMPLETE
values on forward so we I'm setting that to CHECKSUM_NONE.  This should
be safe to remove for bridging but I'd like to check that code path
first.

So here is the patch that lets us get rid of the hack by preserving
ip_summed (mostly) on forwarded packets.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPV4] LVS: Allow to send ICMP unreachable responses when real-servers are removed
Janusz Krzysztofik [Tue, 27 Mar 2007 01:03:44 +0000 (18:03 -0700)]
[IPV4] LVS: Allow to send ICMP unreachable responses when real-servers are removed

this is a small patch by Janusz Krzysztofik to ip_route_output_slow()
that allows VIP-less LVS linux director to generate packets
originating >From VIP if sysctl_ip_nonlocal_bind is set.

In a nutshell, the intention is for an LVS linux director to be able
to send ICMP unreachable responses to end-users when real-servers are
removed.

http://archive.linuxvirtualserver.org/html/lvs-users/2007-01/msg00106.html

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET] fib_rules: Add no-operation action
Thomas Graf [Tue, 27 Mar 2007 00:38:53 +0000 (17:38 -0700)]
[NET] fib_rules: Add no-operation action

The use of nop rules simplifies the usage of goto rules
and adds more flexibility as they allow targets to remain
while the actual content of the branches can change easly.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET] fib_rules: Mark rules detached from the device
Thomas Graf [Tue, 27 Mar 2007 00:37:59 +0000 (17:37 -0700)]
[NET] fib_rules: Mark rules detached from the device

Rules which match against device names in their selector can
remain while the device itself disappears, in fact the device
doesn't have to present when the rule is added in the first
place. The device name is resolved by trying when the rule is
added and later by listening to NETDEV_REGISTER/UNREGISTER
notifications.

This patch adds the flag FIB_RULE_DEV_DETACHED which is set
towards userspace when a rule contains a device match which
is unresolved at the moment. This eases spotting the reason
why certain rules seem not to function properly.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET] fib_rules: goto rule action
Thomas Graf [Tue, 27 Mar 2007 00:14:15 +0000 (17:14 -0700)]
[NET] fib_rules: goto rule action

This patch adds a new rule action FR_ACT_GOTO which allows
to skip a set of rules by jumping to another rule. The rule
to jump to is specified via the FRA_GOTO attribute which
carries a rule preference.

Referring to a rule which doesn't exists is explicitely allowed.
Such goto rules are marked with the flag FIB_RULE_UNRESOLVED
and will act like a rule with a non-matching selector. The rule
will become functional as soon as its target is present.

The goto action enables performance optimizations by reducing
the average number of rules that have to be passed per lookup.

Example:
0:      from all lookup local
40:     not from all to 192.168.23.128 goto 32766
41:     from all fwmark 0xa blackhole
42:     from all fwmark 0xff blackhole
32766:  from all lookup main

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[WAN] cosa.c: Build fix.
David S. Miller [Mon, 26 Mar 2007 09:00:58 +0000 (02:00 -0700)]
[WAN] cosa.c: Build fix.

Caused by skb_reset_mac_header() changes, missing semicolon.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP] tcp_probe: improvements for net-2.6.22
Stephen Hemminger [Sun, 25 Mar 2007 04:35:33 +0000 (21:35 -0700)]
[TCP] tcp_probe: improvements for net-2.6.22

Change tcp_probe to use ktime (needed to add one export).
Add option to only get events when cwnd changes - from Doug Leith

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP]: cubic update for net-2.6.22
Stephen Hemminger [Sun, 25 Mar 2007 04:34:38 +0000 (21:34 -0700)]
[TCP]: cubic update for net-2.6.22

The following update received from Injong updates TCP cubic to the latest
version. I am running more complete tests and will have results after 4/1.

According to Injong: the new version improves on its scalability,
fairness and stability.  So in all properties, we confirmed it shows better
performance.

NCSU results (for 2.6.18 and 2.6.20) available:
http://netsrv.csc.ncsu.edu/wiki/index.php/TCP_Testing

This version is described in a new Internet draft for CUBIC.
http://www.ietf.org/internet-drafts/draft-rhee-tcp-cubic-00.txt

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET] Move DF check to ip_forward
John Heffner [Mon, 26 Mar 2007 06:32:29 +0000 (23:32 -0700)]
[NET] Move DF check to ip_forward

Do fragmentation check in ip_forward, similar to ipv6 forwarding.

Signed-off-by: John Heffner <jheffner@psc.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[INET]: Use jhash + random secret for ehash.
David S. Miller [Fri, 23 Mar 2007 18:40:27 +0000 (11:40 -0700)]
[INET]: Use jhash + random secret for ehash.

The days are gone when this was not an issue, there are folks out
there with huge bot networks that can be used to attack the
established hash tables on remote systems.

So just like the routing cache and connection tracking
hash, use Jenkins hash with random secret input.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETLINK]: introduce NLA_BINARY type
Johannes Berg [Fri, 23 Mar 2007 18:37:48 +0000 (11:37 -0700)]
[NETLINK]: introduce NLA_BINARY type

This patch introduces a new NLA_BINARY attribute policy type with the
verification of simply checking the maximum length of the payload.

It also fixes a small typo in the example.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SCTP]: Implement SCTP_MAX_BURST socket option.
Vlad Yasevich [Fri, 23 Mar 2007 18:34:36 +0000 (11:34 -0700)]
[SCTP]: Implement SCTP_MAX_BURST socket option.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SCTP]: Implement sac_info field in SCTP_ASSOC_CHANGE notification.
Vlad Yasevich [Fri, 23 Mar 2007 18:34:08 +0000 (11:34 -0700)]
[SCTP]: Implement sac_info field in SCTP_ASSOC_CHANGE notification.

As stated in the sctp socket api draft:

   sac_info: variable

   If the sac_state is SCTP_COMM_LOST and an ABORT chunk was received
   for this association, sac_info[] contains the complete ABORT chunk as
   defined in the SCTP specification RFC2960 [RFC2960] section 3.3.7.

We now save received ABORT chunks into the sac_info field and pass that
to the user.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SCTP]: Honor flags when setting peer address parameters
Vlad Yasevich [Fri, 23 Mar 2007 18:33:12 +0000 (11:33 -0700)]
[SCTP]: Honor flags when setting peer address parameters

Parameters only take effect when a corresponding flag bit is set
and a value is specified. This means we need to check the flags
in addition to checking for non-zero value.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SCTP]: Implement SCTP_ADDR_CONFIRMED state for ADDR_CHNAGE event
Vlad Yasevich [Fri, 23 Mar 2007 18:32:26 +0000 (11:32 -0700)]
[SCTP]: Implement SCTP_ADDR_CONFIRMED state for ADDR_CHNAGE event

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SCTP]: Implement SCTP_PARTIAL_DELIVERY_POINT option.
Vlad Yasevich [Fri, 23 Mar 2007 18:32:00 +0000 (11:32 -0700)]
[SCTP]: Implement SCTP_PARTIAL_DELIVERY_POINT option.

This option induces partial delivery to run as soon
as the specified amount of data has been accumulated on
the association.  However, we give preference to fully
reassembled messages over PD messages.  In any case,
window and buffer is freed up.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@.hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SCTP]: Implement SCTP_FRAGMENT_INTERLEAVE socket option
Vlad Yasevich [Fri, 20 Apr 2007 19:23:15 +0000 (12:23 -0700)]
[SCTP]: Implement SCTP_FRAGMENT_INTERLEAVE socket option

This option was introduced in draft-ietf-tsvwg-sctpsocket-13.  It
prevents head-of-line blocking in the case of one-to-many endpoint.
Applications enabling this option really must enable SCTP_SNDRCV event
so that they would know where the data belongs.  Based on an
earlier patch by Ivan Skytte Jørgensen.

Additionally, this functionality now permits multiple associations
on the same endpoint to enter Partial Delivery.  Applications should
be extra careful, when using this functionality, to track EOR indicators.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET_SCHED]: qdisc: remove unnecessary memory barriers
Patrick McHardy [Fri, 23 Mar 2007 18:30:04 +0000 (11:30 -0700)]
[NET_SCHED]: qdisc: remove unnecessary memory barriers

We're holding dev->queue_lock in qdisc_watchdog_schedule and
qdisc_watchdog_cancel, no need for the barriers.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET_SCHED]: Unline tcf_destroy
Patrick McHardy [Fri, 23 Mar 2007 18:29:43 +0000 (11:29 -0700)]
[NET_SCHED]: Unline tcf_destroy

Uninline tcf_destroy and add a helper function to destroy an entire filter
chain.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET_SCHED]: turn PSCHED_GET_TIME into inline function
Patrick McHardy [Fri, 23 Mar 2007 18:29:25 +0000 (11:29 -0700)]
[NET_SCHED]: turn PSCHED_GET_TIME into inline function

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET_SCHED]: turn PSCHED_TDIFF_SAFE into inline function
Patrick McHardy [Fri, 23 Mar 2007 18:29:11 +0000 (11:29 -0700)]
[NET_SCHED]: turn PSCHED_TDIFF_SAFE into inline function

Also rename to psched_tdiff_bounded.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET_SCHED]: kill PSCHED_TDIFF
Patrick McHardy [Fri, 23 Mar 2007 18:28:55 +0000 (11:28 -0700)]
[NET_SCHED]: kill PSCHED_TDIFF

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET_SCHED]: kill PSCHED_SET_PASTPERFECT/PSCHED_IS_PASTPERFECT
Patrick McHardy [Fri, 23 Mar 2007 18:28:30 +0000 (11:28 -0700)]
[NET_SCHED]: kill PSCHED_SET_PASTPERFECT/PSCHED_IS_PASTPERFECT

Use direct assignment and comparison instead.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET_SCHED]: kill PSCHED_TLESS
Patrick McHardy [Fri, 23 Mar 2007 18:28:07 +0000 (11:28 -0700)]
[NET_SCHED]: kill PSCHED_TLESS

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET_SCHED]: kill PSCHED_TADD/PSCHED_TADD2
Patrick McHardy [Fri, 23 Mar 2007 18:27:45 +0000 (11:27 -0700)]
[NET_SCHED]: kill PSCHED_TADD/PSCHED_TADD2

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET_SCHED]: kill PSCHED_AUDIT_TDIFF
Patrick McHardy [Fri, 23 Mar 2007 18:27:29 +0000 (11:27 -0700)]
[NET_SCHED]: kill PSCHED_AUDIT_TDIFF

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET_SCHED]: sch_netem: fix off-by-one in send time comparison
Patrick McHardy [Fri, 23 Mar 2007 18:27:04 +0000 (11:27 -0700)]
[NET_SCHED]: sch_netem: fix off-by-one in send time comparison

netem checks PSCHED_TLESS(cb->time_to_send, now) to find out whether it is
allowed to send a packet, which is equivalent to cb->time_to_send < now.
Use !PSCHED_TLESS(now, cb->time_to_send) instead to properly handle
cb->time_to_send == now.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER] nfnetlink: netlink_run_queue() already checks for NLM_F_REQUEST
Thomas Graf [Fri, 23 Mar 2007 18:17:57 +0000 (11:17 -0700)]
[NETFILTER] nfnetlink: netlink_run_queue() already checks for NLM_F_REQUEST

Patrick has made use of netlink_run_queue() in nfnetlink while my patches
have been waiting for net-2.6.22 to open. So this check for NLM_F_REQUEST
can go as well.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: nf_conntrack: kill destroy() in struct nf_conntrack for diet
Yasuyuki Kozakai [Fri, 23 Mar 2007 18:17:27 +0000 (11:17 -0700)]
[NETFILTER]: nf_conntrack: kill destroy() in struct nf_conntrack for diet

The destructor per conntrack is unnecessary, then this replaces it with
system wide destructor.

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: nf_conntrack: don't use nfct in skb if conntrack is disabled
Yasuyuki Kozakai [Fri, 23 Mar 2007 18:17:07 +0000 (11:17 -0700)]
[NETFILTER]: nf_conntrack: don't use nfct in skb if conntrack is disabled

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: Use setup_timer
Patrick McHardy [Fri, 23 Mar 2007 18:16:30 +0000 (11:16 -0700)]
[NETFILTER]: Use setup_timer

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: nfnetlink_log: remove conditional locking
Patrick McHardy [Fri, 23 Mar 2007 18:12:50 +0000 (11:12 -0700)]
[NETFILTER]: nfnetlink_log: remove conditional locking

This is gross, have the wrapper function take the lock.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: nfnetlink_log: micro-optimization: inst->skb != NULL in __nfulnl_send()
Michal Miroslaw [Fri, 23 Mar 2007 18:12:21 +0000 (11:12 -0700)]
[NETFILTER]: nfnetlink_log: micro-optimization: inst->skb != NULL in __nfulnl_send()

No other function calls __nfulnl_send() with inst->skb == NULL than
nfulnl_timer().

Signed-off-by: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: nfnetlink_log: iterator functions need iter_state * only
Michal Miroslaw [Fri, 23 Mar 2007 18:12:03 +0000 (11:12 -0700)]
[NETFILTER]: nfnetlink_log: iterator functions need iter_state * only

get_*() don't need access to seq_file - iter_state is enough for them.

Signed-off-by: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: nfnetlink_log: micro-optimization: don't modify destroyed instance
Michal Miroslaw [Fri, 23 Mar 2007 18:11:48 +0000 (11:11 -0700)]
[NETFILTER]: nfnetlink_log: micro-optimization: don't modify destroyed instance

Simple micro-optimization: Don't change any options if the instance is
being destroyed.

Signed-off-by: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: nfnetlink_log: micro-optimization for inst==NULL in nfulnl_recv_config()
Michal Miroslaw [Fri, 23 Mar 2007 18:11:31 +0000 (11:11 -0700)]
[NETFILTER]: nfnetlink_log: micro-optimization for inst==NULL in nfulnl_recv_config()

Simple micro-optimization: don't call instance_put() on known NULL pointers.

Signed-off-by: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: nfnetlink_log: kill duplicate code
Michal Miroslaw [Fri, 23 Mar 2007 18:11:05 +0000 (11:11 -0700)]
[NETFILTER]: nfnetlink_log: kill duplicate code

Kill some duplicate code in nfulnl_log_packet().

Signed-off-by: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: nfnetlink_log: don't count max(a,b) twice
Michal Miroslaw [Fri, 23 Mar 2007 18:10:47 +0000 (11:10 -0700)]
[NETFILTER]: nfnetlink_log: don't count max(a,b) twice

We don't need local nlbufsiz (skb size) as nfulnl_alloc_skb() takes
the maximum anyway.

Signed-off-by: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: Remove changelogs and CVS IDs
Patrick McHardy [Fri, 23 Mar 2007 18:10:13 +0000 (11:10 -0700)]
[NETFILTER]: Remove changelogs and CVS IDs

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETEM]: spelling errors
Stephen Hemminger [Fri, 23 Mar 2007 07:12:09 +0000 (00:12 -0700)]
[NETEM]: spelling errors

Get rid of some of my creative spelling.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETLINK]: Directly return -EINTR from netlink_dump_start()
Thomas Graf [Fri, 23 Mar 2007 06:30:55 +0000 (23:30 -0700)]
[NETLINK]: Directly return -EINTR from netlink_dump_start()

Now that all users of netlink_dump_start() use netlink_run_queue()
to process the receive queue, it is possible to return -EINTR from
netlink_dump_start() directly, therefore simplying the callers.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPv4] diag: Use netlink_run_queue() to process the receive queue
Thomas Graf [Fri, 23 Mar 2007 06:30:35 +0000 (23:30 -0700)]
[IPv4] diag: Use netlink_run_queue() to process the receive queue

Makes use of netlink_run_queue() to process the receive queue and
converts inet_diag_rcv_msg() to use the type safe netlink interface.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETLINK]: Remove error pointer from netlink message handler
Thomas Graf [Fri, 23 Mar 2007 06:30:12 +0000 (23:30 -0700)]
[NETLINK]: Remove error pointer from netlink message handler

The error pointer argument in netlink message handlers is used
to signal the special case where processing has to be interrupted
because a dump was started but no error happened. Instead it is
simpler and more clear to return -EINTR and have netlink_run_queue()
deal with getting the queue right.

nfnetlink passed on this error pointer to its subsystem handlers
but only uses it to signal the start of a netlink dump. Therefore
it can be removed there as well.

This patch also cleans up the error handling in the affected
message handlers to be consistent since it had to be touched anyway.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETLINK]: Ignore control messages directly in netlink_run_queue()
Thomas Graf [Fri, 23 Mar 2007 06:29:10 +0000 (23:29 -0700)]
[NETLINK]: Ignore control messages directly in netlink_run_queue()

Changes netlink_rcv_skb() to skip netlink controll messages and don't
pass them on to the message handler.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETLINK]: Ignore !NLM_F_REQUEST messages directly in netlink_run_queue()
Thomas Graf [Fri, 23 Mar 2007 06:28:46 +0000 (23:28 -0700)]
[NETLINK]: Ignore !NLM_F_REQUEST messages directly in netlink_run_queue()

netlink_rcv_skb() is changed to skip messages which don't have the
NLM_F_REQUEST bit to avoid every netlink family having to perform this
check on their own.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETLINK]: Remove unused groups variable
Thomas Graf [Fri, 23 Mar 2007 06:27:39 +0000 (23:27 -0700)]
[NETLINK]: Remove unused groups variable

Leftover from dynamic multicast groups allocation work.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP] westwood: Use type safe netlink interface
Thomas Graf [Fri, 23 Mar 2007 06:27:19 +0000 (23:27 -0700)]
[TCP] westwood: Use type safe netlink interface

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP] vegas: Use type safe netlink interface
Thomas Graf [Fri, 23 Mar 2007 06:27:01 +0000 (23:27 -0700)]
[TCP] vegas: Use type safe netlink interface

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[RTNL]: Properly return rntl message handler
Thomas Graf [Fri, 23 Mar 2007 04:41:06 +0000 (21:41 -0700)]
[RTNL]: Properly return rntl message handler

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET_SCHED] qdisc: avoid transmit softirq on watchdog wakeup
Stephen Hemminger [Thu, 22 Mar 2007 19:18:35 +0000 (12:18 -0700)]
[NET_SCHED] qdisc: avoid transmit softirq on watchdog wakeup

If possible, avoid having to do a transmit softirq when a qdisc
watchdog decides to re-enable.  The watchdog routine runs off
a timer, so it is already in the same effective context as
the softirq.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETEM]: avoid excessive requeues
Stephen Hemminger [Thu, 22 Mar 2007 19:17:42 +0000 (12:17 -0700)]
[NETEM]: avoid excessive requeues

The netem code would call getnstimeofday() and dequeue/requeue after
every packet, even if it was waiting. Avoid this overhead by using
the throttled flag.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETEM]: Optimize tfifo
Stephen Hemminger [Thu, 22 Mar 2007 19:17:05 +0000 (12:17 -0700)]
[NETEM]: Optimize tfifo

In most cases, the next packet will be sent after the
last one. So optimize that case.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETEM]: use better types for time values
Stephen Hemminger [Thu, 22 Mar 2007 19:16:21 +0000 (12:16 -0700)]
[NETEM]: use better types for time values

The random number generator always generates 32 bit values.
The time values are limited by psched_tdiff_t

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETEM]: report reorder percent correctly.
Stephen Hemminger [Thu, 22 Mar 2007 19:15:45 +0000 (12:15 -0700)]
[NETEM]: report reorder percent correctly.

If you setup netem to just delay packets; "tc qdisc ls" will report
the reordering as 100%. Well it's a lie, reorder isn't used unless
gap is set, so just set value to 0 so the output of utility
is correct.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP]: cubic optimization
Stephen Hemminger [Thu, 22 Mar 2007 19:10:58 +0000 (12:10 -0700)]
[TCP]: cubic optimization

Use willy's work in optimizing cube root by having table for small values.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[LIB]: div64_64 optimization
Stephen Hemminger [Thu, 22 Mar 2007 19:10:18 +0000 (12:10 -0700)]
[LIB]: div64_64 optimization

Minor optimization of div64_64.  do_div() already does optimization
for the case of 32 by 32 divide, so no need to do it here.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>