From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Samudrala, Sridhar" Subject: Re: [RFC PATCH net-next] failover: allow name change on IFF_UP slave interfaces Date: Wed, 6 Mar 2019 13:36:27 -0800 Message-ID: References: <1551747059-11831-1-git-send-email-si-wei.liu@oracle.com> <20190306120430.GA2819@nanopsycho> <7d1e79f6-01ff-413d-dac0-ee34258aafec@oracle.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6688099637331711416==" Return-path: In-Reply-To: <7d1e79f6-01ff-413d-dac0-ee34258aafec@oracle.com> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: si-wei liu , Jiri Pirko Cc: "Michael S. Tsirkin" , Jakub Kicinski , Netdev , virtualization@lists.linux-foundation.org, liran.alon@oracle.com, boris.ostrovsky@oracle.com, David Miller List-Id: virtualization@lists.linuxfoundation.org This is a multi-part message in MIME format. --===============6688099637331711416== Content-Type: multipart/alternative; boundary="------------65923323CE40D3D516B72AF9" Content-Language: en-US This is a multi-part message in MIME format. --------------65923323CE40D3D516B72AF9 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit On 3/6/2019 1:26 PM, si-wei liu wrote: > > > > On 3/6/2019 4:04 AM, Jiri Pirko wrote: >>> --- a/net/core/failover.c >>> +++ b/net/core/failover.c >>> @@ -16,6 +16,11 @@ >>> >>> static LIST_HEAD(failover_list); >>> static DEFINE_SPINLOCK(failover_lock); >>> +static bool slave_rename_ok = true; >>> + >>> +module_param(slave_rename_ok, bool, (S_IRUGO | S_IWUSR)); >>> +MODULE_PARM_DESC(slave_rename_ok, >>> + "If set allow renaming the slave when failover master is up"); >> No module parameters please. If you need to set something do it using >> rtnl_link_ops. Thanks. >> > I understand what you ask for, but without module parameters userspace > don't work. During boot (dracut) the virtio netdev gets enslaved > earlier than when userspace comes up, so failover has to determine the > setting during initialization/creation. This config is not dynamic, at > least for the life cycle of a particular failover link it shouldn't be > changed. Without module parameter, how does the userspace specify this > value during kernel initialization? > Can we enable this by default and not make it configurable via module parameter? Is there any  usecase where someone expects rename to fail with failover slaves? --------------65923323CE40D3D516B72AF9 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit


On 3/6/2019 1:26 PM, si-wei liu wrote:



On 3/6/2019 4:04 AM, Jiri Pirko wrote:
--- a/net/core/failover.c
+++ b/net/core/failover.c
@@ -16,6 +16,11 @@

static LIST_HEAD(failover_list);
static DEFINE_SPINLOCK(failover_lock);
+static bool slave_rename_ok = true;
+
+module_param(slave_rename_ok, bool, (S_IRUGO | S_IWUSR));
+MODULE_PARM_DESC(slave_rename_ok,
+		 "If set allow renaming the slave when failover master is up");
No module parameters please. If you need to set something do it using
rtnl_link_ops. Thanks.

I understand what you ask for, but without module parameters userspace don't work. During boot (dracut) the virtio netdev gets enslaved earlier than when userspace comes up, so failover has to determine the setting during initialization/creation. This config is not dynamic, at least for the life cycle of a particular failover link it shouldn't be changed. Without module parameter, how does the userspace specify this value during kernel initialization?

Can we enable this by default and not make it configurable via module parameter?
Is there any  usecase where someone expects rename to fail with failover slaves?
--------------65923323CE40D3D516B72AF9-- --===============6688099637331711416== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization --===============6688099637331711416==--