Skip to content

Commit f050510

Browse files
dstaay-fbfacebook-github-bot
authored andcommitted
Switch to Packed vs Aligned mlx5 WQE ctrl (#542)
Summary: Pull Request resolved: #542 Fix bug in alignment, C definition is: struct mlx5_wqe_ctrl_seg { __be32 opmod_idx_opcode; __be32 qpn_ds; uint8_t signature; __be16 dci_stream_channel_id; uint8_t fm_ce_se; __be32 imm; } __attribute__((__packed__)) __attribute__((__aligned__(4))); LSS: we want to use packed / packed(1) with binding (drop align, works fine). Reviewed By: allenwang28 Differential Revision: D78362878 fbshipit-source-id: e6a4deff1b9108403258ab573a51a9d5fbc7ca3f
1 parent 894579b commit f050510

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rdmacore-sys/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// sections of code adapted from https://github.com/jonhoo/rust-ibverbs
1010
// Copyright (c) 2016 Jon Gjengset under MIT License (MIT)
1111

12-
#[repr(C, align(4))]
12+
#[repr(C, packed(1))]
1313
#[derive(Debug, Default, Clone, Copy)]
1414
pub struct mlx5_wqe_ctrl_seg {
1515
pub opmod_idx_opcode: u32,

0 commit comments

Comments
 (0)