On Mon, 15 Apr 2024 19:01:37 +0200 Laurent Vivier <lvivier(a)redhat.com> wrote:To be able to provide pointers to TCP headers and IP headers without worrying about alignment in the structure, split the structure into several arrays and point to each part of the frame using an iovec array. Using iovec also allows us to simply ignore the first entry when the vnet length header is not needed. Signed-off-by: Laurent Vivier <lvivier(a)redhat.com> Reviewed-by: David Gibson <david(a)gibson.dropbear.id.au> --- Notes: v5: - reformat MSS4/MSS6 macros - update structures comments - use IP_MAX_MTU - rename TCP_IOV_TAP to TCP_IOV_VLEN - s/ethernet/Ethernet/ - split loop in tcp_sock4_iov_init() and tcp_sock6_iov_init() - use intermediate variable vnet_len in tcp_data_to_tap()Applied. -- Stefano