From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 862F6A00BE; Thu, 31 Oct 2019 06:37:10 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 600FA1BFF5; Thu, 31 Oct 2019 06:37:10 +0100 (CET) Received: from alln-iport-8.cisco.com (alln-iport-8.cisco.com [173.37.142.95]) by dpdk.org (Postfix) with ESMTP id 531271BF4F for ; Thu, 31 Oct 2019 06:37:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2240; q=dns/txt; s=iport; t=1572500229; x=1573709829; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=06p1fYAzzVE0ZFvfz5LCNziiNNollqc+f+8KEV0lpdA=; b=R64W+ObxpZJgrkkCeX6Q+DBw4KKpUUQz7Y6KOncAT1h9Y6opmi4vZUdP yfXRs6ZURp9aaNdARKpOxGb1OBQOYxDD3ymUaJdM23uw0IkJhoXelcLf8 PxZgkbG8Xv0Xe5yemsULtsg8ieR7HGcRd32McRqZCfuC++JMdoBFC9Gxi c=; X-IronPort-AV: E=Sophos;i="5.68,250,1569283200"; d="scan'208";a="361854619" Received: from rcdn-core-1.cisco.com ([173.37.93.152]) by alln-iport-8.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 31 Oct 2019 05:37:08 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by rcdn-core-1.cisco.com (8.15.2/8.15.2) with ESMTP id x9V5b7qn018329; Thu, 31 Oct 2019 05:37:08 GMT Received: by cisco.com (Postfix, from userid 508933) id AC91C20F2003; Wed, 30 Oct 2019 22:37:07 -0700 (PDT) From: Hyong Youb Kim To: Ferruh Yigit Cc: dev@dpdk.org, John Daley , Hyong Youb Kim Date: Wed, 30 Oct 2019 22:36:23 -0700 Message-Id: <20191031053623.16185-4-hyonkim@cisco.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20191031053623.16185-1-hyonkim@cisco.com> References: <20191031053623.16185-1-hyonkim@cisco.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Outbound-SMTP-Client: 10.193.184.48, savbu-usnic-a.cisco.com X-Outbound-Node: rcdn-core-1.cisco.com Subject: [dpdk-dev] [PATCH 3/3] net/enic: suppress unwanted error messages X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Do not log errors when CMD_OVERLAY_OFFLOAD_CTRL and CMD_GET_SUPP_FEATURE_VER fail, as they are only used to probe if a feature is provisioned. They are expected to fail if the feature is not provisioned. Do not log an error when disabling Geneve offload fails. It is expected to fail if this feature is provisioned but not enabled. Fixes: c02a96fc4aec ("net/enic: enable GENEVE with options offload") Signed-off-by: Hyong Youb Kim Reviewed-by: John Daley --- drivers/net/enic/base/vnic_dev.c | 4 +++- drivers/net/enic/enic_main.c | 11 +++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/net/enic/base/vnic_dev.c b/drivers/net/enic/base/vnic_dev.c index a52f7430b..899df07df 100644 --- a/drivers/net/enic/base/vnic_dev.c +++ b/drivers/net/enic/base/vnic_dev.c @@ -328,7 +328,9 @@ static int _vnic_dev_cmd(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd, if (!(status & STAT_BUSY)) { if (status & STAT_ERROR) { err = -(int)readq(&devcmd->args[0]); - if (cmd != CMD_CAPABILITY) + if (cmd != CMD_CAPABILITY && + cmd != CMD_OVERLAY_OFFLOAD_CTRL && + cmd != CMD_GET_SUPP_FEATURE_VER) pr_err("Devcmd %d failed " \ "with error code %d\n", _CMD_N(cmd), err); diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index dda0afede..f5b9b0dcb 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -1712,11 +1712,14 @@ static int enic_dev_init(struct enic *enic) * When Geneve with options offload is available, always disable it * first as it can interfere with user flow rules. */ - if (enic->geneve_opt_avail && - vnic_dev_overlay_offload_ctrl(enic->vdev, + if (enic->geneve_opt_avail) { + /* + * Disabling fails if the feature is provisioned but + * not enabled. So ignore result and do not log error. + */ + vnic_dev_overlay_offload_ctrl(enic->vdev, OVERLAY_FEATURE_GENEVE, - OVERLAY_OFFLOAD_DISABLE)) { - dev_err(enic, "failed to disable geneve+option\n"); + OVERLAY_OFFLOAD_DISABLE); } enic->overlay_offload = false; if (enic->disable_overlay && enic->vxlan) { -- 2.22.0