From patchwork Tue Jul 21 07:39:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 74524 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 41DDFA0526; Tue, 21 Jul 2020 10:04:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 13FC41C012; Tue, 21 Jul 2020 10:04:37 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id C7E2E1BFE4 for ; Tue, 21 Jul 2020 10:04:33 +0200 (CEST) IronPort-SDR: I5+2erymXCLC/aCzA5oHZ3XH3iUXB8LxkN+/zKmFyeDMuZ1XzqNK10TLG7znXTiUDIWDElUoP0 /taJ+ynHKTGg== X-IronPort-AV: E=McAfee;i="6000,8403,9688"; a="147586136" X-IronPort-AV: E=Sophos;i="5.75,378,1589266800"; d="scan'208";a="147586136" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2020 01:04:33 -0700 IronPort-SDR: Kx2eIdo5ZpbSy412/n1rm0DFESOALmMepJkWmSE81wUfo5Cg2Qlqjrjrgi6kCf1xCu0h7Kt8jL ja3LAwqw7J0g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,378,1589266800"; d="scan'208";a="301541627" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 21 Jul 2020 01:04:31 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Beilei Xing , Jeff Guo , Guinan Sun , Dawid Lukwinski Date: Tue, 21 Jul 2020 07:39:53 +0000 Message-Id: <20200721074000.30449-2-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200721074000.30449-1-guinanx.sun@intel.com> References: <20200721074000.30449-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH 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 --- 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 Tue Jul 21 07:39:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 74525 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 0C9FDA0526; Tue, 21 Jul 2020 10:04:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7D08F1C031; Tue, 21 Jul 2020 10:04:38 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id AC83C1C00D for ; Tue, 21 Jul 2020 10:04:35 +0200 (CEST) IronPort-SDR: aBvivRJwbesBGk0AFuzUvP8xdaXGMEFepkKMq1XUVT7aDaahB10WyRZbQTpIERI2DNiTTcjYqp XH8e1ODJwkMQ== X-IronPort-AV: E=McAfee;i="6000,8403,9688"; a="147586140" X-IronPort-AV: E=Sophos;i="5.75,378,1589266800"; d="scan'208";a="147586140" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2020 01:04:35 -0700 IronPort-SDR: u+/3YTnie0Y6E6SF8QrLLi93l5WbZPTa/VYRmMeltXX+2Uc0GF3pZG9yL6/LXSirCIVQ5Zb9HT ryeMicujFIIw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,378,1589266800"; d="scan'208";a="301541634" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 21 Jul 2020 01:04:33 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Beilei Xing , Jeff Guo , Guinan Sun , Przemyslaw Patynowski Date: Tue, 21 Jul 2020 07:39:54 +0000 Message-Id: <20200721074000.30449-3-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200721074000.30449-1-guinanx.sun@intel.com> References: <20200721074000.30449-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH 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 --- 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 Tue Jul 21 07:39:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 74526 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 655B6A0526; Tue, 21 Jul 2020 10:05:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EC87B1C038; Tue, 21 Jul 2020 10:04:40 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 3E7FB1C036 for ; Tue, 21 Jul 2020 10:04:39 +0200 (CEST) IronPort-SDR: ROtadfo5NqgFQv6z66tXILfs7+9uWsfw97x8h5azDxxOlq5LQLxXJFGp1gWouw7tC8eSXWFChd Muea0k+SXM7Q== X-IronPort-AV: E=McAfee;i="6000,8403,9688"; a="147586148" X-IronPort-AV: E=Sophos;i="5.75,378,1589266800"; d="scan'208";a="147586148" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2020 01:04:38 -0700 IronPort-SDR: 4iqyict8UeYJ6TIHR18PhUl2I0oE48+aP2c/w3//Bmt8k89VrQtnMb/xYgLTPjMYo7Wn/Xsse8 2lbOPl9O2zxg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,378,1589266800"; d="scan'208";a="301541657" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 21 Jul 2020 01:04:36 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Beilei Xing , Jeff Guo , Guinan Sun , Harshitha Ramamurthy Date: Tue, 21 Jul 2020 07:39:55 +0000 Message-Id: <20200721074000.30449-4-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200721074000.30449-1-guinanx.sun@intel.com> References: <20200721074000.30449-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH 3/8] net/i40e/base: enable new custom cloud filters 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 --- 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 Tue Jul 21 07:39:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 74527 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 679ACA0526; Tue, 21 Jul 2020 10:05:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 65B3D1C045; Tue, 21 Jul 2020 10:04:43 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 5DB9D1C043 for ; Tue, 21 Jul 2020 10:04:41 +0200 (CEST) IronPort-SDR: vIVuQswPUGBu3e1qpoayD/l1L2QkMLdWEMO14gnRzl5CmS59pXCvFmyDWKp23eiJWZX9VEU9IZ a14HPnRbH1pw== X-IronPort-AV: E=McAfee;i="6000,8403,9688"; a="147586154" X-IronPort-AV: E=Sophos;i="5.75,378,1589266800"; d="scan'208";a="147586154" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2020 01:04:40 -0700 IronPort-SDR: Cq3WEXMdUHqMSKWpcIbPsxFDZGjOucmx9tiRTkG2AS/cA5aXsJJGCwmPjnacbaz8gMdwV98um4 aibs8PFPsXEQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,378,1589266800"; d="scan'208";a="301541664" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 21 Jul 2020 01:04:39 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Beilei Xing , Jeff Guo , Guinan Sun , Jacek Naczyk Date: Tue, 21 Jul 2020 07:39:56 +0000 Message-Id: <20200721074000.30449-5-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200721074000.30449-1-guinanx.sun@intel.com> References: <20200721074000.30449-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH 4/8] net/i40e/base: update FVL 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 FVL 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 --- 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 Tue Jul 21 07:39:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 74528 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 9BD4BA0526; Tue, 21 Jul 2020 10:05:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C73251C036; Tue, 21 Jul 2020 10:04:45 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id A3FF51C066 for ; Tue, 21 Jul 2020 10:04:43 +0200 (CEST) IronPort-SDR: WauGeSUbdapB8mR6UA5O2aZqkHyUzXsHzg3+xrVdZkdR9+7c8k9IxOJh3u/WLh/aG3HCuA4+7C MHzRZWgUrd/g== X-IronPort-AV: E=McAfee;i="6000,8403,9688"; a="147586162" X-IronPort-AV: E=Sophos;i="5.75,378,1589266800"; d="scan'208";a="147586162" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2020 01:04:43 -0700 IronPort-SDR: aqBp31TfxbsCqpHzhgnpVd9B8hq9iYd5Wn2N9rMs+k3hIP4sCMq/lpTDR9WFcApvEVY2Trot5P wfTB1iL3k8mw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,378,1589266800"; d="scan'208";a="301541671" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 21 Jul 2020 01:04:41 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Beilei Xing , Jeff Guo , Guinan Sun , Adam Ludkiewicz Date: Tue, 21 Jul 2020 07:39:57 +0000 Message-Id: <20200721074000.30449-6-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200721074000.30449-1-guinanx.sun@intel.com> References: <20200721074000.30449-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH 5/8] net/i40e/base: check return value of DNL admin command 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" Check return value of running DNL admin command. Signed-off-by: Adam Ludkiewicz Signed-off-by: Guinan Sun --- 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 Tue Jul 21 07:39:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 74529 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 092FEA0526; Tue, 21 Jul 2020 10:05:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 02E031C043; Tue, 21 Jul 2020 10:04:49 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 5CECB1C06D for ; Tue, 21 Jul 2020 10:04:47 +0200 (CEST) IronPort-SDR: nBiTC24d5HTgeNgt6qhYoLORvKDkGOO5X8OP4wxORZS8pZcMKHTpQXdW3ictwjoJQQRpOEajGT mL9kBnSyNBFA== X-IronPort-AV: E=McAfee;i="6000,8403,9688"; a="147586170" X-IronPort-AV: E=Sophos;i="5.75,378,1589266800"; d="scan'208";a="147586170" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2020 01:04:45 -0700 IronPort-SDR: 0yV5GboA/wvKVJLB/XtHJAhYWK4x5jL2QSEF58pSMYQnQoAteVKBTlUTmO9TcQ/bpZPJ5Mgv/T a7Z1sWzroIrQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,378,1589266800"; d="scan'208";a="301541680" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 21 Jul 2020 01:04:43 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Beilei Xing , Jeff Guo , Guinan Sun , Damian Milosek Date: Tue, 21 Jul 2020 07:39:58 +0000 Message-Id: <20200721074000.30449-7-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200721074000.30449-1-guinanx.sun@intel.com> References: <20200721074000.30449-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH 6/8] net/i40e/base: add disable unused ports capability 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 "Disable Unused Ports" functionality. Signed-off-by: Damian Milosek Signed-off-by: Guinan Sun --- 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 Tue Jul 21 07:39:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 74530 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 E063FA0526; Tue, 21 Jul 2020 10:05:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C0F7B1C0AC; Tue, 21 Jul 2020 10:04:50 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 2DE4A1C07D for ; Tue, 21 Jul 2020 10:04:49 +0200 (CEST) IronPort-SDR: 7/9tL/n8ID2ROKrMlPzYXHb5aRB/jYk4WtuE6u3d8Bj68y/4sjQXMHbvXiFxWxCm5fbzR2HFzM K/lzg2khGlbg== X-IronPort-AV: E=McAfee;i="6000,8403,9688"; a="147586180" X-IronPort-AV: E=Sophos;i="5.75,378,1589266800"; d="scan'208";a="147586180" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2020 01:04:48 -0700 IronPort-SDR: r5kP47QALDR68LwLgxP15vkf3Mq3GO6EExrNcxJsDXnHI+q4lvDzdR5jYpnmr24LIDeYc6VyQ6 /YFVpS9wLttw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,378,1589266800"; d="scan'208";a="301541691" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 21 Jul 2020 01:04:46 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Beilei Xing , Jeff Guo , Guinan Sun , Jaroslaw Ilgiewicz Date: Tue, 21 Jul 2020 07:39:59 +0000 Message-Id: <20200721074000.30449-8-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200721074000.30449-1-guinanx.sun@intel.com> References: <20200721074000.30449-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH 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 --- 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 Tue Jul 21 07:40:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 74531 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 5758EA0526; Tue, 21 Jul 2020 10:05:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6776C1C0B2; Tue, 21 Jul 2020 10:05:07 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 6AE6E1C0B1 for ; Tue, 21 Jul 2020 10:05:05 +0200 (CEST) IronPort-SDR: 8tFM0B10xSaImRGMc0Mh/g258j5J9KtWAPqnzqrS3qR1vC0EeccK2Vm0qEb8GywHrkhYYK/LtP 1Jwc7xyZzfjw== X-IronPort-AV: E=McAfee;i="6000,8403,9688"; a="151429516" X-IronPort-AV: E=Sophos;i="5.75,378,1589266800"; d="scan'208";a="151429516" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2020 01:05:04 -0700 IronPort-SDR: T3kAiIcDXsKR//OboZ5YlyB+CjX+hu3K+w3W/lRHfC25f1uN5bwvXVl/ci9RPqvoUNN2c25AMD uf9s9gRyKkSA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,378,1589266800"; d="scan'208";a="301541727" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 21 Jul 2020 01:04:48 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Beilei Xing , Jeff Guo , Guinan Sun Date: Tue, 21 Jul 2020 07:40:00 +0000 Message-Id: <20200721074000.30449-9-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200721074000.30449-1-guinanx.sun@intel.com> References: <20200721074000.30449-1-guinanx.sun@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 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 --- 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