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 11F5FA0548; Wed, 15 Jun 2022 16:58:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 86E1D42B8E; Wed, 15 Jun 2022 16:57:50 +0200 (CEST) Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.166.231]) by mails.dpdk.org (Postfix) with ESMTP id C55DA42B8E for ; Wed, 15 Jun 2022 16:57:47 +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 21AF3C0000F5; Wed, 15 Jun 2022 07:57:45 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 21AF3C0000F5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1655305067; bh=Xca0aoY9VRsN1ZuJ/pFbi7zq3oNx3ug7iH07dKNh54A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XT7GFO7ba2j1kRK/2d5shiORawiovwXXnJ6dxuEPRFafVHI8KQdWqLcg1EgDbZM0l oyQ0ljG5J8wup2jNFv2TjP5lUNkpmt9k5E+P+NEc87HKwDtzTvA+ytakHgjGf+X60b KD2TAjyHoUCIGBBq6UCXa/Pbw7/zCDMPEln/MwVs= From: Kalesh A P To: dev@dpdk.org Cc: ferruh.yigit@xilinx.com, ajit.khaparde@broadcom.com Subject: [dpdk-dev] [PATCH 4/8] net/bnxt: allow Tx only or Rx only configs in PMD Date: Wed, 15 Jun 2022 20:26:59 +0530 Message-Id: <20220615145703.6613-5-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20220615145703.6613-1-kalesh-anakkur.purayil@broadcom.com> References: <20220615145703.6613-1-kalesh-anakkur.purayil@broadcom.com> 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 From: Damodharam Ammepalli Currently, we fail the init/probe of pmd if eth_dev->data->nb_tx_queues or eth_dev->data->nb_rx_queues is 0. We are removing this check. Fixes: daef48efe5e5 ("net/bnxt: support set MTU") Cc: stable@dpdk.org Signed-off-by: Damodharam Ammepalli Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_ethdev.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 34f2149..8181e1f 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -723,7 +723,7 @@ static int bnxt_alloc_prev_ring_stats(struct bnxt *bp) sizeof(struct bnxt_ring_stats) * bp->tx_cp_nr_rings, 0); - if (bp->prev_tx_ring_stats == NULL) + if (bp->tx_cp_nr_rings > 0 && bp->prev_tx_ring_stats == NULL) goto error; return 0; @@ -1567,11 +1567,6 @@ int bnxt_dev_start_op(struct rte_eth_dev *eth_dev) int vlan_mask = 0; int rc, retry_cnt = BNXT_IF_CHANGE_RETRY_COUNT; - if (!eth_dev->data->nb_tx_queues || !eth_dev->data->nb_rx_queues) { - PMD_DRV_LOG(ERR, "Queues are not configured yet!\n"); - return -EINVAL; - } - if (bp->rx_cp_nr_rings > RTE_ETHDEV_QUEUE_STAT_CNTRS) PMD_DRV_LOG(ERR, "RxQ cnt %d > RTE_ETHDEV_QUEUE_STAT_CNTRS %d\n", -- 2.10.1