* [dpdk-test-report] |WARNING| pw103702 [PATCH] vhost: fix packed ring descriptor update in async enqueue
@ 2021-11-04 4:08 dpdklab
0 siblings, 0 replies; only message in thread
From: dpdklab @ 2021-11-04 4:08 UTC (permalink / raw)
To: test-report; +Cc: dpdk-test-reports
[-- Attachment #1: Type: text/plain, Size: 3367 bytes --]
Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/103702
_apply patch failure_
Submitter: Jiayu Hu <jiayu.hu@intel.com>
Date: Thursday, November 04 2021 10:19:30
Applied on: CommitID:5b08ac4e4a8dbc95f52b871b62a97fda57fa477e
Apply patch set 103702 failed:
Checking patch lib/vhost/virtio_net.c...
Hunk #1 succeeded at 1653 (offset 104 lines).
error: while searching for:
uint16_t n_buffers)
{
struct vhost_async *async = vq->async;
uint16_t nr_left = n_buffers;
uint16_t from, to;
do {
from = async->last_buffer_idx_packed;
to = (from + nr_left) % vq->size;
if (to > from) {
vhost_update_used_packed(vq, async->buffers_packed + from, to - from);
async->last_buffer_idx_packed += nr_left;
nr_left = 0;
} else {
vhost_update_used_packed(vq, async->buffers_packed + from,
vq->size - from);
async->last_buffer_idx_packed = 0;
nr_left -= vq->size - from;
}
} while (nr_left > 0);
}
static __rte_always_inline uint16_t
error: patch failed: lib/vhost/virtio_net.c:1819
Applying patch lib/vhost/virtio_net.c with 1 reject...
Hunk #1 applied cleanly.
Rejected hunk #2.
diff a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c (rejected hunks)
@@ -1819,23 +1765,63 @@ write_back_completed_descs_packed(struct vhost_virtqueue *vq,
uint16_t n_buffers)
{
struct vhost_async *async = vq->async;
- uint16_t nr_left = n_buffers;
- uint16_t from, to;
+ uint16_t from = async->last_buffer_idx_packed;
+ uint16_t used_idx = vq->last_used_idx;
+ uint16_t head_idx = vq->last_used_idx;
+ uint16_t head_flags = 0;
+ uint16_t i;
- do {
- from = async->last_buffer_idx_packed;
- to = (from + nr_left) % vq->size;
- if (to > from) {
- vhost_update_used_packed(vq, async->buffers_packed + from, to - from);
- async->last_buffer_idx_packed += nr_left;
- nr_left = 0;
+ /* Split loop in two to save memory barriers */
+ for (i = 0; i < n_buffers; i++) {
+ vq->desc_packed[used_idx].id = async->buffers_packed[from].id;
+ vq->desc_packed[used_idx].len = async->buffers_packed[from].len;
+
+ used_idx += async->buffers_packed[from].count;
+ if (used_idx >= vq->size)
+ used_idx -= vq->size;
+
+ from++;
+ if (from >= vq->size)
+ from = 0;
+ }
+
+ /* The ordering for storing desc flags needs to be enforced. */
+ rte_atomic_thread_fence(__ATOMIC_RELEASE);
+
+ from = async->last_buffer_idx_packed;
+
+ for (i = 0; i < n_buffers; i++) {
+ uint16_t flags;
+
+ if (async->buffers_packed[from].len)
+ flags = VRING_DESC_F_WRITE;
+ else
+ flags = 0;
+
+ if (vq->used_wrap_counter) {
+ flags |= VRING_DESC_F_USED;
+ flags |= VRING_DESC_F_AVAIL;
} else {
- vhost_update_used_packed(vq, async->buffers_packed + from,
- vq->size - from);
- async->last_buffer_idx_packed = 0;
- nr_left -= vq->size - from;
+ flags &= ~VRING_DESC_F_USED;
+ flags &= ~VRING_DESC_F_AVAIL;
}
- } while (nr_left > 0);
+
+ if (i > 0) {
+ vq->desc_packed[vq->last_used_idx].flags = flags;
+ } else {
+ head_idx = vq->last_used_idx;
+ head_flags = flags;
+ }
+
+ vq_inc_last_used_packed(vq, async->buffers_packed[from].count);
+
+ from++;
+ if (from == vq->size)
+ from = 0;
+ }
+
+ vq->desc_packed[head_idx].flags = head_flags;
+ async->last_buffer_idx_packed = from;
}
static __rte_always_inline uint16_t
https://lab.dpdk.org/results/dashboard/patchsets/19989/
UNH-IOL DPDK Community Lab
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-04 4:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-04 4:08 [dpdk-test-report] |WARNING| pw103702 [PATCH] vhost: fix packed ring descriptor update in async enqueue 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).