aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2023-02-12 14:34:38 +0100
committerStefano Brivio <sbrivio@redhat.com>2023-02-12 14:34:38 +0100
commitac153595c0427e994bad730ae760b4e0742ec30b (patch)
tree1b3957fab8ffe3ea1a7fc03efac4c43523c005c7
parentd8921dafe506599fd7ff723b211f9113faff9ada (diff)
downloadpasst-ac153595c0427e994bad730ae760b4e0742ec30b.tar
passt-ac153595c0427e994bad730ae760b4e0742ec30b.tar.gz
passt-ac153595c0427e994bad730ae760b4e0742ec30b.tar.bz2
passt-ac153595c0427e994bad730ae760b4e0742ec30b.tar.lz
passt-ac153595c0427e994bad730ae760b4e0742ec30b.tar.xz
passt-ac153595c0427e994bad730ae760b4e0742ec30b.tar.zst
passt-ac153595c0427e994bad730ae760b4e0742ec30b.zip
tap: Send frames after the first one in tap_send_frames_pasta()
...instead of repeatedly sending out the first one in iov. Fixes: e21ee41ac35a ("tcp: Combine two parts of pasta tap send path together") Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--tap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tap.c b/tap.c
index af9bc15..716d887 100644
--- a/tap.c
+++ b/tap.c
@@ -316,12 +316,13 @@ static void tap_send_frames_pasta(struct ctx *c,
{
size_t i;
- for (i = 0; i < n; i++) {
+ for (i = 0; i < n; i++, iov++) {
if (write(c->fd_tap, (char *)iov->iov_base, iov->iov_len) < 0) {
debug("tap write: %s", strerror(errno));
if (errno != EAGAIN && errno != EWOULDBLOCK)
tap_handler(c, c->fd_tap, EPOLLERR, NULL);
i--;
+ iov--;
}
}
}