1
0
Fork 0
mirror of https://passt.top/passt synced 2025-06-15 20:05:34 +02:00

udp: Introduce recvmmsg()/sendmmsg(), zero-copy path from socket

Packets are received directly onto pre-cooked, static buffers
for IPv4 (with partial checksum pre-calculation) and IPv6 frames,
with pre-filled Ethernet addresses and, partially, IP headers,
and sent out from the same buffers with sendmmsg(), for both
passt and pasta (non-local traffic only) modes.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-07-21 12:01:04 +02:00
parent 7fa3e90290
commit 64a0ba3b27
9 changed files with 537 additions and 61 deletions

View file

@ -134,3 +134,6 @@ struct ctx {
struct udp_ctx udp;
struct icmp_ctx icmp;
};
void proto_update_l2_buf(unsigned char *eth_d, unsigned char *eth_s,
uint32_t *ip_da);