- 22 5月, 2008 4 次提交
-
-
由 Jay Vosburgh 提交于
Add a "follow" selection for fail_over_mac. This option causes the MAC address to move from slave to slave as the active slave changes. This is in addition to the existing fail_over_mac option that causes the bond's MAC address to change during failover. This new option is useful for devices that cannot tolerate multiple ports using the same MAC address simultaneously, either because it confuses them or incurs a performance penalty (as is the case with some LPAR-aware multiport devices). Because the MAC of the bond itself does not change, the "follow" option is slightly more reliable during failover and doesn't change the MAC of the bond during operation. This patch requires a previous ARP monitor change to properly handle RTNL during failovers. Signed-off-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
由 Moni Shoua 提交于
With IPoIB, reception of gratuitous ARP by neighboring hosts is essential for a successful change of slaves in case of failure. Otherwise, they won't learn about the HW address change and need to wait a long time until the neighboring system gives up and sends an ARP request to learn the new HW address. This patch decreases the chance for a lost of a gratuitous ARP packet by sending it more than once. The number retries is configurable and can be set with a module param. Signed-off-by: NMoni Shoua <monis@voltaire.com> Acked-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
由 Pavel Emelyanov 提交于
Many places either do not modify the list under the list_for_each_xxx, or break out of the loop as soon as the first element is removed. Thus, this _safe iteration just occupies some unneeded .text space and requires an additional variable. Signed-off-by: NPavel Emelyanov <xemul@openvz.org> Acked-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
由 Pavel Emelyanov 提交于
While we're fixing the bond_create, I hope it's OK to polish it a bit after the fixes. The third argument is NULL at the first caller and is ignored by the second one, so remove it. Signed-off-by: NPavel Emelyanov <xemul@openvz.org> Acked-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 15 5月, 2008 1 次提交
-
-
由 Stephen Hemminger 提交于
If device already exists named bonding_masters, then fail. This is a wierd corner case only a QA group could love. Signed-off-by: NStephen Hemminger <shemminger@vyatta.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 07 5月, 2008 1 次提交
-
-
由 Jay Vosburgh 提交于
Fixed an error unwind in bonding_store_bonds that didn't release the locks it held, and consolidated unwinds into a common block at the end of the function. Bug reported by Pavel Emelyanov <xemul@openvz.org>, who provided a different fix. Signed-off-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 29 3月, 2008 1 次提交
-
-
由 David S. Miller 提交于
original_mtu is only used if we end up with a non-NULL dev, and it is assigned in all such cases, but GCC can't see that. Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 19 1月, 2008 3 次提交
-
-
由 Jay Vosburgh 提交于
Fix the handling of rtnl and the bonding_rwsem to always be acquired in a consistent order (rtnl, then bonding_rwsem). The existing code sometimes acquired them in this order, and sometimes in the opposite order, which opens a window for deadlock between ifenslave and sysfs. Signed-off-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
由 Jay Vosburgh 提交于
A recent change to add an additional hash policy modified bond_parse_parm, but it now does not correctly match parameters passed in via sysfs. Rewrote bond_parse_parm to handle (a) parameter matches that are substrings of one another and (b) user input with whitespace (e.g., sysfs input often has a trailing newline). Signed-off-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
由 Jay Vosburgh 提交于
Fix the functions that store the primary and active slave options via sysfs to hold the correct locks in the correct order. The bond_change_active_slave and bond_select_active_slave functions both require rtnl, bond->lock for read and curr_slave_lock for write_bh, and no other locks. This is so that the lower level mode-specific functions (notably for balance-alb mode) can release locks down to just rtnl in order to call, e.g., dev_set_mac_address with the locks it expects (rtnl only). Signed-off-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NAndy Gospodarek <andy@greyhouse.net> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
- 08 12月, 2007 5 次提交
-
-
由 Wagner Ferenc 提交于
From: Wagner Ferenc <wferi@niif.hu> For consistency with the behaviour of the arp_ip_target option, let /sys/class/net/bond0/bonding/xmit_hash_policy accept and report current policy even if the bonding mode in effect does not use it. Signed-off-by: NFerenc Wagner <wferi@niif.hu> Acked-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
由 Wagner Ferenc 提交于
From: Wagner Ferenc <wferi@niif.hu> Adhere to coding style: break line after the if condition Signed-off-by: NFerenc Wagner <wferi@niif.hu> Acked-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
由 Wagner Ferenc 提交于
From: Wagner Ferenc <wferi@niif.hu> Code for rendering multivalue sysfs files occurs three times in this module. Rename 'buffer' to 'buf' in the first, for the sake of consistency. Signed-off-by: NFerenc Wagner <wferi@niif.hu> Acked-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
由 Wagner Ferenc 提交于
From: Wagner Ferenc <wferi@niif.hu> The previous code returned '\n' (that is, a single empty line) from most files, with one exception (xmit_hash_policy), where it returned 'NA\n'. This patch consolidates each file to return nothing at all if not applicable, not even a '\n'. I find this behaviour more usual, more useful, more efficient and shorter to code from both sides. Signed-off-by: NFerenc Wagner <wferi@niif.hu> Acked-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
由 Wagner Ferenc 提交于
From: Wagner Ferenc <wferi@niif.hu> Also remove trailing spaces from multivalued files. This fixes output like for example: $ od -c /sys/class/net/bond0/bonding/slaves 0000000 e t h - l e f t e t h - r i g 0000020 h t \n \0 0000025 It mostly entails deleting '+1'-s after sprintf() calls: the return value of sprintf is the number of characters printed, without the closing NUL, ie. exactly what the sysfs interface requires. The three multivalue cases are different, because they also have to swallow back a trailing space. Signed-off-by: NFerenc Wagner <wferi@niif.hu> Acked-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
- 10 11月, 2007 1 次提交
-
-
由 Jay Vosburgh 提交于
Looks like I incorrectly merged one of the rtnl lock changes, so that one function, bonding_show_active_slave, held rtnl but didn't release it, and another, bonding_store_active_slave, never held rtnl but did release it. Fixed so the first function doesn't mess with rtnl, and the second correctly acquires and releases rtnl. Bug reported by Moni Shoua <monis@voltaire.com> Signed-off-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
- 24 10月, 2007 2 次提交
-
-
由 Jay Vosburgh 提交于
Convert more lock acquisitions to _bh flavor to avoid deadlock with workqueue activity and add acquisition of RTNL in appropriate places. Affects ALB mode, as well as core bonding functions and sysfs. Signed-off-by: NAndy Gospodarek <andy@greyhouse.net> Signed-off-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
由 Jay Vosburgh 提交于
Convert bonding timers to workqueues. This converts the various monitor functions to run in periodic work queues instead of timers. This patch introduces the framework and convers the calls, but does not resolve various locking issues, and does not stand alone. Signed-off-by: NAndy Gospodarek <andy@greyhouse.net> Signed-off-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
- 20 10月, 2007 1 次提交
-
-
由 Robert P. J. Day 提交于
Fix the various misspellings of "system", controller", "interrupt" and "[un]necessary". Signed-off-by: NRobert P. J. Day <rpjday@mindspring.com> Signed-off-by: NAdrian Bunk <bunk@kernel.org>
-
- 16 10月, 2007 4 次提交
-
-
由 Jay Vosburgh 提交于
Update the "don't change MAC of slaves" functionality added in previous changes to be a generic option, rather than something tied to IB devices, as it's occasionally useful for regular ethernet devices as well. Adds "fail_over_mac" option (which is automatically enabled for IB slaves), applicable only to active-backup mode. Includes documentation update. Updates bonding driver version to 3.2.0. Signed-off-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
由 Moni Shoua 提交于
When bonding enslaves non Ethernet devices it takes pointers to functions in the module that owns the slaves. In this case it becomes unsafe to keep the bonding master registered after last slave was unenslaved because we don't know if the pointers are still valid. Destroying the bond when slave_cnt is zero ensures that these functions be used anymore. Signed-off-by: Moni Shoua <monis at voltaire.com> Acked-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
由 Moni Shoua 提交于
bonding sometimes uses Ethernet constants (such as MTU and address length) which are not good when it enslaves non Ethernet devices (such as InfiniBand). Signed-off-by: Moni Shoua <monis at voltaire.com> Acked-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
由 Moni Shoua 提交于
Allow to enslave devices when the bonding device is not up. Over the discussion held at the previous post this seemed to be the most clean way to go, where it is not expected to cause instabilities. Normally, the bonding driver is UP before any enslavement takes place. Once a netdevice is UP, the network stack acts to have it join some multicast groups (eg the all-hosts 224.0.0.1). Now, since ether_setup() have set the bonding device type to be ARPHRD_ETHER and address len to be ETHER_ALEN, the net core code computes a wrong multicast link address. This is b/c ip_eth_mc_map() is called where for multicast joins taking place after the enslavement another ip_xxx_mc_map() is called (eg ip_ib_mc_map() when the bond type is ARPHRD_INFINIBAND) Signed-off-by: Moni Shoua <monis at voltaire.com> Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com> Acked-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
- 11 10月, 2007 4 次提交
-
-
由 Al Viro 提交于
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
由 Joe Perches 提交于
This is nicer than the MAC_FMT stuff. Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jesper Juhl 提交于
This patch cleans up duplicate includes in drivers/net/ Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com> Acked-by: N"John W. Linville" <linville@tuxdriver.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
由 Eric W. Biederman 提交于
This patch makes most of the generic device layer network namespace safe. This patch makes dev_base_head a network namespace variable, and then it picks up a few associated variables. The functions: dev_getbyhwaddr dev_getfirsthwbytype dev_get_by_flags dev_get_by_name __dev_get_by_name dev_get_by_index __dev_get_by_index dev_ioctl dev_ethtool dev_load wireless_process_ioctl were modified to take a network namespace argument, and deal with it. vlan_ioctl_set and brioctl_set were modified so their hooks will receive a network namespace argument. So basically anthing in the core of the network stack that was affected to by the change of dev_base was modified to handle multiple network namespaces. The rest of the network stack was simply modified to explicitly use &init_net the initial network namespace. This can be fixed when those components of the network stack are modified to handle multiple network namespaces. For now the ifindex generator is left global. Fundametally ifindex numbers are per namespace, or else we will have corner case problems with migration when we get that far. At the same time there are assumptions in the network stack that the ifindex of a network device won't change. Making the ifindex number global seems a good compromise until the network stack can cope with ifindex changes when you change namespaces, and the like. Signed-off-by: NEric W. Biederman <ebiederm@xmission.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 21 6月, 2007 1 次提交
-
-
由 Jay Vosburgh 提交于
The following patch (based on a patch from Stephen Hemminger <shemminger@linux-foundation.org>) removes use after free conditions in the unregister path for the bonding master. Without this patch, an operation of the form "echo -bond0 > /sys/class/net/bonding_masters" would trigger a NULL pointer dereference in sysfs. I was not able to induce the failure with the non-sysfs code path, but for consistency I updated that code as well. I also did some testing of the bonding /proc file being open while the bond is being deleted, and didn't see any problems there. Signed-off-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
- 15 2月, 2007 1 次提交
-
-
由 Tim Schmielau 提交于
After Al Viro (finally) succeeded in removing the sched.h #include in module.h recently, it makes sense again to remove other superfluous sched.h includes. There are quite a lot of files which include it but don't actually need anything defined in there. Presumably these includes were once needed for macros that used to live in sched.h, but moved to other header files in the course of cleaning it up. To ease the pain, this time I did not fiddle with any header files and only removed #includes from .c-files, which tend to cause less trouble. Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha, arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig, allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all configs in arch/arm/configs on arm. I also checked that no new warnings were introduced by the patch (actually, some warnings are removed that were emitted by unnecessarily included header files). Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de> Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 08 2月, 2007 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
This lets the network core have the ability to handle suspend/resume issues, if it wants to. Thanks to Frederik Deweerdt <frederik.deweerdt@gmail.com> for the arm driver fixes. Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 06 2月, 2007 1 次提交
-
-
由 Jay Vosburgh 提交于
The existing code would blindly attempt to create the bonding_masters file (in /sys/class/net) every time the module was loaded. When the module is loaded multiple times (which is the historical method used by initscripts and sysconfig to create multiple bonding interfaces), this caused load failure of the second module load attempt, as the creation request would fail. This changes the code to note the failure, arrange to not remove the bonding_masters file upon module exit, and then return success. Bonding interfaces created by the second or subsequent loads of the module will not exist in bonding_masters. This is not a significant change, as previously only the interfaces from the most recent load of the module would be listed. Both situations are less than optimal, but this case permits compatibility with existing distro configuration scripts, and is consistent. Note that previously, the sysfs create request would overwrite the exsting bonding_masters file and succeed, allowing multiple loads of the module. The sysfs code has recently changed to return an error if the file being created already exists. Patrick McHardy <kaber@trash.net>, who reported this problem, observed crashes on the old kernel (before sysfs checked for duplicates). I did not experience such crashes, but this change should resolve them. Signed-off-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
- 26 9月, 2006 2 次提交
-
-
由 Jay Vosburgh 提交于
Add logic to check ARP request / reply packets used for ARP monitor link integrity checking. The current method simply examines the slave device to see if it has sent and received traffic; this can be fooled by extraneous traffic. For example, if multiple hosts running bonding are behind a common switch, the probe traffic from the multiple instances of bonding will update the tx/rx times on each other's slave devices. Signed-off-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
由 Jay Vosburgh 提交于
Remove unneeded test for NULL. Reported by Thomas Dillig <tdillig@stanford.edu> and Isil Dillig <isil@stanford.edu> via Stephen Hemminger <shemminger@osdl.org>. Signed-off-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
- 01 7月, 2006 1 次提交
-
-
由 Jörn Engel 提交于
Signed-off-by: NJörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: NAdrian Bunk <bunk@stusta.de>
-
- 04 3月, 2006 1 次提交
-
-
由 Jay Vosburgh 提交于
Originally submitted by Kenzo Iwami; his original description is: The current bonding driver receives duplicate packets when broadcast/ multicast packets are sent by other devices or packets are flooded by the switch. In this patch, new flags are added in priv_flags of net_device structure to let the bonding driver discard duplicate packets in dev.c:skb_bond(). Modified by Jay Vosburgh to change a define name, update some comments, rearrange the new skb_bond() for clarity, clear all bonding priv_flags on slave release, and update the driver version. Signed-off-by: NKenzo Iwami <k-iwami@cj.jp.nec.com> Signed-off-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
- 07 2月, 2006 1 次提交
-
-
由 Luiz Fernando Capitulino 提交于
drivers/net/bonding/bond_sysfs.c:263:27: warning: Using plain integer as NULL pointer drivers/net/bonding/bond_sysfs.c:998:26: warning: Using plain integer as NULL pointer drivers/net/bonding/bond_sysfs.c:1126:26: warning: Using plain integer as NULL pointer Signed-off-by: NLuiz Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: NAndrew Morton <akpm@osdl.org> Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
-
- 29 11月, 2005 1 次提交
-
-
由 Jeff Garzik 提交于
No need to record this information in source code, its all in the git repository, and kernel archives.
-
- 14 11月, 2005 1 次提交
-
-
由 Mitch Williams 提交于
This large patch adds sysfs functionality to the channel bonding module. Bonds can be added, removed, and reconfigured at runtime without having to reload the module. Multiple bonds with different configurations are easily configured, and ifenslave is no longer required to configure bonds. Signed-off-by: NMitch Williams <mitch.a.williams@intel.com> Acked-by: NJay Vosburgh <fubar@us.ibm.com> Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
-