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 5461BA0471 for ; Wed, 17 Jul 2019 12:42:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A0CA91B9AA; Wed, 17 Jul 2019 12:42:04 +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 5D43D1B951 for ; Wed, 17 Jul 2019 12:41:57 +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 326EC30C097; Wed, 17 Jul 2019 03:41:56 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 326EC30C097 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1563360116; bh=+z5OozQof1Wno4aBXTw0wYccje/kZfP8dZZ+6Jyp0Lg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rXvmisO1EujzXdGcu7XdiI7TQxyg+0AbjOqB99ztWXwgWuo1g1Y2QoJPWFhR4wKQ4 aQ1ef3hjMDzob56Rrj3Kpo9GnTQQ/mscfxcHYkD2wdjkwHKD7WtTld09EhnlXyVQ3N EAVMq6JFEOj4reRwsvcXWWco/kPmPWWtitp7Wspw= Received: from C02VPB22HTD6.wifi.broadcom.net (c02vpb22htd6.wifi.broadcom.net [10.122.43.105]) by nis-sj1-27.broadcom.com (Postfix) with ESMTP id 81F56AC0749; Wed, 17 Jul 2019 03:41:54 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Lance Richardson , Christopher Reder Date: Wed, 17 Jul 2019 16:11:29 +0530 Message-Id: <20190717104139.21155-6-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20190717104139.21155-1-ajit.khaparde@broadcom.com> References: <0c1b327c-2c36-652f-c88d-cbca8f873c13@intel.com> <20190717104139.21155-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 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: bc4a000f2f53 ("net/bnxt: implement SSE vector mode") 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)