fix packing of structs when building with MSVC
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest16 patches 0 repliesNew
- v316 patches 0 repliesSuperseded
- v215 patches 0 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 15 patches | 9 replies | Superseded |
Changes in v4 from the cover letter
* add another missing __rte_msvc_pack to crypto/mlx5 patch
* correct commit message for duplicated packing packing in crypto/mlx5 patch
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/16 | eal: provide pack start macro for MSVClib/ | +3 | 0 replies | |
| 2/16 | eal: pack structures when building with MSVClib/ lib/ lib/ +2 more | +7 | 0 replies | |
| 3/16 | net: pack structures when building with MSVClib/ lib/ lib/ +17 more | +42 | 0 replies | |
| 4/16 | common/iavf: pack structures when building with MSVCdrivers/ drivers/ | +13 | 0 replies | |
| 5/16 | common/idpf: pack structures when building with MSVCdrivers/ | +2 | 0 replies | |
| 6/16 | common/mlx5: pack structures when building with MSVCdrivers/ drivers/ drivers/ | +33 | 0 replies | |
| 7/16 | dma/ioat: pack structures when building with MSVCdrivers/ | +1 | 0 replies | |
| 8/16 | net/i40e: pack structures when building with MSVCdrivers/ | +2 | 0 replies | |
| 9/16 | net/iavf: pack structures when building with MSVCdrivers/ drivers/ | +4 | 0 replies | |
| 10/16 | net/ice: pack structures when building with MSVCdrivers/ | +2 | 0 replies | |
| 11/16 | net/mlx5: pack structures when building with MSVCdrivers/ drivers/ drivers/ +2 more | +12 | 0 replies | |
| 12/16 | net/octeon_ep: pack structures when building with MSVCdrivers/ | +1 | 0 replies | |
| 13/16 | app/testpmd: pack structures when building with MSVCapp/ | +1 | 0 replies | |
| 14/16 | app/test: pack structures when building with MSVCapp/ app/ app/ | +3 | 0 replies | |
| 15/16 | examples: pack structures when building with MSVCexamples/ examples/ examples/ +2 more | +17 | 0 replies | |
| 16/16 | crypto/mlx5: pack structures when building with MSVCdrivers/ drivers/ | +2 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [PATCH v4 00/16] fix packing of structs when building with MSVC
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.
If as a part of review maintainers identify structs they believe don't require packing so long as they are explicitly identified i'll remove the __rte_packed as a part of this series.
v4:
* add another missing __rte_msvc_pack to crypto/mlx5 patch
* correct commit message for duplicated packing packing in crypto/mlx5 patch
v3:
* add missing __rte_msvc_pack to crypto/mlx5
* fix commit messages to reference __rte_msvc_pack macro instead
of __rte_msvc_pushpack(1)
v2:
* app/testpmd, remove packing from simple_gre_hdr
* net/iavf, remove packing from iavf_ipsec_crypto_pkt_metadata, simple_gre_hdr
* examples, remove packing from pkt_key_qinq, pkt_key_ipv4_5tuple,
pkt_key_ipv6_5tuple, pkt_key_ipv4_addr, pkt_key_ipv6_addr
* eal, remove packing from rte_config, __rte_trace_stream_header
Tyler Retzlaff (16):
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 crypto/mlx5: pack structures when building with MSVC
app/test-pmd/csumonly.c | 2 +- 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/crypto/mlx5/mlx5_crypto.h | 1 + drivers/crypto/mlx5/mlx5_crypto_gcm.c | 1 + drivers/dma/ioat/ioat_hw_defs.h | 1 + drivers/net/i40e/base/i40e_osdep.h | 2 ++ drivers/net/iavf/iavf_ipsec_crypto.h | 4 +++- drivers/net/iavf/iavf_rxtx.c | 2 +- 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 | 10 +++++----- examples/ipsec-secgw/ipsec.h | 1 + examples/l3fwd-power/main.c | 2 ++ examples/ptpclient/ptpclient.c | 8 ++++++++ lib/eal/common/eal_private.h | 2 +- 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 | 2 +- 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 ++ 54 files changed, 145 insertions(+), 11 deletions(-)
Signature · 1 line
1.8.3.1