From: Jie Liu <[email protected]> The sxe2_drv_cmd.h command structures must match the layout used by historical SXE2 kernel versions so the same firmware command ABI is shared. Several structures were declared with __rte_packed_begin/ __rte_packed_end and extra rsv padding that the kernel layout does not have:
- sxe2_drv_link_info_resp: drop rsv[3] padding - sxe2_tm_res: drop rsv[2] padding and packed attribute - sxe2_tm_info: drop packed attribute - sxe2_tm_add_mid_msg: drop packed attribute - sxe2_tm_add_queue_msg: drop packed attribute - sxe2_drv_sfp_req: drop packed attribute - sxe2_drv_sfp_resp: drop packed attribute Keep the structure members as-is so the command ABI is compatible with the historical kernel driver. Cc: [email protected] Cc: [email protected] Signed-off-by: Jie Liu <[email protected]> --- drivers/net/sxe2/sxe2_drv_cmd.h | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/net/sxe2/sxe2_drv_cmd.h b/drivers/net/sxe2/sxe2_drv_cmd.h index d332d15980..f66b574e83 100644 --- a/drivers/net/sxe2/sxe2_drv_cmd.h +++ b/drivers/net/sxe2/sxe2_drv_cmd.h @@ -230,7 +230,6 @@ struct __rte_aligned(4) __rte_packed_begin sxe2_drv_vsi_info_get_resp { struct __rte_aligned(4) __rte_packed_begin sxe2_drv_link_info_resp { uint32_t speed; uint8_t status; - uint8_t rsv[3]; } __rte_packed_end; struct __rte_aligned(4) __rte_packed_begin sxe2_switchdev_info { @@ -348,31 +347,30 @@ struct __rte_aligned(4) __rte_packed_begin sxe2_rss_hf_req { uint8_t rsv1[3]; } __rte_packed_end; -struct __rte_aligned(4) __rte_packed_begin sxe2_tm_res { +struct sxe2_tm_res { uint16_t teid; - uint8_t rsv[2]; -} __rte_packed_end; +}; -struct __rte_aligned(4) __rte_packed_begin sxe2_tm_info { +struct sxe2_tm_info { uint32_t committed; uint32_t peak; uint8_t priority; uint8_t reserve; uint16_t weight; -} __rte_packed_end; +}; -struct __rte_aligned(4) __rte_packed_begin sxe2_tm_add_mid_msg { +struct sxe2_tm_add_mid_msg { uint16_t parent_teid; uint8_t adj_lvl; struct sxe2_tm_info info; -} __rte_packed_end; +}; -struct __rte_aligned(4) __rte_packed_begin sxe2_tm_add_queue_msg { +struct sxe2_tm_add_queue_msg { uint16_t parent_teid; uint16_t queue_id; uint8_t adj_lvl; struct sxe2_tm_info info; -} __rte_packed_end; +}; struct __rte_aligned(4) __rte_packed_begin sxe2_drv_ipsec_capa_resq { uint16_t tx_sa_cnt; @@ -633,7 +631,7 @@ struct __rte_aligned(4) __rte_packed_begin sxe2_drv_udp_tunnel_resp { uint8_t rsv; } __rte_packed_end; -struct __rte_aligned(4) __rte_packed_begin sxe2_drv_sfp_req { +struct sxe2_drv_sfp_req { uint8_t is_wr; uint8_t is_qsfp; uint16_t bus_addr; @@ -642,14 +640,14 @@ struct __rte_aligned(4) __rte_packed_begin sxe2_drv_sfp_req { uint16_t data_len; uint16_t rvd; uint8_t data[]; -} __rte_packed_end; +}; -struct __rte_aligned(4) __rte_packed_begin sxe2_drv_sfp_resp { +struct sxe2_drv_sfp_resp { uint8_t is_wr; uint8_t is_qsfp; uint16_t data_len; uint8_t data[]; -} __rte_packed_end; +}; enum sxe2_fc_type { SXE2_FC_T_DIS = 0, -- 2.52.0

