From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753279AbcGGQFf (ORCPT ); Thu, 7 Jul 2016 12:05:35 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.217]:18396 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752178AbcGGQF1 (ORCPT ); Thu, 7 Jul 2016 12:05:27 -0400 X-RZG-AUTH: :P2EQZWCpfu+qG7CngxMFH1J+yackYocTD1iAi8x+OWtrWFmrD4pjkQ2b4qvS X-RZG-CLASS-ID: mo00 Date: Thu, 7 Jul 2016 18:02:06 +0200 From: Olaf Hering To: Dexuan Cui Cc: "davem@davemloft.net" , "gregkh@linuxfoundation.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devel@linuxdriverproject.org" , "apw@canonical.com" , "jasowang@redhat.com" , Vitaly Kuznetsov , Cathy Avery , KY Srinivasan , Haiyang Zhang , "joe@perches.com" , Rolf Neugebauer Subject: Re: [PATCH v14 net-next 1/1] hv_sock: introduce Hyper-V Sockets Message-ID: <20160707160206.GA5279@aepfle.de> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (6680) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --/04w6evG8XlLl3ft Content-Type: text/plain; charset=utf-8 Content-Disposition: inline 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 --/04w6evG8XlLl3ft Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAld+fPsACgkQXUKg+qaYNn7u3gCeKWOJxMShxY0Gv27zIC18WxD8 2c8An1wwa0vs1/7Uglhu3Z8z9H1zIGqk =VrH3 -----END PGP SIGNATURE----- --/04w6evG8XlLl3ft--