netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Kirjanov <kda@linux-powerpc.org>
To: Claudiu Manoil <claudiu.manoil@nxp.com>
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
	"David S . Miller" <davem@davemloft.net>
Subject: Re: [PATCH net-next resend 1/2] enetc: Fix endianness issues for enetc_ethtool
Date: Thu, 19 Nov 2020 13:37:21 +0300	[thread overview]
Message-ID: <CAOJe8K1ccPn8fJc1bfNwt2O7Z2cYmCXiUmytgp-O4RUO5GhC3Q@mail.gmail.com> (raw)
In-Reply-To: <20201119101215.19223-2-claudiu.manoil@nxp.com>

On 11/19/20, Claudiu Manoil <claudiu.manoil@nxp.com> wrote:
> These particular fields are specified in the H/W reference
> manual as having network byte order format, so enforce big
> endian annotation for them and clear the related sparse
> warnings in the process.
>
> Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
> ---
>  drivers/net/ethernet/freescale/enetc/enetc_hw.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/freescale/enetc/enetc_hw.h
> b/drivers/net/ethernet/freescale/enetc/enetc_hw.h
> index 68ef4f959982..04efccd11162 100644
> --- a/drivers/net/ethernet/freescale/enetc/enetc_hw.h
> +++ b/drivers/net/ethernet/freescale/enetc/enetc_hw.h
> @@ -472,10 +472,10 @@ struct enetc_cmd_rfse {
>  	u8 smac_m[6];
>  	u8 dmac_h[6];
>  	u8 dmac_m[6];
> -	u32 sip_h[4];
> -	u32 sip_m[4];
> -	u32 dip_h[4];
> -	u32 dip_m[4];
> +	__be32 sip_h[4];
> +	__be32 sip_m[4];
> +	__be32 dip_h[4];
> +	__be32 dip_m[4];
>  	u16 ethtype_h;
>  	u16 ethtype_m;
>  	u16 ethtype4_h;

Hi Claudiu,

Why the struct is declared without packed?
I'm seeing that the structure is used in dma transfers in the driver

> --
> 2.17.1
>
>

  reply	other threads:[~2020-11-19 10:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 10:12 [PATCH net-next resend 0/2] enetc: Clean endianness warnings up Claudiu Manoil
2020-11-19 10:12 ` [PATCH net-next resend 1/2] enetc: Fix endianness issues for enetc_ethtool Claudiu Manoil
2020-11-19 10:37   ` Denis Kirjanov [this message]
2020-11-19 13:22     ` Claudiu Manoil
2020-11-19 17:54     ` Jakub Kicinski
2020-11-23 22:42   ` Jesse Brandeburg
2020-11-19 10:12 ` [PATCH net-next resend 2/2] enetc: Fix endianness issues for enetc_qos Claudiu Manoil
2020-11-20 16:56 ` [PATCH net-next resend 0/2] enetc: Clean endianness warnings up Jakub Kicinski

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=CAOJe8K1ccPn8fJc1bfNwt2O7Z2cYmCXiUmytgp-O4RUO5GhC3Q@mail.gmail.com \
    --to=kda@linux-powerpc.org \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).