All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/15] fix packing of structs when building with MSVC
@ 2024-03-20 21:05 Tyler Retzlaff
  2024-03-20 21:05 ` [PATCH 01/15] eal: provide pack start macro for MSVC Tyler Retzlaff
                   ` (18 more replies)
  0 siblings, 19 replies; 74+ messages in thread
From: Tyler Retzlaff @ 2024-03-20 21:05 UTC (permalink / raw)
  To: dev
  Cc: Akhil Goyal, Aman Singh, Anatoly Burakov, Bruce Richardson,
	Byron Marohn, Conor Walsh, Cristian Dumitrescu,
	Dariusz Sosnowski, David Hunt, Jerin Jacob, Jingjing Wu,
	Kirill Rybalchenko, Konstantin Ananyev, Matan Azrad, Ori Kam,
	Radu Nicolau, Ruifeng Wang, Sameh Gobriel, Sivaprasad Tummala,
	Suanming Mou, Sunil Kumar Kori, Vamsi Attunuru,
	Viacheslav Ovsiienko, Vladimir Medvedkin, Yipeng Wang,
	Yuying Zhang, Tyler Retzlaff

MSVC struct packing is not compatible with GCC provide a macro that can
be used to push existing pack value and sets packing to 1-byte. The
existing __rte_packed macro is then used to restore the pack value
prior to the push.

Instead of providing macros exclusively for MSVC and for GCC the
existing macro is deliberately utilized to trigger a warning if no
existing packing has been pushed allowing easy identification of
locations where the __rte_msvc_pack is missing.

I've decided to only add the macro to packed structs that are built
for Windows. It seems there is little value in adding the macro tree
wide and if new code arrives that is built on Windows the __rte_packed
will flag where the preamble macro is required.

