All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	zy@yusur.tech, Hao Chen <chenh@yusur.tech>,
	"open list:NETWORKING DRIVERS" <netdev@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:VIRTIO CORE AND NET DRIVERS"
	<virtualization@lists.linux-foundation.org>,
	Eric Dumazet <edumazet@google.com>,
	hengqi@linux.alibaba.com, huangml@yusur.tech,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH] virtio_net: set default mtu to 1500 when 'Device maximum MTU' bigger than 1500
Date: Mon, 8 May 2023 14:10:07 -0400	[thread overview]
Message-ID: <20230508140640-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20230508092548.5fc8f078@hermes.local>

On Mon, May 08, 2023 at 09:25:48AM -0700, Stephen Hemminger wrote:
> On Mon, 8 May 2023 06:30:07 -0400
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> 
> > > > > I don't know, in any scenario, when the hardware supports a large mtu, but we do
> > > > > not want the user to use it by default.  
> > > >
> > > > When other devices on the same LAN have mtu set to 1500 and
> > > > won't accept bigger packets.  
> > > 
> > > So, that depends on pmtu/tcp-probe-mtu.
> > > 
> > > If the os without pmtu/tcp-probe-mtu has a bigger mtu, then it's big packet
> > > will lost.
> > > 
> > > Thanks.
> > >   
> > 
> > pmtu is designed for routing. LAN is supposed to be configured with
> > a consistent MTU.
> 
> Virtio is often used with bridging or macvlan which can't support PMTU.
> PMTU only works when forwarding at layer 3 (ie routing) where there is
> a IP address to send the ICMP response. If doing L2 forwarding, the
> only thin the bridge can do is drop the packet.
> 
> TCP cab recover but detecting an MTU blackhole requires retransmissions.

Exactly. That's why we basically use the MTU advice supplied by device
by default - it's designed for use-cases of software devices where
the device might have more information about the MTU than the guest.
If hardware devices want e.g. a way to communicate support for
jumbo frames without communicating any information about the LAN,
a new feature will be needed.

-- 
MST

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	huangml@yusur.tech, zy@yusur.tech,
	Jason Wang <jasowang@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"open list:VIRTIO CORE AND NET DRIVERS" 
	<virtualization@lists.linux-foundation.org>,
	"open list:NETWORKING DRIVERS" <netdev@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	Hao Chen <chenh@yusur.tech>,
	hengqi@linux.alibaba.com
Subject: Re: [PATCH] virtio_net: set default mtu to 1500 when 'Device maximum MTU' bigger than 1500
Date: Mon, 8 May 2023 14:10:07 -0400	[thread overview]
Message-ID: <20230508140640-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20230508092548.5fc8f078@hermes.local>

On Mon, May 08, 2023 at 09:25:48AM -0700, Stephen Hemminger wrote:
> On Mon, 8 May 2023 06:30:07 -0400
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> 
> > > > > I don't know, in any scenario, when the hardware supports a large mtu, but we do
> > > > > not want the user to use it by default.  
> > > >
> > > > When other devices on the same LAN have mtu set to 1500 and
> > > > won't accept bigger packets.  
> > > 
> > > So, that depends on pmtu/tcp-probe-mtu.
> > > 
> > > If the os without pmtu/tcp-probe-mtu has a bigger mtu, then it's big packet
> > > will lost.
> > > 
> > > Thanks.
> > >   
> > 
> > pmtu is designed for routing. LAN is supposed to be configured with
> > a consistent MTU.
> 
> Virtio is often used with bridging or macvlan which can't support PMTU.
> PMTU only works when forwarding at layer 3 (ie routing) where there is
> a IP address to send the ICMP response. If doing L2 forwarding, the
> only thin the bridge can do is drop the packet.
> 
> TCP cab recover but detecting an MTU blackhole requires retransmissions.

Exactly. That's why we basically use the MTU advice supplied by device
by default - it's designed for use-cases of software devices where
the device might have more information about the MTU than the guest.
If hardware devices want e.g. a way to communicate support for
jumbo frames without communicating any information about the LAN,
a new feature will be needed.

-- 
MST


  reply	other threads:[~2023-05-08 18:10 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-06  2:15 [PATCH] virtio_net: set default mtu to 1500 when 'Device maximum MTU' bigger than 1500 Hao Chen
2023-05-06  2:50 ` Xuan Zhuo
2023-05-06  2:50   ` Xuan Zhuo
2023-05-06  8:56   ` Hao Chen
2023-05-07  8:58     ` Michael S. Tsirkin
2023-05-07  8:58       ` Michael S. Tsirkin
2023-05-08  2:01       ` Xuan Zhuo
2023-05-08  2:01         ` Xuan Zhuo
2023-05-08  6:15         ` Michael S. Tsirkin
2023-05-08  6:15           ` Michael S. Tsirkin
2023-05-08  6:18           ` Xuan Zhuo
2023-05-08  6:18             ` Xuan Zhuo
2023-05-08  6:43             ` Michael S. Tsirkin
2023-05-08  6:43               ` Michael S. Tsirkin
2023-05-08  7:41               ` Xuan Zhuo
2023-05-08  7:41                 ` Xuan Zhuo
2023-05-08 10:30                 ` Michael S. Tsirkin
2023-05-08 10:30                   ` Michael S. Tsirkin
2023-05-08 16:25                   ` Stephen Hemminger
2023-05-08 18:10                     ` Michael S. Tsirkin [this message]
2023-05-08 18:10                       ` Michael S. Tsirkin
2023-05-09  1:51                       ` Xuan Zhuo
2023-05-09  1:51                         ` Xuan Zhuo
2023-05-07  9:31     ` David Woodhouse
2023-05-07  9:31       ` David Woodhouse
2023-05-07 13:38       ` Michael S. Tsirkin
2023-05-07 13:38         ` Michael S. Tsirkin
2023-05-07  5:59 ` Michael S. Tsirkin
2023-05-07  5:59   ` Michael S. Tsirkin

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=20230508140640-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=chenh@yusur.tech \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hengqi@linux.alibaba.com \
    --cc=huangml@yusur.tech \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stephen@networkplumber.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xuanzhuo@linux.alibaba.com \
    --cc=zy@yusur.tech \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.