From: Kalesh AP Date: Wed, 9 Jun 2021 03:13:29 +0000 (+0530) Subject: net/bnxt: cleanup code X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8879ece56832b7f2dd5e5ee10f36e848089f09df;p=dpdk.git net/bnxt: cleanup code 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 --- diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 1579d797ce..e7fc254173 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -966,7 +966,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 */ @@ -2071,7 +2071,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 be595487e5..13c2b88104 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -3313,7 +3313,6 @@ error: return rc; } -/* JIRA 22088 */ int bnxt_hwrm_func_qcfg(struct bnxt *bp, uint16_t *mtu) { struct hwrm_func_qcfg_input req = {0}; @@ -3330,8 +3329,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)