From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8E901428BA; Tue, 4 Apr 2023 10:53:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1724D410FA; Tue, 4 Apr 2023 10:53:39 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 30C3A40EE3 for ; Tue, 4 Apr 2023 10:53:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680598417; x=1712134417; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=nHgvk/y1uHJRG3YT3yy2k7etugdEJkKScu0rnwvt3V4=; b=iAi4Pb67Dou7THT01RQTULRhdkB0PFWoLjHav8Kt/fVVGzuLS+b+pUmM qlUuk0EWQkIRLse/79HTo2Y6dbROlO1vi7BOp+IRm81FOmB6mIZYhjbOy uZ7lmZX033ATg7I9fEMvtLYFk4btbM8MrLeMQ7rybngtGQ+C4o5uH9nuP A5B6ey55Q4OUcxHwnAZsUrIGDgtdOUDTOZGNHVKrUFx8lsbJnQRHQ9H9p 5iDCc9JtaSSS+o5yTba9NI1q6HwrvuPqrJ28TejOKppTYkACtSdcjBhEs jLEMUQFVqnjd3EU5Bx3DPUQnORP46g6A+v67mcbpLeRnK4TV+viuCNINB w==; X-IronPort-AV: E=McAfee;i="6600,9927,10669"; a="321783541" X-IronPort-AV: E=Sophos;i="5.98,317,1673942400"; d="scan'208";a="321783541" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Apr 2023 01:53:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10669"; a="663509919" X-IronPort-AV: E=Sophos;i="5.98,317,1673942400"; d="scan'208";a="663509919" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga006.jf.intel.com with ESMTP; 04 Apr 2023 01:53:35 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Tue, 4 Apr 2023 01:53:35 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Tue, 4 Apr 2023 01:53:34 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Tue, 4 Apr 2023 01:53:34 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.48) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Tue, 4 Apr 2023 01:53:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UjsFTg4ClNZrIgDnNDPdilGOe7G65cPu/Fx6nztEwDVCdoRYPZMrWfG1d2aaWF6d6XTOkUScWKH6dg5SkGMtpUckctXTStzBrPXwkmThN0n2shrtczGfh9xzYj3mpMA9H5FEH1r1XAQwSzTUN7LZZAXbfczB40bbVqFtIu4exJcciTK0whBdmMXQdfehZbFziKa2wCGVfn/Kiw1vN6DxcCA8kantMKkMz3kRgpJnO8WbVu2Cq1PE2JOPcPAqqgZFd1uWz1etjr6GYVzw4F+UNBt2lHbpmFXtd54ivjEsrOnJiIrCnf7aLr0SPoC5Sena5zVOhpEZDNOFNLpSAfQHuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TndcDzOIdgqxpa+3qc+wwkpgobz8BbPqBxp3luTkFCU=; b=C40ZCPiGfCrSDuCTfs2uFMwjynzQ3+9swFVvhkuUjUvjXKQNk78+gpAtrA0y+gYoAV/XE7GRFcT4vPNQII9Hdx9rBCyeGZA0VMNjNHqPL1qwNZHLzUtXEGelfD4Xv5NCvRcceE+8Oflrwy6BZKBhFmnxRqyTxlq4zb3RLCe5MDEPimjptKPWjb99TYxEnXTIZPSPZuLO4fxd8Osd1sX1uabZlQ72J1Xp4s6jww/ZkpC+WYtlFO/vv9Phs+ndw9q4Y4Vj1qgH3KOX6zWl9Ie3ZD+wR6SlOW//Ujo3iCxI9tCLMzdK0JoCLszzjDHtK8/6yOdpcDMJjPp+XyCRdL66wQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by SN7PR11MB6704.namprd11.prod.outlook.com (2603:10b6:806:267::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.28; Tue, 4 Apr 2023 08:53:28 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::18d0:ac53:aa1d:d19c]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::18d0:ac53:aa1d:d19c%6]) with mapi id 15.20.6254.035; Tue, 4 Apr 2023 08:53:28 +0000 Date: Tue, 4 Apr 2023 09:53:21 +0100 From: Bruce Richardson To: Tyler Retzlaff CC: , , , Subject: Re: [PATCH 3/9] eal: use barrier intrinsics when compiling with msvc Message-ID: References: <1680558751-17931-1-git-send-email-roretzla@linux.microsoft.com> <1680558751-17931-4-git-send-email-roretzla@linux.microsoft.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1680558751-17931-4-git-send-email-roretzla@linux.microsoft.com> X-ClientProxiedBy: LO4P265CA0013.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ad::9) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|SN7PR11MB6704:EE_ X-MS-Office365-Filtering-Correlation-Id: 145333be-e994-4d42-7b46-08db34ea0efb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6BMPj2heG/Yy2+KdB/0Dlz7JQSOsjkgfe8NGuGRtvyHnY/Zr7Fb9elraurhvw4DxftdAuo0RI1u5zMIJ1NEsmosRANWL75zMxq7lfxdlbVFEm3iIARMUDtIOL34HksWCmYb/eStz+6eVtujiKhMCT7sXrb6W4FlohNKBghQogy2ungyVifYrc3bqJuxCGWiMQMva7GcNP3bC34Jnplh9z/adufbZM8YnqMCYRrvEL20CTmKAamHIzKzpRxWJ3oC4tMreGNi17ja98+1bI37S5+8y/d7LmLi+dXNY4103bQTIEb1kJOyvbDI9GPgt1nzKM4blqvOIzNfFfTfJt23RE7jsyXBl8T2T2LbdAJTtCoUEIMyoaAnUhHSggXJVgQLmbSUbp1pVAu2nas6s//o2wuYJasq+dLjo9ws4EKFFXiFRh12GKSpFhnHcq3hsd7uBvJDK4sUoS8OWkmtr6BDXuthS+QAHd0bOH4D8d/LccCM9NJvPajZCXzP22X05fulbUmlFSjebYzAhFzbiGToKNW7p5V+sUDB6OZB7GSW/rJMZbkZc261734+V72fH4s09 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(39860400002)(376002)(396003)(136003)(346002)(366004)(451199021)(316002)(6666004)(6916009)(66476007)(8676002)(6486002)(4326008)(66556008)(66946007)(8936002)(5660300002)(41300700001)(2906002)(44832011)(478600001)(82960400001)(86362001)(186003)(38100700002)(6512007)(26005)(83380400001)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?eu1CRz5i2JBrx8p3d2bylGnhwieAdI2hNmkkceSm+zBYCZnq1h7K+Dyu85Ez?= =?us-ascii?Q?XFLhvAdpgUTtiYdLjtPwon5LBjCyfb9wHOywO8vs9ZjXRY+23x5QnuT9iRQX?= =?us-ascii?Q?821S6Xi2K7fbEhxBDj5pbHPExfwBhjz6VlrJrThwQ/a03Yc3Q3SUt0gI6xh5?= =?us-ascii?Q?NL37vt6+gd7teicshKNIZi/kCsTa7xm6YPIwMJ4Tqm9LgOEU+7cTZDWzMgHQ?= =?us-ascii?Q?NOKWo3Fe2KmO9918D6g6Jpbk2UFiBel08SMuM8JtOuCeS5UAAUSs2m+ESDNO?= =?us-ascii?Q?q5ZCmNgRMQ0A/M7txl6BvWgBrWRilOCcoI4ctoPtZp+Lu0K+o0qtevZj135r?= =?us-ascii?Q?x9CkE73Y8SOPEvzHFXE6iLFTIpN+nXYAYnAY5BNM86Jn75saEux4jlWAOMKO?= =?us-ascii?Q?ZDA02Z216yDPhk1sGkYkstZ4OyeDyoxeLUqB98fiiuxCedc3mAbrJWyTZA5C?= =?us-ascii?Q?H5fOLMEOWeOPjSPHr52cId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OT+5GxfdWM3+1JinMqKec636m+ewJgspv/SSLye/ers9roA/t2LxOex2nCj2?= =?us-ascii?Q?sLiy2J0Rl+c8zRje0NHs9Ya+mZgSNa8AsfcO/IuTnGXHCAJjCjyddRknMqfG?= =?us-ascii?Q?o1GQcdKkRTjMLBNcp04U46RAqwg8SQLyF/EiCGlcin7DL90FiNnlNSe5wyoL?= =?us-ascii?Q?pQCh7gxqSPLzkWDRdf1zwEpUgls4ZlS7LjEtfLHR2UflzLrc++7Xl9zMXbIr?= =?us-ascii?Q?yQ=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 145333be-e994-4d42-7b46-08db34ea0efb X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2023 08:53:28.2883 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: S1VysA1x/p2MbCP3k9h+m53BJEP6dFio4+ZxdOEcqy23iaRC8IT60r7BaQrgRdMkm7zPH9qGn6y+jbuthyGONecXPMTQcaNF4KYxnhbSUwU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB6704 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Apr 03, 2023 at 02:52:25PM -0700, Tyler Retzlaff wrote: > Inline assembly is not supported for msvc x64 instead use > _{Read,Write,ReadWrite}Barrier() intrinsics. > > Signed-off-by: Tyler Retzlaff > --- > lib/eal/include/generic/rte_atomic.h | 4 ++++ > lib/eal/x86/include/rte_atomic.h | 10 +++++++++- > 2 files changed, 13 insertions(+), 1 deletion(-) > > diff --git a/lib/eal/include/generic/rte_atomic.h b/lib/eal/include/generic/rte_atomic.h > index 234b268..e973184 100644 > --- a/lib/eal/include/generic/rte_atomic.h > +++ b/lib/eal/include/generic/rte_atomic.h > @@ -116,9 +116,13 @@ > * Guarantees that operation reordering does not occur at compile time > * for operations directly before and after the barrier. > */ > +#ifndef RTE_TOOLCHAIN_MSVC > #define rte_compiler_barrier() do { \ > asm volatile ("" : : : "memory"); \ > } while(0) > +#else > +#define rte_compiler_barrier() _ReadWriteBarrier() Does this actually add a full memory barrier? If so, that's really not what we want, and will slow things down.