<div style="line-height: 1.43; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;">Dear DPDK Community/Maintainers.</div><div style="line-height: 1.43; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;"><br  /></div><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;">I am writing to consult about a technical issue with the Virtio network driver (located in <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">driver/net/virtio</code></span>). During our testing of the <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">packed queue</code></span> feature with <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">desc_event_flags</code></span> enabled, Testpmd consistently crashes after running for a short period. Below is a detailed description of the scenario, observation, root cause analysis, and a proposed fix—we hope to get clarification on whether this is a usage error or a potential driver issue.</div><h2 style="line-height: 32px; margin: 40px 0px 12px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px;">1. Scenario</h2><ul style="margin-block: 0px; padding-inline-start: 42px; margin: 8px 0px; padding-left: 20px; list-style-position: initial; list-style-type: none; line-height: 1.43;"><li style="font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; margin: 8px 0px; list-style-type: disc;"><span style="line-height: 1.43;">Test Environment: Running Testpmd with the Virtio PMD (</span><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">librte_pmd_virtio.so</code></span><span style="line-height: 1.43;">).</span></li><li style="font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; margin: 8px 0px; list-style-type: disc;"><span style="line-height: 1.43;">Test Focus: Validating the </span><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">desc_event_flags</code></span><span style="line-height: 1.43;"> functionality of Virtio </span><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">packed queue</code></span><span style="line-height: 1.43;"> mode.</span></li></ul><h2 style="line-height: 32px; margin: 40px 0px 12px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px;">2. Observation</h2><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;">After Testpmd runs for several minutes, it crashes unexpectedly. Debugging shows that the content of <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">vq_descx</code></span> (within <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">struct virtqueue</code></span>) is being modified unexpectedly—likely due to address mismatches in the queue memory layout.</div><h2 style="line-height: 32px; margin: 40px 0px 12px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px;">3. Command Used to Reproduce</h2><div style="line-height: 1.43;">testpmd -c 0xff -n 4 --huge-dir=/mnt/huge_dpdk --socket-mem=1024 --socket-limit=1024 -w 0000:15:00.1 --file-prefix=test3 -d /usr/lib64/librte_pmd_virtio.so \</div><div style="line-height: 1.43;">        -- --total-num-mbufs=115200 --rxq=4 --txq=4 --forward-mode=txonly --nb-cores=4 --stats-period 1 --burst=512 --rxd=512 --txd=512 --eth-peer=0,10:70:fd:2a:60:39</div><div style="margin: 8px 0px 0px; line-height: 1.43;"><div style="background-color: rgb(249, 250, 251); margin: 0px; border-radius: 6px;"><div style="background-color: rgba(0, 0, 0, 0); margin: 0px;"></div></div></div><h2 style="line-height: 32px; margin: 40px 0px 12px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px;">4. Suspected Root Cause</h2><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;">The Virtio driver uses <span style="line-height: 28px; font-weight: 700;">inconsistent address calculation logic</span> for two critical steps:</div><ol start="1" style="margin-block: 0px; padding-inline-start: 44px; margin: 8px 0px; padding-left: 20px; list-style-position: initial; list-style-type: none; line-height: 1.43;"><li style="font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; margin: 8px 0px; list-style-type: decimal;"><span style="line-height: 1.43;">When informing the hardware (via the </span><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">modern_setup_queue</code></span><span style="line-height: 1.43;"> interface) of the physical addresses for the </span><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">driver</code></span><span style="line-height: 1.43;"> and </span><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">device</code></span><span style="line-height: 1.43;"> regions of the packed queue.</span></li><li style="font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; margin: 8px 0px; list-style-type: decimal;"><span style="line-height: 1.43;">When calculating the virtual addresses of the </span><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">driver</code></span><span style="line-height: 1.43;"> and </span><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">device</code></span><span style="line-height: 1.43;"> regions for the driver’s own use (via </span><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">vring_init_packed</code></span><span style="line-height: 1.43;">).</span></li></ol><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;">This mismatch leads to the hardware and the driver referencing different memory regions for the <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">device</code></span> queue, causing unintended overwrites of <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">vq_descx</code></span>.</div><h2 style="line-height: 32px; margin: 40px 0px 12px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px;">5. Detailed Analysis</h2><h3 style="line-height: 28px; margin: 28px 0px 12px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 18px;">5.1 Address Calculation in <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; background-color: rgba(0, 0, 0, 0.06);"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">modern_setup_queue</code></span> (Hardware-facing)</h3><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;">The <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">modern_setup_queue</code></span> function configures the queue addresses and passes them to the hardware. For packed queues, it calculates <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">desc_addr</code></span>, <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">avail_addr</code></span> (driver region), and <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">used_addr</code></span> (device region) as follows:</div><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;"><img src="cid:E765370F@BAFD665D.2B09EA6800000000.png" id="img_insert_1760081083977025087434543063036" style="vertical-align: bottom;vertical-align: bottom;"  /></div><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;"><br  /></div><div style="margin: 8px 0px 0px; line-height: 1.43;"><div style="background-color: rgb(249, 250, 251); margin: 0px; border-radius: 6px;"><div style="background-color: rgba(0, 0, 0, 0); margin: 0px;"></div></div></div><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;">Key parameters for our test:</div><ul style="margin-block: 0px; padding-inline-start: 42px; margin: 8px 0px; padding-left: 20px; list-style-position: initial; list-style-type: none; line-height: 1.43;"><li style="font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; margin: 8px 0px; list-style-type: disc;"><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">vq_nentries = 0x1000</code></span><span style="line-height: 1.43;"> (4096 entries)</span></li><li style="font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; margin: 8px 0px; list-style-type: disc;"><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">sizeof(struct vring_desc) = 16</code></span><span style="line-height: 1.43;"> (0x10 in hex)</span></li><li style="font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; margin: 8px 0px; list-style-type: disc;"><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">offsetof(struct vring_avail, ring[vq->vq_nentries]) = 4 + (0x1000 * 2)</code></span><span style="line-height: 1.43;"> (base offset 4 + 2 bytes per ring entry)</span></li><li style="font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; margin: 8px 0px; list-style-type: disc;"><span style="line-height: 1.43;">Alignment requirement: </span><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">VIRTIO_PCI_VRING_ALIGN = 4096</code></span><span style="line-height: 1.43;"> (0x1000 in hex)</span></li></ul><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;">Example calculation (assuming <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">desc_addr = 0x0</code></span>):</div><ol start="1" style="margin-block: 0px; padding-inline-start: 44px; margin: 8px 0px; padding-left: 20px; list-style-position: initial; list-style-type: none; line-height: 1.43;"><li style="font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; margin: 8px 0px; list-style-type: decimal;"><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">avail_addr = 0x0 + (0x1000 * 0x10) = 0x10000</code></span><span style="line-height: 1.43;"> (driver region address passed to hardware)</span></li><li style="font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; margin: 8px 0px; list-style-type: decimal;"><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">used_addr = RTE_ALIGN_CEIL(0x10000 + 4 + (0x1000 * 2), 0x1000) = RTE_ALIGN_CEIL(0x12004, 0x1000) = 0x13000</code></span><span style="line-height: 1.43;"> (device region address passed to hardware)</span></li></ol><h3 style="line-height: 28px; margin: 28px 0px 12px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 18px;">5.2 Address Calculation in <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; background-color: rgba(0, 0, 0, 0.06);"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">vring_init_packed</code></span> (Driver-internal)</h3><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;">The <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">vring_init_packed</code></span> function calculates the driver-internal virtual addresses for the packed queue’s <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">driver</code></span> and <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">device</code></span> regions:</div><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;"><img src="cid:D42E8FFF@3A4B3104.2B09EA6800000000.png" id="img_insert_176008115297409142968702507863" style="vertical-align: bottom;vertical-align: bottom;"  /></div><div style="margin: 8px 0px 0px; line-height: 1.43;"><div style="background-color: rgb(249, 250, 251); margin: 0px; border-radius: 6px;"><div style="background-color: rgba(0, 0, 0, 0); margin: 0px;"></div></div></div><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;">Example calculation (same <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">desc_addr = 0x0</code></span>, <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">p = 0x0</code></span>):</div><ol start="1" style="margin-block: 0px; padding-inline-start: 44px; margin: 8px 0px; padding-left: 20px; list-style-position: initial; list-style-type: none; line-height: 1.43;"><li style="font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; margin: 8px 0px; list-style-type: decimal;"><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">vr->driver = 0x0 + (0x1000 * 0x10) = 0x10000</code></span><span style="line-height: 1.43;"> (matches </span><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">avail_addr</code></span><span style="line-height: 1.43;"> from </span><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">modern_setup_queue</code></span><span style="line-height: 1.43;">)</span></li><li style="font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; margin: 8px 0px; list-style-type: decimal;"><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">vr->device = RTE_ALIGN_CEIL(0x10000 + sizeof(struct vring_packed_desc_event), 0x1000)</code></span></li><ul style="margin-block: 0px;padding-inline-start: 42px;margin: 4px 0px; padding-left: 20px; list-style-position: initial; list-style-type: none;"><li style="font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; margin: 4px 0px 8px; list-style-type: circle;"><span style="line-height: 1.43;">Assuming </span><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">sizeof(struct vring_packed_desc_event) = 4</code></span><span style="line-height: 1.43;"> (standard definition), this becomes </span><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">RTE_ALIGN_CEIL(0x10004, 0x1000) = 0x11000</code></span><span style="line-height: 1.43;"> (driver-internal device region address)</span></li></ul></ol><h3 style="line-height: 28px; margin: 28px 0px 12px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 18px;">5.3 Critical Mismatch</h3><ul style="margin-block: 0px; padding-inline-start: 42px; margin: 8px 0px; padding-left: 20px; list-style-position: initial; list-style-type: none; line-height: 1.43;"><li style="font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; margin: 8px 0px; list-style-type: disc;"><span style="line-height: 1.43;">Hardware uses </span><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">0x13000</code></span><span style="line-height: 1.43;"> as the </span><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">device</code></span><span style="line-height: 1.43;"> region address.</span></li><li style="font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; margin: 8px 0px; list-style-type: disc;"><span style="line-height: 1.43;">Driver uses </span><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">0x11000</code></span><span style="line-height: 1.43;"> as the </span><span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14.4px; background-color: rgba(0, 0, 0, 0.06); line-height: 1.43;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">device</code></span><span style="line-height: 1.43;"> region address.</span></li></ul><h2 style="line-height: 32px; margin: 40px 0px 12px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px;">6. Modification Applied to Fix the Issue</h2><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;">We modified <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">modern_setup_queue</code></span> to use the same address logic as <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">vring_init_packed</code></span> for packed queues. After this change, Testpmd runs stably without crashes:</div><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;"><img src="cid:6469B6FC@56D5E327.2B09EA6800000000.png" id="img_insert_176008123309908385325726857993" style="vertical-align: bottom;vertical-align: bottom;"  /></div><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;"><br  /></div><h2 style="line-height: 32px; margin: 40px 0px 12px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px;">7. Reference from Virtio-User/Vhost-User</h2><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;">We noticed that the <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">virtio-user</code></span> and <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">vhost-user</code></span> drivers already use the same logic as our modified <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">modern_setup_queue</code></span> for packed queues. For example, in <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">virtio_user_setup_queue_packed</code></span>:</div><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;"><img src="cid:8D32FC0D@E5A1E632.2B09EA6800000000.png" id="img_insert_1760081277034008955689590374982" style="vertical-align: bottom;vertical-align: bottom;"  /></div><div style="margin: 8px 0px 0px; line-height: 1.43;"><div style="background-color: rgb(249, 250, 251); margin: 0px; border-radius: 6px;"><div style="background-color: rgba(0, 0, 0, 0); margin: 0px;"></div></div></div><h2 style="line-height: 32px; margin: 40px 0px 12px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px;">8. Question for Clarification</h2><div style="line-height: 1.43; font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);">Both the higher and lower dpdk versions exhibit this behavior.</div><div style="line-height: 1.43;"><br  /></div><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;">Therefore, for <span style="line-height: 28px;">packed queues</span>, why do <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">modern_setup_queue</code></span> and <span style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace; color: rgba(0, 0, 0, 0.85); background-color: rgba(0, 0, 0, 0.06); line-height: 28px;"><code style="font-family: Menlo, Monaco, Consolas, "Courier New", monospace;">vring_init_packed</code></span> use different logic to calculate the <span style="line-height: 28px;">device region address</span>?</div><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;"><br  /></div><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;">Is this inconsistency due to <span style="line-height: 28px;">incorrect usage on my part</span>, or are there <span style="line-height: 28px;">special considerations specific to packed queue mode</span> (e.g., hardware compatibility, protocol requirements)?</div><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;">We would greatly appreciate your help in clarifying this confusion. Thank you!</div><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;"><br  /></div><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;">Best regards.</div><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;"><br  /></div><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;">[A DPDK user and developer].</div><div style="line-height: 24px; margin: 0px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;"><br  /></div><div style="line-height: 1.43;"><br  /></div><hr align="left" style="border: none;line-height: 0; margin: 0px 0px 10px; padding-top: 20px; border-bottom: 1px solid rgb(228, 229, 230); width: 50px; height: 0px;"  /><table style="table-layout:fixed;padding-right:20px;line-height:1.43" cellpadding="0" cellspacing="0" contenteditable="false"><tbody><tr valign="top"><td style="width:40px;min-width:40px;padding-top:10px"><div style="width:38px;height:38px;border:1px #FFF solid;border-radius:50%;margin:0;vertical-align:top;box-shadow:0 0 10px 0 rgba(127,152,178,0.14)"><img src="https://p.qlogo.cn/qqmail_head/HSacfR7gwEBTMLulRYGUVXvciaZ5FwrnZFFXVRhCpvYS0NwCppjNvvj6QNttAZ3Jr/160" style="vertical-align: bottom;vertical-align:bottom;width:100%;height:100%;border-radius:50%;pointer-events:none"  /></div></td><td style="padding:10px 0 8px 10px"><div class="businessCard_name" style="font-size:14px;color:#33312E;line-height:20px;padding-bottom:2px;margin:0;font-weight:500">······</div><div class="businessCard_mail" style="font-size:12px;color:#999896;line-height:18px;margin:0">1104121601@qq.com</div></td></tr></tbody></table><div style="line-height: 1.43;"> </div><div style="line-height: 1.43;"><br  /></div><div style="line-height: 1.43;"><br  /></div>