aboutgitcodebugslistschat
path: root/tcp.h
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-07-26 14:20:36 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-07-26 14:20:36 +0200
commit39ad062100b67a7a6ba77e4c8e2d539e3beb29b4 (patch)
treef1645e12b7355e5b44a04ce381135ee4329cd2c2 /tcp.h
parent85a820a66fe44b2ae4355e306918f78a55edbc23 (diff)
downloadpasst-39ad062100b67a7a6ba77e4c8e2d539e3beb29b4.tar
passt-39ad062100b67a7a6ba77e4c8e2d539e3beb29b4.tar.gz
passt-39ad062100b67a7a6ba77e4c8e2d539e3beb29b4.tar.bz2
passt-39ad062100b67a7a6ba77e4c8e2d539e3beb29b4.tar.lz
passt-39ad062100b67a7a6ba77e4c8e2d539e3beb29b4.tar.xz
passt-39ad062100b67a7a6ba77e4c8e2d539e3beb29b4.tar.zst
passt-39ad062100b67a7a6ba77e4c8e2d539e3beb29b4.zip
tcp: Introduce scatter-gather IO path from socket to tap
...similarly to what was done for UDP. Quick performance test with 32KiB buffers, host to VM: $ iperf3 -c 192.0.2.2 -N [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 8.47 GBytes 7.27 Gbits/sec 0 sender [ 5] 0.00-10.00 sec 8.45 GBytes 7.26 Gbits/sec receiver $ iperf3 -c 2a01:598:88ba:a056:271f:473a:c0d9:abc1 [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 8.43 GBytes 7.24 Gbits/sec 0 sender [ 5] 0.00-10.00 sec 8.41 GBytes 7.22 Gbits/sec receiver Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp.h')
-rw-r--r--tcp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tcp.h b/tcp.h
index 52f4bb0..0dcd798 100644
--- a/tcp.h
+++ b/tcp.h
@@ -14,6 +14,8 @@ int tcp_tap_handler(struct ctx *c, int af, void *addr,
struct tap_msg *msg, int count, struct timespec *now);
int tcp_sock_init(struct ctx *c);
void tcp_timer(struct ctx *c, struct timespec *ts);
+void tcp_update_l2_buf(unsigned char *eth_d, unsigned char *eth_s,
+ uint32_t *ip_da);
/**
* union tcp_epoll_ref - epoll reference portion for TCP connections