Virtio split ring reconnect case failed with qemu version>4.1.0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qemu (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Issue discription:
Virtio split ring reconnect case failed with qemu version>4.1.0, no throughput after reconnect from vhost-user and vhost print log "VHOST_DATA : Failed to allocate memory for mbuf." when sending 1518 length packets.
Test Environment:
DPDK version: DPDK v20.05
OS: Linux 5.4
Compiler: gcc (Ubuntu 7.3.0-16ubuntu3) 8.4.0
Hardware platform: Purley.
The reproduce step is :
Test Case : pvp test with virtio 1.0 mergeable path
======
1. Bind one port to vfio-pci, then launch testpmd by below command::
rm -rf vhost-net*
./testpmd -l 1-3 -n 4 --socket-mem 1024,1024 \
--vdev 'eth_vhost0,
testpmd>set fwd mac
testpmd>start
2. launch VM with different qemu version separately, note: we need add "disable-
/home/qemu-
3. On VM, bind virtio net to igb_uio and run testpmd without tx-offloads::
./testpmd -c 0x7 -n 4 – -i --enable-
--nb-cores=2 --rxq=2 --txq=2 --txd=1024 --rxd=1024
testpmd>start
4. Send 64B and 1518B packets by packet generator separately, show throughput with below command::
testpmd>show port stats all
5. Quit vhost-user, then re-launch, check if the reconnect can work and ensure the traffic can continue.
6. Kill VM, then re-launch VM, check if the reconnect can work and ensure the traffic can continue.
Analysis: this is a regression bug introduced by QEMU(bad commit:6ab79a20af). The change adds a flag to prevent repeated calls to vhost_net_stop(). However, it prevents any calls to vhost_net_cleanup() from net_vhost_