From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id E9E1B1B05 for ; Sun, 4 Mar 2018 16:28:18 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Mar 2018 07:28:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,423,1515484800"; d="scan'208";a="35375900" Received: from dpdk06.sh.intel.com ([10.67.110.196]) by fmsmga001.fm.intel.com with ESMTP; 04 Mar 2018 07:28:15 -0800 From: Jianfeng Tan To: dev@dpdk.org Cc: bruce.richardson@intel.com, konstantin.ananyev@intel.com, thomas@monjalon.net, maxime.coquelin@redhat.com, ferruh.yigit@intel.com, anatoly.burakov@intel.com, Jianfeng Tan Date: Sun, 4 Mar 2018 15:30:01 +0000 Message-Id: <1520177405-59091-1-git-send-email-jianfeng.tan@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH 0/4] allow procinfo and pdump on eth vdev 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: Sun, 04 Mar 2018 15:28:20 -0000 As we know, we have below limitations in vdev: - dpdk-procinfo cannot get the stats of (most) vdev in primary process; - dpdk-pdump cannot dump the packets for (most) vdev in primary proces; - secondary process cannot use (most) vdev in primary process. The very first reason is that the secondary process actually does not know the existence of those vdevs as vdevs are chained on a linked list, and not shareable to secondary. In this patch series, we would like to propose a vdev sharing model like this: - As a secondary process boots, all devices (including vdev) in primary will be automatically shared. After both primary and secondary process booted, - Device add/remove in primary will be translated to device hog plug/unplug event in secondary processes. (TODO) - Device add in secondary * If that kind of device support multi-process, the secondary will request the primary to probe the device and the primary to share it to the secondary. It's not necessary to have secondary-private device in this case. (TODO) * If that kind of device does not support multi-process, the secondary will probe the device by itself, and the port id is shared among all primary/secondary processes. This patch series don't: - provide secondary data path (Rx/Tx) support for each specific vdev. How to test: Step 0: start testpmd with a vhost port; and a VM connected to the vhost port. Step 1: try using dpdk-procinfo to get the stats. $(dpdk-procinfo) --log-level=8 --no-pci -- --stats Step 2: try using dpdk-pdump to dump the packets. $(dpdk-pdump) -- --pdump 'port=0,queue=*,rx-dev=/tmp/rx.pcap' Jianfeng Tan (4): eal: bring forward multi-process channel init bus/vdev: bus scan by multi-process channel drivers/net: do not allocate rte_eth_dev_data privately drivers/net: share vdev data to secondary process drivers/bus/vdev/Makefile | 1 + drivers/bus/vdev/vdev.c | 110 ++++++++++++++++++++++++++++++ drivers/net/af_packet/rte_eth_af_packet.c | 42 ++++++------ drivers/net/bonding/rte_eth_bond_pmd.c | 13 ++++ drivers/net/failsafe/failsafe.c | 14 ++++ drivers/net/kni/rte_eth_kni.c | 25 ++++--- drivers/net/null/rte_eth_null.c | 30 ++++---- drivers/net/octeontx/octeontx_ethdev.c | 28 ++++---- drivers/net/pcap/rte_eth_pcap.c | 31 +++++---- drivers/net/softnic/rte_eth_softnic.c | 19 +++++- drivers/net/tap/rte_eth_tap.c | 22 +++--- drivers/net/vhost/rte_eth_vhost.c | 34 ++++----- lib/librte_eal/bsdapp/eal/eal.c | 23 ++++--- lib/librte_eal/linuxapp/eal/eal.c | 23 ++++--- 14 files changed, 295 insertions(+), 120 deletions(-) -- 2.7.4