mirror of
https://passt.top/passt
synced 2025-06-15 20:05:34 +02:00
udp, passt: Introduce socket packet buffer, avoid getsockname() for UDP
This is in preparation for scatter-gather IO on the UDP receive path: save a getsockname() syscall by setting a flag if we get the numbering of all bound sockets in a strict sequence (expected, in practice) and repurpose the tap buffer to be also a socket receive buffer, passing it down to protocol handlers. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
605af213c5
commit
e07f539ae0
10 changed files with 103 additions and 34 deletions
4
passt.h
4
passt.h
|
@ -14,6 +14,8 @@ struct tap_msg {
|
|||
size_t l4_len;
|
||||
};
|
||||
|
||||
#define SOCK_BUF_BYTES (ETH_MAX_MTU * 4)
|
||||
|
||||
#include "icmp.h"
|
||||
#include "tcp.h"
|
||||
#include "udp.h"
|
||||
|
@ -62,5 +64,5 @@ struct ctx {
|
|||
|
||||
struct icmp_ctx icmp;
|
||||
struct tcp_ctx tcp;
|
||||
struct tcp_ctx udp;
|
||||
struct udp_ctx udp;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue