Re: [RFC v2 mptcp-next] mptcp: support MSG_EOR in mptcp_sendmsg

Paolo Abeni
2026-02-12T09:05:10Z

On 2/3/26 3:30 AM, Gang Yan wrote:
> diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
> index cd5266099993..8b243062009c 100644
> --- a/net/mptcp/protocol.h
> +++ b/net/mptcp/protocol.h
> @@ -267,6 +267,7 @@ struct mptcp_data_frag {
> u16 overhead;
> u16 already_sent;
> struct page *page;
> + u8 eor; /* Is MSG_EOR marked? Prevents coalescing with next frag */

I'm sorry for the late feedback, but the above will waste quite a bit of
memory due to alignment. I think you can change the 'overhead' size to
u8 and place 'eor' after such field.

Such change could be paired with build time check vs 'overhead'
overflow. i.e.

BUILD_BUG_ON(ALIGN(1, sizeof(long)) + sizeof(struct mptcp_data_frag) >
U8_MAX);

/P