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 6865D567C for ; Fri, 22 Jul 2016 21:56:29 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 22 Jul 2016 12:56:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,405,1464678000"; d="scan'208";a="738411001" Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by FMSMGA003.fm.intel.com with ESMTP; 22 Jul 2016 12:56:27 -0700 Received: from orsmsx153.amr.corp.intel.com (10.22.226.247) by ORSMSX103.amr.corp.intel.com (10.22.225.130) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 22 Jul 2016 12:56:27 -0700 Received: from orsmsx109.amr.corp.intel.com ([169.254.11.206]) by ORSMSX153.amr.corp.intel.com ([169.254.12.206]) with mapi id 14.03.0248.002; Fri, 22 Jul 2016 12:56:27 -0700 From: "Tootoonchian, Amin" To: "Kerlin, MarcinX" CC: "dev@dpdk.org" , "Gonzalez Monroy, Sergio" Thread-Topic: [PATCH] ethdev: ensure consistent port id assignment Thread-Index: AdHb4OxXvCXtsLkTSc+EWpRn1GpjVgGftbBwAA3FvRAAL2NkgAA+hczw Date: Fri, 22 Jul 2016 19:56:26 +0000 Message-ID: <5905C8E33883CA46A8878E2D7724E2151739E7@ORSMSX109.amr.corp.intel.com> References: <5905C8E33883CA46A8878E2D7724E21516DF5D@ORSMSX109.amr.corp.intel.com> <68D830D942438745AD09BAFA99E33E812746D0@IRSMSX102.ger.corp.intel.com> <5905C8E33883CA46A8878E2D7724E215172927@ORSMSX109.amr.corp.intel.com> <68D830D942438745AD09BAFA99E33E81275B25@IRSMSX102.ger.corp.intel.com> In-Reply-To: <68D830D942438745AD09BAFA99E33E81275B25@IRSMSX102.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.140] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] ethdev: ensure consistent port id assignment X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jul 2016 19:56:29 -0000 Inline: > > This is the intended behavior with this patch. Ports are to be created > > only by the primary process. This is required for correct operation > > IMO, because if we allow secondary processes to create ports > > dynamically (and locally use conflicting port ids) without any > > synchronization mechanism, they're guaranteed to overwrite each other's > rte_eth_dev_data. >=20 > Thanks Amin for clarification, > I had another approach, that rte_eth_devices and rte_eth_dev_data should = have > different offset of port_id and secondary process can also add devices. That wouldn't work without some rather intrusive changes. As of now, rte_et= h_dev_data includes port_id and therefore should be consistent across proce= sses.=20 > as I now understand with this patch we will not be able do something like= : > Primary: > ./test-pmd -c 0xf -n 4 --socket-mem=3D'512,0' -w 03:00.1 -w 03:00.0 > --proc-type=3Dprimary --file-prefix=3Dxz1 -- -i > Secondary: > ./test-pmd -c 0xf0 --socket-mem=3D'512,0' -n 4 -v -b 03:00.1 -b 03:00.0 -= -vdev > 'eth_pcap0,rx_pcap=3D/var/log/device1.pcap,tx_pcap=3D/var/log/device2.pca= p' > --proc-type=3Dsecondary --file-prefix=3Dxz1 -- -i >=20 > Because secondary processes "Ports are to be created only by the primary > process"? Right, that wouldn't work. Amin