Bug 1785522

Summary: netkvm: the driver does not use VIRTIO_F_ANY_LAYOUT when runs with modern virtio-net-pci device
Product: Red Hat Enterprise Linux 8 Reporter: ybendito
Component: virtio-winAssignee: ybendito
virtio-win sub component: virtio-win-prewhql QA Contact: Yu Wang <wyu>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: lijin, lmiksik, wquan, wyu, yvugenfi
Version: 8.0Keywords: RFE
Target Milestone: rc   
Target Release: 8.0   
Hardware: x86_64   
OS: Windows   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 16:05:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description ybendito 2019-12-20 06:16:11 UTC
Description of problem:

The virtio-net-pci device on Q35 reports VIRTIO_F_VERSION_1.
The driver does not take in account that this implies ANY_LAYOUT feature.
So, when the driver works with virtio-net-pci on Q35 it always splits the first buffer of the packet to two (one for virtio-net header, another one for the packet. This creates redundant operations in the driver and redundant operations in the host for each packet. 

Version-Release number of selected component (if applicable):

175

Expected results:

VIRTIO_F_VERSION_1 implies ANY_LAYOUT even if ANY_LAYOUT feature is not reported by the device (this is what Linux driver does)

Notes for QE:
When the fix is released, functional regression test and performance comparison test required.

Comment 1 Yu Wang 2019-12-20 08:41:28 UTC
Hi Yuri,


For functional regression test and performance comparison test, witch aspect we should test?
For example, network i/o, network migration, network device hotplug/unplug or other tests?

And how to judge VIRTIO_F_ANY_LAYOUT is used when runs with modern virtio-net-pci device?

Thanks
Yu Wang

Comment 2 ybendito 2019-12-20 11:03:36 UTC
(In reply to Yu Wang from comment #1)
> Hi Yuri,
> 
> 
> For functional regression test and performance comparison test, witch aspect
> we should test?
> For example, network i/o, network migration, network device hotplug/unplug
> or other tests?

IMO, network i/o is enough

> 
> And how to judge VIRTIO_F_ANY_LAYOUT is used when runs with modern
> virtio-net-pci device?

I'll ack this it as soon as the BZ will be 'modified'
Additionally this can be checked in driver's log at startup/enable.

> 
> Thanks
> Yu Wang

Comment 3 Yu Wang 2020-01-09 05:11:22 UTC
Hi,

Reproduce this bug with build 175, cannot find VIRTIO_F_ANY_LAYOUT initialize

Test with build 176 , it shows VIRTIO_F_ANY_LAYOUT in traceview log:

00000192	netkvm.sys	4	7856	3	192	01\08\2020-23:28:41:296	 ParaNdis_InitializeContext[ParaNdis_InitializeContext] Assuming VIRTIO_F_ANY_LAYOUT for V1 device
00000193	netkvm.sys	4	7856	3	193	01\08\2020-23:28:41:300	 ParaNdis_InitializeContext status = 0x0

Test on win7-64,win8-32,win2012r2 and win10-64
virtio-win-prewhql-176
qemu-kvm-4.1.0-20.module+el8.1.1+5309+6d656f05.x86_64
kernel-4.18.0-147.3.1.el8_1.x86_64


So, this function has been used.

Wenli will do the performance comparison test. 

Thanks
Yu Wang

Comment 5 ybendito 2020-01-19 12:12:57 UTC
Release in virtio-win 176

Comment 6 Yu Wang 2020-02-13 07:05:23 UTC
Virtio-win-prewhql-178 netkvm function and WHQL Tests all passed,
And according to comment#4, performance tests passed. 
So this bug is verified.

Thanks
Yu Wang

Comment 12 errata-xmlrpc 2020-04-28 16:05:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2020:1757