From ac153595c0427e994bad730ae760b4e0742ec30b Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Sun, 12 Feb 2023 14:34:38 +0100 Subject: 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 --- tap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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--; } } } -- cgit v1.2.3