DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hyong Youb Kim <hyonkim@cisco.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org, John Daley <johndale@cisco.com>,
	Hyong Youb Kim <hyonkim@cisco.com>
Subject: [dpdk-dev] [PATCH 3/3] net/enic: suppress unwanted error messages
Date: Wed, 30 Oct 2019 22:36:23 -0700	[thread overview]
Message-ID: <20191031053623.16185-4-hyonkim@cisco.com> (raw)
In-Reply-To: <20191031053623.16185-1-hyonkim@cisco.com>

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 <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 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


  parent reply	other threads:[~2019-10-31  5:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-31  5:36 [dpdk-dev] [PATCH 0/3] net/enic: fixes for cosmetic issues Hyong Youb Kim
2019-10-31  5:36 ` [dpdk-dev] [PATCH 1/3] net/enic: fix whitespaces in log macros Hyong Youb Kim
2019-10-31  5:36 ` [dpdk-dev] [PATCH 2/3] net/enic: fix speed capabilities for the new VF Hyong Youb Kim
2019-10-31  5:36 ` Hyong Youb Kim [this message]
2019-11-06 17:29 ` [dpdk-dev] [PATCH 0/3] net/enic: fixes for cosmetic issues Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191031053623.16185-4-hyonkim@cisco.com \
    --to=hyonkim@cisco.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=johndale@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).