From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id A03521B025 for ; Fri, 19 Jan 2018 13:47:30 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jan 2018 04:47:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,381,1511856000"; d="scan'208";a="11856189" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by orsmga006.jf.intel.com with ESMTP; 19 Jan 2018 04:47:27 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.236]) by irsmsx110.ger.corp.intel.com ([163.33.3.25]) with mapi id 14.03.0319.002; Fri, 19 Jan 2018 12:47:27 +0000 From: "Ananyev, Konstantin" To: Matan Azrad , Thomas Monjalon , Gaetan Rivet , "Wu, Jingjing" CC: "dev@dpdk.org" , Neil Horman , "Richardson, Bruce" Thread-Topic: [PATCH v3 4/7] ethdev: synchronize port allocation Thread-Index: AQHTkHpqKj9bnxJQHESBDM9z+LQ9pqN7JjYg Date: Fri, 19 Jan 2018 12:47:26 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725886280AB0@irsmsx105.ger.corp.intel.com> References: <1515318351-4756-1-git-send-email-matan@mellanox.com> <1516293317-30748-1-git-send-email-matan@mellanox.com> <1516293317-30748-5-git-send-email-matan@mellanox.com> In-Reply-To: <1516293317-30748-5-git-send-email-matan@mellanox.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzdmY2YwOWQtMzJkNi00MThmLWEyYzEtMzhiMTE5M2ZhYjE5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImhvK283b015MndqcEVtaEhsRG9vTTZtOEJmdW1kQ0RpNW92ektNRVhJT3M9In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 4/7] ethdev: synchronize port allocation 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: Fri, 19 Jan 2018 12:47:31 -0000 > -----Original Message----- > From: Matan Azrad [mailto:matan@mellanox.com] > Sent: Thursday, January 18, 2018 4:35 PM > To: Thomas Monjalon ; Gaetan Rivet ; Wu, Jingjing > Cc: dev@dpdk.org; Neil Horman ; Richardson, Bruce = ; Ananyev, Konstantin > > Subject: [PATCH v3 4/7] ethdev: synchronize port allocation >=20 > Ethernet port allocation was not thread safe, means 2 threads which tried > to allocate a new port at the same time might get an identical port > identifier and caused to memory overwrite. > Actually, all the port configurations were not thread safe from ethdev > point of view. >=20 > The port ownership mechanism added to the ethdev is a good point to > redefine the synchronization rules in ethdev: >=20 > 1. The port allocation and port release synchronization will be > managed by ethdev. > 2. The port usage synchronization will be managed by the port owner. > 3. The port ownership synchronization will be managed by ethdev. >=20 > Add port allocation synchronization to complete the new rules. >=20 > Signed-off-by: Matan Azrad > --- Acked-by: Konstantin Ananyev