mirror of
https://passt.top/passt
synced 2025-05-30 12:55:42 +02:00
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:
parent
f67238aa86
commit
2d0e0084b6
4 changed files with 59 additions and 37 deletions
3
tap.h
3
tap.h
|
@ -73,7 +73,8 @@ void tap_icmp6_send(const struct ctx *c,
|
|||
const struct in6_addr *src, const struct in6_addr *dst,
|
||||
const void *in, size_t len);
|
||||
int tap_send(const struct ctx *c, const void *data, size_t len);
|
||||
size_t tap_send_frames(const struct ctx *c, const struct iovec *iov, size_t n);
|
||||
size_t tap_send_frames(const struct ctx *c, const struct iovec *iov,
|
||||
size_t bufs_per_frame, size_t nframes);
|
||||
void eth_update_mac(struct ethhdr *eh,
|
||||
const unsigned char *eth_d, const unsigned char *eth_s);
|
||||
void tap_listen_handler(struct ctx *c, uint32_t events);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue