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 127961B108 for ; Tue, 25 Sep 2018 16:20:04 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2018 07:20:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,302,1534834800"; d="scan'208";a="265573139" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.55]) ([10.237.220.55]) by fmsmga005.fm.intel.com with ESMTP; 25 Sep 2018 07:20:03 -0700 To: Alejandro Lucero , dev , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko References: From: "Burakov, Anatoly" Message-ID: Date: Tue, 25 Sep 2018 15:20:02 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] secondary processes and private data 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: Tue, 25 Sep 2018 14:20:05 -0000 On 25-Sep-18 3:10 PM, Alejandro Lucero wrote: > I've a problem when part of device private data needs to be private per > process. > > Current multiprocess support shares device private data between primary > and secondaries but it is all dependent on a pointer initialized to the > same memory address by the multiprocess support code. If there is a > per-process data, If a secondary process changes it the primary gets > affected, and the same for additional secondaries which will affect not > just the primary but other previous secondaries. > > The solution is to add support for this inside struct rte_eth_dev, > something like > > void *secondary_priv_data; > > so it is up to the secondaries to use this field if necessary. > > NFP PMD creates the required rte_eth_devs specifically, similar to what > is done inside rte_ethdev.c but adding initialization for an interface > needed when calling device ethdev_init function. There are other PMDs > doing this but none has this requirement for per-process private data. > > Please, let me know what you think about this change to struct > rte_ethdev or if you have a better idea for solving this problem. > > Thanks > Perhaps "private data" is a bad name for data that is shared across primary and secondary processes... I don't have anything against the idea. -- Thanks, Anatoly