Skip to content

Commit

Permalink
tap: Send frames after the first one in tap_send_frames_pasta()
Browse files Browse the repository at this point in the history
...instead of repeatedly sending out the first one in iov.

Fixes: e21ee41 ("tcp: Combine two parts of pasta tap send path together")
Signed-off-by: Stefano Brivio <[email protected]>
  • Loading branch information
sbrivio-rh committed Feb 12, 2023
1 parent d8921da commit ac15359
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
}
}
}
Expand Down

0 comments on commit ac15359

Please sign in to comment.