[PATCH mptcp-next 1/7] mptcp: push ad DSS boundaries

Paolo Abeni posted 7 patches 6 months ago
There is a newer version of this series
[PATCH mptcp-next 1/7] mptcp: push ad DSS boundaries
Posted by Paolo Abeni 6 months ago
when inserting/creating skbs on the subflow write queue, if
the to-be-appended data don't is not contiguous to the tail data,
the protocol creates a new skb and prevent the TCP stack from
merging it later by setting the EOR marker.

Still no push flag is explicitly set at the end of previous GSO
packet, making the aggregation on the receiver side sub-optimal -
and packetdrill self-tests less predictable.

Explicitly mark the end of not contiguous DSS with the push flag.

Fixes: 6d0060f600ad ("mptcp: Write MPTCP DSS headers to outgoing data packets")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
This could also land on next, as needed, dropping the fixes tag
---
 net/mptcp/protocol.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 744b4d6f15f4..4d7131f96ebf 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1264,6 +1264,7 @@ static int mptcp_sendmsg_frag(struct sock *sk, struct sock *ssk,
 		mpext = mptcp_get_ext(skb);
 		if (!mptcp_skb_can_collapse_to(data_seq, skb, mpext)) {
 			TCP_SKB_CB(skb)->eor = 1;
+			tcp_mark_push(tcp_sk(ssk), skb);
 			goto alloc_skb;
 		}
 
-- 
2.43.0
Re: [PATCH mptcp-next 1/7] mptcp: push ad DSS boundaries
Posted by Mat Martineau 5 months, 2 weeks ago
On Mon, 22 Jan 2024, Paolo Abeni wrote:

> when inserting/creating skbs on the subflow write queue, if
> the to-be-appended data don't is not contiguous to the tail data,

Hi Paolo -

Looks like the "don't" here is extra, can you clarify this sentence?

> the protocol creates a new skb and prevent the TCP stack from
> merging it later by setting the EOR marker.
>
> Still no push flag is explicitly set at the end of previous GSO
> packet, making the aggregation on the receiver side sub-optimal -
> and packetdrill self-tests less predictable.
>
> Explicitly mark the end of not contiguous DSS with the push flag.
>

I agree with the approach, gro will never benefit from waiting around for 
the next packet as it will have a new DSS header and can never be 
combined.

- Mat

> Fixes: 6d0060f600ad ("mptcp: Write MPTCP DSS headers to outgoing data packets")
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
> This could also land on next, as needed, dropping the fixes tag
> ---
> net/mptcp/protocol.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index 744b4d6f15f4..4d7131f96ebf 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -1264,6 +1264,7 @@ static int mptcp_sendmsg_frag(struct sock *sk, struct sock *ssk,
> 		mpext = mptcp_get_ext(skb);
> 		if (!mptcp_skb_can_collapse_to(data_seq, skb, mpext)) {
> 			TCP_SKB_CB(skb)->eor = 1;
> +			tcp_mark_push(tcp_sk(ssk), skb);
> 			goto alloc_skb;
> 		}
>
> -- 
> 2.43.0
>
>
>