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

Re: [PATCH 0/4] virtio support for container

From: Tan, Jianfeng <hidden>
Date: 2016-01-22 06:04:45
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

Hi Amit,

On 1/20/2016 11:19 PM, Amit Tomer wrote:
Hello,
quoted
For this case, please use --single-file option because it creates much more
than 8 fds, which can be handled by vhost-user sendmsg().
Thanks, I'm able to verify it by sending ARP packet from container to
host on arm64. But sometimes, I do see following message while running
l2fwd in container(pointed by Rich).

EAL: Master lcore 0 is ready (tid=8a7a3000;cpuset=[0])
EAL: lcore 1 is ready (tid=89cdf050;cpuset=[1])
Notice: odd number of ports in portmask.
Lcore 0: RX port 0
Initializing port 0... PANIC in kick_all_vq():
TUNSETVNETHDRSZ failed: Inappropriate ioctl for device

How it could be avoided?

Thanks,
Amit.
Thanks for pointing out this bug. Actually it's caused by one of my 
fault. So vhost-user cannot work well.
Below change can help start vhost-user.
diff --git a/drivers/net/virtio/vhost.c b/drivers/net/virtio/vhost.c
index e423e02..dbca374 100644
--- a/drivers/net/virtio/vhost.c
+++ b/drivers/net/virtio/vhost.c
@@ -483,8 +483,9 @@ static void kick_all_vq(struct virtio_hw *hw)
         uint64_t features = hw->guest_features;
         features &= ~(1ull << VIRTIO_NET_F_MAC);
         vhost_call(hw, VHOST_MSG_SET_FEATURES, &features);
-       if (ioctl(hw->backfd, TUNSETVNETHDRSZ, &hw->vtnet_hdr_size) == -1)
-               rte_panic("TUNSETVNETHDRSZ failed: %s\n", strerror(errno));
+       if (hw->type == VHOST_KERNEL)
+               if (ioctl(hw->backfd, TUNSETVNETHDRSZ, 
&hw->vtnet_hdr_size) == -1)
+                       rte_panic("TUNSETVNETHDRSZ failed: %s\n", 
strerror(errno));
         PMD_DRV_LOG(INFO, "set features:%"PRIx64"\n", features);


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