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 6A306A034F; Tue, 11 Jan 2022 13:12:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3E864426EE; Tue, 11 Jan 2022 13:12:19 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id C7B40411AE for ; Tue, 11 Jan 2022 13:12:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1641903137; x=1673439137; h=message-id:date:from:to:cc:references:subject: in-reply-to:content-transfer-encoding:mime-version; bh=1fQO/rByWdr/B5f+upN2Adki4tkpQoYvg9ynbtYVILA=; b=QmpbanA8PDN9XCMsFFk287KlWyLrOaiLKMYpwsyT0U7x8bB6xy4ykikF AN3S2Xw+Zn+1CUC2Q4JPSsQNUJQW2fQKzXOTDipUROF1gQswxxFLOnWML 8ZhdOKJ4Ct9lyzzHEcg0VEZtvcJT0WMpVe5XWDm5KCQfJImqnBrTS8+CD gdcbGLv3WFxj7bdLf2/TKaF8L1bbTfE3ZKZHQB4VInIdbeGodArPawJgK 9JF+e3PDd2s25klPTGeAasEniFU/iNU8JKc7piT17tWt28kP3aAOs3IZC 6PwJ174Tsc+FwnRGtM5K8cyJP3uZxbV70TdDbTD+/HHVrWbZu2uFDhY9v A==; X-IronPort-AV: E=McAfee;i="6200,9189,10223"; a="306822529" X-IronPort-AV: E=Sophos;i="5.88,279,1635231600"; d="scan'208";a="306822529" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2022 04:12:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,279,1635231600"; d="scan'208";a="528286793" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga007.fm.intel.com with ESMTP; 11 Jan 2022 04:12:16 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) 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:12:16 -0800 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx611.amr.corp.intel.com (10.18.126.91) 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:12:15 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx609.amr.corp.intel.com (10.18.126.89) 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:12:15 -0800 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.43) 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:12:15 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b8DizEmtYlZd0nDPVbLXuHGD8z5Go3JeU5IoWeSahISoYJAR/8SXNyN5TWYIqhG6HXR+ax09q7Lghy13PZpHpJ4guKq7/ZdCSz9nS81kPqxFYIDBZQJH9q3KoGh6athU0u29ipSyHX6TArWnESRJkulayJBARjIkZDdqu8i4eE4hzFEDrJDud09NrhnWcf04SVNZAThsA4m4DugezJVNLHO2dNWBg3+LpjrzRr5zNwVsFSIwVO2uQp/4Y6iTDqXGxJKuJ5D2B3AwkTb1pJm5J23cY1bp1pVEFTq79ygPj5TEgkOs5EGVxGLV6lCpkjm8tPOeJUHoAhh5RVMd3zTf+Q== 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=9O4xY+AyXpP9XxGsoL34ULCjjDY74qyw7UFaxB2/MsU=; b=mWRIqTT62+bgYIgnZdFENFYNWZ6eS0g6vMXU0PJjlftJUt02bhOpm2LJ5YriR5f9KU1frol9uTMjrrfkqqx5aIyTV++vsRtyex36yOJu03lRMLpSQfKJdpR/XYhKwr5Xo+3oPOHIUVqESoOlyvdeUkXxPiwU2EQfBqzgpKdMpaRDoSTbwUNglVdfQaYwIaN+AznLQ24Gu6F/xddNXkLTtACuVkWKINzVdjAM9XbrKNSVK0BVSVwvrccEh8gOblW/uoM/wgw9zGqerAtIMv9jiyMsvUpmaWdBMnsuBS7p6Svh0dFt2XzwsNqmfVx6j66HdgbI+by9gRmoYxozL+uX9A== 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 PH7PR11MB5796.namprd11.prod.outlook.com (2603:10b6:510:13b::13) 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:12:14 +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:12:14 +0000 Message-ID: Date: Tue, 11 Jan 2022 12:12:05 +0000 Content-Language: en-US From: Ferruh Yigit To: Ashwin Sekhar T K , , "Honnappa Nagarahalli" , "Ruifeng Wang (Arm Technology China)" CC: , , , , , , , , References: <20211130054527.2696881-1-asekhar@marvell.com> <2f82681c-e615-8e3b-4548-58bcffc0ec8e@intel.com> Subject: Re: [PATCH] common/cnxk: use cas with release semantics for batch alloc X-User: ferruhy In-Reply-To: <2f82681c-e615-8e3b-4548-58bcffc0ec8e@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0440.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a9::13) 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: b0d9a286-6f28-48f1-febe-08d9d4fb9a4a X-MS-TrafficTypeDiagnostic: PH7PR11MB5796:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XjrewQW3xsdL6WLsbk+VzzCpRX4iq2SKbpti2QqnWgjXvnDARP1ye3Ax3K2OErwE68GdPxjm5/+BOgkzhKueYCi83aEUyDoFD6NL+v9F1movNApEk8FcMV5ZRqfsgRDyKvDj3danZD1Op7zTOnVKl5QbLnJWbsUtX/kGtfwO4vTx/OyLEIpVoEGNdU4yj+3NHZfc29B5JJYcFKNh0WTuih9klQjs2Wv5yfyup55A2BKEwkms0sKsh+kPa4pA/4uZTTm1ZXWe7peX82GIhaSIIYPK26mf6AGYdSUNRNnVwTHG0WQ3cuK89OThDjnWmVpZv+mpxf99902fDkon7kl8VssugcIM1zpASzl4pSprF/itKKZr8+pEOXQmOldaKu3+frSQ5twCc80egL6o6yO62OHEbJMVjkd62gQOaybp+UIurFGmUaSfeMkC2t7iB9vCC4iMNs04bj5mZaz9cxmBbzUlpnVQ4MjFuA+H+e916a/DZmjHWagi6h0198ukjJTuKo9vDaux+FayNQljsCOx+mX45T43GU4j1/cGguRhW9DluwGXKFPjM43zIvsZci87iXgwP1EdUgPykJfjVYU9Z0ewx7BsKLO78k+uP4/Askj67WfEZ4fOkx7tKf1j6x84BXKRrTwem6urqrcpHoP9Qx74jXwa2mkwNUL6+1RarhVcyGuhmL1j+24hoItG94H6YuXZN8flWuUYPdeO08vLjQ== 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)(110136005)(8676002)(316002)(53546011)(4326008)(8936002)(83380400001)(7416002)(82960400001)(31686004)(5660300002)(66556008)(86362001)(6666004)(38100700002)(66946007)(6506007)(2616005)(26005)(186003)(508600001)(31696002)(2906002)(36756003)(66476007)(6486002)(44832011)(6512007)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TFRUZGh0bnZzQlBjSUZhQ1ZSbWZKTjdrakIvZFFYNmFkSUpxbGF6ek82aitP?= =?utf-8?B?TjRGRkNhd2lwL09ROGxZTjVPdDE3VVJSMFlrdW1TWTZkUWxYNFNrWWsvRG40?= =?utf-8?B?QUNPQ2JIZFdDOW16cDdlSWFYYkN2Nkp3TUZVbjlVSW5leFFTRmgwME01VUh0?= =?utf-8?B?OUhxZGRnQnY4dStuVllzRVlOOWJoSFlQRXlKMnZaRHJGakNBUnFMVWtydDlK?= =?utf-8?B?c082Z2dFZitBY2tGSkNabW00UkVoM1FWTGNhODFGUWJaaFdGelozTGpDd09O?= =?utf-8?B?ZVhpS0w1T2JacStadHNjdUVXSU1XWjZXcUdBRmRweHBiVmYzZ2dBNVB1Skt3?= =?utf-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TmVONjU0b0dLY2dzUlVWQjdCQ1RUaVd6ZVZ2NDcv?= =?utf-8?Q?zaqNJ+Q0N7eFutSTZNWxJb0=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: b0d9a286-6f28-48f1-febe-08d9d4fb9a4a 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:12:14.2309 (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: XDEWKeddDlqChHG196AWbMLeIQzo67voU9rdiVRO6S2wMSWgF+sUMJVNqxb8iPdijNk3ZhLc49qGI2O9a+tVhg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB5796 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 1/11/2022 12:08 PM, Ferruh Yigit wrote: > 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'? + Honnappa & Ruifeng, Isn't this API Arm wide, instead of being cnxk specific? Does it make sense to make this API for arm and cnxk use from there?