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 00F6843D25; Fri, 22 Mar 2024 20:35:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E037E402A7; Fri, 22 Mar 2024 20:35:01 +0100 (CET) Received: from CO1PR03CU002.outbound.protection.outlook.com (mail-westus2azon11024031.outbound.protection.outlook.com [52.101.46.31]) by mails.dpdk.org (Postfix) with ESMTP id D86B640284 for ; Fri, 22 Mar 2024 20:35:00 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Oo3znhBGSTNapKHDtCMThqJzM96OgCJSu4mxf1lqrXAHCX7y7ZbEOedoEgusUnJMe7NcU6ARI5HySwkMAUynHI0OzVS21eRtNjfSDLhCaPyGubS08fLJg8CUPD/OyYpHi7FvuWSsP08dvQE08fa3JtRFYYKk3FLBC3TswyulVhP1GHtaqumS7Jh3aiNILoK5cdn217DWZsHr6lQn2wkS/5D/k6680bbQ9DQlhHiL7C850oNJuG4iy7LCG8DPbnJ1/+XGIuTfxWrce2k6sarL22bTq8HhIz9ImuGpFMdWsNzPtg5/PqKMRjMORzHDx7eXIvGIxluSqlRa8SGguXsxCg== 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=oEqfRAUSQ5xdhGbpvGDdSCaJE4uulO81/fVJxFketGQ=; b=ROoeyGNyN6jpMocmmoA3bYOCQM7dcpiF+4KvfdaiaL8I1spnh4ol637F8WMOfqjsYY3R+DZNhh0vPDmhop1ItZRBMgcf/XFHyjIipRLZMHfEKcRRHikJdEyXi3q1M0glKX2xMzFX/MxA70RuOcdlJEJXZSOII8wLXA9tFY8L06uFmwnbSh7GuRvSff17I5kHxbw6IuKVDgZWv1udv/VMqk+hd+TikryIRORmnLbH+64E6IRPVpnOByVwnWbgLpx2gnLAq7xJ0St9XwLm9aSP85gNVj6MSCJA4Fi9c7Hpm9h8pQ8Iy9Nm7Jeu2OmKLMqy7ZJ2LRnGSWPRrNwlxiXyHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oEqfRAUSQ5xdhGbpvGDdSCaJE4uulO81/fVJxFketGQ=; b=dfdPBpHXIcMGjFq6GWcDGSkw52bLpG4kd0tfrcbaxOB1cSOGXrEaIvn0dIno3oeciwbSjvFQ4qW7Qw+k18GlqFwvTFNWz7hjMDh5JNH2B5+br2Hfpxx69TNZ+PK2uZy66GE9B4n5xzDhQDPDUWVV5Pae25VPqi9KvylU49TY/sA= Received: from SJ1PR21MB3457.namprd21.prod.outlook.com (2603:10b6:a03:453::5) by IA1PR21MB3739.namprd21.prod.outlook.com (2603:10b6:208:3e0::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.15; Fri, 22 Mar 2024 19:34:53 +0000 Received: from SJ1PR21MB3457.namprd21.prod.outlook.com ([fe80::70f:687e:92e6:45b7]) by SJ1PR21MB3457.namprd21.prod.outlook.com ([fe80::70f:687e:92e6:45b7%4]) with mapi id 15.20.7430.013; Fri, 22 Mar 2024 19:34:46 +0000 From: Long Li To: Tyler Retzlaff , "dev@dpdk.org" CC: =?iso-8859-1?Q?Mattias_R=F6nnblom?= , =?iso-8859-1?Q?Morten_Br=F8rup?= , Abdullah Sevincer , Ajit Khaparde , Alok Prasad , Anatoly Burakov , Andrew Rybchenko , Anoob Joseph , Bruce Richardson , Byron Marohn , Chenbo Xia , Chengwen Feng , Ciara Loftus , Ciara Power , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Erik Gabriel Carrillo , Guoyang Zhou , Harman Kalra , Harry van Haaren , Honnappa Nagarahalli , Jakub Grajciar , Jerin Jacob , Jeroen de Borst , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , Joshua Washington , Joyce Kong , Junfeng Guo , Kevin Laatz , Konstantin Ananyev , Liang Ma , Maciej Czekaj , Matan Azrad , Maxime Coquelin , Nicolas Chautru , Ori Kam , Pavan Nikhilesh , Peter Mccarthy , Rahul Lakkireddy , Reshma Pattan , Rosen Xu , Ruifeng Wang , Rushil Gupta , Sameh Gobriel , Sivaprasad Tummala , Somnath Kotur , stephen , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Tetsuya Mukawa , Vamsi Attunuru , Slava Ovsiienko , Vladimir Medvedkin , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Yuying Zhang , Ziyang Xuan Subject: RE: [PATCH v2 38/45] bus/vmbus: use rte stdatomic API Thread-Topic: [PATCH v2 38/45] bus/vmbus: use rte stdatomic API Thread-Index: AQHae8R3MKoDKzEXH0+JTMW/GUGoZbFEJ93w Date: Fri, 22 Mar 2024 19:34:46 +0000 Message-ID: References: <1710967892-7046-1-git-send-email-roretzla@linux.microsoft.com> <1711048652-7512-1-git-send-email-roretzla@linux.microsoft.com> <1711048652-7512-39-git-send-email-roretzla@linux.microsoft.com> In-Reply-To: <1711048652-7512-39-git-send-email-roretzla@linux.microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=fce87f82-4b8e-42b5-8bb0-cb5748fa770a; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2024-03-22T19:32:38Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ1PR21MB3457:EE_|IA1PR21MB3739:EE_ x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: at2NoSAbqontnXZ9HKwSZUZLIHgacytdqDxGh9J4XTS3sOpNP7R2He8+YGF7QMM3b00+8mFtFGyaAe/dgfYdI3M+CWLUo7BDZRIeXIUyku/6cftpTMY6vCXiD6rFUuTW0omqpDcEGeDdcJK6FmTLiDC35l4FLxEIQzRlQcvJ2ofUsv4f9wMRBspn9wiLKb327zgSboHtBnIEkIWJgwtZFyAqtgXYi5x7s5n0Zphw4VUbHL2RsFEdCGdQxpSwCGBo2dxsQSS4T2UHjK5kjgVyu7M8tcoT8Ui/0GVM20UmmM28eB+0uy4mrfSMJs90ReKuAw3YcZKcsnNWJ2uex5SDdAp1YrUea1ISMuJsKuf1sIyNRnvvwh64rK2ieKI9rvNELkWSspRxiu/DBgTW2gvldAa8boasoBZFxkMrGNiRYRixwLrVMumQdvbJhOP1ruEt96HbmXK8tCHCWslDn0fEllRR70tGKY+f0mpbTv63HlEwfr6by66umWfIG4EXk9q5r70BGkWtiuTdYPcnOP5xx4AkTp9XiWLTiGDSz8nYeoJmw4WXFpI3jZqxNsI9+PTae6Gj3WtdVwg6oAyOZgzNKoEATA8mKJwY2ZG/BWwciANXAQuL51fjRdiUsI/ST66qnhWtxhlm1NL3EvvQbqMWC3TpkJgCWXRlBxTaWDlidhw= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ1PR21MB3457.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(7416005)(1800799015)(376005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?clgdNtGaeIpSNzD3kXQQ02H6++2JynsvLTKQc9ZQCyjVvqGQRN9xXTvbCA?= =?iso-8859-1?Q?L78yTHLrcEALgKPa/f4NcHi5sB1GwCI3P72qKjz72n3GYJNXFJby8P4aPG?= =?iso-8859-1?Q?0vGklJsttm+u2KvgYGKAWciboKEBTsXTE6/pOyDV6HXM1bIB4jbtq74Wrg?= =?iso-8859-1?Q?lJk3m/vOGfou/AGr60GOjLm6G5TRjSR1z0NQ9Doeff5o01g7T8tnjZRpw8?= =?iso-8859-1?Q?In3rG7qqOifPiM9TvmppRWH1sZAqe+S5rc5pZFUI8ehoyoWrvulg1MMetb?= =?iso-8859-1?Q?S/0dYi8i04eOskZf2GzWOo7a06eFRJ6KlChWHyh2Q03iXLQqHDssnva4rY?= =?iso-8859-1?Q?cHkI2jFCgaF1/BaMzyNGzzgm83pO9WR+RreuHUlLtrvgA2XOYYH7/Q7R0/?= =?iso-8859-1?Q?5d34mpqSrfjE0En13MaucADmOSybwERt0QoNBlDLdfAp4cZyb3STlawE1v?= =?iso-8859-1?Q?93EQZFfe0Dguv2sDIAiIESH8l8CHGiQ0loU0Q7UayqHg3uYMdz7oAx30kd?= =?iso-8859-1?Q?s9q7Xi5742DUkft8+h7C+EMjbFcSvGHy7V1oNnxWskLHfd+LHi/bwLmd1p?= =?iso-8859-1?Q?g2SvWjxBfVNDr0uPYO9Q63f3nsur1kOya3pUOVIuS3dWcxflhbdnsUpk9w?= =?iso-8859-1?Q?NDTBEqf6bfwI8bzBvWtEb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?= =?iso-8859-1?Q?kHmgDblsQEyvs5KhdQQiUmnR1DN7z1olZsRyOHTpqDbtvHMJZ9yaVakdpU?= =?iso-8859-1?Q?q9OHz1jkJ+fr8iRtPDRNW3EDRO6esl7M3p?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ1PR21MB3457.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1e93676b-953e-4ada-7ad7-08dc4aa7216f X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Mar 2024 19:34:46.0557 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: F3CRJ1bTpei67rkasfL9lwVz1O44VIOdtCSBMmLLKgO9FHhNELw+0RvdLDTYcH53KPNTQmSqNxYstsZoHZzbOw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR21MB3739 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 > static inline void > vmbus_set_monitor(const struct vmbus_channel *channel, uint32_t monitor_= id) > { > - uint32_t *monitor_addr, monitor_mask; > + RTE_ATOMIC(uint32_t) *monitor_addr, monitor_mask; Does this mean monitor_mask will also change to RTE_ATOMIC(uint32_t)?=20 Seems not necessary. > unsigned int trigger_index; >=20 > trigger_index =3D monitor_id / HV_MON_TRIG_LEN; > monitor_mask =3D 1u << (monitor_id % HV_MON_TRIG_LEN); >=20 > - monitor_addr =3D &channel->monitor_page->trigs[trigger_index].pending; > + monitor_addr =3D > + (uint32_t __rte_atomic > +*)&channel->monitor_page->trigs[trigger_index].pending; > vmbus_sync_set_bit(monitor_addr, monitor_mask); } >=20 > -- > 1.8.3.1