From patchwork Mon Jul 27 05:34:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 74824 X-Patchwork-Delegate: qi.z.zhang@intel.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 154B7A053A; Mon, 27 Jul 2020 08:00:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D3C021C023; Mon, 27 Jul 2020 08:00:18 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 9AAF41BFE9 for ; Mon, 27 Jul 2020 08:00:16 +0200 (CEST) IronPort-SDR: 2EUAYDfqzd3Wl2AK6iFc42DiJgZ1P7UULlfSUAUP1LSX2+bKdZEubbH1+rInMbfGsGZkYg1vdB NPPN9wxQ8pzw== X-IronPort-AV: E=McAfee;i="6000,8403,9694"; a="212486084" X-IronPort-AV: E=Sophos;i="5.75,401,1589266800"; d="scan'208";a="212486084" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2020 23:00:15 -0700 IronPort-SDR: 6B4CeYx1I0Yt1wRHvrUwAsnqn/50VXhir8OKFCpuWM3eH2LiNDXdcGYQ4SxbSLYX8JvELlw0VA Hp4V7p5wfMsg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,401,1589266800"; d="scan'208";a="303344471" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 26 Jul 2020 23:00:11 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Beilei Xing , Jeff Guo , Guinan Sun , Dawid Lukwinski Date: Mon, 27 Jul 2020 05:34:44 +0000 Message-Id: <20200727053451.22214-2-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200727053451.22214-1-guinanx.sun@intel.com> References: <20200721074000.30449-1-guinanx.sun@intel.com> <20200727053451.22214-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH v2 1/8] net/i40e/base: enable FEC on/off flag setting for X722 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" Starting with API version 1.10 firmware for X722 devices has ability to change FEC settings in PHY. Code added in this patch checks API version and sets appropriate capability flag. Signed-off-by: Dawid Lukwinski Signed-off-by: Guinan Sun Acked-by: Jeff Guo --- V2: * Add Acked-by --- drivers/net/i40e/base/i40e_adminq.c | 6 ++++++ drivers/net/i40e/base/i40e_adminq_cmd.h | 2 ++ drivers/net/i40e/base/i40e_type.h | 1 + 3 files changed, 9 insertions(+) diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c index c89e1fb3f..0da45f03e 100644 --- a/drivers/net/i40e/base/i40e_adminq.c +++ b/drivers/net/i40e/base/i40e_adminq.c @@ -603,6 +603,12 @@ STATIC void i40e_set_hw_flags(struct i40e_hw *hw) (aq->api_maj_ver == 1 && aq->api_min_ver >= I40E_MINOR_VER_GET_LINK_INFO_X722)) hw->flags |= I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE; + + if (aq->api_maj_ver > 1 || + (aq->api_maj_ver == 1 && + aq->api_min_ver >= I40E_MINOR_VER_FW_REQUEST_FEC_X722)) + hw->flags |= I40E_HW_FLAG_X722_FEC_REQUEST_CAPABLE; + /* fall through */ default: break; diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index 1905167f5..f790183be 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -25,6 +25,8 @@ #define I40E_MINOR_VER_GET_LINK_INFO_X722 0x0009 /* API version 1.6 for X722 devices adds ability to stop FW LLDP agent */ #define I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722 0x0006 +/* API version 1.10 for X722 devices adds ability to request FEC encoding */ +#define I40E_MINOR_VER_FW_REQUEST_FEC_X722 0x000A struct i40e_aq_desc { __le16 flags; diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index 014a4c132..b5b5b928d 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -745,6 +745,7 @@ struct i40e_hw { #define I40E_HW_FLAG_FW_LLDP_PERSISTENT BIT_ULL(5) #define I40E_HW_FLAG_AQ_PHY_ACCESS_EXTENDED BIT_ULL(6) #define I40E_HW_FLAG_DROP_MODE BIT_ULL(7) +#define I40E_HW_FLAG_X722_FEC_REQUEST_CAPABLE BIT_ULL(8) u64 flags; /* Used in set switch config AQ command */ From patchwork Mon Jul 27 05:34:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 74825 X-Patchwork-Delegate: qi.z.zhang@intel.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 64925A053A; Mon, 27 Jul 2020 08:00:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BAC441C0B3; Mon, 27 Jul 2020 08:00:22 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 6DE8B1C0AC for ; Mon, 27 Jul 2020 08:00:19 +0200 (CEST) IronPort-SDR: S8YqbUdr1JcOn437g802A9PtA4/eI40LOoD+p5BnqROJcF3AFRzjOrb7Adl4birWRe2IDSgShS yKYfwDztoIgw== X-IronPort-AV: E=McAfee;i="6000,8403,9694"; a="212486090" X-IronPort-AV: E=Sophos;i="5.75,401,1589266800"; d="scan'208";a="212486090" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2020 23:00:19 -0700 IronPort-SDR: PV3NnAqg/xu/rOoF4gTLo2UY/tW65WXxxka9sSFkObdR0wMUEGPCCaRA4I3AlyU+m66bwfTLei +XGFbGp4pPKg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,401,1589266800"; d="scan'208";a="303344490" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 26 Jul 2020 23:00:15 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Beilei Xing , Jeff Guo , Guinan Sun , Przemyslaw Patynowski Date: Mon, 27 Jul 2020 05:34:45 +0000 Message-Id: <20200727053451.22214-3-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200727053451.22214-1-guinanx.sun@intel.com> References: <20200721074000.30449-1-guinanx.sun@intel.com> <20200727053451.22214-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH v2 2/8] net/i40e/base: add PTYPE definition 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 I40E_RX_PTYPE_PARSER_ABORTED definition, so i40e driver will know opcode for parser aborted packets. Without this definition driver would have to rely on magic numbers. Signed-off-by: Przemyslaw Patynowski Signed-off-by: Guinan Sun Acked-by: Jeff Guo --- V2: * Add Acked-by --- drivers/net/i40e/base/i40e_type.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index b5b5b928d..0eeb55975 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -961,7 +961,8 @@ enum i40e_rx_l2_ptype { I40E_RX_PTYPE_GRENAT4_MAC_PAY3 = 58, I40E_RX_PTYPE_GRENAT4_MACVLAN_IPV6_ICMP_PAY4 = 87, I40E_RX_PTYPE_GRENAT6_MAC_PAY3 = 124, - I40E_RX_PTYPE_GRENAT6_MACVLAN_IPV6_ICMP_PAY4 = 153 + I40E_RX_PTYPE_GRENAT6_MACVLAN_IPV6_ICMP_PAY4 = 153, + I40E_RX_PTYPE_PARSER_ABORTED = 255 }; struct i40e_rx_ptype_decoded { From patchwork Mon Jul 27 05:34:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 74826 X-Patchwork-Delegate: qi.z.zhang@intel.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 BBD45A053A; Mon, 27 Jul 2020 08:00:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1C89C1C0BC; Mon, 27 Jul 2020 08:00:26 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id EBB881C0B2 for ; Mon, 27 Jul 2020 08:00:21 +0200 (CEST) IronPort-SDR: 0hP9+Hp4lGe9UPInabYI+WGV2X6zmKrw7crKLFJQAUafOmsA17MYSGw9lazxSzywQa5lRUiUZP yAqIQ9SAOSrg== X-IronPort-AV: E=McAfee;i="6000,8403,9694"; a="212486097" X-IronPort-AV: E=Sophos;i="5.75,401,1589266800"; d="scan'208";a="212486097" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2020 23:00:21 -0700 IronPort-SDR: rO9snhC4Aa9ohMRQmR85A5GxwfD6ltxBQ4y8XGz/szfv0JMHUjj9pM2yEJTs9WvwPIbVtx+shn f9+F/DTW7unQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,401,1589266800"; d="scan'208";a="303344505" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 26 Jul 2020 23:00:19 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Beilei Xing , Jeff Guo , Guinan Sun , Harshitha Ramamurthy Date: Mon, 27 Jul 2020 05:34:46 +0000 Message-Id: <20200727053451.22214-4-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200727053451.22214-1-guinanx.sun@intel.com> References: <20200721074000.30449-1-guinanx.sun@intel.com> <20200727053451.22214-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH v2 3/8] net/i40e/base: add new custom cloud filter types 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" This patch adds the new filter types needed for custom cloud filters. These custom cloud filters will route traffic to VFs based on the dst IP for both tunneled and non-tunneled packets. Signed-off-by: Harshitha Ramamurthy Signed-off-by: Guinan Sun Acked-by: Jeff Guo --- V2: * Modify the title. --- drivers/net/i40e/base/i40e_adminq_cmd.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index f790183be..21f544840 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -1406,6 +1406,8 @@ struct i40e_aqc_cloud_filters_element_data { #define I40E_AQC_ADD_CLOUD_FILTER_IMAC 0x000A #define I40E_AQC_ADD_CLOUD_FILTER_OMAC_TEN_ID_IMAC 0x000B #define I40E_AQC_ADD_CLOUD_FILTER_IIP 0x000C +#define I40E_AQC_ADD_CLOUD_FILTER_OIP1 0x0010 +#define I40E_AQC_ADD_CLOUD_FILTER_OIP2 0x0012 /* 0x000D reserved */ /* 0x000E reserved */ /* 0x000F reserved */ From patchwork Mon Jul 27 05:34:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 74827 X-Patchwork-Delegate: qi.z.zhang@intel.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 8EC47A053A; Mon, 27 Jul 2020 08:00:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5F9111C0CD; Mon, 27 Jul 2020 08:00:28 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id AE74B1C0BC for ; Mon, 27 Jul 2020 08:00:24 +0200 (CEST) IronPort-SDR: 0S+tNCFDdlgTfvxBTOFYqdeR2gUkZYcZdhsaxW6uhwtst6cIJPme54ZO1TJq+15Fw+6ZdaI/gG Oh9o3e6MkMkA== X-IronPort-AV: E=McAfee;i="6000,8403,9694"; a="212486109" X-IronPort-AV: E=Sophos;i="5.75,401,1589266800"; d="scan'208";a="212486109" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2020 23:00:24 -0700 IronPort-SDR: gay8TDcznOFBf+i7HJfb2y7ax+F+yTD977fAZKIOQ/x/q7u4fEByy0lDbsCymbk3XYoG1YK4Q0 t/cQuLXTjFlQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,401,1589266800"; d="scan'208";a="303344519" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 26 Jul 2020 23:00:21 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Beilei Xing , Jeff Guo , Guinan Sun , Jacek Naczyk Date: Mon, 27 Jul 2020 05:34:47 +0000 Message-Id: <20200727053451.22214-5-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200727053451.22214-1-guinanx.sun@intel.com> References: <20200721074000.30449-1-guinanx.sun@intel.com> <20200727053451.22214-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH v2 4/8] net/i40e/base: update FW API version to 1.11 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" Upcoming FW increment API version to 1.11 due to new bit and new fields in the Replace Cloud Filters AQ command. Signed-off-by: Jacek Naczyk Signed-off-by: Guinan Sun Acked-by: Jeff Guo --- V2: * Modify commit message. --- drivers/net/i40e/base/i40e_adminq_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index 21f544840..e1018ed49 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -13,7 +13,7 @@ #define I40E_FW_API_VERSION_MAJOR 0x0001 #define I40E_FW_API_VERSION_MINOR_X722 0x000A -#define I40E_FW_API_VERSION_MINOR_X710 0x000A +#define I40E_FW_API_VERSION_MINOR_X710 0x000B #define I40E_FW_MINOR_VERSION(_h) ((_h)->mac.type == I40E_MAC_XL710 ? \ I40E_FW_API_VERSION_MINOR_X710 : \ From patchwork Mon Jul 27 05:34:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 74828 X-Patchwork-Delegate: qi.z.zhang@intel.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 D55DDA053A; Mon, 27 Jul 2020 08:01:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 621C81C0D6; Mon, 27 Jul 2020 08:00:31 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id C77671BFE9; Mon, 27 Jul 2020 08:00:27 +0200 (CEST) IronPort-SDR: dGhgAzco0ZWE7DfGDGfpEJTUZOaxUwdT5iOsnr2GGEfYuFEC1wdYutuQn93Yn0a01qhJwGv3Mp AAc+Mkc4UovA== X-IronPort-AV: E=McAfee;i="6000,8403,9694"; a="212486125" X-IronPort-AV: E=Sophos;i="5.75,401,1589266800"; d="scan'208";a="212486125" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2020 23:00:27 -0700 IronPort-SDR: e8q+EPXKsk/evg6pwzy3FLvj3rAd0Xd50tUxIGyA0sbOgQFtwU3xyv+fawBXFTO8ALxL4UlcmJ hUIQ6KUh+mbw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,401,1589266800"; d="scan'208";a="303344550" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 26 Jul 2020 23:00:24 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Beilei Xing , Jeff Guo , Guinan Sun , stable@dpdk.org, Adam Ludkiewicz Date: Mon, 27 Jul 2020 05:34:48 +0000 Message-Id: <20200727053451.22214-6-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200727053451.22214-1-guinanx.sun@intel.com> References: <20200721074000.30449-1-guinanx.sun@intel.com> <20200727053451.22214-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH v2 5/8] net/i40e/base: fix possible uninitialized variable 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" Fix possible uninitialized variable in i40e in the i40e_get_lpi_counters function. Fixes: 429bdc0cd967 ("net/i40e/base: add function to read LPI counters") Cc: stable@dpdk.org Signed-off-by: Adam Ludkiewicz Signed-off-by: Guinan Sun Acked-by: Jeff Guo --- V2: * Modify commit message. --- drivers/net/i40e/base/i40e_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 46a0b7881..85c22849e 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -7097,7 +7097,7 @@ enum i40e_status_code i40e_get_lpi_counters(struct i40e_hw *hw, I40E_AQ_RUN_PHY_ACT_DNL_OPCODE_GET_EEE_STAT, &cmd_status, tx_counter, rx_counter, NULL); - if (cmd_status != I40E_AQ_RUN_PHY_ACT_CMD_STAT_SUCC) + if (!retval && cmd_status != I40E_AQ_RUN_PHY_ACT_CMD_STAT_SUCC) retval = I40E_ERR_ADMIN_QUEUE_ERROR; return retval; From patchwork Mon Jul 27 05:34:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 74829 X-Patchwork-Delegate: qi.z.zhang@intel.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 E9356A0524; Mon, 27 Jul 2020 08:01:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EE4CAF04; Mon, 27 Jul 2020 08:00:32 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 28FEA1C0CF for ; Mon, 27 Jul 2020 08:00:30 +0200 (CEST) IronPort-SDR: 5XZbO1fdojM/UIj328J9oDamkO3P4wqGcFDAvWp9idfeuwwJKl9rdp0iRvSYznfMKSQMZJZ2x/ nEyTUbl6qhUQ== X-IronPort-AV: E=McAfee;i="6000,8403,9694"; a="212486131" X-IronPort-AV: E=Sophos;i="5.75,401,1589266800"; d="scan'208";a="212486131" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2020 23:00:29 -0700 IronPort-SDR: L6PRkA+EvBcRnN5UbLJxqD9d3bplToV8pibLjl/ekLGlZaxR6poBIdZtivi5a8g+mLg8aI/n9N pbiqywhmTBLg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,401,1589266800"; d="scan'208";a="303344579" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 26 Jul 2020 23:00:27 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Beilei Xing , Jeff Guo , Guinan Sun , Damian Milosek Date: Mon, 27 Jul 2020 05:34:49 +0000 Message-Id: <20200727053451.22214-7-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200727053451.22214-1-guinanx.sun@intel.com> References: <20200721074000.30449-1-guinanx.sun@intel.com> <20200727053451.22214-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH v2 6/8] net/i40e/base: support unused ports disabling 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" This patch adds support for disabling unused ports. Signed-off-by: Damian Milosek Signed-off-by: Guinan Sun Acked-by: Jeff Guo --- V2: * Modifiy title and message --- drivers/net/i40e/base/i40e_adminq_cmd.h | 1 + drivers/net/i40e/base/i40e_common.c | 6 ++++++ drivers/net/i40e/base/i40e_type.h | 1 + 3 files changed, 8 insertions(+) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index e1018ed49..c7686b0d3 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -440,6 +440,7 @@ struct i40e_aqc_list_capabilities_element_resp { #define I40E_AQ_CAP_ID_SDP 0x0062 #define I40E_AQ_CAP_ID_MDIO 0x0063 #define I40E_AQ_CAP_ID_WSR_PROT 0x0064 +#define I40E_AQ_CAP_ID_DIS_UNUSED_PORTS 0x0067 #define I40E_AQ_CAP_ID_NVM_MGMT 0x0080 #define I40E_AQ_CAP_ID_FLEX10 0x00F1 #define I40E_AQ_CAP_ID_CEM 0x00F2 diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 85c22849e..65317f6c6 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -4021,6 +4021,12 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff, "HW Capability: wr_csr_prot = 0x%llX\n\n", (p->wr_csr_prot & 0xffff)); break; + case I40E_AQ_CAP_ID_DIS_UNUSED_PORTS: + p->dis_unused_ports = (bool)number; + i40e_debug(hw, I40E_DEBUG_INIT, + "HW Capability: dis_unused_ports = %d\n\n", + p->dis_unused_ports); + break; case I40E_AQ_CAP_ID_NVM_MGMT: if (number & I40E_NVM_MGMT_SEC_REV_DISABLED) p->sec_rev_disabled = true; diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index 0eeb55975..cf4134583 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -425,6 +425,7 @@ struct i40e_hw_capabilities { u32 enabled_tcmap; u32 maxtc; u64 wr_csr_prot; + bool dis_unused_ports; bool apm_wol_support; enum i40e_acpi_programming_method acpi_prog_method; bool proxy_support; From patchwork Mon Jul 27 05:34:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 74830 X-Patchwork-Delegate: qi.z.zhang@intel.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 DBAC4A0524; Mon, 27 Jul 2020 08:01:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 772021C10C; Mon, 27 Jul 2020 08:00:41 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 8163C1C10A for ; Mon, 27 Jul 2020 08:00:32 +0200 (CEST) IronPort-SDR: olb6YQY0+9WQSxC1RPGo56BaOMPch8bnEYG9Su7g1H8Y2bYhNMMPul1thYGqwqrZnnGjTmYUrK 0l6/NBBGh26Q== X-IronPort-AV: E=McAfee;i="6000,8403,9694"; a="212486138" X-IronPort-AV: E=Sophos;i="5.75,401,1589266800"; d="scan'208";a="212486138" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2020 23:00:32 -0700 IronPort-SDR: iQrlP2fvvKlv2Ls0gReqxibe2FhHeNZ2k1mRsulFKBlrGZSwT192weXRRLkO35KvGjPSSEHyG2 5l0ixiJgTiRg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,401,1589266800"; d="scan'208";a="303344602" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 26 Jul 2020 23:00:30 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Beilei Xing , Jeff Guo , Guinan Sun , Jaroslaw Ilgiewicz Date: Mon, 27 Jul 2020 05:34:50 +0000 Message-Id: <20200727053451.22214-8-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200727053451.22214-1-guinanx.sun@intel.com> References: <20200721074000.30449-1-guinanx.sun@intel.com> <20200727053451.22214-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH v2 7/8] net/i40e/base: replace AQ command for NVM update 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 AQ command "NVM update in process" to replace the original AQ command "NVM progress". Signed-off-by: Jaroslaw Ilgiewicz Signed-off-by: Guinan Sun Acked-by: Jeff Guo --- V2: * Add Acked-by --- drivers/net/i40e/base/i40e_adminq_cmd.h | 12 +++++- drivers/net/i40e/base/i40e_common.c | 53 +++++++++++++++---------- drivers/net/i40e/base/i40e_prototype.h | 6 ++- 3 files changed, 46 insertions(+), 25 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index c7686b0d3..0766e69a8 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -240,7 +240,7 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_nvm_update = 0x0703, i40e_aqc_opc_nvm_config_read = 0x0704, i40e_aqc_opc_nvm_config_write = 0x0705, - i40e_aqc_opc_nvm_progress = 0x0706, + i40e_aqc_opc_nvm_update_in_process = 0x0706, i40e_aqc_opc_oem_post_update = 0x0720, i40e_aqc_opc_thermal_sensor = 0x0721, @@ -2400,6 +2400,16 @@ struct i40e_aqc_nvm_config_data_feature { I40E_CHECK_STRUCT_LEN(0x6, i40e_aqc_nvm_config_data_feature); +/* NVM Update in Process (direct 0x0706) */ +struct i40e_aqc_nvm_update_in_process { + u8 command; +#define I40E_AQ_UPDATE_FLOW_END 0x0 +#define I40E_AQ_UPDATE_FLOW_START 0x1 + u8 reserved[15]; +}; + +I40E_CHECK_CMD_LENGTH(i40e_aqc_nvm_update_in_process); + struct i40e_aqc_nvm_config_data_immediate_field { __le32 field_id; __le32 field_value; diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 65317f6c6..6c6fb4de4 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -3686,6 +3686,37 @@ enum i40e_status_code i40e_aq_write_nvm_config(struct i40e_hw *hw, return status; } +/** + * i40e_aq_nvm_update_in_process + * @hw: pointer to the hw struct + * @update_flow_state: True indicates that update flow starts, false that ends + * @cmd_details: pointer to command details structure or NULL + * + * Indicate NVM update in process. + **/ +enum i40e_status_code +i40e_aq_nvm_update_in_process(struct i40e_hw *hw, + bool update_flow_state, + struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + struct i40e_aqc_nvm_update_in_process *cmd = + (struct i40e_aqc_nvm_update_in_process *)&desc.params.raw; + enum i40e_status_code status; + + i40e_fill_default_direct_cmd_desc(&desc, + i40e_aqc_opc_nvm_update_in_process); + + cmd->command = I40E_AQ_UPDATE_FLOW_END; + + if (update_flow_state) + cmd->command |= I40E_AQ_UPDATE_FLOW_START; + + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); + + return status; +} + /** * i40e_aq_oem_post_update - triggers an OEM specific flow after update * @hw: pointer to the hw struct @@ -4257,28 +4288,6 @@ enum i40e_status_code i40e_aq_rearrange_nvm(struct i40e_hw *hw, return status; } -/** - * i40e_aq_nvm_progress - * @hw: pointer to the hw struct - * @progress: pointer to progress returned from AQ - * @cmd_details: pointer to command details structure or NULL - * - * Gets progress of flash rearrangement process - **/ -enum i40e_status_code i40e_aq_nvm_progress(struct i40e_hw *hw, u8 *progress, - struct i40e_asq_cmd_details *cmd_details) -{ - enum i40e_status_code status; - struct i40e_aq_desc desc; - - DEBUGFUNC("i40e_aq_nvm_progress"); - - i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_nvm_progress); - status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); - *progress = desc.params.raw[0]; - return status; -} - /** * i40e_aq_get_lldp_mib * @hw: pointer to the hw struct diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h index 91fa23491..9a89f3002 100644 --- a/drivers/net/i40e/base/i40e_prototype.h +++ b/drivers/net/i40e/base/i40e_prototype.h @@ -254,8 +254,10 @@ enum i40e_status_code i40e_aq_update_nvm(struct i40e_hw *hw, u8 module_pointer, enum i40e_status_code i40e_aq_rearrange_nvm(struct i40e_hw *hw, u8 rearrange_nvm, struct i40e_asq_cmd_details *cmd_details); -enum i40e_status_code i40e_aq_nvm_progress(struct i40e_hw *hw, u8 *progress, - struct i40e_asq_cmd_details *cmd_details); +enum i40e_status_code +i40e_aq_nvm_update_in_process(struct i40e_hw *hw, + bool update_flow_state, + struct i40e_asq_cmd_details *cmd_details); enum i40e_status_code i40e_aq_get_lldp_mib(struct i40e_hw *hw, u8 bridge_type, u8 mib_type, void *buff, u16 buff_size, u16 *local_len, u16 *remote_len, From patchwork Mon Jul 27 05:34:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 74831 X-Patchwork-Delegate: qi.z.zhang@intel.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 3E78AA0524; Mon, 27 Jul 2020 08:01:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 527391C11F; Mon, 27 Jul 2020 08:00:43 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id A1CE01C117 for ; Mon, 27 Jul 2020 08:00:34 +0200 (CEST) IronPort-SDR: xFD+cZzBHCbqEyc/LKoBHz70jurEjaClWjtSQBdl2+l9ZADsWJKX9Nq1Y8qYonqcvv8/ojcPZc N4KpYaQkV9Zw== X-IronPort-AV: E=McAfee;i="6000,8403,9694"; a="212486141" X-IronPort-AV: E=Sophos;i="5.75,401,1589266800"; d="scan'208";a="212486141" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2020 23:00:34 -0700 IronPort-SDR: s56fHHQENxW4RHscdyncN0MW+dlrlOAtBZpTWig5Qgud2kxex4BA5Csj79t/uHOu6kY+gVhBdh VOdHhuD8I+fg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,401,1589266800"; d="scan'208";a="303344622" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 26 Jul 2020 23:00:32 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Beilei Xing , Jeff Guo , Guinan Sun Date: Mon, 27 Jul 2020 05:34:51 +0000 Message-Id: <20200727053451.22214-9-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200727053451.22214-1-guinanx.sun@intel.com> References: <20200721074000.30449-1-guinanx.sun@intel.com> <20200727053451.22214-1-guinanx.sun@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 8/8] net/i40e/base: update version 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" Update base code version in readme. Signed-off-by: Guinan Sun Acked-by: Jeff Guo --- V2: * Add Acked-by --- drivers/net/i40e/base/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/README b/drivers/net/i40e/base/README index 6baca4360..58174d472 100644 --- a/drivers/net/i40e/base/README +++ b/drivers/net/i40e/base/README @@ -6,7 +6,7 @@ IntelĀ® I40E driver ================== This directory contains source code of FreeBSD i40e driver of version -cid-i40e.2020.03.04.tar.gz released by the team which develops +cid-i40e.2020.07.16.tar.gz released by the team which develops basic drivers for any i40e NIC. The directory of base/ contains the original source package. This driver is valid for the product(s) listed below