lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 19 Dec 2018 17:44:44 -0500
From:   Willem de Bruijn <willemdebruijn.kernel@...il.com>
To:     Network Development <netdev@...r.kernel.org>
Cc:     David Miller <davem@...emloft.net>,
        Jason Wang <jasowang@...hat.com>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH net-next] virtio-net: ethtool configurable LRO

On Wed, Dec 19, 2018 at 5:32 PM Willem de Bruijn
<willemdebruijn.kernel@...il.com> 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>

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