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 34E1843D47; Mon, 25 Mar 2024 17:41:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D0129402AF; Mon, 25 Mar 2024 17:41:26 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 95ADF402AF for ; Mon, 25 Mar 2024 17:41:25 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id D066C20B74C0; Mon, 25 Mar 2024 09:41:24 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D066C20B74C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1711384884; bh=xgtO5Mzw7785HmZK1LNLbns3orHf7TMoHAkhAgs09So=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GhrZIvgEK7emvj5bzI1AZ1kkicZ6HEUGLBhVncxKY7TTAWavMvJsOLWpXPyc6fx/7 pj97/79V2HdbadMcvoCJswHf2jBleJMq3H53LYdSR9Lej6btfigxzcyr9N36RO3egP OvgOMhgU6/LASrZsBffcyTIeAZ+YuB9vCZXoNBd4= Date: Mon, 25 Mar 2024 09:41:24 -0700 From: Tyler Retzlaff To: Long Li Cc: "dev@dpdk.org" , Mattias =?iso-8859-1?Q?R=F6nnblom?= , Morten =?iso-8859-1?Q?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 , Ziyang Xuan Subject: Re: [PATCH v2 38/45] bus/vmbus: use rte stdatomic API Message-ID: <20240325164124.GA9035@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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 Fri, Mar 22, 2024 at 07:34:46PM +0000, Long Li wrote: > > 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)? > > Seems not necessary. looks like a mistake, i will review and make clear in next revision. thanks for spotting it. > > > unsigned int trigger_index; > > > > trigger_index = monitor_id / HV_MON_TRIG_LEN; > > monitor_mask = 1u << (monitor_id % HV_MON_TRIG_LEN); > > > > - monitor_addr = &channel->monitor_page->trigs[trigger_index].pending; > > + monitor_addr = > > + (uint32_t __rte_atomic > > +*)&channel->monitor_page->trigs[trigger_index].pending; > > vmbus_sync_set_bit(monitor_addr, monitor_mask); } > > > > -- > > 1.8.3.1