From: Bruce Richardson <bruce.richardson@intel.com>
To: Andre Muezerie <andremue@linux.microsoft.com>
Cc: David Marchand <david.marchand@redhat.com>,
Vladimir Medvedkin <vladimir.medvedkin@intel.com>, <dev@dpdk.org>
Subject: Re: [PATCH] lib/lpm: use standard atomic_store_explicit
Date: Wed, 4 Dec 2024 16:52:43 +0000 [thread overview]
Message-ID: <Z1CI274icvn84qKi@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20241204162019.GA28551@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
On Wed, Dec 04, 2024 at 08:20:19AM -0800, Andre Muezerie wrote:
> 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
> > <andremue@linux.microsoft.com> 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 <andremue@linux.microsoft.com>
> >
> > 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 was a bit curious about this dependency chain and decided to investigate
a bit. The "weak link" in this chain appears to me to be the link between
the hash library and the net library. Within the hash library, I believe
only the thash functionality depends on net, for definitions of the ipv6
headers and address fields.
If we want to break that dependency (temporarily, since net is pretty much
an essential DPDK lib), the following patch should work.
Regards,
/Bruce
diff --git a/lib/hash/meson.build b/lib/hash/meson.build
index e6cb1ebe3b..f9096edd67 100644
--- a/lib/hash/meson.build
+++ b/lib/hash/meson.build
@@ -6,24 +6,34 @@ headers = files(
'rte_hash_crc.h',
'rte_hash.h',
'rte_jhash.h',
- 'rte_thash.h',
- 'rte_thash_gfni.h',
)
indirect_headers += files(
'rte_crc_arm64.h',
'rte_crc_generic.h',
'rte_crc_sw.h',
'rte_crc_x86.h',
- 'rte_thash_x86_gfni.h',
)
sources = files(
'rte_cuckoo_hash.c',
'rte_hash_crc.c',
'rte_fbk_hash.c',
+)
+
+deps = ['rcu']
+
+if dpdk_conf.has('RTE_LIB_NET')
+ headers += files(
+ 'rte_thash.h',
+ 'rte_thash_gfni.h',
+ )
+ indirect_headers += files(
+ 'rte_thash_x86_gfni.h',
+ )
+ sources += files(
'rte_thash.c',
'rte_thash_gfni.c',
'rte_thash_gf2_poly_math.c',
-)
-
-deps = ['net', 'rcu']
+ )
+ deps += ['net']
+endif
next prev parent reply other threads:[~2024-12-04 16:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 2:20 [PATCH] lib/lpm: use standard atomic_store_explicit Andre Muezerie
2024-12-04 7:56 ` David Marchand
2024-12-04 16:20 ` Andre Muezerie
2024-12-04 16:52 ` Bruce Richardson [this message]
2024-12-04 19:09 ` Andre Muezerie
2025-05-16 17:36 ` [PATCH v2 0/2] enable lpm to be compiled with MSVC Andre Muezerie
2025-05-16 17:36 ` [PATCH v2 1/2] lib/lpm: use standard atomic_store_explicit Andre Muezerie
2025-05-16 17:36 ` [PATCH v2 2/2] lib/lpm: enable lpm to be compiled with MSVC Andre Muezerie
2025-06-03 14:32 ` [PATCH v2 0/2] " David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z1CI274icvn84qKi@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=andremue@linux.microsoft.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=vladimir.medvedkin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.