netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: Dexuan Cui <decui@microsoft.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"joe@perches.com" <joe@perches.com>,
	Rolf Neugebauer <rolf.neugebauer@docker.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"apw@canonical.com" <apw@canonical.com>,
	"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
	"davem@davemloft.net" <davem@davemloft.net>
Subject: Re: [PATCH v14 net-next 1/1] hv_sock: introduce Hyper-V Sockets
Date: Thu, 7 Jul 2016 18:02:06 +0200	[thread overview]
Message-ID: <20160707160206.GA5279@aepfle.de> (raw)
In-Reply-To: <CY1PR03MB21865E21E637F03877784979BF240@CY1PR03MB2186.namprd03.prod.outlook.com>


[-- Attachment #1.1: Type: text/plain, Size: 1228 bytes --]

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

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 169 bytes --]

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2016-07-07 16:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-30 15:58 [PATCH v14 net-next 1/1] hv_sock: introduce Hyper-V Sockets Dexuan Cui
2016-06-30 16:12 ` Olaf Hering
2016-06-30 16:22   ` Dexuan Cui
2016-07-01  6:42   ` Olaf Hering
2016-07-05  1:58 ` Dexuan Cui
2016-07-05  6:27   ` David Miller
2016-07-05  6:46     ` Dexuan Cui
2016-07-05  6:58       ` David Miller
2016-07-05  8:21 ` Joe Perches
2016-07-05  9:31   ` Dexuan Cui
2016-07-05  9:38     ` Joe Perches
2016-07-05 10:46       ` Dexuan Cui
2016-07-07 16:02 ` Olaf Hering [this message]
2016-07-08  7:01   ` 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=20160707160206.GA5279@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=apw@canonical.com \
    --cc=davem@davemloft.net \
    --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=rolf.neugebauer@docker.com \
    /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).