From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 74B362BDF for ; Thu, 15 Nov 2018 02:36:31 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Nov 2018 17:36:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,234,1539673200"; d="scan'208";a="106354368" Received: from dpdk51.sh.intel.com ([10.67.110.190]) by fmsmga004.fm.intel.com with ESMTP; 14 Nov 2018 17:36:28 -0800 From: Qi Zhang To: ferruh.yigit@intel.com Cc: thomas@monjalon.net, dev@dpdk.org, xueqin.lin@intel.com, Qi Zhang Date: Thu, 15 Nov 2018 09:37:40 +0800 Message-Id: <20181115013742.117776-1-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20181105210823.38757-1-qi.z.zhang@intel.com> References: <20181105210823.38757-1-qi.z.zhang@intel.com> Subject: [dpdk-dev] [PATCH v4 0/2] fix pcap handlers for secondary 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: Thu, 15 Nov 2018 01:36:31 -0000 Private vdev was the way previously, when pdump developed, now with shared device mode on virtual devices, pcap data path in secondary is not working. When secondary adds a virtual device, related data transferred to primary and primary creates the device and shares device back with secondary. When pcap device created in primary, pcap handlers (pointers) are process local and they are not valid for secondary process. This breaks secondary. So we can't directly share the pcap handlers, but need to create a new set of handlers for secondary, that's what we done in this patch. Also so we use `rte_eth_dev->process_private` to store pcap handlers separately for each process, so a handler in one process will not be closed or overwritten by another process unexpectedly. v4: - rx_burst/tx_burst should use the local pcap handler directly. - add missing devargs memcpy for sharing to secondary process. v3: - fix hardcoded queue number. - use process_private. v2: - fix init issue when try to dump to an iface. Qi Zhang (2): net/pcap: move pcap handler to process private net/pcap: enable data path for secondary drivers/net/pcap/rte_eth_pcap.c | 205 ++++++++++++++++++++++++++++------------ 1 file changed, 144 insertions(+), 61 deletions(-) -- 2.13.6