From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Thomas Monjalon <thomas@monjalon.net>,
Ferruh Yigit <ferruh.yigit@amd.com>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: [PATCH 1/5] ethdev: check that device supports deferred start
Date: Fri, 13 Dec 2024 13:48:14 -0800 [thread overview]
Message-ID: <20241213214929.817688-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20241213214929.817688-1-stephen@networkplumber.org>
The check for supporting deferred start should be handled at
the ethdev level for all devices.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/ethdev/rte_ethdev.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 6413c54e3b..7768058f6d 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -2264,6 +2264,11 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
if (rx_conf != NULL)
rx_offloads |= rx_conf->offloads;
+ /* Deferred start requires that device supports queue start */
+ if (rx_conf != NULL && rx_conf->rx_deferred_start &&
+ *dev->dev_ops->rx_queue_start == NULL)
+ return -ENOTSUP;
+
/* Ensure that we have one and only one source of Rx buffers */
if ((mp != NULL) +
(rx_conf != NULL && rx_conf->rx_nseg > 0) +
@@ -2575,6 +2580,11 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
return -EINVAL;
}
+ /* Deferred start requires that device supports queue start */
+ if (tx_conf != NULL && tx_conf->tx_deferred_start &&
+ *dev->dev_ops->tx_queue_start == NULL)
+ return -ENOTSUP;
+
ret = rte_eth_dev_info_get(port_id, &dev_info);
if (ret != 0)
return ret;
--
2.45.2
next prev parent reply other threads:[~2024-12-13 21:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-13 21:48 [PATCH 0/5] centralize deferred start checks Stephen Hemminger
2024-12-13 21:48 ` Stephen Hemminger [this message]
2024-12-13 21:48 ` [PATCH 2/5] net/dpaa: remove unnecessary deferred start check Stephen Hemminger
2024-12-13 21:48 ` [PATCH 3/5] net/dpaa2: remove unneeded " Stephen Hemminger
2024-12-13 21:48 ` [PATCH 4/5] net/enetfec: " Stephen Hemminger
2024-12-13 21:48 ` [PATCH 5/5] net/virtio: " Stephen Hemminger
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=20241213214929.817688-2-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=thomas@monjalon.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).