From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: virtio-comment@lists.linux.dev, lulu@redhat.com,
nguyenlienviet@google.com
Subject: Re: [PATCH] virtio-net: introduce TSO limit feature
Date: Thu, 16 Oct 2025 02:17:35 -0400 [thread overview]
Message-ID: <20251016021717-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CACGkMEt77EDs4MKo9RSnXRxuVD8hZFca+W3mAxv6sQ3sWN-xZw@mail.gmail.com>
On Thu, Oct 16, 2025 at 01:46:58PM +0800, Jason Wang wrote:
> On Wed, Oct 15, 2025 at 3:02 PM Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > On Wed, Oct 15, 2025 at 12:29:13PM +0800, Jason Wang wrote:
> > > On Tue, Oct 14, 2025 at 4:59 PM Michael S. Tsirkin <mst@redhat.com> wrote:
> > > >
> > > > thanks for the patch! yet something to improve.
> > > > I note issues only when encountered 1st time but please
> > > > do go and check all patch for each issue.
> > > >
> > > >
> > > > On Tue, Oct 14, 2025 at 12:22:43PM +0800, Jason Wang wrote:
> > > > > This patch introduces TSO limit feature which allows the device to
> > > > > advertise:
> > > > >
> > > > > - Maximum TCP length of a TSO packet or inner TSO packet when UDP
> > > > > tunnel is support
> > > > > - Maximum number of segment that can be produced by the device after
> > > > > segmentation of TSO or inner TSO packet of a UDP tunnel
> > > > >
> > > > > This is a must to implement TCP jumbogram, as networking stack needs
> > > > > to know the limitation of the device in order to produce TSO packet as
> > > > > large as possible.
> >
> >
> > Maybe you can provide an overview of how this all is used?
>
> Sure, this feature does not implement BIG TCP (jumbogram) itself. BIG
> TCP requires a little bit more to be implemented:
>
> 1) new gso_type for jumbogram
> 2) when TCP length exceeds 64K, we should mandate ip->tot_len to be
> zero and device can judge from the length of the buffer
> 3) other stuffs
>
> I guess this is something that Viet wants to work on.
>
> But before BIG TCP, the driver needs to know the device limitation of
> TSO packets. That is what this patch did. BIG TCP is not the only
> user, it could be used in the software datapath as well. Consider a
> simple datapath:
>
> virtio-net -> TAP -> bridge -> eth0
>
> If eth0's tso_max_size is less than 64K, we need to advertise this to
> virtio-net otherwise 64K gso packets will be segmented by software run
> xmit in eth0. We've encountered this in collaboration with mana and
> virtio-net/vhost.
Well then pls update with the real motivation.
> > I am looking at tcp_fragment and I just do not see
> > where it looks at any device limits.
> >
>
> It works like a device advertising tso_max_size/segs, and it is capped
> by gso_max_size/segs. The gso_max_size/segs were the ones that are
> used by the stack to determine the skb->len.
>
> Thanks
>
> > --
> > MST
> >
next prev parent reply other threads:[~2025-10-16 6:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 4:22 [PATCH] virtio-net: introduce TSO limit feature Jason Wang
2025-10-14 8:59 ` Michael S. Tsirkin
2025-10-15 4:29 ` Jason Wang
2025-10-15 7:01 ` Michael S. Tsirkin
2025-10-16 5:46 ` Jason Wang
2025-10-16 6:17 ` Michael S. Tsirkin [this message]
2025-10-16 6:19 ` Michael S. Tsirkin
2025-10-16 6:22 ` Jason Wang
2025-10-16 10:16 ` Michael S. Tsirkin
2025-10-15 7:27 ` Michael S. Tsirkin
2025-10-16 5:57 ` Jason Wang
2025-10-16 6:17 ` Michael S. Tsirkin
2025-10-16 6:31 ` Jason Wang
2025-10-16 10:02 ` Michael S. Tsirkin
2025-10-20 6:25 ` Jason Wang
2025-10-20 8:19 ` Michael S. Tsirkin
2025-10-21 3:01 ` Jason Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251016021717-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=jasowang@redhat.com \
--cc=lulu@redhat.com \
--cc=nguyenlienviet@google.com \
--cc=virtio-comment@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox