mirror of
https://passt.top/passt
synced 2024-12-23 06:05:23 +00:00
tap: Send frames after the first one in tap_send_frames_pasta()
...instead of repeatedly sending out the first one in iov.
Fixes: e21ee41ac3
("tcp: Combine two parts of pasta tap send path together")
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
d8921dafe5
commit
ac153595c0
3
tap.c
3
tap.c
@ -316,12 +316,13 @@ static void tap_send_frames_pasta(struct ctx *c,
|
|||||||
{
|
{
|
||||||
size_t i;
|
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) {
|
if (write(c->fd_tap, (char *)iov->iov_base, iov->iov_len) < 0) {
|
||||||
debug("tap write: %s", strerror(errno));
|
debug("tap write: %s", strerror(errno));
|
||||||
if (errno != EAGAIN && errno != EWOULDBLOCK)
|
if (errno != EAGAIN && errno != EWOULDBLOCK)
|
||||||
tap_handler(c, c->fd_tap, EPOLLERR, NULL);
|
tap_handler(c, c->fd_tap, EPOLLERR, NULL);
|
||||||
i--;
|
i--;
|
||||||
|
iov--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user