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 0AB1C45E30; Wed, 4 Dec 2024 17:20:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9FAC440A6D; Wed, 4 Dec 2024 17:20:20 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id D315D402EF for ; Wed, 4 Dec 2024 17:20:19 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 2BD8D20BCAF0; Wed, 4 Dec 2024 08:20:19 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2BD8D20BCAF0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733329219; bh=D2BVU8U51WVQQyPrOCPkrXKaWR+TgJOVMkkEuh12BNc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=psLTfVglaaij4XxaAuloRBeYFinh+29nJJR8SHOv699B4jP5TAgnKXcxFjXhDGd7x v3TlEQ66gI3J6gLXTMlg2yHpkFWyn2AQCyE+JBCduEWVt5EghuWxEXASKm01k85Ms2 1vl7O5b+9oS1pt/TRTV6k2a0aryKLyvc97R0xYMk= Date: Wed, 4 Dec 2024 08:20:19 -0800 From: Andre Muezerie To: David Marchand Cc: Bruce Richardson , Vladimir Medvedkin , dev@dpdk.org Subject: Re: [PATCH] lib/lpm: use standard atomic_store_explicit Message-ID: <20241204162019.GA28551@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1733278801-19296-1-git-send-email-andremue@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 Wed, Dec 04, 2024 at 08:56:35AM +0100, David Marchand wrote: > Hello Andre, > > On Wed, Dec 4, 2024 at 3:20 AM Andre Muezerie > wrote: > > > > MSVC issues the warning below: > > > > ../lib/lpm/rte_lpm.c(297): warning C4013 > > '__atomic_store' undefined; assuming extern returning int > > ../lib/lpm/rte_lpm.c(298): error C2065: > > '__ATOMIC_RELAXED': undeclared identifier > > > > The fix is to use standard atomic_store_explicit() instead of > > gcc specific __atomic_store(). > > atomic_store_explicit() was already being used in other parts > > of DPDK and is compatible > > with many compilers, including MSVC. > > > > Signed-off-by: Andre Muezerie > > With this change, is there anything remaining that blocks this library > compilation with MSVC? > If not, please update meson.build so that CI can test lpm compilation > with MSVC on this patch (and that will detect regressions once > merged). > > > -- > David Marchand Hi David, I'm eager to enable lpm to be compiled with MSVC. Even though this was the last issue I observed for this lib on my machine, lpm depends on hash, which depends on net, which depends on mbuf and mbuf is not enabled for MSVC yet. I have several fixes affecting these pending review and would prefer to not depend on lpm's dependencies for the system to start compiling this code in case some critical fix gets completed later. I have not analyzed all sequences in which patches can be completed, and it's quite possible that some sequences would result in MSVC compilation failures if the libs were enabled in meson.build. However, this code would still get compiled on Linux as usual, and hopefully we can enable all these libs once the patches get completed. I am aware that regressions can happen before that point. We will address them if that happens. It is tricky to handle so many paches/dependencies. Let me know if there's something that can be improved. Andre