Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1378416

Re: [PATCH v8 net-next 1/1] hv_sock: introduce Hyper-V Sockets

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH v8 net-next 1/1] hv_sock: introduce Hyper-V Sockets
Date 2016-04-14 04:40 +0200
Message-ID <rnFmi-2VI-15@gated-at.bofh.it> (permalink)
References <rls09-3bP-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH v8 net-next 1/1] hv_sock: introduce Hyper-V Sockets David Miller <davem@davemloft.net> - 2016-04-14 04:40 +0200
  RE: [PATCH v8 net-next 1/1] hv_sock: introduce Hyper-V Sockets Dexuan Cui <decui@microsoft.com> - 2016-04-14 06:20 +0200

csiph-web