All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	stable@dpdk.org, Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH v2 1/5] net/ice: detect stopping a flow-director queue twice
Date: Tue, 15 Oct 2024 16:19:53 +0100	[thread overview]
Message-ID: <20241015151957.1413286-2-bruce.richardson@intel.com> (raw)
In-Reply-To: <20241015151957.1413286-1-bruce.richardson@intel.com>

If the flow-director queue is stopped at some point during the running
of an application, the shutdown procedure for the port issues an error
as it tries to stop the queue a second time, and fails to do so. We can
eliminate this error by setting the tail-register pointer to NULL on
stop, and checking for that condition in subsequent stop calls. Since
the register pointer is set on start, any restarting of the queue will
allow a stop call to progress as normal.

Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/ice/ice_rxtx.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index d2f9edc221..024d97cb46 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -1139,6 +1139,10 @@ ice_fdir_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
 			    tx_queue_id);
 		return -EINVAL;
 	}
+	if (txq->qtx_tail == NULL) {
+		PMD_DRV_LOG(INFO, "TX queue %u not started", tx_queue_id);
+		return 0;
+	}
 	vsi = txq->vsi;
 
 	q_ids[0] = txq->reg_idx;
@@ -1153,6 +1157,7 @@ ice_fdir_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
 	}
 
 	txq->tx_rel_mbufs(txq);
+	txq->qtx_tail = NULL;
 
 	return 0;
 }
-- 
2.43.0


  reply	other threads:[~2024-10-15 15:20 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09 17:08 [PATCH 0/5] updates for net/ice driver Bruce Richardson
2024-10-09 17:08 ` [PATCH 1/5] net/ice: detect stopping a flow-director queue twice Bruce Richardson
2024-10-09 17:44   ` Stephen Hemminger
2024-10-09 17:08 ` [PATCH 2/5] net/ice: improve Tx scheduler graph output Bruce Richardson
2024-10-09 17:45   ` Stephen Hemminger
2024-10-15 14:32     ` Bruce Richardson
2024-10-09 17:08 ` [PATCH 3/5] net/ice: add option to choose DDP package file Bruce Richardson
2024-10-09 17:47   ` Stephen Hemminger
2024-10-09 17:08 ` [PATCH 4/5] net/ice: add option to download scheduler topology Bruce Richardson
2024-10-09 17:49   ` Stephen Hemminger
2024-10-10  8:10     ` Bruce Richardson
2024-10-09 17:08 ` [PATCH 5/5] net/ice: limit the number of queues to sched capabilities Bruce Richardson
2024-10-09 17:49   ` Stephen Hemminger
2024-10-15 15:19 ` [PATCH v2 0/5] updates for net/ice driver Bruce Richardson
2024-10-15 15:19   ` Bruce Richardson [this message]
2024-10-15 15:19   ` [PATCH v2 2/5] net/ice: improve Tx scheduler graph output Bruce Richardson
2024-10-15 15:19   ` [PATCH v2 3/5] net/ice: add option to choose DDP package file Bruce Richardson
2024-10-15 15:19   ` [PATCH v2 4/5] net/ice: add option to download scheduler topology Bruce Richardson
2024-10-15 15:19   ` [PATCH v2 5/5] net/ice: limit the number of queues to sched capabilities Bruce Richardson
2024-10-18 14:38 ` [PATCH v3 0/4] updates for net/ice driver Bruce Richardson
2024-10-18 14:38   ` [PATCH v3 1/4] net/ice: detect stopping a flow-director queue twice Bruce Richardson
2024-10-18 14:38   ` [PATCH v3 2/4] net/ice: improve Tx scheduler graph output Bruce Richardson
2024-10-18 14:38   ` [PATCH v3 3/4] net/ice: add option to choose DDP package file Bruce Richardson
2024-10-18 14:38   ` [PATCH v3 4/4] net/ice: limit the number of queues to sched capabilities Bruce Richardson
2024-10-21 15:57   ` [PATCH v3 0/4] updates for net/ice driver Bruce Richardson
2024-10-22 16:39 ` [PATCH v4 " Bruce Richardson
2024-10-22 16:39   ` [PATCH v4 1/4] net/ice: detect stopping a flow-director queue twice Bruce Richardson
2024-10-22 16:39   ` [PATCH v4 2/4] net/ice: improve Tx scheduler graph output Bruce Richardson
2024-10-22 16:39   ` [PATCH v4 3/4] net/ice: add option to choose DDP package file Bruce Richardson
2024-10-22 16:39   ` [PATCH v4 4/4] net/ice: limit the number of queues to sched capabilities Bruce Richardson
2024-10-23 10:29   ` [PATCH v4 0/4] updates for net/ice driver Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241015151957.1413286-2-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.