From: Paul Menzel <pmenzel@molgen.mpg.de>
To: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
przemyslaw.kitszel@intel.com
Subject: Re: [Intel-wired-lan] [PATCH iwl-net] idpf: avoid compiler padding in virtchnl2_ptype struct
Date: Wed, 27 Dec 2023 22:45:11 +0100 [thread overview]
Message-ID: <5ae1537b-73dc-45a1-94a7-669e63dc74db@molgen.mpg.de> (raw)
In-Reply-To: <20231227173757.1743001-1-pavan.kumar.linga@intel.com>
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@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202312220250.ufEm8doQ-lkp@intel.com
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga@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@molgen.mpg.de>
Kind regards,
Paul
next prev parent reply other threads:[~2023-12-27 21:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-27 17:37 [PATCH iwl-net] idpf: avoid compiler padding in virtchnl2_ptype struct Pavan Kumar Linga
2023-12-27 21:45 ` Paul Menzel [this message]
2023-12-28 17:39 ` [Intel-wired-lan] " Linga, Pavan Kumar
2024-01-04 22:15 ` Linga, Pavan Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5ae1537b-73dc-45a1-94a7-669e63dc74db@molgen.mpg.de \
--to=pmenzel@molgen.mpg.de \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
--cc=pavan.kumar.linga@intel.com \
--cc=przemyslaw.kitszel@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).