From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A834BA0C40; Wed, 9 Jun 2021 04:52:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59196410DE; Wed, 9 Jun 2021 04:52:16 +0200 (CEST) Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.11.229]) by mails.dpdk.org (Postfix) with ESMTP id 9E31B40E50 for ; Wed, 9 Jun 2021 04:52:15 +0200 (CEST) Received: from dhcp-10-123-153-22.dhcp.broadcom.net (bgccx-dev-host-lnx2.bec.broadcom.net [10.123.153.22]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 72A543C172; Tue, 8 Jun 2021 19:52:12 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 72A543C172 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1623207133; bh=WHgHMqqo5JxGSgfluGvjMjhOa+ztAdVKvoL9zFYNhNI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L6j1GT0E5X8FiqsYF5/8abSq7IFhmEQgRSfvH+fBDMO/IWNBrUAs1gSUticUpex7B l0QitcsZ7G1iUhy+z6DGvdclJEBzR71eBz79WlnAWojuC5j7KQBcTjAZ18OTy97P6o QCN+QExCla6lN8J1ZxqAEr5du8+ivYx+xQXRkVjE= From: Kalesh A P To: dev@dpdk.org Cc: ferruh.yigit@intel.com, ajit.khaparde@broadcom.com Date: Wed, 9 Jun 2021 08:43:29 +0530 Message-Id: <20210609031332.16739-2-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20210609031332.16739-1-kalesh-anakkur.purayil@broadcom.com> References: <20210609031332.16739-1-kalesh-anakkur.purayil@broadcom.com> Subject: [dpdk-dev] [PATCH 1/4] net/bnxt: cleanup code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" From: Kalesh AP This is a cleanup commit and no functional change. 1. use macros instead of hard coded values 2. remove unnecessary comments Fixes: 5cd0e2889c43 ("net/bnxt: support NIC Partitioning") Fixes: 2ba07b7dbd9d ("net/bnxt: set the hash key size") Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 3 +-- drivers/net/bnxt/bnxt_hwrm.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 30aa0ef..f38fe6a 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -959,7 +959,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev, dev_info->max_rx_queues = max_rx_rings; dev_info->max_tx_queues = max_rx_rings; dev_info->reta_size = bnxt_rss_hash_tbl_size(bp); - dev_info->hash_key_size = 40; + dev_info->hash_key_size = HW_HASH_KEY_SIZE; max_vnics = bp->max_vnics; /* MTU specifics */ @@ -2064,7 +2064,6 @@ static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev, if (rc) return rc; - /* Retrieve from the default VNIC */ if (!vnic) return -EINVAL; if (!vnic->rss_table) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 31f1d31..5d34081 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -3307,7 +3307,6 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up) return rc; } -/* JIRA 22088 */ int bnxt_hwrm_func_qcfg(struct bnxt *bp, uint16_t *mtu) { struct hwrm_func_qcfg_input req = {0}; @@ -3324,8 +3323,7 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp, uint16_t *mtu) HWRM_CHECK_RESULT(); - /* Hard Coded.. 0xfff VLAN ID mask */ - bp->vlan = rte_le_to_cpu_16(resp->vlan) & 0xfff; + bp->vlan = rte_le_to_cpu_16(resp->vlan) & ETH_VLAN_ID_MAX; svif_info = rte_le_to_cpu_16(resp->svif_info); if (svif_info & HWRM_FUNC_QCFG_OUTPUT_SVIF_INFO_SVIF_VALID) -- 2.10.1