DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andre Muezerie <andremue@linux.microsoft.com>
To: andremue@linux.microsoft.com
Cc: dev@dpdk.org
Subject: [PATCH v4 0/3] enable drivers to be compiled with MSVC
Date: Mon, 21 Jul 2025 08:24:41 -0700	[thread overview]
Message-ID: <1753111484-27021-1-git-send-email-andremue@linux.microsoft.com> (raw)
In-Reply-To: <1735243903-26857-1-git-send-email-andremue@linux.microsoft.com>

This patchset solves the last issues preventing drivers from being
compiled with MSVC (array range initialization) and enables the
drivers to be built with it.

Array range initialization is non-standard and is not provided by
all compilers. MSVC does not implement it and ends up emitting
errors like the one below:

drivers/net/r8169/r8169_phy.c(380):
    error C2143: syntax error: missing ':' before '...'
case CFG_METHOD_48 ... CFG_METHOD_57:

The fix is to explicitly initialize each element in the range.

v4:
- Add explicit casts to avoid warnings in mlx5 driver
(https://bugs.dpdk.org/show_bug.cgi?id=1758).
- Add cast to drivers\net\mlx5\mlx5_rx.c to avoid warnings
about signed/unsigned comparison.

v3:
- Add a patch to enable drivers to be compiled with MSVC.

v2:
- Rebase on top of latest main.

Andre Muezerie (3):
  app/test: remove use of non-standard array range initialization
  drivers/net: remove use of non-standard array range initialization
  drivers: enable drivers to be compiled with MSVC

 app/test/test_cryptodev_zuc_test_vectors.h | 156 ++++++++++++++++++++-
 drivers/common/mlx5/mlx5_malloc.h          |   4 +-
 drivers/meson.build                        |   4 -
 drivers/net/mlx5/mlx5_flow_dv.c            |   5 +-
 drivers/net/mlx5/mlx5_rx.c                 |   4 +-
 drivers/net/mlx5/mlx5_utils.c              |   4 +-
 drivers/net/octeon_ep/otx_ep_mbox.c        |  24 +++-
 7 files changed, 183 insertions(+), 18 deletions(-)

--
2.50.1.vfs.0.0


  parent reply	other threads:[~2025-07-21 15:24 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-26 20:11 [PATCH 0/2] remove use of non-standard array range initialization Andre Muezerie
2024-12-26 20:11 ` [PATCH 1/2] app/test: " Andre Muezerie
2024-12-26 20:11 ` [PATCH 2/2] drivers/net: " Andre Muezerie
2025-03-05 16:06 ` [PATCH v2 0/2] " Andre Muezerie
2025-03-05 16:06   ` [PATCH v2 1/2] app/test: " Andre Muezerie
2025-03-05 16:06   ` [PATCH v2 2/2] drivers/net: " Andre Muezerie
2025-03-06  3:00     ` Patrick Robb
2025-03-07  8:07     ` Howard Wang
2025-06-12 14:17 ` [PATCH v3 0/3] enable drivers to be compiled with MSVC Andre Muezerie
2025-06-12 14:17   ` [PATCH v3 1/3] app/test: remove use of non-standard array range initialization Andre Muezerie
2025-06-12 15:03     ` Bruce Richardson
2025-06-16  7:23       ` David Marchand
2025-06-12 14:17   ` [PATCH v3 2/3] drivers/net: " Andre Muezerie
2025-06-16  7:37     ` David Marchand
2025-06-18  9:25       ` Thomas Monjalon
2025-06-18  9:37         ` 答复: " 王颢
2025-06-18 10:04           ` Thomas Monjalon
2025-06-12 14:17   ` [PATCH v3 3/3] drivers: enable drivers to be compiled with MSVC Andre Muezerie
2025-06-13 18:55     ` Patrick Robb
2025-06-23 14:02   ` [PATCH v3 0/3] " David Marchand
2025-07-21 15:24 ` Andre Muezerie [this message]
2025-07-21 15:24   ` [PATCH v4 1/3] app/test: remove use of non-standard array range initialization Andre Muezerie
2025-07-21 15:24   ` [PATCH v4 2/3] drivers/net: " Andre Muezerie
2025-07-21 15:24   ` [PATCH v4 3/3] drivers: enable drivers to be compiled with MSVC Andre Muezerie

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=1753111484-27021-1-git-send-email-andremue@linux.microsoft.com \
    --to=andremue@linux.microsoft.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).