tap: Extend tap_send_frames() to allow multi-buffer frames

tap_send_frames() takes a vector of buffers and requires exactly one frame
per buffer.  We have future plans where we want to have multiple buffers
per frame in some circumstances, so extend tap_send_frames() to take the
number of buffers per frame as a parameter.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
[sbrivio: Improve comment to rembufs calculation]
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
David Gibson
2024-03-08 17:53:22 +11:00
committed by Stefano Brivio
parent f67238aa86
commit 2d0e0084b6
4 changed files with 59 additions and 37 deletions

2
udp.c
View File

@@ -712,7 +712,7 @@ static void udp_tap_send(const struct ctx *c,
tap_iov[i].iov_len = buf_len;
}
tap_send_frames(c, tap_iov + start, n);
tap_send_frames(c, tap_iov + start, 1, n);
}
/**