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 ED576A034F; Tue, 11 Jan 2022 13:09:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7C20C426EA; Tue, 11 Jan 2022 13:09:00 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id B3A49411AE for ; Tue, 11 Jan 2022 13:08:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1641902938; x=1673438938; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=6anvC1GSCK1o9nnPMjUAMHDm5JL4Cvwv3TiNzrwpkWo=; b=Lpum03/RTr19Mic66aO2+iXvGdrKyf40UKcnWP1XJZ0kyZXro66YSKuk wsGCuZzjVc4NRV25r4SY24sLwOEMbl+uUdJmpXSrGtz6jQBfNGDv60mNw FPxlMaH4KL20vMzhJ6QvsmuBSzHkAYZe5GOkXS4RB19cjzT1UYvb9cFQJ 2BUPFpriiGWz04M6N1L/1IADvY65t1WID8S4wfYkzsJyylGWBAhMlOC+F uK8HOKT/vy5skvEXQQiXTgQ9GnWil/zYrjw4OFTAMq1vZ0zypUcfhIUiL vi1iOj59M4LxTKOxf32y6tolEjkircmPa0baMkjKpe5uiGzQzTs4Bu0B5 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10223"; a="267807965" X-IronPort-AV: E=Sophos;i="5.88,279,1635231600"; d="scan'208";a="267807965" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2022 04:08:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,279,1635231600"; d="scan'208";a="619807579" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga002.fm.intel.com with ESMTP; 11 Jan 2022 04:08:57 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 11 Jan 2022 04:08:57 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Tue, 11 Jan 2022 04:08:57 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.108) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Tue, 11 Jan 2022 04:08:57 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JhZjbvRpCCRL66yAgeIadOyOPrAOdwaeigOXCLVqHey79SEx+WJnNu4Um9uUISmPNFmUU6cIcCParjRz+tvI9dQC5SPemnI82ZX8qnufOXgn86UlFJu+2HyECHjB4toRK/IeerY7O2tmhDtCvrqBEZbSboioqFhZbYLYIHgNJoymqKrg/9cLD0Fz6ey5udJxyyWZC02I4aFaoH21xMqM283DJeAwe5legN4djbVNP9E8WHz2NXcaH0LsL8NbUTnKSW3CUhfs8tZGC+Ofhapi7NH+wdPjJWiWvvZZzY/oXBiKsdqdVL1SKtipVWnaG4NiHZkjHefc/+BkehZoRCl8cQ== 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=5T0Z4N3gmpIDfqHDK0RdvzXu+ml/xCHHqu+CjqdjSHo=; b=FZENjSDNrF15ehlthjMHAg72vtmWY2oO/DNapAHdMBVbKSBHIT4LfhK16kqmUKRi38psvb4ZtSAXiNGrtKp5nnR9lhbj6Yf5+GmZIcUjpYarRtwkT0/Fj+N10BSRR1eX+bxt++w9xJqtf9EAUjzYDwSTIwp0NzAAdESny2EPh4myZOACdNFjJUVxnFWPcHHiFeWaOXrd1a8fPEev8DgebRlTU3CgETCUJ6oEhBIF1z3UAJxGSCuedUiPYbqepnTzAsKC6ltDaPNPzQ4JalUgT5EPzAH6HY7XTJY3Yw766HCO7+eP85N4c7op6CH+sgrw1xXk2UI98vtanC1LOn1GzQ== 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 PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH7PR11MB5793.namprd11.prod.outlook.com (2603:10b6:510:13a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.11; Tue, 11 Jan 2022 12:08:56 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e%7]) with mapi id 15.20.4867.012; Tue, 11 Jan 2022 12:08:54 +0000 Message-ID: <2f82681c-e615-8e3b-4548-58bcffc0ec8e@intel.com> Date: Tue, 11 Jan 2022 12:08:46 +0000 Content-Language: en-US To: Ashwin Sekhar T K , CC: , , , , , , , , References: <20211130054527.2696881-1-asekhar@marvell.com> From: Ferruh Yigit Subject: Re: [PATCH] common/cnxk: use cas with release semantics for batch alloc X-User: ferruhy In-Reply-To: <20211130054527.2696881-1-asekhar@marvell.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0443.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a9::16) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9d24ff37-ed9a-4f83-3c5b-08d9d4fb2354 X-MS-TrafficTypeDiagnostic: PH7PR11MB5793:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:580; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SVxEGzrGl3+bGRv7I2vX6uPgQmQrg+FQgpE4tVt4yPnUyFdnP8SxJZX6+Fid52SAtrrnJwwV0kmk12CyRUxXzWD8tEhX72kKLGUgCsC5n05jSZmZWpGVn+ZaE/a8RdGhP87N1RlArbnZJY5o6LDlQdjRlnUqe+sk4jNEaNouSv3WAQbY+jRm0oAfdE2NVVIY76uWwV4aSfN4b8JsghSapiyaf2yXW2QzB9ZYeS4sdhXLqPw5RyjAhlfL1OtsUWLrrvpB4I1Rkm09r5mbDBK59tasab1di13HgPdmPyfgVPyhRHs6ZFOTFXjOvTBTcAYVZBDmaPdPKggpDQvZHCe3CkOhplRkIuHZBjhrhG8UIhGdN46kJfUYg8nG8YlfWZdrZ9zTMj4GkSPm4QCr7L5dOzksGkpnMcSK6adtzhDjcaWc/qAsGmRwGBCIdS5MGDHpPWZAz6bgMrz/flV1eYmhv+7vOyTkACbVoPPJ4nJEvIyIbgNuLpXELWhuT2zBUo+QNlN4mUSPbxArxqRo6GYMMKXPsHvKSiOem8iXr42CHAHQLB2H2MObgwl5y+XgDGpWzvwm10cNjqlSNOCZVBO6OZLNY4WBHLH+oxi2tbgs2V5M9LaBMZT2uNNjT0i7LYkcQHkrhmRwLd+em9fk82yrc2JPWZgMy2LfF6T8JI+rtRDbOszWNwIuAYut0PiFb4J115wH8aH2tF4RECAAR4BloA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(44832011)(31686004)(36756003)(2616005)(38100700002)(6512007)(8936002)(8676002)(53546011)(83380400001)(82960400001)(86362001)(316002)(66556008)(66946007)(31696002)(2906002)(66476007)(26005)(7416002)(6666004)(6506007)(6486002)(508600001)(186003)(4326008)(5660300002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?N29RekxuMFNsQVdyRkl1clZvalZKT1dzUWxaQUFXZlNaS1VxajgzMmEwRjNv?= =?utf-8?B?Y0ltanpJWHE1V09qellIRmZhQlFtWlpOOWdTWjloY01rVy9JK2UzMHJTWU1H?= =?utf-8?B?bno2T3JoK212UkVUTHk3RU92Z21ERWQ5NzRQdnpxZUpjSGgwZVJGcXdyK0pW?= =?utf-8?B?aGxCRTRNUnB0eUVtR052Q0J6Y0lnWlU2UTFueDFvUXVPTGxBYUJreEk0WmVi?= =?utf-8?B?VkZqQ1B6aWR6azl0MTJxMFRlOHNlNWxkNkIxbzk2TlBUNmZlN1ZTUDdIUGNP?= =?utf-8?B?VTBwV2xPMHg2R01IQTRrQytycFhWUTFidVcwT3FKT1puYkluRU9PcTFXQnFB?= =?utf-8?B?VWxVRGNQTlVjTStxYU9yWW1oSXQ4ZFJUZlBNTFIzZmFYMkZMRjFMeTBuMWZJ?= =?utf-8?B?NVdNUDRhSHlEbnFmN1ZYZWorRXdVQko2SklmUTZWcStrZiszU1ZBRHlmYkRo?= =?utf-8?B?WSt4NUw1RWdCYWVNK3RhU09Ob3k1WjZXSDlY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93WXpMZzVDYVRnVkdKMERLSXNzbjJidjJBYy9mN05WRUNWZXZKRncx?= =?utf-8?B?UGp3SVdQaTduU3JUd0hLdCtrTHlHY3orS3B0d2VRMzJ6T1dPMC9RYnVLZm4r?= =?utf-8?B?UXJjeHoxSXdkRGVLSmRUZW5NZE5ESG96WFU5b0xnUVQwODNSbTBsSENtK2ph?= =?utf-8?B?cVBPbHloaDczZitxMjBUbVZ4V2RyUnIwRy9hTlZsSGJBbEZ4Ym9OcjF1RjlS?= =?utf-8?B?MVova0ZYTFRseGZYY2F0aklvVk9nQ3hoUitYeXA5RkExaXN0Qk96cmJYMnkx?= =?utf-8?B?RjYyUUpTWmxXdTh5UHdLWXRkeWlxaHM3UUhMWG5YcEorUmMrYSt1S1hrWmg2?= =?utf-8?B?TEtpdCs4L2kremVTc3VPZk92aGUwZ2ZWQWdFeVcyZTRTdWZKSW1NVmdqNWpS?= =?utf-8?B?ckVxeUViSi9sRHpkVnJPcjVNVm0yZEpZcFVrT2QzUzAzZWN5QnkwdjI5Z000?= =?utf-8?B?SEVaa3o0dXIzSk93RTc1OHRtMllzOTBGNmFFdnFJMU1sMm9KL1NTSUZyRVRx?= =?utf-8?B?VmMveE1rbU5BN3M2S1VPNDFnZVJNcHR2TEl1NDJkYlJlVUk5RUlyaVJXNHI5?= =?utf-8?B?Y25lNUZaWnd2UG9rVUVoT01tSE5ybWZGbFRzOFBsdFhvUWxiNCtxNjlFNVFr?= =?utf-8?B?cVE2ZW9PSGFiNVJhL2xtMlc4N3A5Vi9rYzRLYy8xYzRIbU8yZ2hhVmpHT2J2?= =?utf-8?B?dTlUdDMxTnd1aDJidFdYTjQzOFBKS3pIUHliODZiTUFyd1dkS01GTGRzSlhp?= =?utf-8?Q?3pwERW2GUs34FBp33mpFUmE=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 9d24ff37-ed9a-4f83-3c5b-08d9d4fb2354 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2022 12:08:54.7363 (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: XrXnFl9ObKdtXhUMy1HI9j/9ckhCHOI+FnYaXz6J2dLZaN1cgkN1FeEa1A0Xa6oDs3HmwDA7SD+dtKbCxPsz9g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB5793 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 11/30/2021 5:45 AM, Ashwin Sekhar T K wrote: > Before issuing the batch alloc, we clear the first word of > cache lines so that NPA can update the status. Make sure that > this line clear is flushed before the batch alloc is issued. > > Signed-off-by: Ashwin Sekhar T K > --- > drivers/common/cnxk/roc_io.h | 12 ++++++++++++ > drivers/common/cnxk/roc_io_generic.h | 9 +++++++++ > drivers/common/cnxk/roc_npa.h | 2 +- > 3 files changed, 22 insertions(+), 1 deletion(-) > > diff --git a/drivers/common/cnxk/roc_io.h b/drivers/common/cnxk/roc_io.h > index fe5f7f46d0..4f15503c29 100644 > --- a/drivers/common/cnxk/roc_io.h > +++ b/drivers/common/cnxk/roc_io.h > @@ -78,6 +78,18 @@ roc_atomic64_cas(uint64_t compare, uint64_t swap, int64_t *ptr) > return compare; > } > > +static __plt_always_inline uint64_t > +roc_atomic64_casl(uint64_t compare, uint64_t swap, int64_t *ptr) > +{ > + asm volatile(PLT_CPU_FEATURE_PREAMBLE > + "casl %[compare], %[swap], [%[ptr]]\n" > + : [compare] "+r"(compare) > + : [swap] "r"(swap), [ptr] "r"(ptr) > + : "memory"); > + out of curiosity, what is the "cas with release semantics"? briefly, what is the difference between 'cas' and 'casl'?