summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mib: add net to NET_INC_STATS_USERPavel Emelyanov2008-07-172-4/+4
| | | | | Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* mib: add net to NET_INC_STATS_BHPavel Emelyanov2008-07-1718-81/+84
| | | | | Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* mib: add net to NET_INC_STATSPavel Emelyanov2008-07-173-4/+4
| | | | | Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* tcp: replace tcp_sock argument with sock in some placesPavel Emelyanov2008-07-171-13/+18
| | | | | | | | | These places have a tcp_sock, but we'd prefer the sock itself to get net from it. Fortunately, tcp_sk macro is just a type cast, so this replace is really cheap. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* inet: prepare net on the stack for NET accounting macrosPavel Emelyanov2008-07-173-3/+6
| | | | | Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sock: add net to prot->enter_memory_pressure callbackPavel Emelyanov2008-07-176-8/+8
| | | | | | | | | | | | The tcp_enter_memory_pressure calls NET_INC_STATS, but doesn't have where to get the net from. I decided to add a sk argument, not the net itself, only to factor all the required sock_net(sk) calls inside the enter_memory_pressure callback itself. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* mib: add net to TCP_ADD_STATS_USERPavel Emelyanov2008-07-171-5/+5
| | | | | | | Now we're done with the TCP_XXX_STATS macros. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* mib: add net to TCP_DEC_STATSPavel Emelyanov2008-07-172-2/+2
| | | | | Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* mib: add net to TCP_INC_STATS_BHPavel Emelyanov2008-07-176-21/+21
| | | | | | | | | Same as before - the sock is always there to get the net from, but there are also some places with the net already saved on the stack. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* mib: add net to TCP_INC_STATSPavel Emelyanov2008-07-173-8/+8
| | | | | | | Fortunately (almost) all the TCP code has a sock to get the net from :) Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* tcp: add net to tcp_mib_initPavel Emelyanov2008-07-172-2/+2
| | | | | | | | | | This one sets TCP MIBs after zeroing them, and thus requires the net. The existing single caller can use init_net (temporarily). Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* mib: drop unused TCP_XXX_STATS macrosPavel Emelyanov2008-07-171-2/+0Star
| | | | | | | TCP_INC_STATS_USER and TCP_ADD_STATS_BH are currently unused. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* inet: prepare struct net for TCP MIB accountingPavel Emelyanov2008-07-172-4/+9
| | | | | | | | | This is the same as the first patch in the set, but preparing the net for TCP_XXX_STATS - save the struct net on the stack where required and possible. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* mib: add net to IP_ADD_STATS_BHPavel Emelyanov2008-07-172-2/+2
| | | | | | | | Very simple - only ip_evictor (fragments) requires such. This patch ends up the IP_XXX_STATS patching. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* mib: add net to IP_INC_STATS_BHPavel Emelyanov2008-07-1712-34/+41
| | | | | Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* mib: add net to IP_INC_STATSPavel Emelyanov2008-07-174-18/+18
| | | | | | | | All the callers already have either the net itself, or the place where to get it from. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* mib: drop unused IP_INC_STATS_USERPavel Emelyanov2008-07-171-1/+0Star
| | | | | Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv4: prepare net initialization for IP accountingPavel Emelyanov2008-07-173-5/+8
| | | | | | | | | | | Some places, that deal with IP statistics already have where to get a struct net from, but use it directly, without declaring a separate variable on the stack. So, save this net on the stack for future IP_XXX_STATS macros. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* netdrv intel: always enable VLAN filtering except in promiscous modePatrick McHardy2008-07-175-36/+5Star
| | | | | | | | | | | | Currently VLAN filtering is enabled when the first VLAN is added. Obviously before that there's no point in receiving any VLAN packets. Now that we disable VLAN filtering in promiscous mode, we can keep the VLAN filters enabled the remaining time. Signed-off-by: Patrick McHardy <kaber@trash.net> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netdrv intel: disable VLAN filtering in promiscous modePatrick McHardy2008-07-175-27/+57
| | | | | | | | | | | | | | | As discussed in this thread: http://www.mail-archive.com/netdev@vger.kernel.org/msg53976.html promiscous mode means to disable *all* filters. Currently only unicast and multicast filtering is disabled. This patch changes all Intel drivers to also disable VLAN filtering. Signed-off-by: Patrick McHardy <kaber@trash.net> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/ipv4/tcp.c: Fix use of PULLHUP instead of POLLHUP in comments.Will Newton2008-07-171-4/+4
| | | | | | | | Change PULLHUP to POLLHUP in tcp_poll comments and clean up another comment for grammar and coding style. Signed-off-by: Will Newton <will.newton@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: make __skb_splice_bits staticHarvey Harrison2008-07-171-1/+1
| | | | | | | net/core/skbuff.c:1335:5: warning: symbol '__skb_splice_bits' was not declared. Should it be static? Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'stealer/ipvs/sync-daemon-cleanup-for-next' of ↵David S. Miller2008-07-171-259/+172Star
|\ | | | | | | git://git.stealer.net/linux-2.6
| * ipvs: Use schedule_timeout_interruptible() instead of msleep_interruptible()Sven Wegener2008-07-171-1/+1
| | | | | | | | | | | | | | | | So that kthread_stop() can wake up the thread and we don't have to wait one second in the worst case for the daemon to actually stop. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> Acked-by: Simon Horman <horms@verge.net.au>
| * ipvs: Put backup thread on mcast socket wait queueSven Wegener2008-07-171-2/+5
| | | | | | | | | | | | | | | | | | Instead of doing an endless loop with sleeping for one second, we now put the backup thread onto the mcast socket wait queue and it gets woken up as soon as we have data to process. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> Acked-by: Simon Horman <horms@verge.net.au>
| * ipvs: Use kthread_run() instead of doing a double-fork via kernel_thread()Sven Wegener2008-07-171-233/+136Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This also moves the setup code out of the daemons, so that we're able to return proper error codes to user space. The current code will return success to user space when the daemon is started with an invald mcast interface. With these changes we get an appropriate "No such device" error. We longer need our own completion to be sure the daemons are actually running, because they no longer contain code that can fail and kthread_run() takes care of the rest. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> Acked-by: Simon Horman <horms@verge.net.au>
| * ipvs: Use ERR_PTR for returning errors from make_receive_sock() and ↵Sven Wegener2008-07-171-19/+27
| | | | | | | | | | | | | | | | | | | | make_send_sock() The additional information we now return to the caller is currently not used, but will be used to return errors to user space. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> Acked-by: Simon Horman <horms@verge.net.au>
| * ipvs: Initialize mcast addr at compile timeSven Wegener2008-07-171-6/+5Star
| | | | | | | | | | | | | | There's no need to do it at runtime, the values are constant. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> Acked-by: Simon Horman <horms@verge.net.au>
* | ipvs: More reliable synchronization on connection closeRumen G. Bogdanovski2008-07-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | This patch enhances the synchronization of the closing connections between the master and the backup director. It prevents the closed connections to expire with the 15 min timeout of the ESTABLISHED state on the backup and makes them expire as they would do on the master with much shorter timeouts. Signed-off-by: Rumen G. Bogdanovski <rumen@voicecho.com> Acked-by: Simon Horman <horms@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* | iucv: fix memory leak in cpu hotplug error path.Akinobu Mita2008-07-151-1/+4
|/ | | | | | | Fix memory leak in error path in CPU_UP_PREPARE notifier. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* wireless: fix warnings from QoS patchJohannes Berg2008-07-152-44/+8Star
| | | | | | | | | | | When I removed the special "default" meaning from the QoS parameters, I forgot to update drivers and this lead to warnings because some drivers were checking for the special values and putting in defaults. This fixes that by removing the default special-casing completely. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* bluetooth/hci_bcsp: fix bitrev KconfigRandy Dunlap2008-07-151-1/+1
| | | | | | | | | | | | | | | Fix bluetooth hci_bcsp Kconfig to avoid build errors: drivers/built-in.o: In function `bcsp_prepare_pkt': hci_bcsp.c:(.text+0x7e9ac): undefined reference to `bitrev16' drivers/built-in.o: In function `bcsp_recv': hci_bcsp.c:(.text+0x7f276): undefined reference to `bitrev16' hci_bcsp.c:(.text+0x7f293): undefined reference to `bitrev16' make[1]: *** [.tmp_vmlinux1] Error 1 Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Ackey-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: refactor tcp splice receive path to improve readabilityOctavian Purdila2008-07-151-92/+61Star
| | | | | | | | | | | | | | | - move all of the details on offsets, lengths and buffers into a single function instead of doing these operation from multiple places - use a bottom up approach: try to avoid details in the high level functions, introduce them gradually as we go deeper in the function call stack With helpful feedback from Jarek Poplawski. Signed-off-by: Octavian Purdila <opurdila@ixiacom.com> Acked-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netdev: Do not use TX lock to protect address lists.David S. Miller2008-07-159-90/+42Star
| | | | | | | | | Now that we have a specific lock to protect the network device unicast and multicast lists, remove extraneous grabs of the TX lock in cases where the code only needs address list protection. Signed-off-by: David S. Miller <davem@davemloft.net>
* netdev: Add netdev->addr_list_lock protection.David S. Miller2008-07-1514-0/+94
| | | | | | | | | | | | | Add netif_addr_{lock,unlock}{,_bh}() helpers. Use them to protect operations that operate on or read the network device unicast and multicast address lists. Also use them in cases where the code simply wants to block calls into the driver's ->set_rx_mode() and ->set_multicast_list() methods. Signed-off-by: David S. Miller <davem@davemloft.net>
* netdev: Add addr_list_lock to struct net_device.David S. Miller2008-07-152-0/+2
| | | | | | | | This will be used to protect the per-device unicast and multicast address lists, as well as the callbacks into the drivers which configure such state such as ->set_rx_mode() and ->set_multicast_list(). Signed-off-by: David S. Miller <davem@davemloft.net>
* mib: add struct net to ICMPMSGIN_INC_STATS_BHPavel Emelyanov2008-07-152-2/+2
| | | | | Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* mib: add struct net to ICMPMSGOUT_INC_STATSPavel Emelyanov2008-07-152-2/+2
| | | | | Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* mib: add struct net to ICMP_INC_STATS_BHPavel Emelyanov2008-07-156-13/+14
| | | | | Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* mib: add struct net to ICMP_INC_STATSPavel Emelyanov2008-07-152-2/+2
| | | | | Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* icmp: drop unused MIB accounting wrappersPavel Emelyanov2008-07-151-5/+0Star
| | | | | | | | | There are ICMP_XXX_STATS that are not used in the kernel, so I remove them, not to "just patch" them later. But if there's some sense in keeping them, kick me - I will remake this set keeping them. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* inet: toss struct net initialization aroundPavel Emelyanov2008-07-154-6/+7
| | | | | | | | | | | | | Some places, that deal with ICMP statistics already have where to get a struct net from, but use it directly, without declaring a separate variable on the stack. Since I will need this net soon, I declare a struct net on the stack and use it in the existing places in a separate patch not to spoil the future ones. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* icmp: add struct net argument to icmp_out_countPavel Emelyanov2008-07-154-4/+7
| | | | | | | | This routine deals with ICMP statistics, but doesn't have a struct net at hands, so add one. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* vlan: remove unnecessary include statementsPatrick McHardy2008-07-153-22/+4Star
| | | | | Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* vlan: clean up hard_start_xmit functionsPatrick McHardy2008-07-151-35/+6Star
| | | | | | | | Remove excessive comments and debugging, use NETDEV_TX codes, remove some empty lines. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* vlan: clean up vlan_dev_hard_header()Patrick McHardy2008-07-151-46/+9Star
| | | | | | | | Remove some debugging and excessive comments, merge the two dev_hard_header calls into one. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* vlan: ethtool ->get_flags supportPatrick McHardy2008-07-151-0/+13
| | | | | | | | | | Allow to query LRO settings of underlying device when VLAN RX acceleration is used. Suggested by Ben Hutchings <bhutchings@solarflare.com>. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* packet: deliver VLAN TCI to userspacePatrick McHardy2008-07-152-0/+4
| | | | | | | | Store the VLAN tag in the auxillary data/tpacket2_hdr so userspace can properly deal with hardware VLAN tagging/stripping. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* packet: support extensible, 64 bit clean mmaped ring structurePatrick McHardy2008-07-152-33/+167
| | | | | | | | | | | | | | | | | | | | | | | | | The tpacket_hdr is not 64 bit clean due to use of an unsigned long and can't be extended because the following struct sockaddr_ll needs to be at a fixed offset. Add support for a version 2 tpacket protocol that removes these limitations. Userspace can query the header size through a new getsockopt option and change the protocol version through a setsockopt option. The changes needed to switch to the new protocol version are: 1. replace struct tpacket_hdr by struct tpacket2_hdr 2. query header len and save 3. set protocol version to 2 - set up ring as usual 4. for getting the sockaddr_ll, use (void *)hdr + TPACKET_ALIGN(hdrlen) instead of (void *)hdr + TPACKET_ALIGN(sizeof(struct tpacket_hdr)) Steps 2 and 4 can be omitted if the struct sockaddr_ll isn't needed. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* vlan: deliver packets received with VLAN acceleration to network tapsPatrick McHardy2008-07-153-0/+32
| | | | | | | | | | | | | | When VLAN header stripping is used, packets currently bypass packet sockets (and other network taps) completely. For locally existing VLANs, they appear directly on the VLAN device, for unknown VLANs they are silently dropped. Add a new function netif_nit_deliver() to deliver incoming packets to all network interface taps and use it in __vlan_hwaccel_rx() to make VLAN packets visible on the underlying device. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>