automatic DPDK test reports
 help / color / mirror / Atom feed
From: dpdklab@iol.unh.edu
To: test-report@dpdk.org
Cc: dpdk-test-reports@iol.unh.edu
Subject: |WARNING| pw111124-111125 [PATCH] [v2, 2/2] example/vhost: support to clear in-flight packets for async dequeue
Date: Fri, 13 May 2022 04:59:02 -0400 (EDT)
Message-ID: <20220513085902.C92156D50B@noxus.dpdklab.iol.unh.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 6446 bytes --]

Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/111124

_apply patch failure_

Submitter: Yuan Wang <yuanx.wang@intel.com>
Date: Friday, May 13 2022 16:35:24 
Applied on: CommitID:c0c305ee9e0e7c9feca6412266a778f330d20c19
Apply patch set 111124-111125 failed:

Checking patch doc/guides/prog_guide/vhost_lib.rst...
error: while searching for:

* ``rte_vhost_clear_queue_thread_unsafe(vid, queue_id, **pkts, count, dma_id, vchan_id)``

  Clear inflight packets which are submitted to DMA engine in vhost async data
  path. Completed packets are returned to applications through ``pkts``.

* ``rte_vhost_async_try_dequeue_burst(int vid, uint16_t queue_id,

error: patch failed: doc/guides/prog_guide/vhost_lib.rst:279
Checking patch doc/guides/rel_notes/release_22_07.rst...
error: while searching for:
  Added vhost async dequeue API which can leverage DMA devices to
  accelerate receiving pkts from guest.

Removed Items
-------------


error: patch failed: doc/guides/rel_notes/release_22_07.rst:75
Checking patch lib/vhost/rte_vhost_async.h...
Hunk #1 succeeded at 166 (offset -17 lines).
Checking patch lib/vhost/version.map...
error: while searching for:
	# added in 22.07
	rte_vhost_async_get_inflight_thread_unsafe;
	rte_vhost_async_try_dequeue_burst;
};

