From: Andrew Lunn <andrew@lunn.ch>
To: Haiyang Zhang <haiyangz@microsoft.com>
Cc: David Miller <davem@davemloft.net>,
Dexuan Cui <decui@microsoft.com>,
"kuba@kernel.org" <kuba@kernel.org>,
KY Srinivasan <kys@microsoft.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
"wei.liu@kernel.org" <wei.liu@kernel.org>,
Wei Liu <liuwe@microsoft.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"leon@kernel.org" <leon@kernel.org>,
"bernd@petrovitsch.priv.at" <bernd@petrovitsch.priv.at>,
"rdunlap@infradead.org" <rdunlap@infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-hyperv@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: Fri, 9 Apr 2021 15:35:36 +0200 [thread overview]
Message-ID: <YHBYKGwJsX/wuYqn@lunn.ch> (raw)
In-Reply-To: <BL0PR2101MB0930523DB18C6F1C1CA00A89CA739@BL0PR2101MB0930.namprd21.prod.outlook.com>
For the structs containing variables with the same sizes, or already size aligned
> variables, we knew the __packed has no effect. And for these structs, it doesn't
> cause performance impact either, correct?
>
> But in the future, if different sized variables are added, the __packed may
> become necessary again. To prevent anyone accidently forget to add __packed
> when adding new variables to these structs, can we keep the __packed for all
> messages going through the "wire"?
It should not be a problem because anybody adding new variables should
know packed is not liked in the kernel and will take care.
If you want to be paranoid add a BUILD_BUG_ON(size(struct foo) != 42);
Andrew
next prev parent reply other threads:[~2021-04-09 13:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-08 22:58 [PATCH v3 net-next] net: mana: Add a driver for Microsoft Azure Network Adapter (MANA) 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
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 [this message]
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=YHBYKGwJsX/wuYqn@lunn.ch \
--to=andrew@lunn.ch \
--cc=bernd@petrovitsch.priv.at \
--cc=davem@davemloft.net \
--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