From patchwork Mon Dec 28 09:24:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: taoyunxiang X-Patchwork-Id: 1420971 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=cmss.chinamobile.com Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D4Qc82tT4z9sVv for ; Tue, 29 Dec 2020 05:11:51 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5A4F187304; Mon, 28 Dec 2020 18:11:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pEi90QJXXRgH; Mon, 28 Dec 2020 18:11:45 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id CF2C686E35; Mon, 28 Dec 2020 18:10:48 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id AAF25C1DA4; Mon, 28 Dec 2020 18:10:48 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id DF2CFC0891 for ; Mon, 28 Dec 2020 09:26:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id CF0E586C8C for ; Mon, 28 Dec 2020 09:26:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Xf4uDlBOPUpS for ; Mon, 28 Dec 2020 09:26:05 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from cmccmta3.chinamobile.com (cmccmta3.chinamobile.com [221.176.66.81]) by whitealder.osuosl.org (Postfix) with ESMTP id 4413386CA1 for ; Mon, 28 Dec 2020 09:26:04 +0000 (UTC) Received: from spf.mail.chinamobile.com (unknown[172.16.121.3]) by rmmx-syy-dmz-app10-12010 (RichMail) with SMTP id 2eea5fe9a4999d1-c33d1; Mon, 28 Dec 2020 17:25:46 +0800 (CST) X-RM-TRANSID: 2eea5fe9a4999d1-c33d1 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from yun.localdomain (unknown[112.25.154.146]) by rmsmtp-syy-appsvr02-12002 (RichMail) with SMTP id 2ee25fe9a48a90b-7b89d; Mon, 28 Dec 2020 17:25:45 +0800 (CST) X-RM-TRANSID: 2ee25fe9a48a90b-7b89d From: Tao YunXiang To: ovs-dev@openvswitch.org Date: Mon, 28 Dec 2020 01:24:50 -0800 Message-Id: <20201228092520.11807-33-taoyunxiang@cmss.chinamobile.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201228092520.11807-1-taoyunxiang@cmss.chinamobile.com> References: <8> <20201228092520.11807-1-taoyunxiang@cmss.chinamobile.com> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 28 Dec 2020 18:10:33 +0000 Cc: Rongyin Subject: [ovs-dev] [PATCH 32/62] netdev-linux:don't print no ifindex log X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" From: Rongyin Code Source From: Self Code Description: don't print no ifindex log Jira: #[Optional] 市场项目编号(名称):[Optional] --- lib/netdev-linux.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 4326456..5d02e12 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -6263,9 +6263,11 @@ linux_get_ifindex(const char *netdev_name) /* ENODEV probably means that a vif disappeared asynchronously and * hasn't been removed from the database yet, so reduce the log level * to INFO for that case. */ - VLOG_RL(&rl, error == ENODEV ? VLL_INFO : VLL_ERR, - "ioctl(SIOCGIFINDEX) on %s device failed: %s", - netdev_name, ovs_strerror(error)); + if (error != ENODEV) { + VLOG_RL(&rl, error == ENODEV ? VLL_INFO : VLL_ERR, + "ioctl(SIOCGIFINDEX) on %s device failed: %s", + netdev_name, ovs_strerror(error)); + } return -error; } return ifr.ifr_ifindex;