[dpdk-dev] [PATCH 0/4] virtio support for container
Tan, Jianfeng
jianfeng.tan at intel.com
Fri Jan 22 07:04:41 CET 2016
Hi Amit,
On 1/20/2016 11:19 PM, Amit Tomer wrote:
> Hello,
>
>> 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
More information about the dev
mailing list