From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 21 Jan 2016 22:04:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,329,1449561600"; d="scan'208";a="898637587" Received: from shwdeisgchi083.ccr.corp.intel.com (HELO [10.239.67.119]) ([10.239.67.119]) by fmsmga002.fm.intel.com with ESMTP; 21 Jan 2016 22:04:42 -0800 To: Amit Tomer 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> From: "Tan, Jianfeng" Message-ID: <56A1C679.3050407@intel.com> Date: Fri, 22 Jan 2016 14:04:41 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: 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 Subject: Re: [dpdk-dev] [PATCH 0/4] virtio support for container X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2016 06:04:46 -0000 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