i40e/base: fix padding in struct
The struct i40e_aqc_get_cee_dcb_cfg_v1_resp was originally defined with word boundary layout issues, which most compilers deal with by silently adding padding, making the actual struct larger than designed. This patch adds an extra byte in fields reserved3 and reserved4 to directly acknowledge that padding. Signed-off-by: Jingjing Wu <jingjing.wu@intel.com> Acked-by: Helin Zhang <helin.zhang@intel.com> Tested-by: Huilong Xu <huilongx.xu@intel.com>
This commit is contained in:
parent
8af9e07ff7
commit
3006df511e
@ -2082,6 +2082,7 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_start);
|
||||
#define I40E_AQC_CEE_APP_ISCSI_MASK (0x7 << I40E_AQC_CEE_APP_ISCSI_SHIFT)
|
||||
#define I40E_AQC_CEE_APP_FIP_SHIFT 0x8
|
||||
#define I40E_AQC_CEE_APP_FIP_MASK (0x7 << I40E_AQC_CEE_APP_FIP_SHIFT)
|
||||
|
||||
#define I40E_AQC_CEE_PG_STATUS_SHIFT 0x0
|
||||
#define I40E_AQC_CEE_PG_STATUS_MASK (0x7 << I40E_AQC_CEE_PG_STATUS_SHIFT)
|
||||
#define I40E_AQC_CEE_PFC_STATUS_SHIFT 0x3
|
||||
@ -2095,6 +2096,14 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_start);
|
||||
#define I40E_AQC_CEE_FIP_STATUS_SHIFT 0x10
|
||||
#define I40E_AQC_CEE_FIP_STATUS_MASK (0x7 << I40E_AQC_CEE_FIP_STATUS_SHIFT)
|
||||
|
||||
/* struct i40e_aqc_get_cee_dcb_cfg_v1_resp was originally defined with
|
||||
* word boundary layout issues, which the Linux compilers silently deal
|
||||
* with by adding padding, making the actual struct larger than designed.
|
||||
* However, the FW compiler for the NIC is less lenient and complains
|
||||
* about the struct. Hence, the struct defined here has an extra byte in
|
||||
* fields reserved3 and reserved4 to directly acknowledge that padding,
|
||||
* and the new length is used in the length check macro.
|
||||
*/
|
||||
struct i40e_aqc_get_cee_dcb_cfg_v1_resp {
|
||||
u8 reserved1;
|
||||
u8 oper_num_tc;
|
||||
@ -2102,9 +2111,9 @@ struct i40e_aqc_get_cee_dcb_cfg_v1_resp {
|
||||
u8 reserved2;
|
||||
u8 oper_tc_bw[8];
|
||||
u8 oper_pfc_en;
|
||||
u8 reserved3;
|
||||
u8 reserved3[2];
|
||||
__le16 oper_app_prio;
|
||||
u8 reserved4;
|
||||
u8 reserved4[2];
|
||||
__le16 tlv_status;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user