INTERNAL {

error: patch failed: lib/vhost/version.map:91
Checking patch lib/vhost/virtio_net.c...
Hunk #2 succeeded at 2088 (offset -19 lines).
Hunk #3 succeeded at 2109 (offset -19 lines).
Applying patch doc/guides/prog_guide/vhost_lib.rst with 1 reject...
Rejected hunk #1.
Applying patch doc/guides/rel_notes/release_22_07.rst with 1 reject...
Rejected hunk #1.
Applied patch lib/vhost/rte_vhost_async.h cleanly.
Applying patch lib/vhost/version.map with 1 reject...
Rejected hunk #1.
Applied patch lib/vhost/virtio_net.c cleanly.
diff a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst	(rejected hunks)
@@ -279,7 +279,13 @@ The following is an overview of some key Vhost API functions:
 
 * ``rte_vhost_clear_queue_thread_unsafe(vid, queue_id, **pkts, count, dma_id, vchan_id)``
 
-  Clear inflight packets which are submitted to DMA engine in vhost async data
+  Clear in-flight packets which are submitted to async channel in vhost
+  async data path without performing any locking. Completed packets are
+  returned to applications through ``pkts``.
+
+* ``rte_vhost_clear_queue(vid, queue_id, **pkts, count, dma_id, vchan_id)``
+
+  Clear in-flight packets which are submitted to async channel in vhost async data
   path. Completed packets are returned to applications through ``pkts``.
 
 * ``rte_vhost_async_try_dequeue_burst(int vid, uint16_t queue_id,
diff a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst	(rejected hunks)
@@ -75,6 +75,11 @@ New Features
   Added vhost async dequeue API which can leverage DMA devices to
   accelerate receiving pkts from guest.
 
+* **Added thread-safe version of inflight packet clear API in vhost library.**
+
+  Added an API which can clear the inflight packets submitted to
+  the async channel in a thread-safe manner in the vhost async data path.
+
 Removed Items
 -------------
 
diff a/lib/vhost/version.map b/lib/vhost/version.map	(rejected hunks)
@@ -91,6 +91,7 @@ EXPERIMENTAL {
 	# added in 22.07
 	rte_vhost_async_get_inflight_thread_unsafe;
 	rte_vhost_async_try_dequeue_burst;
+	rte_vhost_clear_queue;
 };
 
 INTERNAL {
Checking patch examples/vhost/main.c...
error: while searching for:
	}
}

/*
 * Remove a device from the specific data core linked list and from the
 * main linked list. Synchronization  occurs through the use of the

error: patch failed: examples/vhost/main.c:1537
error: while searching for:
		vdev->vid);

	if (dma_bind[vid].dmas[VIRTIO_RXQ].async_enabled) {
		vhost_clear_queue_thread_unsafe(vdev, VIRTIO_RXQ);
		rte_vhost_async_channel_unregister(vid, VIRTIO_RXQ);
		dma_bind[vid].dmas[VIRTIO_RXQ].async_enabled = false;
	}

	if (dma_bind[vid].dmas[VIRTIO_TXQ].async_enabled) {
		vhost_clear_queue_thread_unsafe(vdev, VIRTIO_TXQ);
		rte_vhost_async_channel_unregister(vid, VIRTIO_TXQ);
		dma_bind[vid].dmas[VIRTIO_TXQ].async_enabled = false;
	}

error: patch failed: examples/vhost/main.c:1594
error: while searching for:
	if (!vdev)
		return -1;

	if (queue_id != VIRTIO_RXQ)
		return 0;

	if (dma_bind[vid2socketid[vid]].dmas[queue_id].async_enabled) {
		if (!enable)
			vhost_clear_queue_thread_unsafe(vdev, queue_id);

error: patch failed: examples/vhost/main.c:1759
Applying patch examples/vhost/main.c with 3 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
diff a/examples/vhost/main.c b/examples/vhost/main.c	(rejected hunks)
@@ -1537,6 +1537,25 @@ vhost_clear_queue_thread_unsafe(struct vhost_dev *vdev, uint16_t queue_id)
 	}
 }
 
+static void
+vhost_clear_queue(struct vhost_dev *vdev, uint16_t queue_id)
+{
+	uint16_t n_pkt = 0;
+	int pkts_inflight;
+
+	uint16_t dma_id = dma_bind[vid2socketid[vdev->vid]].dmas[queue_id].dev_id;
+	pkts_inflight = rte_vhost_async_get_inflight(vdev->vid, queue_id);
+
+	struct rte_mbuf *m_cpl[pkts_inflight];
+
+	while (pkts_inflight) {
+		n_pkt = rte_vhost_clear_queue(vdev->vid, queue_id, m_cpl,
+						pkts_inflight, dma_id, 0);
+		free_pkts(m_cpl, n_pkt);
+		pkts_inflight = rte_vhost_async_get_inflight(vdev->vid, queue_id);
+	}
+}
+
 /*
  * Remove a device from the specific data core linked list and from the
  * main linked list. Synchronization  occurs through the use of the
@@ -1594,13 +1613,13 @@ destroy_device(int vid)
 		vdev->vid);
 
 	if (dma_bind[vid].dmas[VIRTIO_RXQ].async_enabled) {
-		vhost_clear_queue_thread_unsafe(vdev, VIRTIO_RXQ);
+		vhost_clear_queue(vdev, VIRTIO_RXQ);
 		rte_vhost_async_channel_unregister(vid, VIRTIO_RXQ);
 		dma_bind[vid].dmas[VIRTIO_RXQ].async_enabled = false;
 	}
 
 	if (dma_bind[vid].dmas[VIRTIO_TXQ].async_enabled) {
-		vhost_clear_queue_thread_unsafe(vdev, VIRTIO_TXQ);
+		vhost_clear_queue(vdev, VIRTIO_TXQ);
 		rte_vhost_async_channel_unregister(vid, VIRTIO_TXQ);
 		dma_bind[vid].dmas[VIRTIO_TXQ].async_enabled = false;
 	}
@@ -1759,9 +1778,6 @@ vring_state_changed(int vid, uint16_t queue_id, int enable)
 	if (!vdev)
 		return -1;
 
-	if (queue_id != VIRTIO_RXQ)
-		return 0;
-
 	if (dma_bind[vid2socketid[vid]].dmas[queue_id].async_enabled) {
 		if (!enable)
 			vhost_clear_queue_thread_unsafe(vdev, queue_id);

https://lab.dpdk.org/results/dashboard/patchsets/22108/

UNH-IOL DPDK Community Lab

                 reply	other threads:[~2022-05-13  8:59 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=20220513085902.C92156D50B@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

automatic DPDK test reports

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/test-report/0 test-report/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 test-report test-report/ http://inbox.dpdk.org/test-report \
		test-report@dpdk.org
	public-inbox-index test-report

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.test-report


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git