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 B2EF8A00E6 for ; Fri, 9 Aug 2019 19:46:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 59C812082; Fri, 9 Aug 2019 19:46:37 +0200 (CEST) Received: from mail-ot1-f66.google.com (mail-ot1-f66.google.com [209.85.210.66]) by dpdk.org (Postfix) with ESMTP id 52BB3DE3 for ; Fri, 9 Aug 2019 19:46:36 +0200 (CEST) Received: by mail-ot1-f66.google.com with SMTP id r21so129750543otq.6 for ; Fri, 09 Aug 2019 10:46:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=t3izvCSmtR0PxxWNuImPjM4VQ6o11A4bWtpHBYLa+pA=; b=eGrN8lxmy0PGZ2GCsNyLzdPOPzAe4S798692lLJwX2hwMYtgDuomTDiefb9/SQu8N2 N1xo9HAn9lSbDDggZP3V1UADeJmEE691QmCIyob6W4hvruXz04Fqk/EXUWA4ncl8yPq7 QLrnzYvWTQ4NKErgn/QyYo8/PdzhY7tYMnHqY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=t3izvCSmtR0PxxWNuImPjM4VQ6o11A4bWtpHBYLa+pA=; b=T3n9Q+5t5c9xYIgJrQwJ89Ofx0iHFSH8GL3AneDthfpl/RfgEWolPI8Lo8Dd7SCjR6 S4EZ1Jxy5+4Qzq23e8vKD8AqXEqZRA9FyaN2IL71E+0UptqMBizZP2YaC80aFrMI4pbu HmgpaHTRtPlNCgcHdMn3YKzScb3U+IH/7fhwon/qJ32kQQ3NWpZfdjJxMyS2Ino5QfqY J3vXryObVeC1RYehKPz4AYBSVeOabkHgZQIhl3hWYe0QctYYq6GTavg2LIRxKjFdvr9R SQC/SoteLUiLZDI5Vmh76zk1RWf1OQMAi61SN/8/G+jgy0MnNDXOBpGjiVg1/i4yl4Gv 3p9Q== X-Gm-Message-State: APjAAAVlYuXb725+qJjTDy63M9h7SWZImU0oPTd6mBipuGb27lB0QjI1 8z406qHW1OyVIz2iFK4h7uRkize9oSyF1NrGMRCm5A== X-Google-Smtp-Source: APXvYqwxXfdbkY06lpmomXSL4smQumKYTNOXRQCgzbPf0opRu6cN5LFo6kctJ8pP7vvfpS4Lj5rDZJyrcKgZ2L6WNtk= X-Received: by 2002:a9d:7d90:: with SMTP id j16mr16681582otn.95.1565372795263; Fri, 09 Aug 2019 10:46:35 -0700 (PDT) MIME-Version: 1.0 References: <20190809172208.25497-1-lance.richardson@broadcom.com> In-Reply-To: <20190809172208.25497-1-lance.richardson@broadcom.com> From: Ajit Khaparde Date: Fri, 9 Aug 2019 10:46:19 -0700 Message-ID: To: Lance Richardson Cc: dev@dpdk.org, Kalesh Anakkur Purayil Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [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" On Fri, Aug 9, 2019 at 10:22 AM Lance Richardson < lance.richardson@broadcom.com> wrote: > 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 > Acked-by: Ajit Khaparde > --- > 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 > >