From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 3B69C2B9C for ; Fri, 30 Dec 2016 07:55:23 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 29 Dec 2016 22:55:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,428,1477983600"; d="scan'208";a="1088084649" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by fmsmga001.fm.intel.com with ESMTP; 29 Dec 2016 22:55:22 -0800 Date: Fri, 30 Dec 2016 14:57:09 +0800 From: Yuanhan Liu To: Jianfeng Tan Cc: dev@dpdk.org, stephen@networkplumber.org Message-ID: <20161230065709.GM21789@yliu-dev.sh.intel.com> References: <1482996643-113253-1-git-send-email-jianfeng.tan@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1482996643-113253-1-git-send-email-jianfeng.tan@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v2 0/9] rxq interrupt mode for virtio PMD X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2016 06:55:24 -0000 On Thu, Dec 29, 2016 at 07:30:34AM +0000, Jianfeng Tan wrote: > v2: > - Add PCI queue/irq config ops. > - Move rxq interrupt settings before sending DRIVER OK. > > Historically, virtio PMD can only be binded to igb_uio or > uio_pci_generic, and not for vfio-pci. Besides, quote from > http://dpdk.org/doc/guides-16.11/rel_notes/release_2_1.html: > "Per queue RX interrupt events are only allowed in VFIO > which supports multiple MSI-X vectors." > > As Linux starts to support vfio noiommu mode since 4.8.0, it's > a good chance to enable rxq interrupt for virtio PMD. This cover letter (as well as all the commit logs) lacks an _overall_ introducation of how the Rx interrupt works in virtio, say how things are setup, etc. --yliu > > How to test: > > Step 1, prepare a VM image with kernel version >= 4.8.0. > > Step 2, on the host, start a testpmd with a vhost port: > $ testpmd -c 0x7 -m 1024 --vdev 'eth_vhost0,iface=/tmp/sock0,queues=2' \ > --no-pci -- -i --rxq=2 --txq=2 --nb-cores=2 > > Step 3, boot the VM: > $ qemu ... -chardev socket,id=chr1,path=/tmp/sock0 \ > -netdev vhost-user,id=net1,chardev=chr1,vhostforce,queues=2 \ > -device virtio-net-pci,netdev=net1,mq=on,vectors=5 ... > > Step 4, start l3fwd-power in VM: > $ l3fwd-power -c 0x3 -n 4 -- -p 1 -P --config="(0,0,1),(0,1,1)" --no-numa > > Step 5, send packets from testpmd on the host: > $ start tx_first > > Then l3fwd-power outputs: > L3FWD_POWER: lcore 1 is waked up from rx interrupt on port 0 queue 0 > L3FWD_POWER: lcore 1 is waked up from rx interrupt on port 0 queue 1 > > Signed-off-by: Jianfeng Tan > Jianfeng Tan (9): > net/virtio: fix rewriting LSC flag > net/virtio: add Rx descriptor check > net/virtio: add PCI ops for queue/irq binding > net/virtio: add Rx queue intr enable/disable functions > net/virtio: setup rxq interrupts > net/virtio: unbind intr/eventfd when stop device > net/virtio: unmapping queue/irq when close device > examples/l3fwd: add parse-ptype option > examples/l3fwd-power: fix not stop and close device > > drivers/net/virtio/virtio_ethdev.c | 149 +++++++++++++++++++++++++++++++++++-- > drivers/net/virtio/virtio_ethdev.h | 3 + > drivers/net/virtio/virtio_pci.c | 29 ++++++++ > drivers/net/virtio/virtio_pci.h | 5 ++ > drivers/net/virtio/virtio_rxtx.c | 9 +++ > drivers/net/virtio/virtqueue.c | 11 --- > drivers/net/virtio/virtqueue.h | 24 +++++- > examples/l3fwd-power/main.c | 70 ++++++++++++++++- > 8 files changed, 282 insertions(+), 18 deletions(-) > > -- > 2.7.4