From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v3 2/2] net/pcap: enable data path for secondary Date: Wed, 14 Nov 2018 23:08:11 +0000 Message-ID: References: <20181105210823.38757-1-qi.z.zhang@intel.com> <20181114195647.196648-1-qi.z.zhang@intel.com> <20181114195647.196648-3-qi.z.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: thomas@monjalon.net, dev@dpdk.org, xueqin.lin@intel.com To: Qi Zhang Return-path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id E800C2BDF for ; Thu, 15 Nov 2018 00:08:14 +0100 (CET) In-Reply-To: <20181114195647.196648-3-qi.z.zhang@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 11/14/2018 7:56 PM, Qi Zhang wrote: > 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. > > Signed-off-by: Ferruh Yigit > Signed-off-by: Qi Zhang <...> > @@ -1155,16 +1157,18 @@ pmd_pcap_probe(struct rte_vdev_device *dev) > PMD_LOG(ERR, "Failed to probe %s", name); > return -1; > } > - /* TODO: request info from primary to set up Rx and Tx */ > - eth_dev->dev_ops = &ops; > - eth_dev->device = &dev->device; > - rte_eth_dev_probing_finish(eth_dev); > - return 0; > - } > > - kvlist = rte_kvargs_parse(rte_vdev_device_args(dev), valid_arguments); > - if (kvlist == NULL) > - return -1; > + internal = eth_dev->data->dev_private; > + > + kvlist = rte_kvargs_parse(internal->devargs, valid_arguments); > + if (kvlist == NULL) > + return -1; Copying devargs to internal->devargs seems missing, it is still needed right?