mirror of
https://passt.top/passt
synced 2025-06-08 08:35:35 +02:00
passt: Introduce packet batching mechanism
Receive packets in batches from AF_UNIX, check if they can be sent with a single syscall, and batch them up with sendmmsg() in case. A bit rudimentary, currently only implemented for UDP, but it seems to work. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
5b0c88d4ef
commit
1f7cf04d34
8 changed files with 337 additions and 122 deletions
14
passt.h
14
passt.h
|
@ -1,5 +1,19 @@
|
|||
#define UNIX_SOCK_PATH "/tmp/passt.socket"
|
||||
|
||||
/**
|
||||
* struct tap_msg - Generic message descriptor for arrays of messages
|
||||
* @start: Pointer to message start
|
||||
* @l4_start: Pointer to L4 header
|
||||
* @len: Message length, with L2 headers
|
||||
* @l4_len: Message length, with L4 headers
|
||||
*/
|
||||
struct tap_msg {
|
||||
char *start;
|
||||
char *l4h;
|
||||
size_t len;
|
||||
size_t l4_len;
|
||||
};
|
||||
|
||||
#include "icmp.h"
|
||||
#include "tcp.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue