public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
blob 7a9caae17f4292d5a72405da3a62a872317658ea 922 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 
// SPDX-License-Identifier: GPL-2.0-or-later
/* Copyright Red Hat
 * Author: Laurent Vivier <lvivier@redhat.com>
 *
 * common_vu.c - vhost-user common UDP and TCP functions
 */

#include <unistd.h>
#include <sys/uio.h>
#include <linux/virtio_net.h>

#include "util.h"
#include "passt.h"
#include "vhost_user.h"
#include "vu_common.h"

/**
 * vu_send_frame() - Send one frame to the vhost-user interface
 * @vdev:	vhost-user device
 * @vq:		vhost-user virtqueue
 * @elem:	virtqueue element array to send back to the virqueue
 * @iov_vu:	iovec array containing the data to send
 * @iov_used:	Length of the array
 */
void vu_send_frame(const struct vu_dev *vdev, struct vu_virtq *vq,
		   struct vu_virtq_element *elem, const struct iovec *iov_vu,
		   int iov_used)
{
	int i;

	for (i = 0; i < iov_used; i++)
		vu_queue_fill(vq, &elem[i], iov_vu[i].iov_len, i);

	vu_queue_flush(vq, iov_used);
	vu_queue_notify(vdev, vq);
}

debug log:

solving 7a9caae17f42 ...
found 7a9caae17f42 in https://archives.passt.top/passt-dev/20240913162036.3635783-5-lvivier@redhat.com/

applying [1/1] https://archives.passt.top/passt-dev/20240913162036.3635783-5-lvivier@redhat.com/
diff --git a/vu_common.c b/vu_common.c
new file mode 100644
index 000000000000..7a9caae17f42

Checking patch vu_common.c...
Applied patch vu_common.c cleanly.

index at:
100644 7a9caae17f4292d5a72405da3a62a872317658ea	vu_common.c

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

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 IMAP folder(s).