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 BB9DF8D86 for ; Fri, 20 Apr 2018 18:55:41 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Apr 2018 09:55:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,302,1520924400"; d="scan'208";a="35795911" Received: from dpdk06.sh.intel.com ([10.67.110.196]) by orsmga006.jf.intel.com with ESMTP; 20 Apr 2018 09:55:39 -0700 From: Jianfeng Tan To: dev@dpdk.org Cc: thomas@monjalon.net, Jianfeng Tan Date: Fri, 20 Apr 2018 16:57:38 +0000 Message-Id: <1524243463-143438-1-git-send-email-jianfeng.tan@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520177405-59091-1-git-send-email-jianfeng.tan@intel.com> References: <1520177405-59091-1-git-send-email-jianfeng.tan@intel.com> Subject: [dpdk-dev] [PATCH v4 0/5] 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: Fri, 20 Apr 2018 16:55:43 -0000 v4: - Change the lock code style as suggested by Anatoly. - Add function note as suggested by Anatoly. v3: - Update doc. - Rebase on master. v2: - Add spinlock for vdev device list as suggested by Anatoly. - Add ring, cxgbe and remove the free in each PMDs as suggested by Matan. - Rebase on master. 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 process; - 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 patchset, 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 patchset 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 it. 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 (5): eal: bring forward multi-process channel init bus/vdev: add lock on vdev device list bus/vdev: bus scan by multi-process channel drivers/net: not use private eth dev data drivers/net: share vdev data to secondary process doc/guides/rel_notes/release_18_05.rst | 5 + drivers/bus/vdev/Makefile | 1 + drivers/bus/vdev/vdev.c | 193 ++++++++++++++++++++++++++---- drivers/net/af_packet/rte_eth_af_packet.c | 43 +++---- drivers/net/bonding/rte_eth_bond_pmd.c | 13 ++ drivers/net/cxgbe/cxgbe_main.c | 1 - drivers/net/failsafe/failsafe.c | 14 +++ drivers/net/kni/rte_eth_kni.c | 26 ++-- drivers/net/null/rte_eth_null.c | 32 ++--- drivers/net/octeontx/octeontx_ethdev.c | 29 +++-- drivers/net/pcap/rte_eth_pcap.c | 32 ++--- drivers/net/ring/rte_eth_ring.c | 17 +-- drivers/net/softnic/rte_eth_softnic.c | 19 ++- drivers/net/tap/rte_eth_tap.c | 24 ++-- drivers/net/vhost/rte_eth_vhost.c | 36 +++--- lib/librte_eal/bsdapp/eal/eal.c | 23 ++-- lib/librte_eal/linuxapp/eal/eal.c | 23 ++-- 17 files changed, 360 insertions(+), 171 deletions(-) -- 2.7.4