From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id A32D6FB34 for ; Fri, 3 Mar 2017 18:55:57 +0100 (CET) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Mar 2017 09:55:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,237,1484035200"; d="scan'208";a="71894481" Received: from dpdk06.sh.intel.com ([10.239.129.195]) by fmsmga005.fm.intel.com with ESMTP; 03 Mar 2017 09:55:55 -0800 From: Jianfeng Tan To: dev@dpdk.org Cc: yuanhan.liu@linux.intel.com, david.marchand@6wind.com, Jianfeng Tan Date: Fri, 3 Mar 2017 17:56:38 +0000 Message-Id: <1488563803-87754-1-git-send-email-jianfeng.tan@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH 0/5] add LSC and Rxq interrupt for virtio-user 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, 03 Mar 2017 17:55:58 -0000 This is an attempt to add LSC and Rxq interrupt for a virtual device, virtio-user (with the backend of both vhost-user and vhost-kernel). HOW TO TEST: Step 1: start testpmd with a virtual vhost device: $ testpmd -c 0x3 -n 4 --socket-mem 1024 --no-pci \ --vdev 'eth_vhost0,iface=/tmp/sock0' -- -i Step 2: start l3fwd-power with a virtio-user device: $ l3fwd-power -c 0xc -n 4 --socket-mem 1024 --no-pci \ --file-prefix=l3fwd-pwd \ --vdev=virtio_user0,path=/tmp/sock0 \ -- -p 1 -P --config="(0,0,1)" \ --no-numa --parse-ptype Step 3: start burst in testpmd (testpmd)> start tx_first Packets will be received and forwarded back by l3fwd-power. And l3fwd-power will keep in polling mode. Step 4: stop burst in testpmd (testpmd)> stop l3fwd-power will change to interrupt mode with few CPU consumption. Step 5: kill testpmd $ kill -p `pidof testpmd` The link status will be changed to down in l3fwd-power. Signed-off-by: Jianfeng Tan Jianfeng Tan (5): eal/linux: add interrupt type for vdev net/virtio-user: add rxq interrupt mode support net/virtio-user: support to report net status net/virtio-user: add lsc support with vhost-user adapter net/virtio-user: add lsc support with vhost-kernel adapter drivers/net/virtio/virtio_ethdev.c | 46 +++++++++---- drivers/net/virtio/virtio_ethdev.h | 2 + drivers/net/virtio/virtio_user/virtio_user_dev.c | 52 ++++++++++++++- drivers/net/virtio/virtio_user/virtio_user_dev.h | 4 +- drivers/net/virtio/virtio_user_ethdev.c | 76 +++++++++++++++++++--- lib/librte_eal/linuxapp/eal/eal_interrupts.c | 32 ++++++++- lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 2 + .../linuxapp/eal/include/exec-env/rte_interrupts.h | 5 +- 8 files changed, 192 insertions(+), 27 deletions(-) -- 2.7.4