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;