From: "Michael S. Tsirkin" <mst@redhat.com>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: Network Development <netdev@vger.kernel.org>,
David Miller <davem@davemloft.net>,
Jason Wang <jasowang@redhat.com>,
Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH net-next] virtio-net: ethtool configurable LRO
Date: Thu, 20 Dec 2018 13:48:58 -0500 [thread overview]
Message-ID: <20181220134821-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CAF=yD-Lb8kNe1u6L18mhdz5enurWrc40SHvX0s+7-=6T=DXNyQ@mail.gmail.com>
On Thu, Dec 20, 2018 at 01:30:15PM -0500, Willem de Bruijn wrote:
> On Wed, Dec 19, 2018 at 5:44 PM Willem de Bruijn
> <willemdebruijn.kernel@gmail.com> wrote:
> >
> > On Wed, Dec 19, 2018 at 5:32 PM Willem de Bruijn
> > <willemdebruijn.kernel@gmail.com> wrote:
> > >
> > > From: Willem de Bruijn <willemb@google.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@google.com>
> >
> > Two comments for the review:
> >
> > 1. Current drivers show LRO as disabled even if it is negotiated at
> > probe. That is arguably a bug. In which case I can split this patch into
> > - a net patch to advertise the initially negotiated value through dev->feature
> > - a net-next patch to configure it with ndo_set_features.
> >
> > 2. virtnet_clear_guest_offloads disables all guest_offloads, including
> > VIRTIO_NET_F_GUEST_CSUM. That seems undesirable? The feature is a
> > prerequisite for LRO, but not the other way around. This applies
> > equally to the xdp and ethtool paths, so would be another separate
> > net patch.
>
> I was wrong. This was a deliberate choice. See below. Will leave as is.
>
> The other change is not really important enough on its, so I'll just
> send a v2 of this patch.
>
> One additional change, show LRO as enabled if it is active for any protocol
> (as opposed to only for all protocols), so that we can truly disable it in all
> cases.
That makes sense.
> "
> commit e59ff2c49ae16e1d179de679aca81405829aee6c
> Author: Jason Wang <jasowang@redhat.com>
> Date: Thu Nov 22 14:36:30 2018 +0800
>
> virtio-net: disable guest csum during XDP set
>
> We don't disable VIRTIO_NET_F_GUEST_CSUM if XDP was set. This means we
> can receive partial csumed packets with metadata kept in the
> vnet_hdr. This may have several side effects:
>
> - It could be overridden by header adjustment, thus is might be not
> correct after XDP processing.
> - There's no way to pass such metadata information through
> XDP_REDIRECT to another driver.
> - XDP does not support checksum offload right now.
>
> So simply disable guest csum if possible in this the case of XDP.
> "
next prev parent reply other threads:[~2018-12-20 18:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 22:32 [PATCH net-next] virtio-net: ethtool configurable LRO Willem de Bruijn
2018-12-19 22:44 ` Willem de Bruijn
2018-12-19 23:13 ` Michael S. Tsirkin
2018-12-20 18:30 ` Willem de Bruijn
2018-12-20 18:48 ` Michael S. Tsirkin [this message]
2018-12-19 23:16 ` Michael S. Tsirkin
2018-12-19 23:46 ` Willem de Bruijn
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=20181220134821-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=davem@davemloft.net \
--cc=jasowang@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=willemb@google.com \
--cc=willemdebruijn.kernel@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).