Commit 7fef3932 authored by Jacob Keller's avatar Jacob Keller Committed by Jeff Kirsher

fm10k: pack TLV overlay structures

This patch adds the __attribute__((packed)) indicator to some structures
which are overlayed onto a TLV message. These structures must be packed
as small as possible in order to correctly align when copied into the
mailbox buffer. Without doing so, the receiving mailbox code incorrectly
parses the values and we get invalid message responses from the switch
manager software.
Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Tested-by: default avatarKrishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent fba341d5
...@@ -81,26 +81,26 @@ struct fm10k_mac_update { ...@@ -81,26 +81,26 @@ struct fm10k_mac_update {
__le16 glort; __le16 glort;
u8 flags; u8 flags;
u8 action; u8 action;
}; } __packed;
struct fm10k_global_table_data { struct fm10k_global_table_data {
__le32 used; __le32 used;
__le32 avail; __le32 avail;
}; } __packed;
struct fm10k_swapi_error { struct fm10k_swapi_error {
__le32 status; __le32 status;
struct fm10k_global_table_data mac; struct fm10k_global_table_data mac;
struct fm10k_global_table_data nexthop; struct fm10k_global_table_data nexthop;
struct fm10k_global_table_data ffu; struct fm10k_global_table_data ffu;
}; } __packed;
struct fm10k_swapi_1588_timestamp { struct fm10k_swapi_1588_timestamp {
__le64 egress; __le64 egress;
__le64 ingress; __le64 ingress;
__le16 dglort; __le16 dglort;
__le16 sglort; __le16 sglort;
}; } __packed;
s32 fm10k_msg_lport_map_pf(struct fm10k_hw *, u32 **, struct fm10k_mbx_info *); s32 fm10k_msg_lport_map_pf(struct fm10k_hw *, u32 **, struct fm10k_mbx_info *);
extern const struct fm10k_tlv_attr fm10k_lport_map_msg_attr[]; extern const struct fm10k_tlv_attr fm10k_lport_map_msg_attr[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment