From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A3B1BA2EEB for ; Tue, 10 Sep 2019 12:13:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 65FB91EDD2; Tue, 10 Sep 2019 12:13:55 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 98CA51EDB2 for ; Tue, 10 Sep 2019 12:13:53 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2019 03:13:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,489,1559545200"; d="scan'208";a="385292415" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga006.fm.intel.com with ESMTP; 10 Sep 2019 03:13:51 -0700 Received: from hasmsx112.ger.corp.intel.com (10.184.198.40) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 10 Sep 2019 03:13:51 -0700 Received: from hasmsx113.ger.corp.intel.com ([169.254.13.177]) by HASMSX112.ger.corp.intel.com ([169.254.11.119]) with mapi id 14.03.0439.000; Tue, 10 Sep 2019 13:13:50 +0300 From: "Zapolski, MarcinX A" To: "Richardson, Bruce" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [RFC 19.11 v2 1/3] ethdev: hide key ethdev structures from public API Thread-Index: AQHVZLYTzdmBMJkf+0y1UM2/wAYG6Kcksf5g///RQoCAADKvcA== Date: Tue, 10 Sep 2019 10:13:50 +0000 Message-ID: <51FEE37A1339864DB0A4E34597F561E30D5D6FFB@HASMSX113.ger.corp.intel.com> References: <20190730124950.1293-1-marcinx.a.zapolski@intel.com> <20190906131813.1343-2-marcinx.a.zapolski@intel.com> <51FEE37A1339864DB0A4E34597F561E30D5D6FCC@HASMSX113.ger.corp.intel.com> <20190910100659.GA1894@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20190910100659.GA1894@bricha3-MOBL.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTJjYWMwM2MtOGQ2ZS00NTRiLTk2MzAtOTE0OWZiNjBmNWYxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoib3d6NXJqbG83UHM4blwvMDh5UTVBV2JOVlpmYkZ6UlN3d3hrSWxSRlBLZjJ1ZEVza2pGaFMrZ3JSRE1UVitRWlQifQ== x-ctpclassification: CTP_NT x-originating-ip: [10.184.70.11] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [RFC 19.11 v2 1/3] ethdev: hide key ethdev structures from public API 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Bruce Richardson [mailto:bruce.richardson@intel.com] > Sent: Tuesday, September 10, 2019 12:07 PM > To: Zapolski, MarcinX A > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [RFC 19.11 v2 1/3] ethdev: hide key ethdev > structures from public API >=20 > On Tue, Sep 10, 2019 at 09:59:51AM +0000, Zapolski, MarcinX A wrote: > > <...> > > > @@ -3994,7 +4054,55 @@ void * > > > rte_eth_dev_get_sec_ctx(uint16_t port_id); > > > > > > > > > -#include > > > +struct rte_eth_dev_callback; > > > +/** Structure to keep track of registered callbacks */ > > > +TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback); > > > + > > > +/** > > > + * Structure used to hold information about the callbacks to be > > > +called for a > > > + * queue on RX and TX. > > > + */ > > > +struct rte_eth_rxtx_callback { > > > + struct rte_eth_rxtx_callback *next; > > > + union{ > > > + rte_rx_callback_fn rx; > > > + rte_tx_callback_fn tx; > > > + } fn; > > > + void *param; > > > +}; > > > + > > > +/** > > > + * The generic data structure associated with each ethernet device. > > > + * > > > + * Pointers to burst-oriented packet receive and transmit functions > > > +are > > > + * located at the beginning of the structure, along with the > > > +pointer to > > > + * where all the data elements for the particular device are stored > > > +in shared > > > + * memory. This split allows the function pointer and driver data > > > +to be per- > > > + * process, while the actual configuration data for the device is sh= ared. > > > + */ > > I would like to raise one more concern (maybe not the smartest thing > > to do involving my own patch, but I will sleep better when this is reso= lved). > > Does anyone know what the author of this comment had in mind? I could > > not find any code that utilizes this split, and this patch clearly > > breaks it. If it is obsolete, I guess this comment could be removed. >=20 > As the comment suggest the split is for multi-process suport. The data > structures for the RX/TX queues etc. all need to be common across > processes, while the function pointers need to be per-process. Originally= , in > very early versions of DPDK there was no rte_eth_dev_data structure, all > fields - both data and function pointers - were in rte_eth_dev itself. >=20 > /Bruce Yes, I see the need to have the elements separated. But the comment suggest= s that the order of variables in structure is important. I just want to make sure that it is not.