All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Muezerie <andremue@linux.microsoft.com>
To: andremue@linux.microsoft.com
Cc: dev@dpdk.org, david.marchand@redhat.com
Subject: [PATCH v2 0/2] enable build of lib/stack when using MSVC
Date: Tue, 28 Jan 2025 13:16:52 -0800	[thread overview]
Message-ID: <1738099014-16629-1-git-send-email-andremue@linux.microsoft.com> (raw)
In-Reply-To: <1733848355-19048-1-git-send-email-andremue@linux.microsoft.com>

MSVC does not support inline assembly, which is used by the
implementation of rte_atomic128_cmp_exchange and is needed
by the C11 flavor of lib/stack.

A special implementation of rte_atomic128_cmp_exchange
compatible with MSVC is added to rte_stack_lf_c11.h. It uses an
intrinsic function when using MSVC, and inline assembly when other
compilers are used.

Existing atomic tests (which are not C11 compatible) are
now skipped when using MSVC.

v2:
 * Added MSVC compatible implementation of rte_atomic128_cmp_exchange
 * Skipped non-C11 atomic tests when using MSVC

Andre Muezerie (2):
  test: disable non-C11 atomic tests for MSVC
  stack: enable build with MSVC

 app/test/test_atomic.c       |  2 ++
 lib/stack/meson.build        |  6 ----
 lib/stack/rte_stack_lf_c11.h | 62 ++++++++++++++++++++++++++++++++++--
 3 files changed, 62 insertions(+), 8 deletions(-)

--
2.47.2.vfs.0.1


  parent reply	other threads:[~2025-01-28 21:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-10 16:32 [PATCH 0/3] enable build of lib/stack when using MSVC Andre Muezerie
2024-12-10 16:32 ` [PATCH 1/3] lib/eal: add rte_atomic128_cmp_exchange compatible with MSVC Andre Muezerie
2025-01-24 14:27   ` David Marchand
2025-01-28 21:25     ` Andre Muezerie
2024-12-10 16:32 ` [PATCH 2/3] app/test: add basic test for rte_atomic128_cmp_exchange Andre Muezerie
2024-12-10 16:32 ` [PATCH 3/3] lib/stack: enable build with MSVC Andre Muezerie
2025-01-28 21:16 ` Andre Muezerie [this message]
2025-01-28 21:16   ` [PATCH v2 1/2] test: disable non-C11 atomic tests for MSVC Andre Muezerie
2025-01-28 21:16   ` [PATCH v2 2/2] stack: enable build with MSVC Andre Muezerie
2025-02-04  1:58 ` [PATCH v3 0/2] enable build of lib/stack when using MSVC Andre Muezerie
2025-02-04  1:58   ` [PATCH v3 1/2] test: disable non-C11 atomic tests for MSVC Andre Muezerie
2025-02-04  1:58   ` [PATCH v3 2/2] stack: enable build with MSVC Andre Muezerie
2025-02-04 10:30     ` Bruce Richardson
2025-02-04 15:25       ` Andre Muezerie
2025-02-04 17:42     ` Patrick Robb
2025-03-06 13:26   ` [PATCH v3 0/2] enable build of lib/stack when using MSVC 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=1738099014-16629-1-git-send-email-andremue@linux.microsoft.com \
    --to=andremue@linux.microsoft.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    /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.