On Fri, Jul 12, 2024 at 04:49:07PM +0200, Laurent Vivier wrote:On 24/06/2024 07:05, David Gibson wrote: > On Fri, Jun 21, 2024 at 04:56:40PM +0200, Laurent Vivier wrote:[snip]Ah, right. It still concerns me a bit, having two structures with the same name in different parts of the code, when the difference between them is so subtle. Could we use a common struct for both "buf" and vu, and put the alignment constraint on the actual array in the buf code, rather than on the type? -- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibsonIn fact, no: because we cannot have the ((aligned)) attribute as the address is provided by the guest.+/** + * struct tcp_payload_t - TCP header and data to send segments with payload + * @th: TCP header + * @data: TCP data + */ +struct tcp_payload_t { + struct tcphdr th; + uint8_t data[IP_MAX_MTU - sizeof(struct tcphdr)]; +};This could be common with tcp_buf.c, couldn't it?