Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2046109pxf; Sat, 13 Mar 2021 06:07:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJxxazgXo+aNCHNFtAPRPMb50pDQ7/1Vd9glI2lrq1V46u5LDMus6n7rtRBPlPXrzeDFWhpn X-Received: by 2002:a17:906:d291:: with SMTP id ay17mr13897011ejb.308.1615644442607; Sat, 13 Mar 2021 06:07:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615644442; cv=none; d=google.com; s=arc-20160816; b=psSnDAUq+m6XO7FjqKqme/1M9m6GtTz5AK5xQoZL9KjitoRTTEALBNuga6Lc1xj2NT cQ/DW8xxQ+LZttVwCxQr74dATmZeAYdxHX5WT8PUDOe4G457q2PPLGYPLLT7c+c6r76l X3lVEuvC/UJTTpoSMVfvOyRFMqxVM4eVmWvm0YRTsaPYG+Pu9oLDXA6D7dyOtoDdve2b FnmS7bLuIWD+bhqpsGAX74f22p9kA+Tl3doUbgK4Rc6n+h+O4wgLDCoYqc5ZpINQGLQc 1II4SnpJ5Q8dHGediLKpB4Rt99cRc09womkSqyDtZghS1iJjbyhQ/QH4o6BmYjkjxqug VG3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=PXch0lrWmvyZ/KrQ+4/SWoXZnG6uElVyRyB65LQcCxU=; b=wGInhA9vYMkvgVJZ/Kyduy3YAZ2wbs1BKse5rRhb3hglMGQczV3xhmHVE/2c+R+dQs 1IKA1yS4Efd6QpnhWwJ/JFOCeZ6U2Lbf+n/VnhlxWH8WE8fh14YDqsPJCF4MMOsfqaN2 nGQyPZw5LzGrKZVh1a36zJssPNI3YilhTlNRdwcqpwPwjZ+lzxJ5meXvGFut7Qz9dGkx 8s2pfE00U0tezU8HFEcky5rd7qzOBds2Y/DIzTTzQW5zgE1O2Cp9Nk9WgoRIF7UJGfs4 kvNiLOjHxnXyG6O7Z/FXm5cleUEu67hyhWYNMPXaOcZ8dGShUeRbUZnqrpN7wBdwJ89l sxFQ== 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=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6751485edb.398.2021.03.13.06.06.59; Sat, 13 Mar 2021 06:07:22 -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=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233635AbhCMOCu (ORCPT + 99 others); Sat, 13 Mar 2021 09:02:50 -0500 Received: from foss.arm.com ([217.140.110.172]:37990 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233478AbhCMOCY (ORCPT ); Sat, 13 Mar 2021 09:02:24 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4F83F1FB; Sat, 13 Mar 2021 06:02:24 -0800 (PST) Received: from net-arm-thunderx2-02.shanghai.arm.com (net-arm-thunderx2-02.shanghai.arm.com [10.169.208.215]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 67FBB3F7D7; Sat, 13 Mar 2021 06:02:21 -0800 (PST) From: Jianlin Lv To: j.vosburgh@gmail.com, vfalico@gmail.com, andy@greyhouse.net, davem@davemloft.net, kuba@kernel.org Cc: Jianlin.Lv@arm.com, iecedge@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next] bonding: Added -ENODEV interpret for slaves option Date: Sat, 13 Mar 2021 22:02:10 +0800 Message-Id: <20210313140210.3940183-1-Jianlin.Lv@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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