mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: decui@microsoft.com
Cc: kuba@kernel.org, kys@microsoft.com, haiyangz@microsoft.com,
	sthemmin@microsoft.com, wei.liu@kernel.org, liuwe@microsoft.com,
	netdev@vger.kernel.org, leon@kernel.org, andrew@lunn.ch,
	bernd@petrovitsch.priv.at, rdunlap@infradead.org,
	linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org
Subject: Re: [PATCH v3 net-next] net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)
Date: Thu, 08 Apr 2021 16:46:18 -0700 (PDT)	[thread overview]
Message-ID: <20210408.164618.597563844564989065.davem@davemloft.net> (raw)
In-Reply-To: <20210408225840.26304-1-decui@microsoft.com>

From: Dexuan Cui <decui@microsoft.com>
Date: Thu,  8 Apr 2021 15:58:40 -0700

> +struct gdma_msg_hdr {
> +	u32 hdr_type;
> +	u32 msg_type;
> +	u16 msg_version;
> +	u16 hwc_msg_id;
> +	u32 msg_size;
> +} __packed;
> +
> +struct gdma_dev_id {
> +	union {
> +		struct {
> +			u16 type;
> +			u16 instance;
> +		};
> +
> +		u32 as_uint32;
> +	};
> +} __packed;

Please don't  use __packed unless absolutely necessary.  It generates suboptimal code (byte at a time
accesses etc.) and for many of these you don't even need it.

Thank you.

  parent reply	other threads:[~2021-04-08 23:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08 22:58 Dexuan Cui
2021-04-08 23:45 ` Stephen Hemminger
2021-04-09  0:30   ` Andrew Lunn
2021-04-09  0:54     ` Dexuan Cui
2021-04-08 23:46 ` David Miller [this message]
2021-04-09  0:24   ` Dexuan Cui
2021-04-09  0:41     ` David Miller
2021-04-09  0:47       ` Dexuan Cui
2021-04-09  3:58       ` Haiyang Zhang
2021-04-09 13:35         ` Andrew Lunn
2021-04-08 23:51 ` Randy Dunlap

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=20210408.164618.597563844564989065.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=andrew@lunn.ch \
    --cc=bernd@petrovitsch.priv.at \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kuba@kernel.org \
    --cc=kys@microsoft.com \
    --cc=leon@kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuwe@microsoft.com \
    --cc=netdev@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=sthemmin@microsoft.com \
    --cc=wei.liu@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

all inboxes | Powered by JetHome®