From: "Eugenio Pérez" <eperezma@redhat.com>
To: passt-dev@passt.top
Cc: jasowang@redhat.com
Subject: [RFC v2 05/11] virtio: Fill .next in tx queue
Date: Wed, 9 Jul 2025 19:47:42 +0200 [thread overview]
Message-ID: <20250709174748.3514693-6-eperezma@redhat.com> (raw)
In-Reply-To: <20250709174748.3514693-1-eperezma@redhat.com>
This way we can send one frame splitted in many buffers. TCP stack
already works this way in pasta.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
tap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tap.c b/tap.c
index 8b3ec45..5667fbe 100644
--- a/tap.c
+++ b/tap.c
@@ -1727,6 +1727,9 @@ static int tap_ns_tun(void *arg)
vring_desc[0][i].len = PKT_BUF_BYTES/VHOST_NDESCS;
vring_desc[0][i].flags = VRING_DESC_F_WRITE;
}
+ for (i = 0; i < (VHOST_NDESCS - 1); ++i) {
+ vring_desc[1][i].next = i+1;
+ }
for (i = 0; i < VHOST_NDESCS; ++i) {
vring_avail_0.avail.ring[i] = i;
}
--
@@ -1727,6 +1727,9 @@ static int tap_ns_tun(void *arg)
vring_desc[0][i].len = PKT_BUF_BYTES/VHOST_NDESCS;
vring_desc[0][i].flags = VRING_DESC_F_WRITE;
}
+ for (i = 0; i < (VHOST_NDESCS - 1); ++i) {
+ vring_desc[1][i].next = i+1;
+ }
for (i = 0; i < VHOST_NDESCS; ++i) {
vring_avail_0.avail.ring[i] = i;
}
--
2.50.0
next prev parent reply other threads:[~2025-07-09 17:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-09 17:47 [RFC v2 00/11] Add vhost-net kernel support Eugenio Pérez
2025-07-09 17:47 ` [RFC v2 01/11] tap: implement vhost_call_cb Eugenio Pérez
2025-07-09 17:47 ` [RFC v2 02/11] tap: add die() on vhost error Eugenio Pérez
2025-07-09 17:47 ` [RFC v2 03/11] tap: replace tx tap hdr with virtio_nethdr_mrg_rxbuf Eugenio Pérez
2025-07-09 17:47 ` [RFC v2 04/11] tcp: export memory regions to vhost Eugenio Pérez
2025-07-09 17:47 ` Eugenio Pérez [this message]
2025-07-09 17:47 ` [RFC v2 06/11] tap: move static iov_sock to tcp_buf_data_from_sock Eugenio Pérez
2025-07-09 17:47 ` [RFC v2 07/11] tap: support tx through vhost Eugenio Pérez
2025-07-09 17:47 ` [RFC v2 08/11] tap: add tap_free_old_xmit Eugenio Pérez
2025-07-09 17:47 ` [RFC v2 09/11] tcp: start conversion to circular buffer Eugenio Pérez
2025-07-09 17:47 ` [RFC v2 10/11] tap: add poll(2) to used_idx Eugenio Pérez
2025-07-09 17:47 ` [RFC v2 11/11] tcp_buf: adding TCP tx circular buffer Eugenio Pérez
2025-07-10 9:46 ` [RFC v2 00/11] Add vhost-net kernel support Eugenio Perez Martin
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=20250709174748.3514693-6-eperezma@redhat.com \
--to=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=passt-dev@passt.top \
/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.
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).