summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* vlan: Move device unregistration before lower dev cleanupPatrick McHardy2008-07-051-2/+2
| | | | | | | | | Move the unregister_netdevice() call for the VLAN device before cleanup for the lower device. This is needed by GVRP so it can send a leave message before the applicant on the lower device is cleaned up. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* vlan: Change vlan_dev_set_vlan_flag() to handle multiple flags at oncePatrick McHardy2008-07-054-19/+14
| | | | | | | | | | Change vlan_dev_set_vlan_flag() to handle multiple flags at once and rename to vlan_dev_change_flags(). This allows to to use it from the netlink interface, which in turn allows to handle necessary adjustments when changing flags centrally. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Add GARP applicant-only participantPatrick McHardy2008-07-055-0/+767
| | | | | | | | | Add an implementation of the GARP (Generic Attribute Registration Protocol) applicant-only participant. This will be used by the following patch to add GVRP support to the VLAN code. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* bridge: Use STP demuxPatrick McHardy2008-07-054-18/+16
| | | | | | | | Use the STP demux layer for receiving STP PDUs instead of directly registering with LLC. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Add STP demux layerPatrick McHardy2008-07-055-0/+121
| | | | | | | | | Add small STP demux layer for demuxing STP PDUs based on MAC address. This is needed to run both GARP and STP in parallel (or even load the modules) since both use LLC_SAP_BSPAN. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* MIB: add struct net to UDP6_INC_STATS_BHPavel Emelyanov2008-07-052-8/+9
| | | | | | Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* MIB: add struct net to UDP6_INC_STATS_USERPavel Emelyanov2008-07-052-5/+8
| | | | | | | | As simple as the patch #1 in this set. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* MIB: add struct net to UDP_INC_STATS_BHPavel Emelyanov2008-07-053-13/+16
| | | | | | | | | | | | Two special cases here - one is rxrpc - I put init_net there explicitly, since we haven't touched this part yet. The second place is in __udp4_lib_rcv - we already have a struct net there, but I have to move its initialization above to make it ready at the "drop" label. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* MIB: add struct net to UDP_INC_STATS_USERPavel Emelyanov2008-07-052-5/+8
| | | | | | | | | Nothing special - all the places already have a struct sock at hands, so use the sock_net() net. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'davem-next' of ↵David S. Miller2008-07-0537-944/+846
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
| * 8390: Split 8390 support into a pausing and a non pausing driver coreAlan Cox2008-07-047-36/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only a few ISA controllers need the pausing version of the 8390 core while PCMCIA, later ISA and PCI do not. More importantly the ISA delays can break non ISA boxes so we must use a different build of 8390.c for the two sets of controllers. No changes since last time as all the points of concerns raised proved to be invalid Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * WAN: Remove no longer needed pvc_desc in FR code.Krzysztof Halasa2008-07-041-17/+8
| | | | | | | | | | | | | | | | Remove no longer needed struct pvc_desc in FR code. Requires "WAN: convert drivers to use built-in netdev_stats" patch. Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * WAN: convert drivers to use built-in netdev_statsKrzysztof Halasa2008-07-0417-230/+174
| | | | | | | | | | | | | | | | There is no point in using separate net_device_stats structs when the one in struct net_device is present. Compiles. Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * igb: add NAPI Rx queue supportPJ Waskiewicz2008-07-042-89/+61
| | | | | | | | | | | | | | | | | | | | Update the NAPI implementation to use the new napi_struct infrstructure. This removes the need of multiple net_device structs to implement a multiqueue NAPI. Signed-off-by: PJ Waskiewicz <peter.p.waskiewicz.jr.@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * igb: fix init on 82575 with MNG enabledAlexander Duyck2008-07-044-0/+79
| | | | | | | | | | | | | | | | | | This patch resolves an issue seen on 82575 adapters with managability pass-thru enabled, which could cause the system to panic. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * igb: eliminate hw from the hw_dbg macro argumentsAuke Kok2008-07-047-182/+147
| | | | | | | | | | | | | | | | | | Various cosmetic cleanups. Comment fixes. Eliminate the hw part out of the hw_dbg macro since it's always used. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * igb: fix parameter optionsAlexander Duyck2008-07-041-4/+0
| | | | | | | | | | | | | | | | | | Currently there are items in the driver to support parameters, but there are no parameters being added to the driver. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * igb: cleanup function header commentsJeff Kirsher2008-07-044-103/+103
| | | | | | | | | | | | | | Function header comments do not match function name. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * igb: Remove adapter struct from these function call parametersMitch Williams2008-07-041-48/+40
| | | | | | | | | | | | | | | | | | Simplify a bunch of calls to these functions by moving the adapter struct out of the function arguments since that is not needed. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * igb: limit EEPROM accessJeff Kirsher2008-07-041-0/+4
| | | | | | | | | | | | | | | | EEPROM access beyond the base eeprom page is unsupported. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * ipg: run-time configurable jumbo frame supportPekka Enberg2008-07-042-95/+32
| | | | | | | | | | | | | | | | | | | | Make jumbo frame support configurable via ifconfig mtu option as suggested by Stephen Hemminger. Cc: Stephen Hemminger <stephen.hemminger@vyatta.com> Tested-by: Andrew Savchenko <Bircoph@list.ru> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * ipg: per-device max_rxframe_sizePekka Enberg2008-07-042-2/+7
| | | | | | | | | | | | | | | | | | | | Add a ->max_rxframe member to struct ipg_nic_private and convert the users of IPG_MAX_RXFRAME_SIZE to use it instead to enable per-device jumbo frame configuration. Tested-by: Andrew Savchenko <Bircoph@list.ru> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * ipg: per-device rxsupport_sizePekka Enberg2008-07-042-4/+6
| | | | | | | | | | | | | | | | | | | | Add a ->max_rxframe member to struct ipg_nic_private and convert the users of IPG_RXSUPPORT_SIZE to use it instead to enable per-device jumbo frame configuration. Tested-by: Andrew Savchenko <Bircoph@list.ru> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * ipg: per-device rxfrag_sizePekka Enberg2008-07-042-14/+12
| | | | | | | | | | | | | | | | | | | | Add a ->max_rxframe member to struct ipg_nic_private and convert the users of IPG_RXFRAG_SIZE to use it instead to enable per-device jumbo frame configuration. Tested-by: Andrew Savchenko <Bircoph@list.ru> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * ipg: remove jumbo frame #ifdef from mtuPekka Enberg2008-07-042-3/+5
| | | | | | | | | | | | | | | | | | Remove JUMBO_FRAME #ifdef from dev->mtu setting in ipg_nic_open() so that we can make IPG_TXFRAG_SIZE configurable. Tested-by: Andrew Savchenko <Bircoph@list.ru> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * ipg: always compile in jumbo frame supportPekka Enberg2008-07-042-15/+21
| | | | | | | | | | | | | | | | | | | | | | Add a ->is_jumbo boolean to struct ipg_nic_private and fix up ipg_interrupt_handler() to call the jumbo frame version of ipg_nic_rx() if the boolean is set to true. Also remove the JUMBO_FRAME #ifdefs so we can always compile in support for jumbo frames. Tested-by: Andrew Savchenko <Bircoph@list.ru> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * Merge branch 'r8169-next' of ↵Jeff Garzik2008-07-042-116/+45
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6 into upstream-next
| | * r8169: remove non-napi codeFrancois Romieu2008-06-292-114/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It will almost unavoidably cause some breakage but it is long overdue. The driver identification string has been updated, a lost tabulation and some unused code have been removed. Otherwise the code paths should stay the same. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Edward Hsu <edward_hsu@realtek.com.tw>
| | * r8169: multicast register update (sync with Realtek's 8.004.00 8168 driver)Francois Romieu2008-06-291-2/+4
| | | | | | | | | | | | | | | | | | | | | The layout of the 8168 serie is different from that of the 8110 one. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Edward Hsu <edward_hsu@realtek.com.tw>
* | | netns: selective flush of rt_cacheDenis V. Lunev2008-07-051-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | dst cache is marked as expired on the per/namespace basis by previous path. Right now we have to implement selective cache shrinking. This procedure has been ported from older OpenVz codebase. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | netns: place rt_genid into struct netDenis V. Lunev2008-07-052-33/+44
| | | | | | | | | | | | | | | Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | ipv4: pass current value of rt_genid into rt_hashDenis V. Lunev2008-07-051-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | Basically, there is no difference to atomic_read internally or pass it as a parameter as rt_hash is inline. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | netns: add struct net parameter to rt_cache_invalidateDenis V. Lunev2008-07-051-3/+3
| | | | | | | | | | | | | | | Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | netns: make rt_secret_rebuild timer per namespaceDenis V. Lunev2008-07-052-10/+32
| | | | | | | | | | | | | | | Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | netns: register net.ipv4.route.flush in each namespaceDenis V. Lunev2008-07-052-10/+70
| | | | | | | | | | | | | | | Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | ipv4: remove static flush_delay variableDenis V. Lunev2008-07-051-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | flush delay is used as an external storage for net.ipv4.route.flush sysctl entry. It is write-only. The ctl_table->data for this entry is used once. Fix this case to point to the stack to remove global variable. Do this to avoid additional variable on struct net in the next patch. Possible race (as it was before) accessing this local variable is removed using flush_mutex. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | net: add fib_rules_ops to flush_cache methodDenis V. Lunev2008-07-054-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | This is required to pass namespace context into rt_cache_flush called from ->flush_cache. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | netns: add namespace parameter to rt_cache_flushDenis V. Lunev2008-07-058-24/+27
| | | | | | | | | | | | | | | Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | tun: Allow GSO using virtio_net_hdrRusty Russell2008-07-032-3/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a IFF_VNET_HDR flag. This uses the same ABI as virtio_net (ie. prepending struct virtio_net_hdr to packets) to indicate GSO and checksum information. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Max Krasnyansky <maxk@qualcomm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | tun: TUNSETFEATURES to set gso features.Rusty Russell2008-07-032-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ethtool is useful for setting (some) device fields, but it's root-only. Finer feature control is available through a tun-specific ioctl. (Includes Mark McLoughlin <markmc@redhat.com>'s fix to hold rtnl sem). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Max Krasnyansky <maxk@qualcomm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | tun: Interface to query tun/tap features.Rusty Russell2008-07-032-0/+9
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem with introducing checksum offload and gso to tun is they need to set dev->features to enable GSO and/or checksumming, which is supposed to be done before register_netdevice(), ie. as part of TUNSETIFF. Unfortunately, TUNSETIFF has always just ignored flags it doesn't understand, so there's no good way of detecting whether the kernel supports new IFF_ flags. This patch implements a TUNGETFEATURES ioctl which returns all the valid IFF flags. It could be extended later to include other features. Here's an example program which uses it: #include <linux/if_tun.h> #include <sys/types.h> #include <sys/ioctl.h> #include <sys/stat.h> #include <fcntl.h> #include <err.h> #include <stdio.h> static struct { unsigned int flag; const char *name; } known_flags[] = { { IFF_TUN, "TUN" }, { IFF_TAP, "TAP" }, { IFF_NO_PI, "NO_PI" }, { IFF_ONE_QUEUE, "ONE_QUEUE" }, }; int main() { unsigned int features, i; int netfd = open("/dev/net/tun", O_RDWR); if (netfd < 0) err(1, "Opening /dev/net/tun"); if (ioctl(netfd, TUNGETFEATURES, &features) != 0) { printf("Kernel does not support TUNGETFEATURES, guessing\n"); features = (IFF_TUN|IFF_TAP|IFF_NO_PI|IFF_ONE_QUEUE); } printf("Available features are: "); for (i = 0; i < sizeof(known_flags)/sizeof(known_flags[0]); i++) { if (features & known_flags[i].flag) { features &= ~known_flags[i].flag; printf("%s ", known_flags[i].name); } } if (features) printf("(UNKNOWN %#x)", features); printf("\n"); return 0; } Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Max Krasnyansky <maxk@qualcomm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'net-next-2.6-v6ready-20080703' of ↵David S. Miller2008-07-0313-26/+223
|\ \ | | | | | | | | | git://git.linux-ipv6.org/gitroot/yoshfuji/linux-2.6-next
| * | ipv4,ipv6 mroute: Add some helper inline functions to remove ugly ifdefs.YOSHIFUJI Hideaki2008-07-033-8/+59
| | | | | | | | | | | | | | | | | | | | | ip{,v6}_mroute_{set,get}sockopt() should not matter by optimization but it would be better not to depend on optimization semantically. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
| * | ipv4: Do cleanup for ip_mr_initWang Chen2008-07-034-9/+28
| | | | | | | | | | | | | | | | | | | | | | | | Same as ip6_mr_init(), make ip_mr_init() return errno if fails. But do not do error handling in inet_init(), just print a msg. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
| * | ipv6: Do cleanup for ip6_mr_init.Wang Chen2008-07-033-7/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | If do not do it, we will get following issues: 1. Leaving junks after inet6_init failing halfway. 2. Leaving proc and notifier junks after ipv6 modules unloading. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
| * | ipv6 route: Prefer outgoing interface with source address assigned.YOSHIFUJI Hideaki2008-07-031-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Outgoing interface is selected by the route decision if unspecified. Let's prefer routes via interface(s) with the address assigned if we have multiple routes with same cost. With help from Naohiro Ooiwa <nooiwa@miraclelinux.com>. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
| * | ipv6 addrconf: add accept_dad sysctl to control DAD operation.YOSHIFUJI Hideaki2008-07-033-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - If 0, disable DAD. - If 1, perform DAD (default). - If >1, perform DAD and disable IPv6 operation if DAD for MAC-based link-local address has been failed (RFC4862 5.4.5). We do not follow RFC4862 by default. Refer to the netdev thread entitled "Linux IPv6 DAD not full conform to RFC 4862 ?" http://www.spinics.net/lists/netdev/msg52027.html Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
| * | ipv6: Add disable_ipv6 sysctl to disable IPv6 operaion on specific interface.YOSHIFUJI Hideaki2008-07-035-1/+26
| | | | | | | | | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
| * | ipv6: Assume the loopback address in link-local scope.YOSHIFUJI Hideaki2008-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | Handle interface property strictly when looking up a route for the loopback address (RFC4291 2.5.3). Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
| * | ipv6: Do not forward packets with the unspecified source address.YOSHIFUJI Hideaki2008-07-031-1/+2
| | | | | | | | | | | | | | | | | | RFC4291 2.5.2. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
OpenPOWER on IntegriCloud