[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF=yD-LSPMno=56w7nhGzAC67ej9TNSa6Ob+SgpGtc2GGp2kuw@mail.gmail.com>
Date: Wed, 19 Dec 2018 18:46:27 -0500
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: "Michael S. Tsirkin" <mst@...hat.com>
Cc: Network Development <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>,
Jason Wang <jasowang@...hat.com>,
Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH net-next] virtio-net: ethtool configurable LRO
On Wed, Dec 19, 2018 at 6:16 PM Michael S. Tsirkin <mst@...hat.com> wrote:
>
> On Wed, Dec 19, 2018 at 05:32:27PM -0500, Willem de Bruijn wrote:
> > From: Willem de Bruijn <willemb@...gle.com>
> >
> > Virtio-net devices negotiate LRO support with the host.
> > Display the initially negotiated state with ethtool -k.
> >
> > Also allow configuring it with ethtool -K, reusing the existing
> > virtnet_set_guest_offloads helper that disables LRO for XDP.
> >
> > Virtio-net negotiates TSO4 and TSO6 separately, but ethtool does not
> > distinguish between the two. In the unlikely legacy case where the
> > host only supports one of the two, maintain the current state.
> >
> > RTNL is held while calling virtnet_set_features, same as on the path
> > from virtnet_xdp_set.
> >
> > Tested:
> > Verified that large-receive-offload is "off [fixed]" when not
> > negotiated during initial probe and "on" otherwise.
> >
> > Measured packet size when scp-ing a large file to the guest with
> > nstat (IpExtInOctets / IpInDelivers). Verified that packet size
> > exceeds MTU only if ethtool -k shows LRO and/or GRO as enabled.
> >
> > Signed-off-by: Willem de Bruijn <willemb@...gle.com>
>
> So I see a bug here:
>
> virtnet_send_command calls:
> /* Caller should know better */
> BUG_ON(!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ));
>
> works fine for XDP because that checks VIRTIO_NET_F_CTRL_GUEST_OFFLOADS
> in virtnet_xdp_set.
Oh, indeed. Of course I need to check that flag before advertising as
configurable. Thanks!
Powered by blists - more mailing lists