Message ID | 20240124001026.2627-1-pavan.kumar.linga@intel.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [iwl-net,v4] idpf: avoid compiler padding in virtchnl2_ptype struct | expand |
diff --git a/drivers/net/ethernet/intel/idpf/virtchnl2.h b/drivers/net/ethernet/intel/idpf/virtchnl2.h index 8dc83788972..506036e7df0 100644 --- a/drivers/net/ethernet/intel/idpf/virtchnl2.h +++ b/drivers/net/ethernet/intel/idpf/virtchnl2.h @@ -23,7 +23,7 @@ * is not exactly the correct length. */ #define VIRTCHNL2_CHECK_STRUCT_LEN(n, X) \ - static_assert((n) == sizeof(struct X)) + static_assert(sizeof(struct X) == (n)) /* New major set of opcodes introduced and so leaving room for * old misc opcodes to be added in future. Also these opcodes may only @@ -978,7 +978,7 @@ struct virtchnl2_ptype { u8 proto_id_count; __le16 pad; __le16 proto_id[]; -}; +} __packed __aligned(2); VIRTCHNL2_CHECK_STRUCT_LEN(6, virtchnl2_ptype); /**