From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tan, Jianfeng" Subject: Re: [PATCH 0/4] virtio support for container Date: Fri, 22 Jan 2016 14:04:41 +0800 Message-ID: <56A1C679.3050407@intel.com> References: <1446748276-132087-1-git-send-email-jianfeng.tan@intel.com> <058a01d14c7b$5cdc60d0$16952270$@samsung.com> <5693CFE4.4060405@intel.com> <009a01d14d0c$3ab6cd60$b0246820$@samsung.com> <00b101d14d14$bab82510$30286f30$@samsung.com> <5694BE75.7010708@intel.com> <00d901d14d26$d04fc600$70ef5200$@samsung.com> <56951357.2030008@intel.com> <5695275A.5050203@intel.com> <56969A3F.1040503@intel.com> <5697896C.2000804@intel.com> <5698941E.5020101@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: nakajima.yoshihiro@lab.ntt.co.jp, "Michael S. Tsirkin" , dev@dpdk.org, ann.zhuangyanying@huawei.com To: Amit Tomer Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 979BC8F9B for ; Fri, 22 Jan 2016 07:04:45 +0100 (CET) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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