Bug 1861434

Summary: packed=on:guest fails receive packets with "network" interface type and 'qemu' driver
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Pei Zhang <pezhang>
Component: qemu-kvmAssignee: Eugenio Pérez Martín <eperezma>
qemu-kvm sub component: Networking QA Contact: Pei Zhang <pezhang>
Status: CLOSED DUPLICATE Docs Contact:
Severity: medium    
Priority: medium CC: aadam, chayang, eperezma, jinzhao, juzhang, leiyang, virt-maint
Version: 8.3Keywords: Triaged
Target Milestone: rc   
Target Release: 8.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1861436 (view as bug list) Environment:
Last Closed: 2021-09-09 12:37:20 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:
Bug Depends On:    
Bug Blocks: 1861436    

Description Pei Zhang 2020-07-28 15:38:00 UTC
Description of problem:
Boot VM with virtio-net-pci, using "network" interface type and 'qemu'  driver, and enable packed=on. Guest will fail receive packets. 

Version-Release number of selected component (if applicable):
qemu-kvm-5.0.0-2.module+el8.3.0+7379+0505d6ca.x86_64
4.18.0-227.el8.x86_64
dpdk-20.05.tar.xz

How reproducible:
100%

Steps to Reproduce:
1. Boot VM with virtio-net-pci, using "network" interface type and 'qemu'  driver, and enable packed=on.

<domain type="kvm" xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
...
  </devices>
  ...
    <interface type="bridge">
      <mac address="88:66:da:5f:dd:01" />
      <source bridge="switch" />
      <model type="virtio" />
      <address bus="0x01" domain="0x0000" function="0x0" slot="0x00" type="pci" />
    </interface>
    <interface type="network">
      <mac address="28:66:da:5f:ee:01" />
      <source network="default" />
      <model type="virtio" />
      <driver name='qemu' />
      <address bus="0x06" domain="0x0000" function="0x0" slot="0x00" type="pci" />
    </interface>
    <interface type="network">
      <mac address="28:66:da:5f:ee:02" />
      <source network="default" />
      <model type="virtio" />
      <driver name='qemu' />
      <address bus="0x07" domain="0x0000" function="0x0" slot="0x00" type="pci" />
    </interface>
  ...
  </devices>
  <qemu:commandline>
    <qemu:arg value='-set'/>
    <qemu:arg value='device.net1.packed=on'/>
    <qemu:arg value='-set'/>
    <qemu:arg value='device.net2.packed=on'/>
  </qemu:commandline>

2. In both host and guest, compile upstream dpdk, which enables eth_af_packet device

# tar -xvf dpdk-20.05.tar.xz 
# cd dpdk-20.05
# make config T=x86_64-native-linux-gcc
# cd builds
# make

3. In host, start dpdk's testpmd with txonly to generate packets.

# ./dpdk-20.05/build/app/testpmd \
	-l 2,4 \
	--socket-mem 1024 \
	--vdev=eth_af_packet0,iface=vnet1 \
	--file-prefix tx  \
	-- \
	--forward-mode=txonly --stats-period 1 -a

4. In guest, start dpdk's testpmd with rxonly to receive packets. But fails receiving packets well.

# ./dpdk-20.05/build/app/testpmd \
	-l 4,5 \
	--socket-mem 1024 \
	--vdev=eth_af_packet0,iface=enp6s0 \
	--file-prefix rx  \
	-- \
	--forward-mode=rxonly --stats-period 1 -a


Actual results:
Guest fails receive packets.

Expected results:
Guest should receive packets well.

Additional info:
1. Guest can send packets well, only receiving packets function doesn't work well.

2. Without packed=on, guest can receive packets well.

Comment 1 jason wang 2020-09-18 02:22:06 UTC
Packed virtqueue is not fully supported yet (e.g vhost kernel part is missing).

Move to 8.4.

Thanks

Comment 5 jason wang 2021-01-20 08:29:24 UTC
Consider it's not urgent since we don't have packed support in the vhost kernel.

Move to 8.5 due to bandwidth.

Thanks

Comment 6 Pei Zhang 2021-04-08 13:32:09 UTC
Update:

Testing with RHEL9 qemu-kvm-5.2.0-11.el9.x86_64, this issue cannot be reproduced.

Comment 11 John Ferlan 2021-09-09 12:37:20 UTC
Bulk update: RHEL-AV bug is duplicate of RHEL8 bug, closing.

*** This bug has been marked as a duplicate of bug 1861436 ***