From patchwork Tue Apr 19 01:32:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Haley X-Patchwork-Id: 91900 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 62DA51007D9 for ; Tue, 19 Apr 2011 11:32:49 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753487Ab1DSBcp (ORCPT ); Mon, 18 Apr 2011 21:32:45 -0400 Received: from g6t0184.atlanta.hp.com ([15.193.32.61]:35367 "EHLO g6t0184.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752927Ab1DSBco (ORCPT ); Mon, 18 Apr 2011 21:32:44 -0400 Received: from g5t0030.atlanta.hp.com (g5t0030.atlanta.hp.com [16.228.8.142]) by g6t0184.atlanta.hp.com (Postfix) with ESMTP id 2A9C8CA52; Tue, 19 Apr 2011 01:32:43 +0000 (UTC) Received: from [16.1.1.20] (squirrel.fc.hp.com [15.11.146.57]) by g5t0030.atlanta.hp.com (Postfix) with ESMTP id 69F5414049; Tue, 19 Apr 2011 01:32:41 +0000 (UTC) Message-ID: <4DACE638.9060909@hp.com> Date: Mon, 18 Apr 2011 21:32:40 -0400 From: Brian Haley Organization: Open Source and Linux Organization User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: Ben Hutchings CC: Jay Vosburgh , David Miller , Andy Gospodarek , Patrick McHardy , netdev@vger.kernel.org Subject: Re: [PATCH net-next-2.6 3/3] bonding, ipv4, ipv6, vlan: Handle NETDEV_BONDING_FAILOVER like NETDEV_NOTIFY_PEERS References: <1302911271.2845.41.camel@bwh-desktop> <22334.1302913805@death> <1303153792.2857.32.camel@bwh-desktop> In-Reply-To: <1303153792.2857.32.camel@bwh-desktop> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 04/18/2011 03:09 PM, Ben Hutchings wrote: > How about restoring the parameters like this: > > --- > From: Ben Hutchings > Date: Mon, 18 Apr 2011 19:36:48 +0100 > Subject: [PATCH net-next-2.6] ipv4,ipv6,bonding: Restore control over number of peer notifications > > For backward compatibility, we should retain the module parameters and > sysfs attributes to control the number of peer notifications > (gratuitous ARPs and unsolicited NAs) sent after bonding failover. > Also, it is possible for failover to take place even though the new > active slave does not have link up, and in that case the peer > notification should be deferred until it does. > > Change ipv4 and ipv6 so they do not automatically send peer > notifications on bonding failover. Change the bonding driver to send > separate NETDEV_NOTIFY_PEERS notifications when the link is up, as > many times as requested. Since it does not directly control which > protocols send notifications, make num_grat_arp and num_unsol_na > aliases for a single parameter. Hi Ben, I think this looks good, I'll try and get this tested here when I have a chance, but for now I can: Acked-by: Brian Haley Should we just go ahead and make a new parameter for peer notification? Compiled but untested patch below. Thanks, -Brian --- Make a new bonding parameter, called num_peer_notif, to control how many peer notifications are sent on fail-over. Mark the old values, num_grat_arp and num_unsol_na, as deprecated in the documentation. Signed-off-by: Brian Haley -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt index 511b4e5..8b16beb 100644 --- a/Documentation/networking/bonding.txt +++ b/Documentation/networking/bonding.txt @@ -585,8 +585,15 @@ mode chosen. num_grat_arp + + Deprecated. Use num_peer_notif instead. + num_unsol_na + Deprecated. Use num_peer_notif instead. + +num_peer_notif + Specify the number of peer notifications (gratuitous ARPs and unsolicited IPv6 Neighbor Advertisements) to be issued after a failover event. As soon as the link is up on the new slave @@ -595,7 +602,7 @@ num_unsol_na each link monitor interval (arp_interval or miimon, whichever is active) if the number is greater than 1. - These notifications are now generated by the ipv4 and ipv6 code + These notifications are now generated by the IPv4 and IPv6 code and the numbers of repetitions cannot be set independently. The valid range is 0 - 255; the default value is 1. These options diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 956a6f7..631ca9e 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -116,6 +116,8 @@ module_param_named(num_grat_arp, num_peer_notif, int, 0644); MODULE_PARM_DESC(num_grat_arp, "Number of peer notifications to send on failover event"); module_param_named(num_unsol_na, num_peer_notif, int, 0644); MODULE_PARM_DESC(num_unsol_na, "Number of peer notifications to send on failover event"); +module_param_named(num_peer_notif, num_peer_notif, int, 0644); +MODULE_PARM_DESC(num_unsol_na, "Number of peer notifications to send on failover event"); module_param(miimon, int, 0); MODULE_PARM_DESC(miimon, "Link check interval in milliseconds"); module_param(updelay, int, 0); @@ -4699,7 +4701,7 @@ static int bond_check_params(struct bond_params *params) } if (num_peer_notif < 0 || num_peer_notif > 255) { - pr_warning("Warning: num_grat_arp/num_unsol_na (%d) not in range 0-255 so it was reset to 1\n", + pr_warning("Warning: num_peer_notif (%d) not in range 0-255 so it was reset to 1\n", num_peer_notif); num_peer_notif = 1; } diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 58fb3e9..b03e7be 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c @@ -896,6 +896,8 @@ static DEVICE_ATTR(num_grat_arp, S_IRUGO | S_IWUSR, bonding_show_num_peer_notif, bonding_store_num_peer_notif); static DEVICE_ATTR(num_unsol_na, S_IRUGO | S_IWUSR, bonding_show_num_peer_notif, bonding_store_num_peer_notif); +static DEVICE_ATTR(num_peer_notif, S_IRUGO | S_IWUSR, + bonding_show_num_peer_notif, bonding_store_num_peer_notif); /* * Show and set the MII monitor interval. There are two tricky bits @@ -1598,6 +1600,7 @@ static struct attribute *per_bond_attrs[] = { &dev_attr_xmit_hash_policy.attr, &dev_attr_num_grat_arp.attr, &dev_attr_num_unsol_na.attr, + &dev_attr_num_peer_notif.attr, &dev_attr_miimon.attr, &dev_attr_primary.attr, &dev_attr_primary_reselect.attr,