[dpdk-dev] [PATCH 0/2] virtio fix false offload claims

Olivier MATZ olivier.matz at 6wind.com
Wed Aug 23 11:30:26 CEST 2017


Hello,

On Sat, Jul 08, 2017 at 11:12:22AM +0800, Yuanhan Liu wrote:
> On Fri, Jul 07, 2017 at 12:52:48PM -0700, Stephen Hemminger wrote:
> > While doing code for Hyper-V, noticed that the virtio driver was
> > confused about receive versus transmit offloads.  The virtio
> > checksum offload is L4 (TCP/UDP) only, not IPv4. Also, TSO
> > and LRO are not the same.
> > 
> > This may break some program that was assuming it was getting offloads
> > that it wasn't.
> 
> Applied to dpdk-next-virtio.
> 
> And I think they should be backported to stable releases, thus,
> 
>     Cc: stable at dpdk.org
> 
> Thanks.
> 
> 	--yliu
> > 
> > Stephen Hemminger (2):
> >   virtio: don't falsely claim to do IP checksum
> >   virtio: don't claim to support LRO
> > 
> >  drivers/net/virtio/virtio_ethdev.c | 30 +++++-------------------------
> >  1 file changed, 5 insertions(+), 25 deletions(-)
> > 
> > -- 
> > 2.11.0

I think these 2 commits break the virtio offload, which can be tested as
described in this test plan:
http://dpdk.org/ml/archives/dev/2016-October/048092.html

First, about checksum: the description of rxmode->hw_ip_checksum is:

     hw_ip_checksum   : 1, /**< IP/UDP/TCP checksum offload enable. */

So, while I agree the name is not well chosen, it is valid to set it
for virtio to enable L4 checksum.

Then about LRO: setting rxmode->enable_lro is a way to tell the host that the
guest is ok to receive tso packets. From the guest point of view, it is like
enabling lro on a physical driver. Again, it is valid and useful to do this.

Before removing these features, it would have been nice to have a quick look at
the commits that introduced them.

Olivier


More information about the dev mailing list