From 3d484aa370902873bd42a434fa856b9ee3eac228 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Thu, 3 Oct 2024 16:51:07 +0200 Subject: tcp: Update TCP checksum using an iovec array TCP header and payload are supposed to be in the same buffer, and tcp_update_check_tcp4()/tcp_update_check_tcp6() compute the checksum from the base address of the header using the length of the IP payload. In the future (for vhost-user) we need to dispatch the TCP header and the TCP payload through several buffers. To be able to manage that, we provide an iovec array that points to the data of the TCP frame. We provide also an offset to be able to provide an array that contains the TCP frame embedded in an lower level frame, and this offset points to the TCP header inside the iovec array. Signed-off-by: Laurent Vivier Signed-off-by: Stefano Brivio --- checksum.c | 1 - 1 file changed, 1 deletion(-) (limited to 'checksum.c') diff --git a/checksum.c b/checksum.c index 05d002a..cf85019 100644 --- a/checksum.c +++ b/checksum.c @@ -503,7 +503,6 @@ uint16_t csum(const void *buf, size_t len, uint32_t init) * * Return: 16-bit folded, complemented checksum */ -/* cppcheck-suppress unusedFunction */ uint16_t csum_iov(const struct iovec *iov, size_t n, size_t offset, uint32_t init) { -- cgit v1.2.3