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 DF5FCA00E6 for ; Fri, 9 Aug 2019 19:22:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F099D2082; Fri, 9 Aug 2019 19:22:31 +0200 (CEST) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id 6C6E9A69 for ; Fri, 9 Aug 2019 19:22:30 +0200 (CEST) Received: by mail-pf1-f196.google.com with SMTP id b13so46397800pfo.1 for ; Fri, 09 Aug 2019 10:22:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=WRVP69rqH44ddYmwOAhNH1N+Z7w8GxyurD4tVtuHbA4=; b=OmfH6UuRlbOfSObjYkgLygG67EQdysMMepPogp4xQ7mGRlVG75XTbW9uwrKeUiDz19 gacaGo3yreK2yDOjsB0QkA9qvK6HIHYiGiwel/kJbeB+5aqDpkrxCLc4a/Q67RsHo3KV WWiGzogC7hLlio1HODEwhK6+ChznbS/zk5yIg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WRVP69rqH44ddYmwOAhNH1N+Z7w8GxyurD4tVtuHbA4=; b=XphPZJF53YHzZ7aaapINXcddmLozdH+1IiPMUswAgSK2RzM9tOfyBt136/v7i2DZlt i/hZRtppNh3v4Q6monJ2of6/xXP1he/8pFl8vmhhPSrZdQSByFfFkDmjOOjXymC1xt2t /Mx9osI+lwxB5bG9+LOfg9k43I6vlBolUQmRulJzP0OZ0Fn5eijfyJBmxv7SRWmoNHPR rlaOk2nPP6AiRcUNKPWQZx1bXcF7DGGBz2iuUIs3YYVHdEMa9Lv/ChOK0XjHbzoiZtR4 1ilb5V40sCAN3WLzC+6Qr3Yi2btsDwTUu7GMsVMOMdUfBVv1/6FTA4i96krGyVB44L5x xSgQ== X-Gm-Message-State: APjAAAWI+D9wEu23+piHMz6UcRrvc8z2sR15G9g4/TVR8tWyeIBgfmQk nfLDioQFp8yfr7Qr/Wx0gGJ/LGOkCp2upnkQJw+GTaxhYkvukBiq5YfXUH2DAKg6/x+OqKU9Zxx i0T+hhj7ZrKP6CkCZe5yzvQhdgfT59a0OvCMkih9BGXoyvFvvrceGuwQcgbdtmzHx X-Google-Smtp-Source: APXvYqwYcAHu1nMcUtc6xcVPj9Sn6vHsiROfGs6iwZMhLab7OJZVxuPTo8BQY6w9J/QgT2hVpxlxYg== X-Received: by 2002:a63:d002:: with SMTP id z2mr18848932pgf.364.1565371349169; Fri, 09 Aug 2019 10:22:29 -0700 (PDT) Received: from localhost.localdomain ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id c23sm91157383pgj.62.2019.08.09.10.22.27 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 09 Aug 2019 10:22:28 -0700 (PDT) From: Lance Richardson To: dev@dpdk.org Cc: ajit.khaparde@broadcom.com, kalesh-anakkur.purayil@broadcom.com, Lance Richardson Date: Fri, 9 Aug 2019 13:22:08 -0400 Message-Id: <20190809172208.25497-1-lance.richardson@broadcom.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] net/bnxt: revert fix traffic stall on stop/start 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" This reverts commit aa2c00702bad7b2c742e11a86cb9dbbb8364fd88, which introduced the possibility of an invalid address exception when running an application with a stopped receive queue. The issues with rxq stop/start will be revisited in the 19.11 release timeframe. Fixes: aa2c00702bad ("net/bnxt: fix traffic stall on Rx queue stop/start") Signed-off-by: Lance Richardson --- drivers/net/bnxt/bnxt_ethdev.c | 2 +- drivers/net/bnxt/bnxt_ring.c | 3 ++- drivers/net/bnxt/bnxt_rxq.c | 5 ++++- drivers/net/bnxt/bnxt_txq.c | 1 - drivers/net/bnxt/bnxt_txr.c | 1 + 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 25a345cd4..6685ee7d9 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -1754,7 +1754,7 @@ bnxt_rxq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id, qinfo->conf.rx_free_thresh = rxq->rx_free_thresh; qinfo->conf.rx_drop_en = 0; - qinfo->conf.rx_deferred_start = rxq->rx_deferred_start; + qinfo->conf.rx_deferred_start = 0; } static void diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c index a9fcdabe8..be15b4bd1 100644 --- a/drivers/net/bnxt/bnxt_ring.c +++ b/drivers/net/bnxt/bnxt_ring.c @@ -533,7 +533,8 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index) rxq->rx_buf_use_size = BNXT_MAX_MTU + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + (2 * VLAN_TAG_SIZE); - if (!rxq->rx_deferred_start) { + if (bp->eth_dev->data->rx_queue_state[queue_index] == + RTE_ETH_QUEUE_STATE_STARTED) { if (bnxt_init_one_rx_ring(rxq)) { RTE_LOG(ERR, PMD, "bnxt_init_one_rx_ring failed!\n"); diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c index 723e85f01..1d95f1139 100644 --- a/drivers/net/bnxt/bnxt_rxq.c +++ b/drivers/net/bnxt/bnxt_rxq.c @@ -436,9 +436,11 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id) rc = bnxt_vnic_rss_configure(bp, vnic); } - if (rc == 0) + if (rc == 0) { dev->data->rx_queue_state[rx_queue_id] = RTE_ETH_QUEUE_STATE_STARTED; + rxq->rx_deferred_start = false; + } PMD_DRV_LOG(INFO, "queue %d, rx_deferred_start %d, state %d!\n", @@ -473,6 +475,7 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) } dev->data->rx_queue_state[rx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED; + rxq->rx_deferred_start = true; PMD_DRV_LOG(DEBUG, "Rx queue stopped\n"); if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) { diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c index ba8d39063..43b3496c1 100644 --- a/drivers/net/bnxt/bnxt_txq.c +++ b/drivers/net/bnxt/bnxt_txq.c @@ -131,7 +131,6 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev, txq->queue_id = queue_idx; txq->port_id = eth_dev->data->port_id; - txq->tx_deferred_start = tx_conf->tx_deferred_start; /* Allocate TX ring hardware descriptors */ if (bnxt_alloc_rings(bp, queue_idx, txq, NULL, txq->cp_ring, diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c index 9adfee368..c71e6f189 100644 --- a/drivers/net/bnxt/bnxt_txr.c +++ b/drivers/net/bnxt/bnxt_txr.c @@ -506,6 +506,7 @@ int bnxt_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id) bnxt_handle_tx_cp(txq); dev->data->tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED; + txq->tx_deferred_start = true; PMD_DRV_LOG(DEBUG, "Tx queue stopped\n"); return 0; -- 2.17.1