[Intel-wired-lan] [PATCH iwl-net] idpf: avoid compiler padding in virtchnl2_ptype struct
Paul Menzel
pmenzel at molgen.mpg.de
Wed Dec 27 21:45:11 UTC 2023
Dear Pavan,
Thank you for yoru patch.
Am 27.12.23 um 18:37 schrieb Pavan Kumar Linga:
> Config option in arm random config file
Sorry, I do not understand this part of the sentence. What Kconfig
option was selected exactly causing this behavior.
> is causing the compiler
> to add padding. Avoid it by using "__packed" structure attribute
> for virtchnl2_ptype struct.
Did the compiler emit a warning? If so, please paste it.
> Fixes: 0d7502a9b4a7 ("virtchnl: add virtchnl version 2 ops")
> Reported-by: kernel test robot <lkp at intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202312220250.ufEm8doQ-lkp@intel.com
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel at intel.com>
> Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga at intel.com>
> ---
> drivers/net/ethernet/intel/idpf/virtchnl2.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/idpf/virtchnl2.h b/drivers/net/ethernet/intel/idpf/virtchnl2.h
> index 8dc83788972..dd750e6dcd0 100644
> --- a/drivers/net/ethernet/intel/idpf/virtchnl2.h
> +++ b/drivers/net/ethernet/intel/idpf/virtchnl2.h
> @@ -978,7 +978,7 @@ struct virtchnl2_ptype {
> u8 proto_id_count;
> __le16 pad;
> __le16 proto_id[];
> -};
> +} __packed;
> VIRTCHNL2_CHECK_STRUCT_LEN(6, virtchnl2_ptype);
>
> /**
Reviewed-by: Paul Menzel <pmenzel at molgen.mpg.de>
Kind regards,
Paul
More information about the Intel-wired-lan
mailing list