netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 net-next 0/6] bonding: prepare to and add arp_all_targets
@ 2013-06-21 13:11 Veaceslav Falico
  0 siblings, 0 replies; 3+ messages in thread
From: Veaceslav Falico @ 2013-06-21 13:11 UTC (permalink / raw)
  To: netdev
  Cc: vfalico, fubar, andy, davem, linux, nicolas.2p.debian,
	rick.jones2, nikolay, mkubecek

Hi,

This patchset does some cleanup, fixes a few flaws and adds a new parameter
to control whether the slave should stay up when any of arp_ip_targets are
up or all of them are up (i.e. if the slave should go down if even one
target from arp_ip_targets fail).

The patches 1-5 basically prepare the bonding code to work properly with this
new parameter, however it's not depending on them.

All comments are really welcome.

v2->v3:

Fix "[6/6] bonding: add helper function bond_get_targets_ip(targets, ip)",
per Nikolay's advice, to use _bh spinlock, remove useless rtnl_lock() and
use jiffies for new arp_ip_target last arp, instead of slave_last_rx(). As
Michal suggested, initialize the target_last_arp_rx[] the same as the
default last_arp_rx, to avoid flapping. Also, don't fail while removing the
last arp_ip_target, and instead just print a warning - otherwise it might
break existing scripts.

v1->v2:

Drop "[1/6] bonding: verify if bond has ip only once on arp validate", per
Jay's advice, it's really useless as a standalone patch (though the change
itself will appear in 2/6).

Fix "[2/6] bonding: add helper function bond_get_targets_ip(targets, ip)",
per Nikolay's advice, to verify if source ip != 0.0.0.0, otherwise we might
update 'null' arp_ip_targets' last_rx. Also, address style.

Drop "[5/6] bonding: don't swap arp's ips on validation for backup slave",
per Jay's advice, though it does address cyclic failover issue - it
disables a good optimization. Instead, update the documentation and fix the
cyclic loop issue in the following patch.

Add "bonding: don't trust arp requests unless active slave really works",
this patch fixes the cyclic loop that occurs when we can't reach
arp_ip_target and fool ourselves with our own generated arp requests. It's
done by checking if we currently have a current active slave and if this
slave received at least one arp reply after its 'nomination' to active.

Add "bonding: doc: some details on backup slave arp validation",
this patch describes a bit more in detail how the backup slave arp
validation works.

Fix "[6/6] bonding: add an option to fail when any of arp_ip_target is
inaccessible", per Nikolay's advice, to correctly handle adding/removing
hosts in arp_ip_target - we need to shift/initialize all slave's
target_last_arp_rx. Also, don't fail module loading on arp_all_targets
misconfiguration, just disable it, and some minor style fixes.

Thanks!

Veaceslav Falico (6):
      bonding: add helper function bond_get_targets_ip(targets, ip)
      bonding: don't add duplicate targets to arp_ip_target
      bonding: don't validate arp if we don't have to
      bonding: don't trust arp requests unless active slave really works
      bonding: doc: some details on backup slave arp validation
      bonding: add an option to fail when any of arp_ip_target is inaccessible

 Documentation/networking/bonding.txt |   23 ++++++
 drivers/net/bonding/bond_main.c      |   70 +++++++++++++++----
 drivers/net/bonding/bond_sysfs.c     |  125 ++++++++++++++++++++++++----------
 drivers/net/bonding/bonding.h        |   46 ++++++++++++-
 4 files changed, 212 insertions(+), 52 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v3 net-next 0/6] bonding: prepare to and add arp_all_targets
@ 2013-06-24  9:49 Veaceslav Falico
  2013-06-25 23:59 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Veaceslav Falico @ 2013-06-24  9:49 UTC (permalink / raw)
  To: netdev
  Cc: vfalico, fubar, andy, davem, linux, nicolas.2p.debian,
	rick.jones2, nikolay, mkubecek

Hi,

This patchset does some cleanup, fixes a few flaws and adds a new parameter
to control whether the slave should stay up when any of arp_ip_targets are
up or all of them are up (i.e. if the slave should go down if even one
target from arp_ip_targets fail).

The patches 1-5 basically prepare the bonding code to work properly with this
new parameter, however it's not depending on them.

All comments are really welcome.

v3->v4:

