From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 25DAFA32A1 for ; Thu, 24 Oct 2019 08:07:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A299A1C1BE; Thu, 24 Oct 2019 08:07:10 +0200 (CEST) Received: from relay.smtp.broadcom.com (unknown [192.19.211.62]) by dpdk.org (Postfix) with ESMTP id D6C081C029 for ; Thu, 24 Oct 2019 08:06:57 +0200 (CEST) Received: from dhcp-10-123-153-55.dhcp.broadcom.net (bgccx-dev-host-lnx35.bec.broadcom.net [10.123.153.55]) by relay.smtp.broadcom.com (Postfix) with ESMTP id 0A2E328FA89; Wed, 23 Oct 2019 23:06:56 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com 0A2E328FA89 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1571897217; bh=1BSm/yABxJfAaSxk2xekx0IARwnQnAt+UTPcCYOIMc8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=onmwIWZlqe0Yre00jxQ3RKyhC1GGau0b4sd2LPEowtr+gaY5ntbqt+Ukd2FzGsdOA 6hIIWv3egA+KdPgiD5W2lJAyX4De9jJhUItc/cF5xvZtcFt5wGT1Ky7yG3zThHKsMZ 1PTI55Rl8xiB3Jp0SeNcsYOBb6/Gq7CTVd9TM4HA= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Thu, 24 Oct 2019 11:28:59 +0530 Message-Id: <20191024055913.28817-5-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.10.1.613.g2cc2e70 In-Reply-To: <20191024055913.28817-1-somnath.kotur@broadcom.com> References: <20191024055913.28817-1-somnath.kotur@broadcom.com> Subject: [dpdk-dev] [PATCH 04/16] net/bnxt: fix to write the correct MTU to FW 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" From: Ajit Khaparde We are currently writing the MAX supported MTU size even though the MTU passed by the application is a different value. Configure the application specified MTU instead. Fixes: b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF") Signed-off-by: Ajit Khaparde Reviewed-by: Somnath Kotur Signed-off-by: Somnath Kotur --- drivers/net/bnxt/bnxt_hwrm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index ae26b30..c777c73 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -860,7 +860,7 @@ int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp, bool test) req.num_l2_ctxs = rte_cpu_to_le_16(BNXT_VF_RSV_NUM_L2_CTX); req.num_vnics = rte_cpu_to_le_16(BNXT_VF_RSV_NUM_VNIC); } else if (bp->vf_resv_strategy == - HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESV_STRATEGY_MAXIMAL) + HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESV_STRATEGY_MAXIMAL) { enables |= HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_RSSCOS_CTXS; req.num_rsscos_ctxs = rte_cpu_to_le_16(bp->max_rsscos_ctx); } @@ -2956,7 +2956,8 @@ static int bnxt_hwrm_pf_func_cfg(struct bnxt *bp, int tx_rings) } req.flags = rte_cpu_to_le_32(bp->pf.func_cfg_flags); - req.mtu = rte_cpu_to_le_16(BNXT_MAX_MTU); + req.mtu = rte_cpu_to_le_16(RTE_MIN(bp->eth_dev->data->mtu, + BNXT_MAX_MTU)); //FW adds hdr sizes req.mru = rte_cpu_to_le_16(BNXT_VNIC_MRU(bp->eth_dev->data->mtu)); req.num_rsscos_ctxs = rte_cpu_to_le_16(bp->max_rsscos_ctx); req.num_stat_ctxs = rte_cpu_to_le_16(bp->max_stat_ctx); -- 1.8.3.1