From patchwork Thu Oct 31 05:36:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hyong Youb Kim (hyonkim)" X-Patchwork-Id: 62272 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DF9D7A00BE; Thu, 31 Oct 2019 06:36:46 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9E6E81BF80; Thu, 31 Oct 2019 06:36:46 +0100 (CET) Received: from alln-iport-3.cisco.com (alln-iport-3.cisco.com [173.37.142.90]) by dpdk.org (Postfix) with ESMTP id 55C302BAA for ; Thu, 31 Oct 2019 06:36:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=899; q=dns/txt; s=iport; t=1572500205; x=1573709805; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=C+k9xznvZQ3Y6xnqbwOkCcXJzhvn2ODNil8sovLk10Y=; b=a622oAvsayQJj7HyW7TN7E/XRYvx0GT2K/i2bUT12sFBT37ebzaf1hIp g8MmZoOFjl7THBUyUfnz8gES0xCPG//7aWEzq7cqlrZ3fSuuMP1Tp2jEp Bg+D1KKoZdWuJm8yjNXzlDWUFXDucpPio6LgYhFh5FtGXuoZTMmeIt0/W I=; X-IronPort-AV: E=Sophos;i="5.68,250,1569283200"; d="scan'208";a="368953524" Received: from rcdn-core-4.cisco.com ([173.37.93.155]) by alln-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 31 Oct 2019 05:36:44 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by rcdn-core-4.cisco.com (8.15.2/8.15.2) with ESMTP id x9V5ai33017206; Thu, 31 Oct 2019 05:36:44 GMT Received: by cisco.com (Postfix, from userid 508933) id EBF7E20F2003; Wed, 30 Oct 2019 22:36:43 -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:21 -0700 Message-Id: <20191031053623.16185-2-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 X-Outbound-SMTP-Client: 10.193.184.48, savbu-usnic-a.cisco.com X-Outbound-Node: rcdn-core-4.cisco.com Subject: [dpdk-dev] [PATCH 1/3] net/enic: fix whitespaces in log macros 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" Add a space between the function name and message. Fixes: bbd8ecc05434 ("net/enic: remove PMD log type references") Signed-off-by: Hyong Youb Kim Reviewed-by: John Daley --- 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 From patchwork Thu Oct 31 05:36:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hyong Youb Kim (hyonkim)" X-Patchwork-Id: 62273 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9F6A2A00BE; Thu, 31 Oct 2019 06:36:59 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 758581C134; Thu, 31 Oct 2019 06:36:59 +0100 (CET) Received: from alln-iport-3.cisco.com (alln-iport-3.cisco.com [173.37.142.90]) by dpdk.org (Postfix) with ESMTP id B103B1BFF5 for ; Thu, 31 Oct 2019 06:36:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1031; q=dns/txt; s=iport; t=1572500218; x=1573709818; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JE0b3lxbXEDFUOtdV6aJd1oanWsc/IlPJUrqowixP84=; b=mFovR9ffZyjWzS4m+KfHciT7ikEstP9nNPyQ4ipezFxjIUACY81tzEJl 2nM/9uDwhwY/FpDqmlwenXZKi4Ys6vHehj0IGK4AMdJryhKbJ1r4GscE0 SX9Pl0QLmxmfMqBT8FJ7R5A1x6jYQ5MWBzsiCEjJqCoMefb3nWbGPWN/+ E=; X-IronPort-AV: E=Sophos;i="5.68,250,1569283200"; d="scan'208";a="368953552" Received: from alln-core-8.cisco.com ([173.36.13.141]) by alln-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 31 Oct 2019 05:36:57 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by alln-core-8.cisco.com (8.15.2/8.15.2) with ESMTP id x9V5auns001731; Thu, 31 Oct 2019 05:36:56 GMT Received: by cisco.com (Postfix, from userid 508933) id A96B220F2003; Wed, 30 Oct 2019 22:36:56 -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:22 -0700 Message-Id: <20191031053623.16185-3-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 X-Outbound-SMTP-Client: 10.193.184.48, savbu-usnic-a.cisco.com X-Outbound-Node: alln-core-8.cisco.com Subject: [dpdk-dev] [PATCH 2/3] net/enic: fix speed capabilities for the new VF 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" 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 Reviewed-by: John Daley --- 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; } From patchwork Thu Oct 31 05:36:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hyong Youb Kim (hyonkim)" X-Patchwork-Id: 62274 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org 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 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) {