netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: decui@microsoft.com
Cc: olaf@aepfle.de, gregkh@linuxfoundation.org, jasowang@redhat.com,
	linux-kernel@vger.kernel.org, joe@perches.com,
	netdev@vger.kernel.org, apw@canonical.com,
	devel@linuxdriverproject.org, haiyangz@microsoft.com
Subject: Re: [PATCH v8 net-next 1/1] hv_sock: introduce Hyper-V Sockets
Date: Wed, 13 Apr 2016 22:30:27 -0400 (EDT)	[thread overview]
Message-ID: <20160413.223027.844777521863481943.davem@davemloft.net> (raw)
In-Reply-To: <1460079411-31982-1-git-send-email-decui@microsoft.com>

From: Dexuan Cui <decui@microsoft.com>
Date: Thu,  7 Apr 2016 18:36:51 -0700

> +struct vmpipe_proto_header {
> +	u32 pkt_type;
> +	u32 data_size;
> +} __packed;

There is no reason to specify __packed here.

The types are strongly sized to word aligned quantities.
No holes are possible in this structure, nor is any padding
possible either.

Do not ever slap __packed onto protocol or HW defined structures,
simply just define them properly with proper types and explicit
padding when necessary.
> +	struct {
> +		struct vmpipe_proto_header hdr;
> +		char buf[HVSOCK_SND_BUF_SZ];
> +	} __packed send;

And so on, and so forth..

I'm really disappointed that I couldn't even get one hunk into this
patch submission without finding a major problem.

I expect this patch to take several more iterations before I can even
come close to applying it.  So please set your expectations properly,
and also it seems like nobody else wants to even review this stuff
either.  It is you who needs to find a way to change all of this, not
me.

  parent reply	other threads:[~2016-04-14  2:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-08  1:36 [PATCH v8 net-next 1/1] hv_sock: introduce Hyper-V Sockets Dexuan Cui
2016-04-08  1:15 ` Joe Perches
2016-04-08  1:56   ` Dexuan Cui
2016-04-14  2:30 ` David Miller [this message]
2016-04-14  3:56   ` Dexuan Cui
2016-04-26 16:19 ` Cathy Avery
2016-04-27  3:02   ` Dexuan Cui

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=20160413.223027.844777521863481943.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=apw@canonical.com \
    --cc=decui@microsoft.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=haiyangz@microsoft.com \
    --cc=jasowang@redhat.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olaf@aepfle.de \
    /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).