summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS.YOSHIFUJI Hideaki2008-03-2687-228/+251
| | | | | | | | Introduce per-net_device inlines: dev_net(), dev_net_set(). Without CONFIG_NET_NS, no namespace other than &init_net exists. Let's explicitly define them to help compiler optimizations. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6]: Support Source Address Selection API (RFC5014).YOSHIFUJI Hideaki2008-03-2512-13/+146
| | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6]: Use bitfields for hop_limit and mcast_hops.YOSHIFUJI Hideaki2008-03-251-4/+24
| | | | | | Save some bits for future extensions. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6]: Optimize hop-limit determination.YOSHIFUJI Hideaki2008-03-258-29/+19
| | | | | | | | | | | Last part of hop-limit determination is always: hoplimit = dst_metric(dst, RTAX_HOPLIMIT); if (hoplimit < 0) hoplimit = ipv6_get_hoplimit(dst->dev). Let's consolidate it as ip6_dst_hoplimit(dst). Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6]: Convert cork.hop_limit and cork.tclass into u8 instead of int.YOSHIFUJI Hideaki2008-03-251-2/+2
| | | | | | | Values of those fields are always between 0 and 255 (inclusive), so use u8 and save some memory on 32bit systems. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV4,IPV6]: Share cork.rt between IPv4 and IPv6.YOSHIFUJI Hideaki2008-03-254-16/+13
| | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6] ADDRCONF: Clean-up ipv6_dev_get_saddr().YOSHIFUJI Hideaki2008-03-251-214/+206
| | | | | | | | | | | | old: | text data bss dec hex filename | 28599 1416 96 30111 759f net/ipv6/addrconf.o new: | text data bss dec hex filename | 28007 1416 96 29519 734f net/ipv6/addrconf.o Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [XFRM] MIP6: Fix address keys for routing search.YOSHIFUJI Hideaki2008-03-252-9/+57
| | | | | | | | | | | | | | | | | Each MIPv6 XFRM state (DSTOPT/RH2) holds either destination or source address to be mangled in the IPv6 header (that is "CoA"). On Inter-MN communication after both nodes binds each other, they use route optimized traffic two MIPv6 states applied, and both source and destination address in the IPv6 header are replaced by the states respectively. The packet format is correct, however, next-hop routing search are not. This patch fixes it by remembering address pairs for later states. Based on patch from Masahide NAKAMURA <nakam@linux-ipv6.org>. Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [XFRM] IPV6: Optimize __xfrm_tunnel_alloc_spi().YOSHIFUJI Hideaki2008-03-251-22/+23
| | | | | | | | | | % size old/net/ipv6/xfrm6_tunnel.o new/net/ipv6/xfrm6_tunnel.o | text data bss dec hex filename | 1606 40 2080 3726 e8e old/net/ipv6/xfrm6_tunnel.o | 1574 40 2080 3694 e6e new/net/ipv6/xfrm6_tunnel.o Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [XFRM] IPV6: Optimize xfrm6_input_addr().YOSHIFUJI Hideaki2008-03-251-41/+14
| | | | | | | | | | % size old/net/ipv6/xfrm6_input.o new/net/ipv6/xfrm6_input.o | text data bss dec hex filename | 1026 0 0 1026 402 old/net/ipv6/xfrm6_input.o | 947 0 0 947 3b3 new/net/ipv6/xfrm6_input.o Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [XFRM] IPV6: Use distribution counting sort for xfrm_state/xfrm_tmpl chain.YOSHIFUJI Hideaki2008-03-251-97/+74
| | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [NETNS]: Enable TCP/UDP/ICMP inside namespace.Denis V. Lunev2008-03-242-0/+4
| | | | | Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETNS]: Allow to create sockets in non-initial namespace.Denis V. Lunev2008-03-241-3/+21
| | | | | | | Allow to create sockets in the namespace if the protocol ok with this. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETNS]: Drop packets in the non-initial namespace on the per/protocol basis.Denis V. Lunev2008-03-242-5/+6
| | | | | | | | | IP layer now can handle multiple namespaces normally. So, process such packets normally and drop them only if the transport layer is not aware about namespaces. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETNS]: Process netfilter hooks in initial namespace only.Denis V. Lunev2008-03-241-0/+8
| | | | | | | | | | There were no packets in the namespace other than initial previously. This will be changed in the neareast future. Netfilters are not namespace aware and should be processed in the initial namespace only for now. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETNS]: Process INET socket layer in the correct namespace.Denis V. Lunev2008-03-244-7/+7
| | | | | | | | Replace all the reast of the init_net with a proper net on the socket layer. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETNS]: Process IP layer in the context of the correct namespace.Denis V. Lunev2008-03-245-8/+14
| | | | | | | Replace all the rest of the init_net with a proper net on the IP layer. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETNS]: Add namespace parameter to ip_cmsg_send.Denis V. Lunev2008-03-244-5/+6
| | | | | | | Pass the init_net there for now. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETNS]: Add namespace parameter to ip_options_get(...).Denis V. Lunev2008-03-243-10/+12
| | | | | | | Pass the init_net there for now. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETNS]: Add namespace parameter to ip_options_compile.Denis V. Lunev2008-03-243-5/+7
| | | | | | | | | ip_options_compile uses inet_addr_type which requires a namespace. The packet argument is optional, so parameter is the only way to obtain it. Pass the init_net there for now. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETNS]: /proc/net/arp namespacing.Denis V. Lunev2008-03-241-2/+18
| | | | | | | | Seqfile operation showing /proc/net/arp are already namespace aware. All we need is to register this file for each namespace. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETNS]: Process ARP in the context of the correct namespace.Denis V. Lunev2008-03-241-14/+9
| | | | | | | | Get namespace from a device and pass it to the routing engine. Enable ARP packet processing and device notifiers after that. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETNS]: Minor information leak via /proc/net/ptype file.Pavel Emelyanov2008-03-241-3/+4
| | | | | | | | | This file displays the registered packet types, but some of them (packet sockets creates such) can be bound to a net device and showing them in a wrong namespace is not correct. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETNS][UDP-Lite]: Register /proc/net/udplite(6) in a namespace.Pavel Emelyanov2008-03-242-3/+33
| | | | | | | | UDP-Lite sockets are displayed in another files, rather than UDP ones, so make the present in namespaces as well. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [UDP-Lite]: Clean up proc creation a bit.Pavel Emelyanov2008-03-241-3/+11
| | | | | | | | | Just introduce a helper to remove ifdefs from inside the udplite4_register function. This will help to make the next patch nicer. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETNS][TCP]: Register /proc/net/tcp in a namespace.Pavel Emelyanov2008-03-241-2/+17
| | | | | | | | | After the commit f40c8174d3c21bf178283f3ef3aa8c7bf238fdec ([NETNS][IPV4] tcp - make proc handle the network namespaces) it is now possible to make this file present in newly created namespaces. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETNS][UDP]: Register /proc/net/udp in a namespace.Pavel Emelyanov2008-03-241-2/+17
| | | | | | | | | After the commit a91275eff43a527e1a25d6d034cbcd19ee323e64 ([NETNS][IPV6] udp - make proc handle the network namespace) it is now possible to make this file present in newly created namespaces. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ../net-2.6/David S. Miller2008-03-2312-57/+43
|\ | | | | | | | | | | Conflicts: net/ipv6/ndisc.c
| * sch_htb: fix "too many events" situationMartin Devera2008-03-231-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HTB is event driven algorithm and part of its work is to apply scheduled events at proper times. It tried to defend itself from livelock by processing only limited number of events per dequeue. Because of faster computers some users already hit this hardcoded limit. This patch limits processing up to 2 jiffies (why not 1 jiffie ? because it might stop prematurely when only fraction of jiffie remains). Signed-off-by: Martin Devera <devik@cdi.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
| * connector: convert to single-threaded workqueueEvgeniy Polyakov2008-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | From: Evgeniy Polyakov <johnpol@2ka.mipt.ru> We don't need one cqueue thread for each CPU. cqueue is used for receiving userspace datagrams, which are very rare and thus will happily live with a single queue. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [ATM]: When proc_create() fails, do some error handling work and return -ENOMEM.Wang Chen2008-03-232-3/+20
| | | | | | | | | | Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [SUNGEM]: Fix NAPI assertion failure.David S. Miller2008-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported by Johannes Berg: I started getting this warning with recent kernels: [ 773.908927] ------------[ cut here ]------------ [ 773.908954] Badness at net/core/dev.c:2204 ... If we loop more than once in gem_poll(), we'll use more than the real budget in our gem_rx() calls, thus eventually trigger the caller's assertions in net_rx_action(). Subtract "work_done" from "budget" for the second arg to gem_rx() to fix the bug. Signed-off-by: David S. Miller <davem@davemloft.net>
| * BNX2X: prevent ethtool from setting port typeEliezer Tamir2008-03-231-34/+2
| | | | | | | | | | | | | | | | | | | | On 10GBaseT boards setting the type to TP will cause the driver to try to configure 1GBaseT. Since there are currently no boards that support setting of the port type, disable this for now. Signed-off-by: Eliezer Tamir <eliezert@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [9P] net/9p/trans_fd.c: remove unused variableJulia Lawall2008-03-221-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The variable cb is initialized but never used otherwise. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ type T; identifier i; constant C; @@ ( extern T i; | - T i; <+... when != i - i = C; ...+> ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [IPV6] net/ipv6/ndisc.c: remove unused variableJulia Lawall2008-03-221-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The variable hlen is initialized but never used otherwise. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ type T; identifier i; constant C; @@ ( extern T i; | - T i; <+... when != i - i = C; ...+> ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [IPV4] fib_trie: fix warning from rcu_assign_poingerStephen Hemminger2008-03-221-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | This gets rid of a warning caused by the test in rcu_assign_pointer. I tried to fix rcu_assign_pointer, but that devolved into a long set of discussions about doing it right that came to no real solution. Since the test in rcu_assign_pointer for constant NULL would never succeed in fib_trie, just open code instead. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [TCP]: Let skbs grow over a page on fast peersHerbert Xu2008-03-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While testing the virtio-net driver on KVM with TSO I noticed that TSO performance with a 1500 MTU is significantly worse compared to the performance of non-TSO with a 16436 MTU. The packet dump shows that most of the packets sent are smaller than a page. Looking at the code this actually is quite obvious as it always stop extending the packet if it's the first packet yet to be sent and if it's larger than the MSS. Since each extension is bound by the page size, this means that (given a 1500 MTU) we're very unlikely to construct packets greater than a page, provided that the receiver and the path is fast enough so that packets can always be sent immediately. The fix is also quite obvious. The push calls inside the loop is just an optimisation so that we don't end up doing all the sending at the end of the loop. Therefore there is no specific reason why it has to do so at MSS boundaries. For TSO, the most natural extension of this optimisation is to do the pushing once the skb exceeds the TSO size goal. This is what the patch does and testing with KVM shows that the TSO performance with a 1500 MTU easily surpasses that of a 16436 MTU and indeed the packet sizes sent are generally larger than 16436. I don't see any obvious downsides for slower peers or connections, but it would be prudent to test this extensively to ensure that those cases don't regress. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [DLCI]: Fix tiny race between module unload and sock_ioctl.Pavel Emelyanov2008-03-211-4/+3
| | | | | | | | | | | | | | | | This is a narrow pedantry :) but the dlci_ioctl_hook check and call should not be parted with the mutex lock. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [SCTP]: Fix build warnings with IPV6 disabled.David S. Miller2008-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced by 270637abff0cdf848b910b9f96ad342e1da61c66 ("[SCTP]: Fix a race between module load and protosw access") Reported by Gabriel C: In file included from net/sctp/sm_statetable.c:50: include/net/sctp/sctp.h: In function 'sctp_v6_pf_init': include/net/sctp/sctp.h:392: warning: 'return' with a value, in function returning void In file included from net/sctp/sm_statefuns.c:62: include/net/sctp/sctp.h: In function 'sctp_v6_pf_init': include/net/sctp/sctp.h:392: warning: 'return' with a value, in function returning void ... Signed-off-by: David S. Miller <davem@davemloft.net>
| * [IPV4]: Fix null dereference in ip_defragPhil Oester2008-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Been seeing occasional panics in my testing of 2.6.25-rc in ip_defrag. Offending line in ip_defrag is here: net = skb->dev->nd_net where dev is NULL. Bisected the problem down to commit ac18e7509e7df327e30d6e073a787d922eaf211d ([NETNS][FRAGS]: Make the inet_frag_queue lookup work in namespaces). Below patch (idea from Patrick McHardy) fixes the problem for me. Signed-off-by: Phil Oester <kernel@linuxace.com> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [CASSINI]: Use shorter list_splice_init() macro for brevity.Robert P. J. Day2008-03-231-8/+4
| | | | | | | | | | Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [SCTP]: Remove redundant wrapper functions.Florian Westphal2008-03-233-19/+3
| | | | | | | | | | | | | | | | | | | | sctp_datamsg_free and sctp_datamsg_track are just aliases for sctp_datamsg_put and sctp_chunk_hold, respectively. Saves 32 Bytes on x86. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [SCTP]: Replace char msg[] with static const char[].Florian Westphal2008-03-232-5/+5
| | | | | | | | | | | | | | | | 133886 2004 220 136110 213ae sctp.new/sctp.o 134018 2004 220 136242 21432 sctp.old/sctp.o Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* | fib_trie: print information on all routing tablesStephen Hemminger2008-03-231-84/+95
| | | | | | | | | | | | | | | | Make /proc/net/fib_trie and /proc/net/fib_triestat display all routing tables, not just local and main. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [AF_PACKET]: Remove unused variable.Jiri Olsa2008-03-231-2/+1
| | | | | | | | | | Signed-off-by: Jiri Olsa <olsajiri@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [TCP]: Shrink syncookie_secret by 8 byte.Florian Westphal2008-03-233-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the first u32 copied from syncookie_secret is overwritten by the minute-counter four lines below. After adjusting the destination address, the size of syncookie_secret can be reduced accordingly. AFAICS, the only other user of syncookie_secret[] is the ipv6 syncookie support. Because ipv6 syncookies only grab 44 bytes from syncookie_secret[], this shouldn't affect them in any way. With fixes from Glenn Griffin. Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Glenn Griffin <ggriffin.kernel@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NET]: include/linux/udp.h - remove duplicate includeJoe Perches2008-03-231-11/+7
| | | | | | | | | | | | | | | | Remove duplicate #include <linux/types.h> Combine #ifdef __KERNEL__ blocks Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NET]: include/linux/igmp.h - remove duplicate includeJoe Perches2008-03-231-21/+17
| | | | | | | | | | | | | | | | Removed duplicate #include <linux/skbuff.h> Combined #ifdef __KERNEL__ blocks Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NET]: include/linux/atalk.h - remove duplicate includeJoe Perches2008-03-231-2/+0
| | | | | | | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NET]: include/net/route.h - remove duplicate includeJoe Perches2008-03-231-1/+0
| | | | | | | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud