Subject: Re: virtio_net: can change MTU after installing program

From: "Michael S. Tsirkin" <[email-masked]>
Date: Wed, 26 Feb 2020 12:02:03 -0500

On Wed, Feb 26, 2020 at 09:58:00AM -0700, David Ahern wrote:
> On 2/26/20 9:55 AM, Michael S. Tsirkin wrote:
> > 
> > OK that seems to indicate an ndo callback as a reasonable way
> > to handle this. Right? The only problem is this might break
> > guests if they happen to reverse the order of
> > operations:
> > 	1. set mtu
> > 	2. detach xdp prog
> > would previously work fine, and would now give an error.
> 
> That order should not work at all. You should not be allowed to change
> the MTU size that exceeds XDP limits while an XDP program is attached.

Right. But we didn't check it so blocking that now is a UAPI change.
Do we care?

> > 
> > If we want to make it transparent for userspace,
> > I guess we can defer the actual update until xdp prog is detached.
> > Sound ugly and might still confuse some userspace ... worth it?
> >