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 553B0A0471 for ; Tue, 16 Jul 2019 11:29:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5AA441B9DE; Tue, 16 Jul 2019 11:28:56 +0200 (CEST) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 026944C90 for ; Tue, 16 Jul 2019 11:28:43 +0200 (CEST) Received: from nis-sj1-27.broadcom.com (nis-sj1-27.lvn.broadcom.net [10.75.144.136]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id C440B30C037; Tue, 16 Jul 2019 02:28:41 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com C440B30C037 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1563269321; bh=aRav2kWo0Gxu1qpSdjB7QjJTzLCz7rb8PRmasPz0Sgs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Krk59lYA5rdBF0e/g+41qtpBRY1Gg84wC91KiXSJRFsyjTMS7ZGVHCWcXAP1xcyuS VLgq00Sqn7exzxZor4oNXrMWOLI6UmZd0v81s8Fela071zPquU3MqMfN3QIks75kq9 E4ptS4VwC2A8c8UEBViLRItnXoMiT4y/PraWup5s= Received: from C02VPB22HTD6.wifi.broadcom.net (c02vpb22htd6.wifi.broadcom.net [10.122.43.105]) by nis-sj1-27.broadcom.com (Postfix) with ESMTP id 07EAAAC0749; Tue, 16 Jul 2019 02:28:39 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Lance Richardson , Christopher Reder Date: Tue, 16 Jul 2019 14:58:16 +0530 Message-Id: <20190716092826.54276-6-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20190716092826.54276-1-ajit.khaparde@broadcom.com> References: <20190712060622.76975-1-ajit.khaparde@broadcom.com> <20190716092826.54276-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 05/15] net/bnxt: reset Rx allocation state on port restart 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: Lance Richardson Move call site of bnxt_rxq_vec_setup() to ensure that rxq->rxrearm_nb and rxq->rxrearm_start are reinitialized correctly when a port is restarted. Fixes: af3ed597e305 ("net/bnxt: initial vector-mode driver") Reviewed-by: Christopher Reder Signed-off-by: Lance Richardson Signed-off-by: Ajit Khaparde -- v1->v2: Move bnxt_rxq_vec_setup under RTE_ARCH_X86. --- drivers/net/bnxt/bnxt_ring.c | 3 +++ drivers/net/bnxt/bnxt_rxq.c | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c index 16327dbe9..7453d4b56 100644 --- a/drivers/net/bnxt/bnxt_ring.c +++ b/drivers/net/bnxt/bnxt_ring.c @@ -613,6 +613,9 @@ int bnxt_alloc_hwrm_rings(struct bnxt *bp) bnxt_db_write(&rxr->rx_db, rxr->rx_prod); bnxt_db_write(&rxr->ag_db, rxr->ag_prod); rxq->index = i; +#ifdef RTE_ARCH_X86 + bnxt_rxq_vec_setup(rxq); +#endif } for (i = 0; i < bp->tx_cp_nr_rings; i++) { diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c index 6919acbb4..c94cac5a9 100644 --- a/drivers/net/bnxt/bnxt_rxq.c +++ b/drivers/net/bnxt/bnxt_rxq.c @@ -356,10 +356,6 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev, eth_dev->data->rx_queue_state[queue_idx] = queue_state; rte_spinlock_init(&rxq->lock); -#ifdef RTE_ARCH_X86 - bnxt_rxq_vec_setup(rxq); -#endif - out: return rc; } -- 2.20.1 (Apple Git-117)