From: dpdklab@iol.unh.edu
To: test-report@dpdk.org
Cc: dpdk-test-reports@iol.unh.edu
Subject: |WARNING| pw116400-116401 [PATCH] [v5, 2/2] test/eth_tx: add testcase for queue start stop APIs
Date: Fri, 16 Sep 2022 12:42:38 -0400 (EDT) [thread overview]
Message-ID: <20220916164238.8C2396D509@noxus.dpdklab.iol.unh.edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 13005 bytes --]
Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/116400
_apply patch failure_
Submitter: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Date: Friday, September 16 2022 16:23:27
Applied on: CommitID:f8f6b1c1744e12d8d6877464a613acd1231db1a1
Apply patch set 116400-116401 failed:
Checking patch doc/guides/prog_guide/event_ethernet_tx_adapter.rst...
Hunk #1 succeeded at 176 (offset -6 lines).
Checking patch doc/guides/rel_notes/release_22_11.rst...
error: while searching for:
Added ``rte_event_eth_tx_adapter_instance_get`` to get the Tx adapter instance id for specified
ethernet device id and Tx queue index.
.. This section should contain new features added in this release.
Sample format:
error: patch failed: doc/guides/rel_notes/release_22_11.rst:30
Checking patch lib/eventdev/eventdev_pmd.h...
error: while searching for:
typedef int (*eventdev_eth_tx_adapter_instance_get_t)
(uint16_t eth_dev_id, uint16_t tx_queue_id, uint8_t *txa_inst_id);
/** Event device operations function pointer table */
struct eventdev_ops {
error: patch failed: lib/eventdev/eventdev_pmd.h:1294
error: while searching for:
/**< Reset eth Tx adapter statistics */
eventdev_eth_tx_adapter_instance_get_t eth_tx_adapter_instance_get;
/**< Get Tx adapter instance id for Tx queue */
eventdev_selftest dev_selftest;
/**< Start eventdev Selftest */
error: patch failed: lib/eventdev/eventdev_pmd.h:1409
Checking patch lib/eventdev/rte_event_eth_tx_adapter.c...
error: while searching for:
#define txa_dev_instance_get(id) \
txa_evdev(id)->dev_ops->eth_tx_adapter_instance_get
#define RTE_EVENT_ETH_TX_ADAPTER_ID_VALID_OR_ERR_RET(id, retval) \
do { \
if (!txa_valid_id(id)) { \
error: patch failed: lib/eventdev/rte_event_eth_tx_adapter.c:47
Hunk #2 succeeded at 88 (offset -12 lines).
Hunk #3 succeeded at 525 (offset -39 lines).
Hunk #4 succeeded at 539 (offset -39 lines).
Hunk #5 succeeded at 577 (offset -39 lines).
Hunk #6 succeeded at 642 (offset -39 lines).
Hunk #7 succeeded at 838 (offset -39 lines).
Hunk #8 succeeded at 857 (offset -39 lines).
Hunk #9 succeeded at 916 (offset -39 lines).
error: while searching for:
return -EINVAL;
}
error: patch failed: lib/eventdev/rte_event_eth_tx_adapter.c:1319
Checking patch lib/eventdev/rte_event_eth_tx_adapter.h...
error: while searching for:
* - rte_event_eth_tx_adapter_event_port_get()
* - rte_event_eth_tx_adapter_service_id_get()
* - rte_event_eth_tx_adapter_instance_get()
*
* The application creates the adapter using
* rte_event_eth_tx_adapter_create() or rte_event_eth_tx_adapter_create_ext().
error: patch failed: lib/eventdev/rte_event_eth_tx_adapter.h:35
error: while searching for:
rte_event_eth_tx_adapter_instance_get(uint16_t eth_dev_id,
uint16_t tx_queue_id,
uint8_t *txa_inst_id);
#ifdef __cplusplus
}
error: patch failed: lib/eventdev/rte_event_eth_tx_adapter.h:446
Checking patch lib/eventdev/version.map...
error: while searching for:
# added in 22.11
rte_event_eth_rx_adapter_instance_get;
rte_event_eth_tx_adapter_instance_get;
};
INTERNAL {
error: patch failed: lib/eventdev/version.map:116
Applied patch doc/guides/prog_guide/event_ethernet_tx_adapter.rst cleanly.
Applying patch doc/guides/rel_notes/release_22_11.rst with 1 reject...
Rejected hunk #1.
Applying patch lib/eventdev/eventdev_pmd.h with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
Applying patch lib/eventdev/rte_event_eth_tx_adapter.c with 2 rejects...
Rejected hunk #1.
Hunk #2 applied cleanly.
Hunk #3 applied cleanly.
Hunk #4 applied cleanly.
Hunk #5 applied cleanly.
Hunk #6 applied cleanly.
Hunk #7 applied cleanly.
Hunk #8 applied cleanly.
Hunk #9 applied cleanly.
Rejected hunk #10.
Applying patch lib/eventdev/rte_event_eth_tx_adapter.h with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
Applying patch lib/eventdev/version.map with 1 reject...
Rejected hunk #1.
diff a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst (rejected hunks)
@@ -30,6 +30,14 @@ New Features
Added ``rte_event_eth_tx_adapter_instance_get`` to get the Tx adapter instance id for specified
ethernet device id and Tx queue index.
+
+* **Added Tx adapter queue start/stop API**
+
+ Added ``rte_event_eth_tx_adapter_queue_start`` to start enqueueing packets to the Tx queue by
+ Tx adapter.
+ Added ``rte_event_eth_tx_adapter_queue_stop`` to stop the Tx Adapter from transmitting any
+ packets to the Tx queue.
+
.. This section should contain new features added in this release.
Sample format:
diff a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h (rejected hunks)
@@ -1294,6 +1294,43 @@ typedef int (*eventdev_eth_tx_adapter_stats_reset_t)(uint8_t id,
typedef int (*eventdev_eth_tx_adapter_instance_get_t)
(uint16_t eth_dev_id, uint16_t tx_queue_id, uint8_t *txa_inst_id);
+/**
+ * Start a Tx queue that is assigned to Tx adapter instance
+ *
+ * @param id
+ * Adapter identifier
+ *
+ * @param eth_dev_id
+ * Port identifier of Ethernet device
+ *
+ * @param tx_queue_id
+ * Ethernet device Tx queue index
+ *
+ * @return
+ * - 0: Success
+ * - <0: Error code on failure
+ */
+typedef int (*eventdev_eth_tx_adapter_queue_start)
+ (uint8_t id, uint16_t eth_dev_id, uint16_t tx_queue_id);
+
+/**
+ * Stop a Tx queue that is assigned to Tx adapter instance
+ *
+ * @param id
+ * Adapter identifier
+ *
+ * @param eth_dev_id
+ * Port identifier of Ethernet device
+ *
+ * @param tx_queue_id
+ * Ethernet device Tx queue index
+ *
+ * @return
+ * - 0: Success
+ * - <0: Error code on failure
+ */
+typedef int (*eventdev_eth_tx_adapter_queue_stop)
+ (uint8_t id, uint16_t eth_dev_id, uint16_t tx_queue_id);
/** Event device operations function pointer table */
struct eventdev_ops {
@@ -1409,6 +1446,10 @@ struct eventdev_ops {
/**< Reset eth Tx adapter statistics */
eventdev_eth_tx_adapter_instance_get_t eth_tx_adapter_instance_get;
/**< Get Tx adapter instance id for Tx queue */
+ eventdev_eth_tx_adapter_queue_start eth_tx_adapter_queue_start;
+ /**< Start Tx queue assigned to Tx adapter instance */
+ eventdev_eth_tx_adapter_queue_stop eth_tx_adapter_queue_stop;
+ /**< Stop Tx queue assigned to Tx adapter instance */
eventdev_selftest dev_selftest;
/**< Start eventdev Selftest */
diff a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c (rejected hunks)
@@ -47,6 +47,12 @@
#define txa_dev_instance_get(id) \
txa_evdev(id)->dev_ops->eth_tx_adapter_instance_get
+#define txa_dev_queue_start(id) \
+ txa_evdev(id)->dev_ops->eth_tx_adapter_queue_start
+
+#define txa_dev_queue_stop(id) \
+ txa_evdev(id)->dev_ops->eth_tx_adapter_queue_stop
+
#define RTE_EVENT_ETH_TX_ADAPTER_ID_VALID_OR_ERR_RET(id, retval) \
do { \
if (!txa_valid_id(id)) { \
@@ -1319,3 +1347,80 @@ rte_event_eth_tx_adapter_instance_get(uint16_t eth_dev_id,
return -EINVAL;
}
+
+static inline int
+txa_sw_queue_start_state_set(uint16_t eth_dev_id, uint16_t tx_queue_id,
+ bool start_state, struct txa_service_data *txa)
+{
+ struct txa_service_queue_info *tqi = NULL;
+
+ rte_spinlock_lock(&txa->tx_lock);
+ tqi = txa_service_queue(txa, eth_dev_id, tx_queue_id);
+ if (unlikely(tqi == NULL || !tqi->added)) {
+ rte_spinlock_unlock(&txa->tx_lock);
+ return -EINVAL;
+ }
+ if (start_state == false)
+ txa_txq_buffer_drain(tqi);
+
+ tqi->stopped = !start_state;
+ rte_spinlock_unlock(&txa->tx_lock);
+ return 0;
+}
+
+static int
+txa_queue_start_state_set(uint16_t eth_dev_id, uint16_t tx_queue_id,
+ bool start_state)
+{
+ struct txa_service_data *txa;
+ uint8_t txa_inst_id;
+ int ret;
+ uint32_t caps = 0;
+
+ /* Below API already does validation of input parameters.
+ * Hence skipping the validation here.
+ */
+ ret = rte_event_eth_tx_adapter_instance_get(eth_dev_id,
+ tx_queue_id,
+ &txa_inst_id);
+ if (ret < 0)
+ return -EINVAL;
+
+ TXA_CHECK_OR_ERR_RET(txa_inst_id);
+
+ txa = txa_service_id_to_data(txa_inst_id);
+ ret = rte_event_eth_tx_adapter_caps_get(txa->eventdev_id,
+ eth_dev_id,
+ &caps);
+ if (ret < 0)
+ return -EINVAL;
+
+ if (caps & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT) {
+ if (start_state == true) {
+ ret = txa_dev_queue_start(txa_inst_id) ?
+ txa_dev_queue_start(txa_inst_id)(txa_inst_id,
+ eth_dev_id,
+ tx_queue_id) : 0;
+ } else {
+ ret = txa_dev_queue_stop(txa_inst_id) ?
+ txa_dev_queue_stop(txa_inst_id)(txa_inst_id,
+ eth_dev_id,
+ tx_queue_id) : 0;
+ }
+ return ret;
+ }
+ return txa_sw_queue_start_state_set(eth_dev_id, tx_queue_id,
+ start_state, txa);
+}
+
+int
+rte_event_eth_tx_adapter_queue_start(uint16_t eth_dev_id, uint16_t tx_queue_id)
+{
+ return txa_queue_start_state_set(eth_dev_id, tx_queue_id, true);
+}
+
+int
+rte_event_eth_tx_adapter_queue_stop(uint16_t eth_dev_id, uint16_t tx_queue_id)
+{
+ return txa_queue_start_state_set(eth_dev_id, tx_queue_id, false);
+}
diff a/lib/eventdev/rte_event_eth_tx_adapter.h b/lib/eventdev/rte_event_eth_tx_adapter.h (rejected hunks)
@@ -35,6 +35,8 @@
* - rte_event_eth_tx_adapter_event_port_get()
* - rte_event_eth_tx_adapter_service_id_get()
* - rte_event_eth_tx_adapter_instance_get()
+ * - rte_event_eth_tx_adapter_queue_start()
+ * - rte_event_eth_tx_adapter_queue_stop()
*
* The application creates the adapter using
* rte_event_eth_tx_adapter_create() or rte_event_eth_tx_adapter_create_ext().
@@ -446,6 +448,58 @@ int
rte_event_eth_tx_adapter_instance_get(uint16_t eth_dev_id,
uint16_t tx_queue_id,
uint8_t *txa_inst_id);
+/**
+ * Enables the Tx adapter to start enqueueing packets to the
+ * Tx queue.
+ *
+ * This function is provided so that the application can
+ * resume enqueueing packets that reference packets for
+ * <eth_dev_id, tx_queue_id> after calling
+ * rte_event_eth_tx_adapter_queue_stop()
+ * @see rte_event_eth_tx_adapter_queue_stop
+ *
+ * Use case:
+ * --------
+ * The queue start/stop APIs help avoid some unexpected behavior with
+ * application stopping ethdev Tx queues and adapter being unaware of it.
+ * With these APIs, the application can call stop API to notify adapter
+ * that corresponding ethdev Tx queue is stopped and any in-flight
+ * packets are freed by adapter dataplane code. Adapter queue stop API
+ * is called before stopping the ethdev Tx queue. When ethdev Tx queue
+ * is enabled, application can notify adapter to resume processing of
+ * the packets for that queue by calling the start API. The ethdev Tx
+ * queue is started before calling adapter start API.
+ *
+ * @param eth_dev_id
+ * Port identifier of Ethernet device.
+ * @param tx_queue_id
+ * Ethernet device transmit queue index.
+ * @return
+ * - 0: Success
+ * - <0: Error code on failure
+ */
+__rte_experimental
+int
+rte_event_eth_tx_adapter_queue_start(uint16_t eth_dev_id, uint16_t tx_queue_id);
+
+/**
+ * Stops the Tx adapter runtime function from enqueueing any packets
+ * to the associated Tx queue. This API also frees any packets that may
+ * have been buffered for this queue. All inflight packets destined to the
+ * queue are freed by the adapter runtime until the queue is started again.
+ * @see rte_event_eth_tx_adapter_queue_start
+ *
+ * @param eth_dev_id
+ * Port identifier of Ethernet device.
+ * @param tx_queue_id
+ * Ethernet device transmit queue index.
+ * @return
+ * - 0: Success
+ * - <0: Error code on failure
+ */
+__rte_experimental
+int
+rte_event_eth_tx_adapter_queue_stop(uint16_t eth_dev_id, uint16_t tx_queue_id);
#ifdef __cplusplus
}
diff a/lib/eventdev/version.map b/lib/eventdev/version.map (rejected hunks)
@@ -116,6 +116,8 @@ EXPERIMENTAL {
# added in 22.11
rte_event_eth_rx_adapter_instance_get;
rte_event_eth_tx_adapter_instance_get;
+ rte_event_eth_tx_adapter_queue_start;
+ rte_event_eth_tx_adapter_queue_stop;
};
INTERNAL {
Checking patch app/test/test_event_eth_tx_adapter.c...
Hunk #1 succeeded at 638 (offset -73 lines).
error: while searching for:
tx_adapter_service),
TEST_CASE_ST(tx_adapter_create, tx_adapter_free,
tx_adapter_instance_get),
TEST_CASE_ST(NULL, NULL, tx_adapter_dynamic_device),
TEST_CASES_END() /**< NULL terminate unit test array */
}
error: patch failed: app/test/test_event_eth_tx_adapter.c:770
Applying patch app/test/test_event_eth_tx_adapter.c with 1 reject...
Hunk #1 applied cleanly.
Rejected hunk #2.
diff a/app/test/test_event_eth_tx_adapter.c b/app/test/test_event_eth_tx_adapter.c (rejected hunks)
@@ -770,6 +854,8 @@ static struct unit_test_suite event_eth_tx_tests = {
tx_adapter_service),
TEST_CASE_ST(tx_adapter_create, tx_adapter_free,
tx_adapter_instance_get),
+ TEST_CASE_ST(tx_adapter_create, tx_adapter_free,
+ tx_adapter_queue_start_stop),
TEST_CASE_ST(NULL, NULL, tx_adapter_dynamic_device),
TEST_CASES_END() /**< NULL terminate unit test array */
}
https://lab.dpdk.org/results/dashboard/patchsets/23525/
UNH-IOL DPDK Community Lab
reply other threads:[~2022-09-16 16:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220916164238.8C2396D509@noxus.dpdklab.iol.unh.edu \
--to=dpdklab@iol.unh.edu \
--cc=dpdk-test-reports@iol.unh.edu \
--cc=test-report@dpdk.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 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).