aboutgitcodebugslistschat
path: root/udp.h
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-09-26 23:38:22 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-09-27 01:28:02 +0200
commitdd581730e54b934f80d5b6a820136707dc71c664 (patch)
treec58b140d407f4b308e1fc1d21703b444ea34cabd /udp.h
parentdfc451319034f594037822b3193a30fa5715175f (diff)
downloadpasst-dd581730e54b934f80d5b6a820136707dc71c664.tar
passt-dd581730e54b934f80d5b6a820136707dc71c664.tar.gz
passt-dd581730e54b934f80d5b6a820136707dc71c664.tar.bz2
passt-dd581730e54b934f80d5b6a820136707dc71c664.tar.lz
passt-dd581730e54b934f80d5b6a820136707dc71c664.tar.xz
passt-dd581730e54b934f80d5b6a820136707dc71c664.tar.zst
passt-dd581730e54b934f80d5b6a820136707dc71c664.zip
tap: Completely de-serialise input message batches
Until now, messages would be passed to protocol handlers in a single batch only if they happened to be dequeued in a row. Packets interleaved between different connections would result in multiple calls to the same protocol handler for a single connection. Instead, keep track of incoming packet descriptors, arrange them in sequences, and call protocol handlers only as we completely sorted input messages in batches. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'udp.h')
-rw-r--r--udp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/udp.h b/udp.h
index bdafcaf..c20f936 100644
--- a/udp.h
+++ b/udp.h
@@ -6,8 +6,8 @@
void udp_sock_handler(struct ctx *c, union epoll_ref ref, uint32_t events,
struct timespec *now);
int udp_tap_handler(struct ctx *c, int af, void *addr,
- struct tap_msg *msg, int count, struct timespec *now);
-int udp_sock_init(struct ctx *c);
+ struct tap_l4_msg *msg, int count, struct timespec *now);
+int udp_sock_init(struct ctx *c, struct timespec *now);
void udp_timer(struct ctx *c, struct timespec *ts);
void udp_update_l2_buf(unsigned char *eth_d, unsigned char *eth_s,
uint32_t *ip_da);