Re: [PATCH v2] skbuff: Improve the sending efficiency of __skb_send_sock

From: Eric Dumazet
Date: Fri Jun 27 2025 - 06:25:06 EST


On Fri, Jun 27, 2025 at 2:44 AM Feng Yang <yangfeng59949@xxxxxxx> wrote:
>
> From: Feng Yang <yangfeng@xxxxxxxxxx>
>
> By aggregating skb data into a bvec array for transmission, when using sockmap to forward large packets,
> what previously required multiple transmissions now only needs a single transmission, which significantly enhances performance.
> For small packets, the performance remains comparable to the original level.
>
> When using sockmap for forwarding, the average latency for different packet sizes
> after sending 10,000 packets is as follows:
> size old(us) new(us)
> 512 56 55
> 1472 58 58
> 1600 106 79
> 3000 145 108
> 5000 182 123
>
> Signed-off-by: Feng Yang <yangfeng@xxxxxxxxxx>

Instead of changing everything, have you tried strategically adding
MSG_MORE in this function ?