Thread (196 messages) 196 messages, 20 authors, 2016-06-24

Re: [PATCH 4/4] virtio/vdev: add a new vdev named eth_cvio

From: Tan, Jianfeng <hidden>
Date: 2016-01-12 09:15:36

Hi Fedin,

On 1/12/2016 4:39 PM, Tan, Jianfeng wrote:
Hi Fedin,

On 1/12/2016 3:45 PM, Pavel Fedin wrote:
quoted
  Hello!

  See inline
quoted
...
      }

+    struct rte_mbuf *m = NULL;
+    if (dev->dev_type == RTE_ETH_DEV_PCI)
+        vq->offset = (uintptr_t)&m->buf_addr;
+#ifdef RTE_VIRTIO_VDEV
+    else {
+        vq->offset = (uintptr_t)&m->buf_physaddr;
  Not sure, but shouldn't these be swapped? Originally, for PCI 
devices, we used buf_physaddr.
Oops, seems that you are right. I'm trying to figure out why I can 
rx/tx pkts using the wrong version.
I figure out why. When we run apps without root privilege, mempool's 
elt_pa is assigned the same of elt_va_start. So it happens to be right 
value to translate addresses. But it's definitely a bug. Thanks for 
pointing this out.

Thanks,
Jianfeng
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help