Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2220385pxf; Sat, 13 Mar 2021 11:56:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwcdbfcIyPOEPHyb/J1Qcx6xIxJFd9G8L8psaTs8f/JSGg9HCBTZg9UXKC8V1Gxn6XD4/qU X-Received: by 2002:a17:907:94cc:: with SMTP id dn12mr15399987ejc.177.1615665396006; Sat, 13 Mar 2021 11:56:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615665396; cv=none; d=google.com; s=arc-20160816; b=wkxdOlQ7XYLw0mKC2pTaEaO4rXXq7/BU477TjTQ6JJygyEfdKboeu/Q/K9Tzbvx1Ep iAObgA5dcu/sheyvLZ9MV5JXw2Pm5v1gfD50NsovxE38sWNPdI0HqMlJ/nCL/3QLj+YL mHRS+Tur1057zQNWUj2qHNSsorXGUnLZ807hLZAd8JDWGZ3NPbn8wqBNPPyGCH1MZReG 3ID6D5RZV/ucX18GMM1m+I2nRoPnn0JiC2tJzwkntZUeWxpIetz5sGldINGYspAhj2w7 UlikuoVGMuz3uYLbGmVaLbSPF7URb6p0gCu4uD7c7zHjyO+ZqZHXsIVJfqJOx9x58lgH Mu/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-transfer-encoding :content-id:mime-version:comments:references:in-reply-to:subject:cc :to:from; bh=9NHoEsQVbAuHJZuzfEbcQrxq9AC42GhsEPh0ISe2MNM=; b=jtWps6gr8y2plyqt+aXnMYGG0u+ucTupSDxziXVRFf0KTo2Fq8kN54lfNpVSpnjpQS vJtO3ss8AfwUXnoNLDZLh0c/8TU0bwlPod/nxPGuvxOBRed2NqDmdR8tTThzz6BRPaRl sQWw24eGQCPq8KxavVj1GoiBO3adcDbESKB+ahQI+6CZnQnHTsyu/9jTl78l7T6FpJjD GtSC/5YzNQD7m/BWHfuAXVDUGWafvtO1BKIFSv9zcUuTXy+DEAT3z25G3h/qwi95DFYa 0NZcBOnBezKWRqJQA6QiNEipjP2i1veR/H4/CjN091GI5nGBYhGQx9lY3nRFJQHufTFR iC4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r27si6900618edw.299.2021.03.13.11.56.13; Sat, 13 Mar 2021 11:56:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234687AbhCMTut convert rfc822-to-8bit (ORCPT + 99 others); Sat, 13 Mar 2021 14:50:49 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:45803 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234702AbhCMTum (ORCPT ); Sat, 13 Mar 2021 14:50:42 -0500 Received: from 1.general.jvosburgh.us.vpn ([10.172.68.206] helo=famine.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lLAHW-0001Ql-AD; Sat, 13 Mar 2021 19:50:38 +0000 Received: by famine.localdomain (Postfix, from userid 1000) id 7D85F5FEE8; Sat, 13 Mar 2021 11:50:36 -0800 (PST) Received: from famine (localhost [127.0.0.1]) by famine.localdomain (Postfix) with ESMTP id 75524A0410; Sat, 13 Mar 2021 11:50:36 -0800 (PST) From: Jay Vosburgh To: Jianlin Lv cc: vfalico@gmail.com, andy@greyhouse.net, davem@davemloft.net, kuba@kernel.org, iecedge@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] bonding: Added -ENODEV interpret for slaves option In-reply-to: <20210313140210.3940183-1-Jianlin.Lv@arm.com> References: <20210313140210.3940183-1-Jianlin.Lv@arm.com> Comments: In-reply-to Jianlin Lv message dated "Sat, 13 Mar 2021 22:02:10 +0800." X-Mailer: MH-E 8.6+git; nmh 1.6; GNU Emacs 27.0.50 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6675.1615665036.1@famine> Content-Transfer-Encoding: 8BIT Date: Sat, 13 Mar 2021 11:50:36 -0800 Message-ID: <6676.1615665036@famine> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jianlin Lv wrote: >After upgrading the kernel, the slave interface name is changed, >Systemd cannot use the original configuration to create bond interface, >thereby losing the connection with the host. > >Adding log for ENODEV will make it easier to find out such problem lies. To be clear, this specifically affects add/remove of interfaces to/from the bond via the "slaves" sysfs interface. Please update your log to better describe this (that it affects the sysfs API only) and resubmit. I'm sympathetic to the problem this is trying to solve, and the message shouldn't spam the kernel log particularly, but the commit log needs to more clearly describe what the problem is and how it's being fixed. Thanks, -J >Signed-off-by: Jianlin Lv >--- > drivers/net/bonding/bond_options.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c >index 77d7c38bd435..c9d3604ae129 100644 >--- a/drivers/net/bonding/bond_options.c >+++ b/drivers/net/bonding/bond_options.c >@@ -640,6 +640,15 @@ static void bond_opt_error_interpret(struct bonding *bond, > netdev_err(bond->dev, "option %s: unable to set because the bond device is up\n", > opt->name); > break; >+ case -ENODEV: >+ if (val && val->string) { >+ p = strchr(val->string, '\n'); >+ if (p) >+ *p = '\0'; >+ netdev_err(bond->dev, "option %s: interface %s does not exist!\n", >+ opt->name, val->string); >+ } >+ break; > default: > break; > } >-- >2.25.1 > --- -Jay Vosburgh, jay.vosburgh@canonical.com