Hi Maxime / team, I have been going through the 12+ virtio commits between the last known working version and the first place we noticed this being broken. It does appear to be a change in this commit: https://github.com/DPDK/dpdk/commit/a632f0f64ffba3553a18bdb51a670c1b603c0ce6
I focused on the virtio_alloc_queue_headers() and virtio_free_queue_headers() functions. I think I have narrowed it down to to the hdr_mem setting. The following changes seem to be working in my test environment (which is a little limited). I was hoping you could look at these changes and hopefully help get a fix in for 24.11. Regards, -ChrisB --- drivers/net/virtio/virtqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c index 6f419665f1..fc7f7a9c55 100644 --- a/drivers/net/virtio/virtqueue.c +++ b/drivers/net/virtio/virtqueue.c @@ -344,7 +344,7 @@ virtio_alloc_queue_headers(struct virtqueue *vq, int numa_node, const char *name if (vq->hw->use_va) *hdr_mem = (uintptr_t)(*hdr_mz)->addr; else - *hdr_mem = (uintptr_t)(*hdr_mz)->iova; + *hdr_mem = (*hdr_mz)->iova; return 0; } -- 2.35.6 From: Chris Brezovec (cbrezove) <cbrez...@cisco.com> Date: Tuesday, September 3, 2024 at 10:43 AM To: dev@dpdk.org <dev@dpdk.org>, maxime.coque...@redhat.com <maxime.coque...@redhat.com> Cc: Roger Melton (rmelton) <rmel...@cisco.com>, Walt Robinson (walrobin) <walro...@cisco.com> Subject: Re: 32-bit virtio failing on DPDK v23.11.1 (and tags) Hi Maxime / others, I am just following up to see if you have had any chance to look at what I previously sent and had any ideas regarding the issue. Thanks in advance! -ChrisB From: Chris Brezovec (cbrezove) <cbrez...@cisco.com> Date: Wednesday, August 28, 2024 at 5:27 PM To: dev@dpdk.org <dev@dpdk.org>, maxime.coque...@redhat.com <maxime.coque...@redhat.com> Cc: common-dpio-core-team(mailer list) <common-dpio-core-t...@cisco.com> Subject: 32-bit virtio failing on DPDK v23.11.1 (and tags) HI Maxime, My name is Chris Brezovec, we met and talked about some 32 bit virtio issues we were seeing at Cisco during the DPDK summit last year. There was also a back and forth between you and Dave Johnson at Cisco last September regarding the same issue. I have attached some of the email chain from that conversation that resulted in this commit being made to dpdk v23.11 (https://github.com/DPDK/dpdk/commit/8c41645be010ec7fa0df4f6c3790b167945154b4). We recently picked up the v23.11.1 DPDK release and saw that 32 bit virtio is not working again, but 64-bit virtio is working. We are noticing CVQ timeouts - PMD receives no response from host and this leads to failure of the port to start. We were able to recreate this issue using testpmd. We have done some tracing through the virtio changes made during the development of the v23.xx DPDK release, and believe we have identified the following rework commit to have caused a failure (https://github.com/DPDK/dpdk/commit/a632f0f64ffba3553a18bdb51a670c1b603c0ce6). We have also tested v23.07, v23.11, v23.11.2-rc2, v24.07 and they all seem to see the same issue when running in 32-bit mode using testpmd. We were hoping you might be able to take a quick look at the two commits and see if there might be something obvious missing in the refactor work that might have caused this issue. I am thinking there might a location or two in the code that should be using the VIRTIO_MBUF_ADDR() or similar macro that might have been missed. Regards, ChrisB This is some of the testpmd output seen on v23.11.2-rc2: LD_LIBRARY_PATH=/home/rmelton/scratch/dpdk-v23.11.2-rc2.git/build/lib /home/rmelton/scratch/dpdk-v23.11.2-rc2.git/build/app/dpdk-testpmd -l 2-3 -a 0000:07:00.0 --log-level pmd.net.iavf.*,8 --log-level lib.eal.*,8 --log-level=lib.eal:info --log-level=lib.eal:debug --log-level=lib.ethdev:info --log-level=lib.ethdev:debug --log-level=lib.virtio:warning --log-level=lib.virtio:info --log-level=lib.virtio:debug --log-level=pmd.*:debug --iova-mode=pa -- -i — snip — virtio_send_command(): vq->vq_desc_head_idx = 0, status = 255, vq->hw->cvq = 0x76d9acc0 vq = 0x76d9ac80 virtio_send_command_split(): vq->vq_queue_index = 2 virtio_send_command_split(): vq->vq_free_cnt=64 vq->vq_desc_head_idx=0 virtio_dev_promiscuous_disable(): Failed to disable promisc Failed to disable promiscuous mode for device (port 0): Resource temporarily unavailable Error during restoring configuration for device (port 0): Resource temporarily unavailable virtio_dev_stop(): stop Fail to start port 0: Resource temporarily unavailable Done virtio_send_command(): vq->vq_desc_head_idx = 0, status = 255, vq->hw->cvq = 0x76d9acc0 vq = 0x76d9ac80 virtio_send_command_split(): vq->vq_queue_index = 2 virtio_send_command_split(): vq->vq_free_cnt=64 vq->vq_desc_head_idx=0 virtio_dev_promiscuous_enable(): Failed to enable promisc Error during enabling promiscuous mode for port 0: Resource temporarily unavailable - ignore