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 068D4A0C41; Sat, 25 Sep 2021 02:55:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 64A664068B; Sat, 25 Sep 2021 02:55:51 +0200 (CEST) Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by mails.dpdk.org (Postfix) with ESMTP id 6DC0D4003D for ; Sat, 25 Sep 2021 02:55:50 +0200 (CEST) Received: by mail-pj1-f49.google.com with SMTP id mv7-20020a17090b198700b0019c843e7233so8823494pjb.4 for ; Fri, 24 Sep 2021 17:55:50 -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:mime-version; bh=44JAuqzWpqEUIl6/3dD7u874ja/XKTTT3cyaFvZISaE=; b=WVDafswjbowwvs4vwEzkyu4+oXQKhBjPpgEHRn4+1QU0qo/h/yqUQi2XkYS1+byX7s /wPfhI22rwpUlk7pCvEY3zeq5AV9IrSZDICX1FZIUpPV5hgpRuH0NZ8gLtK/4gHCSBPC tPb1hWmCH/8A/QPon/3q06Vfdz5sI8ukDW1n8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=44JAuqzWpqEUIl6/3dD7u874ja/XKTTT3cyaFvZISaE=; b=OEiL5gMjfkHZczwAr5oVC/VAy368EoKzWQW0oRnOMJOOjwkCOODPkB25+rmERSh8cA SEHo46b7UQB2XnKSab0i7WY/NbGJQmcyWes5dkrKQjN5dQzWhYyfixuUV6SuXdjAVqXw AmPJFUevP3tNTUmtVQMrj2u9Pul+3aGQ5Qw/ibMUOgvRhlVnzpOphCkx48O8cnVgruTr GpSQWuciDdMCUxrFeWXkN8VXbXdCpFl2afq5QOgVzfM80l8mXRCmra90tr1fHLDYxZvy oqu5jhTJhHb4nGb6xd0ACCAIC0CKtnfGtXTwuBdSRONLF1hvlgIrwKo/V8RjZ96yg9TO WfYQ== X-Gm-Message-State: AOAM530r1muXRYI2YVQBqEnvK+HBKCZUfFR+IGkJLnU6TzLlfennlznU pLG/DLP0uUt6zbiliN0u9necVOYb2b8GmFoZn3WyYRubwK4V84dLHJtR0F7vIVZkQxmv5u0+35T xPZqEKHT1CYsW4mXRDncaRDDsjLHXMbIsgWOHqLge1xLoYO4VqhdfGN3mVcCIxXc= X-Google-Smtp-Source: ABdhPJy6ysZHQKFvx2T9slZHjsGL1jtteQjCLMwxgNHabgg92ByH5q4dfmJUh+QbxUcrTHQGz6xvbA== X-Received: by 2002:a17:90a:1c6:: with SMTP id 6mr5562477pjd.194.1632531349161; Fri, 24 Sep 2021 17:55:49 -0700 (PDT) Received: from localhost.localdomain ([136.52.99.246]) by smtp.gmail.com with ESMTPSA id j9sm12725259pjb.33.2021.09.24.17.55.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Sep 2021 17:55:48 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: stable@dpdk.org, Lance Richardson Date: Fri, 24 Sep 2021 17:55:44 -0700 Message-Id: <20210925005544.50518-1-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="0000000000002f2dd605ccc753c7" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [dpdk-dev] [PATCH] net/bnxt: fix Tx queue startup state 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 Sender: "dev" --0000000000002f2dd605ccc753c7 Content-Transfer-Encoding: 8bit Default queue state of Tx queues on startup is not correct. Fix this by setting the state when the port is started. Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code") Cc: stable@dpdk.org Signed-off-by: Ajit Khaparde Reviewed-by: Lance Richardson --- drivers/net/bnxt/bnxt_ethdev.c | 10 ++++++++++ drivers/net/bnxt/bnxt_txq.c | 5 ----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 097dd10de9..eb9147927e 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -814,6 +814,16 @@ static int bnxt_start_nic(struct bnxt *bp) } } + for (j = 0; j < bp->tx_nr_rings; j++) { + struct bnxt_tx_queue *txq = bp->tx_queues[j]; + + if (!txq->tx_deferred_start) { + bp->eth_dev->data->tx_queue_state[j] = + RTE_ETH_QUEUE_STATE_STARTED; + txq->tx_started = true; + } + } + rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, &bp->vnic_info[0], 0, NULL); if (rc) { PMD_DRV_LOG(ERR, diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c index 830416af3d..3ffc334cff 100644 --- a/drivers/net/bnxt/bnxt_txq.c +++ b/drivers/net/bnxt/bnxt_txq.c @@ -166,11 +166,6 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev, eth_dev->data->tx_queues[queue_idx] = txq; - if (txq->tx_deferred_start) - txq->tx_started = false; - else - txq->tx_started = true; - return 0; err: bnxt_tx_queue_release_op(txq); -- 2.30.1 (Apple Git-130) --0000000000002f2dd605ccc753c7--