DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/3] net/enic: fixes for cosmetic issues
@ 2019-10-31  5:36 Hyong Youb Kim
  2019-10-31  5:36 ` [dpdk-dev] [PATCH 1/3] net/enic: fix whitespaces in log macros Hyong Youb Kim
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Hyong Youb Kim @ 2019-10-31  5:36 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, John Daley, Hyong Youb Kim

These patches fix 3 cosmetic issues discovered during rc1 testing. For
example, removing useless/misleading error messages and adding a space
in log messages.

Thanks.
-Hyong

Hyong Youb Kim (3):
  net/enic: fix whitespaces in log macros
  net/enic: fix speed capabilities for the new VF
  net/enic: suppress unwanted error messages

 drivers/net/enic/base/vnic_dev.c |  4 +++-
 drivers/net/enic/enic_compat.h   |  4 ++--
 drivers/net/enic/enic_ethdev.c   |  6 ++++++
 drivers/net/enic/enic_main.c     | 11 +++++++----
 4 files changed, 18 insertions(+), 7 deletions(-)

-- 
2.22.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH 1/3] net/enic: fix whitespaces in log macros
  2019-10-31  5:36 [dpdk-dev] [PATCH 0/3] net/enic: fixes for cosmetic issues Hyong Youb Kim
@ 2019-10-31  5:36 ` 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
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Hyong Youb Kim @ 2019-10-31  5:36 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, John Daley, Hyong Youb Kim

Add a space between the function name and message.

Fixes: bbd8ecc05434 ("net/enic: remove PMD log type references")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_compat.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/enic/enic_compat.h b/drivers/net/enic/enic_compat.h
index bf9e998a6..bdf4edcab 100644
--- a/drivers/net/enic/enic_compat.h
+++ b/drivers/net/enic/enic_compat.h
@@ -60,8 +60,8 @@ extern int enic_pmd_logtype;
 
 #define ENICPMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, enic_pmd_logtype, \
-		"%s" fmt "\n", __func__, ##args)
-#define ENICPMD_FUNC_TRACE() ENICPMD_LOG(DEBUG, " >>")
+		"%s " fmt "\n", __func__, ##args)
+#define ENICPMD_FUNC_TRACE() ENICPMD_LOG(DEBUG, ">>")
 
 #define __le16 u16
 #define __le32 u32
-- 
2.22.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH 2/3] net/enic: fix speed capabilities for the new VF
  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 ` Hyong Youb Kim
  2019-10-31  5:36 ` [dpdk-dev] [PATCH 3/3] net/enic: suppress unwanted error messages Hyong Youb Kim
  2019-11-06 17:29 ` [dpdk-dev] [PATCH 0/3] net/enic: fixes for cosmetic issues Ferruh Yigit
  3 siblings, 0 replies; 5+ messages in thread
From: Hyong Youb Kim @ 2019-10-31  5:36 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, John Daley, Hyong Youb Kim

VFs all have subsystem ID 0. VIC models with the latest VF are at
least 40G, so report that as a more reasonable speed than 10G.

Fixes: 57bb45b37bdf ("net/enic: add PCI id for new virtual function")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 12c59a3c5..8ad976d3c 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -507,6 +507,12 @@ static uint32_t speed_capa_from_pci_id(struct rte_eth_dev *eth_dev)
 	/* 1300 and later models are at least 40G */
 	if (id >= 0x0100)
 		return ETH_LINK_SPEED_40G;
+	/* VFs have subsystem id 0, check device id */
+	if (id == 0) {
+		/* Newer VF implies at least 40G model */
+		if (pdev->id.device_id == PCI_DEVICE_ID_CISCO_VIC_ENET_SN)
+			return ETH_LINK_SPEED_40G;
+	}
 	return ETH_LINK_SPEED_10G;
 }
 
-- 
2.22.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH 3/3] net/enic: suppress unwanted error messages
  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
  2019-11-06 17:29 ` [dpdk-dev] [PATCH 0/3] net/enic: fixes for cosmetic issues Ferruh Yigit
  3 siblings, 0 replies; 5+ messages in thread
From: Hyong Youb Kim @ 2019-10-31  5:36 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, John Daley, Hyong Youb Kim

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH 0/3] net/enic: fixes for cosmetic issues
  2019-10-31  5:36 [dpdk-dev] [PATCH 0/3] net/enic: fixes for cosmetic issues Hyong Youb Kim
                   ` (2 preceding siblings ...)
  2019-10-31  5:36 ` [dpdk-dev] [PATCH 3/3] net/enic: suppress unwanted error messages Hyong Youb Kim
@ 2019-11-06 17:29 ` Ferruh Yigit
  3 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2019-11-06 17:29 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: dev, John Daley

On 10/31/2019 5:36 AM, Hyong Youb Kim wrote:
> These patches fix 3 cosmetic issues discovered during rc1 testing. For
> example, removing useless/misleading error messages and adding a space
> in log messages.
> 
> Thanks.
> -Hyong
> 
> Hyong Youb Kim (3):
>   net/enic: fix whitespaces in log macros
>   net/enic: fix speed capabilities for the new VF
>   net/enic: suppress unwanted error messages

Series applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-06 17:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [dpdk-dev] [PATCH 3/3] net/enic: suppress unwanted error messages Hyong Youb Kim
2019-11-06 17:29 ` [dpdk-dev] [PATCH 0/3] net/enic: fixes for cosmetic issues Ferruh Yigit

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).