From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nbfkord-smmo04.seg.att.com (nbfkord-smmo04.seg.att.com [209.65.160.86]) by dpdk.org (Postfix) with ESMTP id 6DAED28FD for ; Thu, 24 Nov 2016 15:58:22 +0100 (CET) Received: from unknown [193.34.186.16] (EHLO webmail.solarflare.com) by nbfkord-smmo04.seg.att.com(mxl_mta-7.2.4-7) with ESMTP id e0007385.2ac18a21c940.219386.00-2433.227018.nbfkord-smmo04.seg.att.com (envelope-from ); Thu, 24 Nov 2016 14:58:22 +0000 (UTC) X-MXL-Hash: 5837000e61c7d54c-81c102bf96a83a36898ef94e0de7b71f81ad50ab Received: from unknown [193.34.186.16] (EHLO webmail.solarflare.com) by nbfkord-smmo04.seg.att.com(mxl_mta-7.2.4-7) over TLS secured channel with ESMTP id 70007385.0.219153.00-2373.226797.nbfkord-smmo04.seg.att.com (envelope-from ); Thu, 24 Nov 2016 14:58:17 +0000 (UTC) X-MXL-Hash: 58370009009e25c0-5049fcee11e661d39b990e1a5439a5b007b995d9 Received: from [192.168.38.17] (84.52.89.52) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Thu, 24 Nov 2016 14:58:11 +0000 To: Ferruh Yigit , References: <1479740470-6723-1-git-send-email-arybchenko@solarflare.com> <1479740470-6723-33-git-send-email-arybchenko@solarflare.com> <76a60072-2c7b-b674-ca7f-1dc9ca66815a@intel.com> From: Andrew Rybchenko Message-ID: Date: Thu, 24 Nov 2016 17:58:06 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: <76a60072-2c7b-b674-ca7f-1dc9ca66815a@intel.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [84.52.89.52] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.000.1202-22718.003 X-TM-AS-Result: No--3.095300-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-AnalysisOut: [v=2.1 cv=e9YAPPd/ c=1 sm=1 tr=0 a=8P+NB+fYZDP74ap4g4d9Kw==] X-AnalysisOut: [:17 a=RB3BGLmKESwA:10 a=N659UExz7-8A:10 a=L24OOQBejmoA:10 ] X-AnalysisOut: [a=zRKbQ67AAAAA:8 a=JFi6jgQ9u-Y7BzVuvoQA:9 a=pILNOxqGKmIA:1] X-AnalysisOut: [0 a=PA03WX8tBzeizutn5_OT:22] X-Spam: [F=0.2000000000; CM=0.500; S=0.200(2015072901)] X-MAIL-FROM: X-SOURCE-IP: [193.34.186.16] Subject: Re: [dpdk-dev] [PATCH 32/56] net/sfc: implement driver operation to init device on attach 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: Thu, 24 Nov 2016 14:58:22 -0000 On 11/23/2016 06:26 PM, Ferruh Yigit wrote: > On 11/21/2016 3:00 PM, Andrew Rybchenko wrote: >> The setup and configuration of the PMD is not performance sensitive, >> but is not thread safe either. It is possible that the multiple >> read/writes during PMD setup and configuration could be corrupted >> in a multi-thread environment. > Right, this is not thread-safe, but this is valid for all PMDs, it is > not expected to have initialization in multi-threaded environment, that > said so, synchronization also won't hurt, as you said this is not fast > path, just may not be necessary. In fact further patches really need the lock and it should be introduced and maintained from the very beginning. I'll add comments in v2 to explain it. >> Since this is not performance >> sensitive, the developer can choose to add their own layer to provide >> thread-safe setup and configuration. It is expected that, in most >> applications, the initial configuration of the network ports would be >> done by a single thread at startup. >> >> Reviewed-by: Andy Moreton >> Signed-off-by: Andrew Rybchenko > <...> Thanks, Andrew.