* [dpdk-test-report] |WARNING| pw98409-98410 [PATCH] [2/2] vhost: support thread-safe API for clearing in-flight packets in async vhost
@ 2021-09-09 7:28 dpdklab
0 siblings, 0 replies; only message in thread
From: dpdklab @ 2021-09-09 7:28 UTC (permalink / raw)
To: test-report; +Cc: dpdk-test-reports
[-- Attachment #1: Type: text/plain, Size: 3960 bytes --]
Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/98409
_apply patch failure_
Submitter: Yuan Wang <yuanx.wang@intel.com>
Date: Thursday, September 09 2021 06:58:07
Applied on: CommitID:dbf81c338cdcf9737315c57ac4dfd40df4c6b8e9
Apply patch set 98409-98410 failed:
Checking patch lib/vhost/rte_vhost_async.h...
error: while searching for:
__rte_experimental
uint16_t rte_vhost_clear_queue_thread_unsafe(int vid, uint16_t queue_id,
struct rte_mbuf **pkts, uint16_t count);
/**
* This function tries to receive packets from the guest with offloading
* copies to the async channel. The packets that are transfer completed
error: patch failed: lib/vhost/rte_vhost_async.h:261
Checking patch lib/vhost/version.map...
error: while searching for:
# added in 21.11
rte_vhost_async_try_dequeue_burst;
};
error: patch failed: lib/vhost/version.map:88
Checking patch lib/vhost/virtio_net.c...
error: while searching for:
return n_pkts_cpl;
}
static __rte_always_inline uint32_t
virtio_dev_rx_async_submit(struct virtio_net *dev, uint16_t queue_id,
struct rte_mbuf **pkts, uint32_t count)
error: patch failed: lib/vhost/virtio_net.c:2142
Applying patch lib/vhost/rte_vhost_async.h with 1 reject...
Rejected hunk #1.
Applying patch lib/vhost/version.map with 1 reject...
Rejected hunk #1.
Applying patch lib/vhost/virtio_net.c with 1 reject...
Rejected hunk #1.
diff a/lib/vhost/rte_vhost_async.h b/lib/vhost/rte_vhost_async.h (rejected hunks)
@@ -261,6 +261,27 @@ int rte_vhost_async_get_inflight(int vid, uint16_t queue_id);
__rte_experimental
uint16_t rte_vhost_clear_queue_thread_unsafe(int vid, uint16_t queue_id,
struct rte_mbuf **pkts, uint16_t count);
+
+/**
+ * This function checks async completion status and clear packets for
+ * a specific vhost device queue. Packets which are inflight will be
+ * returned in an array.
+ *
+ * @param vid
+ * ID of vhost device to clear data
+ * @param queue_id
+ * Queue id to clear data
+ * @param pkts
+ * Blank array to get return packet pointer
+ * @param count
+ * Size of the packet array
+ * @return
+ * Number of packets returned
+ */
+__rte_experimental
+uint16_t rte_vhost_clear_queue(int vid, uint16_t queue_id,
+ struct rte_mbuf **pkts, uint16_t count);
+
/**
* This function tries to receive packets from the guest with offloading
* copies to the async channel. The packets that are transfer completed
diff a/lib/vhost/version.map b/lib/vhost/version.map (rejected hunks)
@@ -88,4 +88,5 @@ EXPERIMENTAL {
# added in 21.11
rte_vhost_async_try_dequeue_burst;
+ rte_vhost_clear_queue;
};
diff a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c (rejected hunks)
@@ -2142,6 +2142,42 @@ rte_vhost_clear_queue_thread_unsafe(int vid, uint16_t queue_id,
return n_pkts_cpl;
}
+uint16_t
+rte_vhost_clear_queue(int vid, uint16_t queue_id, struct rte_mbuf **pkts, uint16_t count)
+{
+ struct virtio_net *dev = get_device(vid);
+ struct vhost_virtqueue *vq;
+ uint16_t n_pkts_cpl;
+
+ if (!dev)
+ return 0;
+
+ VHOST_LOG_DATA(DEBUG, "(%d) %s\n", dev->vid, __func__);
+
+ vq = dev->virtqueue[queue_id];
+
+ if (unlikely(!vq->async_registered)) {
+ VHOST_LOG_DATA(ERR, "(%d) %s: async not registered for queue id %d.\n",
+ dev->vid, __func__, queue_id);
+ return 0;
+ }
+
+ if (!rte_spinlock_trylock(&vq->access_lock)) {
+ VHOST_LOG_CONFIG(ERR, "Failed to clear async queue, virt queue busy.\n");
+ return 0;
+ }
+
+ if ((queue_id % 2) == 0)
+ n_pkts_cpl = vhost_poll_enqueue_completed(dev, queue_id, pkts, count);
+ else
+ n_pkts_cpl = async_poll_dequeue_completed_split(dev, vq, queue_id, pkts, count,
+ dev->flags & VIRTIO_DEV_LEGACY_OL_FLAGS);
+
+ rte_spinlock_unlock(&vq->access_lock);
+
+ return n_pkts_cpl;
+}
+
static __rte_always_inline uint32_t
virtio_dev_rx_async_submit(struct virtio_net *dev, uint16_t queue_id,
struct rte_mbuf **pkts, uint32_t count)
https://lab.dpdk.org/results/dashboard/patchsets/18639/
UNH-IOL DPDK Community Lab
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-09 7:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09 7:28 [dpdk-test-report] |WARNING| pw98409-98410 [PATCH] [2/2] vhost: support thread-safe API for clearing in-flight packets in async vhost dpdklab
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).