For vhost-user, we will need to spread TCP payload over several buffers. To re-use tcp_update_check_tcp[4|6](), provide an iovec rather than a pointer to a buffer. This series updates also csum_iov() and pcap_iov() to add an offset of bytes to skip in the iovec array. It's based on top of "tcp: Use tcp_payload_t rather than tcphdr" that is added in the series for convenience. Laurent Vivier (4): tcp: Use tcp_payload_t rather than tcphdr pcap: Add an offset argument in pcap_iov() checksum: Add an offset argument in csum_iov() tcp: Update TCP checksum using an iovec array checksum.c | 14 ++++-- checksum.h | 3 +- pcap.c | 5 ++- pcap.h | 2 +- tcp.c | 118 ++++++++++++++++++++++++++++++++++--------------- tcp_buf.c | 29 ------------ tcp_internal.h | 29 ++++++++++++ 7 files changed, 128 insertions(+), 72 deletions(-) -- 2.46.0