From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [PATCH net-next v9 2/4] net: Introduce generic failover module Date: Wed, 2 May 2018 23:39:19 +0200 Message-ID: <20180502213919.GK19250@nanopsycho> References: <1524848820-42258-1-git-send-email-sridhar.samudrala@intel.com> <1524848820-42258-3-git-send-email-sridhar.samudrala@intel.com> <20180428090601.GL5632@nanopsycho.orion> <20180502161542.GI19250@nanopsycho> <052e2c60-dc4c-d6a0-0159-fc1821cb4365@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: mst@redhat.com, stephen@networkplumber.org, davem@davemloft.net, netdev@vger.kernel.org, virtualization@lists.linux-foundation.org, virtio-dev@lists.oasis-open.org, jesse.brandeburg@intel.com, alexander.h.duyck@intel.com, kubakici@wp.pl, jasowang@redhat.com, loseweigh@gmail.com, aaron.f.brown@intel.com To: "Samudrala, Sridhar" Return-path: Received: from mail-wr0-f182.google.com ([209.85.128.182]:40720 "EHLO mail-wr0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751477AbeEBVjV (ORCPT ); Wed, 2 May 2018 17:39:21 -0400 Received: by mail-wr0-f182.google.com with SMTP id v60-v6so15493649wrc.7 for ; Wed, 02 May 2018 14:39:21 -0700 (PDT) Content-Disposition: inline In-Reply-To: <052e2c60-dc4c-d6a0-0159-fc1821cb4365@intel.com> Sender: netdev-owner@vger.kernel.org List-ID: Wed, May 02, 2018 at 07:51:12PM CEST, sridhar.samudrala@intel.com wrote: > > >On 5/2/2018 9:15 AM, Jiri Pirko wrote: >> Sat, Apr 28, 2018 at 11:06:01AM CEST, jiri@resnulli.us wrote: >> > Fri, Apr 27, 2018 at 07:06:58PM CEST, sridhar.samudrala@intel.com wrote: >> [...] >> >> >> > > + >> > > + err = netdev_rx_handler_register(slave_dev, net_failover_handle_frame, >> > > + failover_dev); >> > > + if (err) { >> > > + netdev_err(slave_dev, "can not register failover rx handler (err = %d)\n", >> > > + err); >> > > + goto err_handler_register; >> > > + } >> > > + >> > > + err = netdev_upper_dev_link(slave_dev, failover_dev, NULL); >> > Please use netdev_master_upper_dev_link(). >> Don't forget to fillup struct netdev_lag_upper_info - NETDEV_LAG_TX_TYPE_ACTIVEBACKUP >> >> >> Also, please call netdev_lower_state_changed() when the active slave >> device changes from primary->backup of backup->primary and whenever link >> state of a slave changes >> >Sure. will look into it.  Do you think this will help with the issue >you saw with having to change mac on standy twice to get the init scripts >working? We are now going to block changing the mac on both standby and >failover. > >Also, i was wondering if we should set dev->flags to IFF_MASTER on failover >and IFF_SLAVE on primary and standby. netvsc does this. No. Don't set it. It is wrong. >Does this help with the init scripts and network manager to skip slave >devices for dhcp requests? >