Fix "[6/6] bonding: add helper function bond_get_targets_ip(targets, ip)",
per Nikolay's advice and kill that lonely rtnl_unlock(). As Jay suggested,
rephrase the documentation part to be more clear, don't fail setting
arp_all_targets if arp_validate is not set - it has no effect anyway but
can be easier to set up. Jay also spotted that there's no need to print
warning if the last arp_target is removed and arp_validate is on, so change
it to be paired with arp_interval warning - if the arp_interval is on and
we delete the last arp_target - print a warning.

Fix "[4/6] bonding: don't trust arp requests unless active slave really
works", per Sergei's suggestion - split the lines to make checkpatch.pl
happy.

v2->v3:

Fix "[6/6] bonding: add helper function bond_get_targets_ip(targets, ip)",
per Nikolay's advice, to use _bh spinlock, remove useless rtnl_lock() and
use jiffies for new arp_ip_target last arp, instead of slave_last_rx(). As
Michal suggested, initialize the target_last_arp_rx[] the same as the
default last_arp_rx, to avoid flapping. Also, don't fail while removing the
last arp_ip_target, and instead just print a warning - otherwise it might
break existing scripts.

v1->v2:

Drop "[1/6] bonding: verify if bond has ip only once on arp validate", per
Jay's advice, it's really useless as a standalone patch (though the change
itself will appear in 2/6).

Fix "[2/6] bonding: add helper function bond_get_targets_ip(targets, ip)",
per Nikolay's advice, to verify if source ip != 0.0.0.0, otherwise we might
update 'null' arp_ip_targets' last_rx. Also, address style.

Drop "[5/6] bonding: don't swap arp's ips on validation for backup slave",
per Jay's advice, though it does address cyclic failover issue - it
disables a good optimization. Instead, update the documentation and fix the
cyclic loop issue in the following patch.

Add "bonding: don't trust arp requests unless active slave really works",
this patch fixes the cyclic loop that occurs when we can't reach
arp_ip_target and fool ourselves with our own generated arp requests. It's
done by checking if we currently have a current active slave and if this
slave received at least one arp reply after its 'nomination' to active.

Add "bonding: doc: some details on backup slave arp validation",
this patch describes a bit more in detail how the backup slave arp
validation works.

Fix "[6/6] bonding: add an option to fail when any of arp_ip_target is
inaccessible", per Nikolay's advice, to correctly handle adding/removing
hosts in arp_ip_target - we need to shift/initialize all slave's
target_last_arp_rx. Also, don't fail module loading on arp_all_targets
misconfiguration, just disable it, and some minor style fixes.

Thanks!

Veaceslav Falico (6):
      bonding: add helper function bond_get_targets_ip(targets, ip)
      bonding: don't add duplicate targets to arp_ip_target
      bonding: don't validate arp if we don't have to
      bonding: don't trust arp requests unless active slave really works
      bonding: doc: some details on backup slave arp validation
      bonding: add an option to fail when any of arp_ip_target is inaccessible

 Documentation/networking/bonding.txt |   23 ++++++
 drivers/net/bonding/bond_main.c      |   70 +++++++++++++++----
 drivers/net/bonding/bond_sysfs.c     |  125 ++++++++++++++++++++++++----------
 drivers/net/bonding/bonding.h        |   46 ++++++++++++-
 4 files changed, 212 insertions(+), 52 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3 net-next 0/6] bonding: prepare to and add arp_all_targets
  2013-06-24  9:49 [PATCH v3 net-next 0/6] bonding: prepare to and add arp_all_targets Veaceslav Falico
@ 2013-06-25 23:59 ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2013-06-25 23:59 UTC (permalink / raw)
  To: vfalico
  Cc: netdev, fubar, andy, linux, nicolas.2p.debian, rick.jones2,
	nikolay, mkubecek

From: Veaceslav Falico <vfalico@redhat.com>
Date: Mon, 24 Jun 2013 11:49:28 +0200

> This patchset does some cleanup, fixes a few flaws and adds a new parameter
> to control whether the slave should stay up when any of arp_ip_targets are
> up or all of them are up (i.e. if the slave should go down if even one
> target from arp_ip_targets fail).
> 
> The patches 1-5 basically prepare the bonding code to work properly with this
> new parameter, however it's not depending on them.
> 
> All comments are really welcome.

Series applied, thank you.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-25 23:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-24  9:49 [PATCH v3 net-next 0/6] bonding: prepare to and add arp_all_targets Veaceslav Falico
2013-06-25 23:59 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2013-06-21 13:11 Veaceslav Falico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).