[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250629123339.0dd73fb1@pumpkin>
Date: Sun, 29 Jun 2025 12:33:39 +0100
From: David Laight <david.laight.linux@...il.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: Feng Yang <yangfeng59949@....com>, davem@...emloft.net, kuba@...nel.org,
pabeni@...hat.com, horms@...nel.org, willemb@...gle.com,
almasrymina@...gle.com, kerneljasonxing@...il.com, ebiggers@...gle.com,
asml.silence@...il.com, aleksander.lobakin@...el.com, stfomichev@...il.com,
yangfeng@...inos.cn, netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] skbuff: Improve the sending efficiency of
__skb_send_sock
On Fri, 27 Jun 2025 03:19:27 -0700
Eric Dumazet <edumazet@...gle.com> wrote:
> On Fri, Jun 27, 2025 at 2:44 AM Feng Yang <yangfeng59949@....com> wrote:
> >
> > From: Feng Yang <yangfeng@...inos.cn>
> >
> > 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@...inos.cn>
>
> Instead of changing everything, have you tried strategically adding
> MSG_MORE in this function ?
>
Does (could) this code ever be used for protocols other than TCP?
For UDP setting MSG_MORE will generate a single datagram.
For SCTP all the data actually has to be sent as a single sendmsg()
in order to generate a single DATA chunk.
Prior to 6.5 the code used sock->ops->sendpage_locked() so had to do
a separate call per page.
But if all the overheads of 'ioc_iter' are being added it does seen
appropriate to make use of its features!
David
Powered by blists - more mailing lists