Tyler Retzlaff (15):
  eal: provide pack start macro for MSVC
  eal: pack structures when building with MSVC
  net: pack structures when building with MSVC
  common/iavf: pack structures when building with MSVC
  common/idpf: pack structures when building with MSVC
  common/mlx5: pack structures when building with MSVC
  dma/ioat: pack structures when building with MSVC
  net/i40e: pack structures when building with MSVC
  net/iavf: pack structures when building with MSVC
  net/ice: pack structures when building with MSVC
  net/mlx5: pack structures when building with MSVC
  net/octeon_ep: pack structures when building with MSVC
  app/testpmd: pack structures when building with MSVC
  app/test: pack structures when building with MSVC
  examples: pack structures when building with MSVC

 app/test-pmd/csumonly.c                     |  1 +
 app/test/test_efd.c                         |  1 +
 app/test/test_hash.c                        |  1 +
 app/test/test_member.c                      |  1 +
 drivers/common/iavf/iavf_osdep.h            |  2 ++
 drivers/common/iavf/virtchnl_inline_ipsec.h | 11 +++++++++++
 drivers/common/idpf/base/idpf_osdep.h       |  2 ++
 drivers/common/mlx5/mlx5_common_mr.h        |  4 ++++
 drivers/common/mlx5/mlx5_common_utils.h     |  1 +
 drivers/common/mlx5/mlx5_prm.h              | 28 ++++++++++++++++++++++++++++
 drivers/dma/ioat/ioat_hw_defs.h             |  1 +
 drivers/net/i40e/base/i40e_osdep.h          |  2 ++
 drivers/net/iavf/iavf_ipsec_crypto.h        |  3 +++
 drivers/net/iavf/iavf_rxtx.c                |  1 +
 drivers/net/ice/base/ice_osdep.h            |  2 ++
 drivers/net/mlx5/hws/mlx5dr.h               |  1 +
 drivers/net/mlx5/mlx5.h                     |  1 +
 drivers/net/mlx5/mlx5_flow.h                |  5 +++++
 drivers/net/mlx5/mlx5_hws_cnt.h             |  1 +
 drivers/net/mlx5/mlx5_utils.h               |  4 ++++
 drivers/net/octeon_ep/otx_ep_mbox.h         |  1 +
 examples/common/neon/port_group.h           |  1 +
 examples/ip_pipeline/cli.c                  |  5 +++++
 examples/ipsec-secgw/ipsec.h                |  1 +
 examples/l3fwd-power/main.c                 |  2 ++
 examples/ptpclient/ptpclient.c              |  8 ++++++++
 lib/eal/common/eal_private.h                |  1 +
 lib/eal/include/rte_common.h                |  4 +++-
 lib/eal/include/rte_memory.h                |  1 +
 lib/eal/include/rte_memzone.h               |  1 +
 lib/eal/include/rte_trace_point.h           |  1 +
 lib/eal/x86/include/rte_memcpy.h            |  3 +++
 lib/net/rte_arp.h                           |  2 ++
 lib/net/rte_dtls.h                          |  1 +
 lib/net/rte_esp.h                           |  2 ++
 lib/net/rte_ether.h                         |  1 +
 lib/net/rte_geneve.h                        |  1 +
 lib/net/rte_gre.h                           |  4 ++++
 lib/net/rte_gtp.h                           |  5 +++++
 lib/net/rte_ib.h                            |  1 +
 lib/net/rte_icmp.h                          |  3 +++
 lib/net/rte_ip.h                            |  4 ++++
 lib/net/rte_l2tpv2.h                        |  4 ++++
 lib/net/rte_macsec.h                        |  2 ++
 lib/net/rte_mpls.h                          |  1 +
 lib/net/rte_pdcp_hdr.h                      |  4 ++++
 lib/net/rte_ppp.h                           |  1 +
 lib/net/rte_sctp.h                          |  1 +
 lib/net/rte_tcp.h                           |  1 +
 lib/net/rte_tls.h                           |  1 +
 lib/net/rte_udp.h                           |  1 +
 lib/net/rte_vxlan.h                         |  2 ++
 52 files changed, 143 insertions(+), 1 deletion(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 74+ messages in thread

end of thread, other threads:[~2024-04-16  0:06 UTC | newest]

Thread overview: 74+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-20 21:05 [PATCH 00/15] fix packing of structs when building with MSVC Tyler Retzlaff
2024-03-20 21:05 ` [PATCH 01/15] eal: provide pack start macro for MSVC Tyler Retzlaff
2024-03-20 21:05 ` [PATCH 02/15] eal: pack structures when building with MSVC Tyler Retzlaff
2024-03-21 16:02   ` Bruce Richardson
2024-03-20 21:05 ` [PATCH 03/15] net: " Tyler Retzlaff
2024-03-20 21:06 ` [PATCH 04/15] common/iavf: " Tyler Retzlaff
2024-03-20 21:06 ` [PATCH 05/15] common/idpf: " Tyler Retzlaff
2024-03-20 21:06 ` [PATCH 06/15] common/mlx5: " Tyler Retzlaff
2024-03-20 21:06 ` [PATCH 07/15] dma/ioat: " Tyler Retzlaff
2024-03-21 16:13   ` Bruce Richardson
2024-03-27 22:51     ` Tyler Retzlaff
2024-03-20 21:06 ` [PATCH 08/15] net/i40e: " Tyler Retzlaff
2024-03-20 21:06 ` [PATCH 09/15] net/iavf: " Tyler Retzlaff
2024-03-21 16:26   ` Bruce Richardson
2024-03-20 21:06 ` [PATCH 10/15] net/ice: " Tyler Retzlaff
2024-03-20 21:06 ` [PATCH 11/15] net/mlx5: " Tyler Retzlaff
2024-03-20 21:06 ` [PATCH 12/15] net/octeon_ep: " Tyler Retzlaff
2024-03-20 21:06 ` [PATCH 13/15] app/testpmd: " Tyler Retzlaff
2024-03-21 16:28   ` Bruce Richardson
2024-03-20 21:06 ` [PATCH 14/15] app/test: " Tyler Retzlaff
2024-03-20 21:06 ` [PATCH 15/15] examples: " Tyler Retzlaff
2024-03-21 16:31   ` Bruce Richardson
2024-03-21 15:32 ` [PATCH 00/15] fix packing of structs " Stephen Hemminger
2024-03-21 15:46   ` Tyler Retzlaff
2024-03-27 23:09 ` [PATCH v2 " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 01/15] eal: provide pack start macro for MSVC Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 02/15] eal: pack structures when building with MSVC Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 03/15] net: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 04/15] common/iavf: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 05/15] common/idpf: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 06/15] common/mlx5: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 07/15] dma/ioat: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 08/15] net/i40e: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 09/15] net/iavf: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 10/15] net/ice: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 11/15] net/mlx5: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 12/15] net/octeon_ep: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 13/15] app/testpmd: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 14/15] app/test: " Tyler Retzlaff
2024-03-27 23:09   ` [PATCH v2 15/15] examples: " Tyler Retzlaff
2024-04-15 23:51 ` [PATCH v3 00/16] fix packing of structs " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 01/16] eal: provide pack start macro for MSVC Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 02/16] eal: pack structures when building with MSVC Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 03/16] net: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 04/16] common/iavf: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 05/16] common/idpf: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 06/16] common/mlx5: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 07/16] dma/ioat: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 08/16] net/i40e: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 09/16] net/iavf: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 10/16] net/ice: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 11/16] net/mlx5: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 12/16] net/octeon_ep: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 13/16] app/testpmd: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 14/16] app/test: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 15/16] examples: " Tyler Retzlaff
2024-04-15 23:51   ` [PATCH v3 16/16] crypto/mlx5: " Tyler Retzlaff
2024-04-16  0:04 ` [PATCH v4 00/16] fix packing of structs " Tyler Retzlaff
2024-04-16  0:04   ` [PATCH v4 01/16] eal: provide pack start macro for MSVC Tyler Retzlaff
2024-04-16  0:04   ` [PATCH v4 02/16] eal: pack structures when building with MSVC Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 03/16] net: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 04/16] common/iavf: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 05/16] common/idpf: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 06/16] common/mlx5: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 07/16] dma/ioat: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 08/16] net/i40e: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 09/16] net/iavf: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 10/16] net/ice: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 11/16] net/mlx5: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 12/16] net/octeon_ep: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 13/16] app/testpmd: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 14/16] app/test: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 15/16] examples: " Tyler Retzlaff
2024-04-16  0:05   ` [PATCH v4 16/16] crypto/mlx5: " Tyler Retzlaff

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.