Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1438705 > unrolled thread
| Started by | Olaf Hering <olaf@aepfle.de> |
|---|---|
| First post | 2016-07-07 18:10 +0200 |
| Last post | 2016-07-08 11:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v14 net-next 1/1] hv_sock: introduce Hyper-V Sockets Olaf Hering <olaf@aepfle.de> - 2016-07-07 18:10 +0200
RE: [PATCH v14 net-next 1/1] hv_sock: introduce Hyper-V Sockets Dexuan Cui <decui@microsoft.com> - 2016-07-08 11:40 +0200
| From | Olaf Hering <olaf@aepfle.de> |
|---|---|
| Date | 2016-07-07 18:10 +0200 |
| Subject | Re: [PATCH v14 net-next 1/1] hv_sock: introduce Hyper-V Sockets |
| Message-ID | <rSk2e-Ok-29@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
On Thu, Jun 30, Dexuan Cui wrote:
> +/* The MTU is 16KB per the host side's design. */
> +struct hvsock_recv_buf {
> + unsigned int data_len;
> + unsigned int data_offset;
> +
> + struct vmpipe_proto_header hdr;
> + u8 buf[PAGE_SIZE * 4];
Please use some macro related to the protocol rather than a Linux
compiletime macro.
> +/* We send at most 4KB payload per VMBus packet. */
> +struct hvsock_send_buf {
> + struct vmpipe_proto_header hdr;
> + u8 buf[PAGE_SIZE];
Same here.
> + * Copyright(c) 2016, Microsoft Corporation. All rights reserved.
Here the BSD license follows. I think its required/desired to also
include a GPL blurb like it is done in many other files:
...
* Alternatively, this software may be distributed under the terms of
* the GNU General Public License ("GPL") version 2 as published by the
* Free Software Foundation.
....
Otherwise the MODULE_LICENSE string might be incorrect.
> + /* Hyper-V Sockets requires at least VMBus 4.0 */
> + if ((vmbus_proto_version >> 16) < 4) {
> + pr_err("failed to load: VMBus 4 or later is required\n");
I guess this mens WS 2016+, and loading in earlier host versions will
trigger this path? I think a silent ENODEV is enough.
> + return -ENODEV;
Olaf
[toc] | [next] | [standalone]
| From | Dexuan Cui <decui@microsoft.com> |
|---|---|
| Date | 2016-07-08 11:40 +0200 |
| Message-ID | <rSAqm-2Tv-7@gated-at.bofh.it> |
| In reply to | #1438705 |
> From: Olaf Hering [mailto:olaf@aepfle.de]
> Sent: Friday, July 8, 2016 0:02
> On Thu, Jun 30, Dexuan Cui wrote:
>
> > +/* The MTU is 16KB per the host side's design. */
> > +struct hvsock_recv_buf {
> > + unsigned int data_len;
> > + unsigned int data_offset;
> > +
> > + struct vmpipe_proto_header hdr;
> > + u8 buf[PAGE_SIZE * 4];
>
> Please use some macro related to the protocol rather than a Linux
> compiletime macro.
OK. I'll fix this.
> > +/* We send at most 4KB payload per VMBus packet. */
> > +struct hvsock_send_buf {
> > + struct vmpipe_proto_header hdr;
> > + u8 buf[PAGE_SIZE];
>
> Same here.
OK. I'll fix this.
> > + * Copyright(c) 2016, Microsoft Corporation. All rights reserved.
>
> Here the BSD license follows. I think its required/desired to also
> include a GPL blurb like it is done in many other files:
> ...
> * Alternatively, this software may be distributed under the terms of
> * the GNU General Public License ("GPL") version 2 as published by the
> * Free Software Foundation.
> ....
>
> Otherwise the MODULE_LICENSE string might be incorrect.
I'll add the GPL blurb.
> > + /* Hyper-V Sockets requires at least VMBus 4.0 */
> > + if ((vmbus_proto_version >> 16) < 4) {
> > + pr_err("failed to load: VMBus 4 or later is required\n");
>
> I guess this mens WS 2016+, and loading in earlier host versions will
> trigger this path? I think a silent ENODEV is enough.
Yes.
OK, I'll remove the pr_err().
>
> > + return -ENODEV;
>
> Olaf
I'll post v15 shortly, which will address all the comments from Joe and Olaf.
Thanks,
-- Dexuan
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web