From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f194.google.com (mail-qk0-f194.google.com [209.85.220.194]) by dpdk.org (Postfix) with ESMTP id 8DCC68E72 for ; Tue, 12 Jan 2016 15:45:14 +0100 (CET) Received: by mail-qk0-f194.google.com with SMTP id f10so19193359qke.1 for ; Tue, 12 Jan 2016 06:45:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=8pf6kxlLRw/AgWzmRqXFA6qT9rkMlOmvP5mnKQ52p/4=; b=r0WM+CJjKd2lLSq1Jf7IY8ixwDc1FardmrXhLXCQL8bCyOrkMFR5BY6+/o3ND9B5yk z8QudxYKpTqMvP1gkzFPNQbfyUb8JG9cFyWWAn71xN9lgk5+2HLm/KNXXHLDZSNs75aG 4ukkJc1BwCqJi1j4ED6KmjvtTdokBRoHgMMjo2lEGG4EGgbb+hyY1Ibj3dpJ7UwtDotl cus0m4SZj1+QB1zT8rAxrD7mdSIUD7b6qzl5i/0150PdpSWJVrJpL2zTq8hIqTab7pXA XSwNBj3LTDVrO8wj2/d0l8AQQ7U9Q3m32S6iXj0kRvTH31Z/z5+ZrshhhemkUdRQMTir 8vbg== MIME-Version: 1.0 X-Received: by 10.129.72.6 with SMTP id v6mr97504969ywa.44.1452609913969; Tue, 12 Jan 2016 06:45:13 -0800 (PST) Received: by 10.129.123.134 with HTTP; Tue, 12 Jan 2016 06:45:13 -0800 (PST) In-Reply-To: <00d901d14d26$d04fc600$70ef5200$@samsung.com> References: <1446748276-132087-1-git-send-email-jianfeng.tan@intel.com> <1452426182-86851-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> Date: Tue, 12 Jan 2016 20:15:13 +0530 Message-ID: From: Amit Tomer To: Pavel Fedin Content-Type: text/plain; charset=UTF-8 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: Tue, 12 Jan 2016 14:45:14 -0000 Hello, I run l2fwd from inside docker with following logs: But, don't see Port statistics gets updated ? #/home/ubuntu/dpdk# sudo docker run -i -t -v /home/ubuntu/dpdk/usvhost:/usr/src/dpdk/usvhost l4 EAL: Detected lcore 0 as core 0 on socket 0 EAL: Detected lcore 1 as core 1 on socket 0 EAL: Detected lcore 2 as core 2 on socket 0 EAL: Detected lcore 3 as core 3 on socket 0 EAL: Detected lcore 4 as core 4 on socket 0 EAL: Detected lcore 5 as core 5 on socket 0 EAL: Detected lcore 6 as core 6 on socket 0 EAL: Detected lcore 7 as core 7 on socket 0 EAL: Detected lcore 8 as core 8 on socket 0 EAL: Setting up physically contiguous memory... EAL: TSC frequency is ~99999 KHz EAL: Master lcore 1 is ready (tid=b5968000;cpuset=[1]) Notice: odd number of ports in portmask. Lcore 1: RX port 0 Initializing port 0... done: Port 0, MAC address: F6:9F:7A:47:A4:99 Checking link statusdone Port 0 Link Up - speed 10000 Mbps - full-duplex L2FWD: entering main loop on lcore 1 L2FWD: -- lcoreid=1 portid=0 Port statistics ==================================== Statistics for port 0 ------------------------------ Packets sent: 0 Packets received: 0 Packets dropped: 0 Aggregate statistics =============================== Total packets sent: 0 Total packets received: 0 Total packets dropped: 0 ==================================================== Host side logs after running # ./vhost-switch -c 0x3 f -n 4 --socket-mem 2048 --huge-dir /dev/hugepages -- -p 0x1 --dev-basename usvhost PMD: eth_ixgbe_dev_init(): MAC: 4, PHY: 3 PMD: eth_ixgbe_dev_init(): port 1 vendorID=0x8086 deviceID=0x1528 pf queue num: 0, configured vmdq pool num: 64, each vmdq pool has 2 queues VHOST_PORT: Max virtio devices supported: 64 VHOST_PORT: Port 0 MAC: d8 9d 67 ee 55 f0 VHOST_PORT: Skipping disabled port 1 VHOST_DATA: Procesing on Core 1 started VHOST_CONFIG: socket created, fd:20 VHOST_CONFIG: bind to usvhost VHOST_CONFIG: new virtio connection is 21 VHOST_CONFIG: new device, handle is 0 VHOST_CONFIG: read message VHOST_USER_GET_FEATURES VHOST_CONFIG: read message VHOST_USER_SET_FEATURES VHOST_CONFIG: read message VHOST_USER_SET_MEM_TABLE VHOST_CONFIG: mapped region 0 fd:22 to 0x7f34000000 sz:0x4000000 off:0x0 VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL VHOST_CONFIG: vring call idx:0 file:23 VHOST_CONFIG: read message VHOST_USER_SET_VRING_NUM VHOST_CONFIG: read message VHOST_USER_SET_VRING_BASE VHOST_CONFIG: read message VHOST_USER_SET_VRING_ADDR VHOST_CONFIG: read message VHOST_USER_SET_VRING_KICK VHOST_CONFIG: vring kick idx:0 file:24 VHOST_CONFIG: virtio isn't ready for processing. VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL VHOST_CONFIG: vring call idx:1 file:25 VHOST_CONFIG: read message VHOST_USER_SET_VRING_NUM VHOST_CONFIG: read message VHOST_USER_SET_VRING_BASE VHOST_CONFIG: read message VHOST_USER_SET_VRING_ADDR VHOST_CONFIG: read message VHOST_USER_SET_VRING_KICK VHOST_CONFIG: vring kick idx:1 file:26 VHOST_CONFIG: virtio is now ready for processing. VHOST_DATA: (0) Device has been added to data core 1 Could anyone please point out, how it can be tested further(how can traffic be sent across host and container) ? Thanks, Amit. On Tue, Jan 12, 2016 at 4:18 PM, Pavel Fedin wrote: > Hello! > >> Your guess makes sense because current implementation does not support >> multi-queues. >> >> From you log, only 0 and 1 are "ready for processing"; others are "not >> ready for processing". > > Yes, and if study it even more carefully, we see that we initialize all tx queues but only a single rx queue (#0). > After some more code browsing and comparing the two patchsets i figured out that the problem is caused by inappropriate VIRTIO_NET_F_CTRL_VQ flag. In your RFC you used different capability set, while in v1 you seem to have forgotten about this. > I suggest to temporarily move hw->guest_features assignment out of virtio_negotiate_features() into the caller, where we have eth_dev->dev_type, and can choose the right set depending on it. > > With all mentioned fixes i've got the ping running. > Tested-by: Pavel Fedin > > Kind regards, > Pavel Fedin > Expert Engineer > Samsung Electronics Research center Russia > >