Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932110AbbGPLTA (ORCPT ); Thu, 16 Jul 2015 07:19:00 -0400 Received: from mail-bn1on0119.outbound.protection.outlook.com ([157.56.110.119]:11232 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752632AbbGPLS6 convert rfc822-to-8bit (ORCPT ); Thu, 16 Jul 2015 07:18:58 -0400 Authentication-Results: spf=pass (sender IP is 206.191.229.116) smtp.mailfrom=microsoft.com; davemloft.net; dkim=none (message not signed) header.d=none; From: Dexuan Cui To: David Miller CC: "gregkh@linuxfoundation.org" , "stephen@networkplumber.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "driverdev-devel@linuxdriverproject.org" , "olaf@aepfle.de" , "apw@canonical.com" , "jasowang@redhat.com" , KY Srinivasan Subject: RE: [V2 1/7] Drivers: hv: vmbus: define the new offer type for Hyper-V socket (hvsock) Thread-Topic: [V2 1/7] Drivers: hv: vmbus: define the new offer type for Hyper-V socket (hvsock) Thread-Index: AQHQv32+gn2cUjLPAkOp8/Ixfin/PZ3doRxg Date: Thu, 16 Jul 2015 11:18:44 +0000 Message-ID: <4eb229b0935b4a42b126325c95bf7a2d@SIXPR30MB031.064d.mgd.msft.net> References: <1436867883-17692-1-git-send-email-decui@microsoft.com> <20150715.211306.576715827080894506.davem@davemloft.net> In-Reply-To: <20150715.211306.576715827080894506.davem@davemloft.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [141.251.58.132] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD032;1:ScLXuXL4dmPEd7dLaln7twvpBAizjcAHXURZwSAjqr/PiUURYTL2b8jfRCNSpN+JAvx1PX9tv8kg2d/sv582sY9HYqTVXu9HDt2tgjutdawldq65/Nfr+lFAU0zPGxJQWjumoBexA4Girqn8rhR+mCQIeJCj6Lr+hxpptBcmL9bUSmxd40WXSHSTS+RzNgkvtiylDQ126FSu05Z99KyeTKzIaqqNAkXaCR3nOxou6DGPpVK2Lz1Bst4PB+vVeUZb3WFLOmJTBQvYh2sz0ds0Z7hakONW+iSj8NeDZxB1YzkOk/mlcgXzYeLD3ynac2XVgeEEBEDd8xDx3QeoZdH2TVwvqLzfQVSh9rFmFxNoQwnCiQxuThS0X9Uy9U5/WDiK X-Forefront-Antispam-Report: CIP:206.191.229.116;CTRY:US;IPV:CAL;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(438002)(199003)(52604005)(189002)(86612001)(47776003)(2950100001)(2900100001)(106116001)(92566002)(86362001)(5003600100002)(66066001)(189998001)(23726002)(102836002)(77156002)(50986999)(110136002)(54356999)(76176999)(62966003)(107886002)(5001960100002)(106466001)(86146001)(97756001)(6806004)(33646002)(87936001)(2656002)(16796002)(50466002)(46406003)(46102003)(108616004)(24736003)(4001430100001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0301MB0668;H:064-smtp-out.microsoft.com;FPR:;SPF:Pass;MLV:sfv;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB0668;2:tBIyXnMISW0e6QkE0CHa5BLCsq2NTNcEkzOszDs4ITPPMaBLo6FNyjGH91+JbnNx;3:6HOe9Rr0HznPv5OFvotXpPeszN7YgMaGxFkTnxcyca94VYSdBa3g32GXS3iu2KljKxjLb+x2Bxnh9Bb+zpMH5Riq9cX2MU0zcBOeEWdy5y6noq4qZ3+1fDUn5nFc9tHwdsvBp61v6e6ZwLgPtJLoGeXsqxwYT7y6u9+7+3iUKRE9usR6IKRKWdOeQTmif+yH2VBfNUGnHDFWXuJ5d8OaDlxwDpCfex9NLFN2vNp1KDbtsKNk+WO3IVNRYW26m2PW;25:w5iZf8uPNWGlpVYO2w3B6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Slhmse0o7MqxphwiMKoYxkNWPZXUz0su+474vA0stQisHmRMjvJFu/M8ozbsg+efPm5pzHosWAm4xwL9/dxNhywOvXLPg9pyuQdj22ur8cSSOR CY1PR0301MB0668: X-MS-Exchange-Organization-RulesExecuted X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401001)(5005006)(3002001);SRVR:CY1PR0301MB0668;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB0668; X-Forefront-PRVS: 0639027A9E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR0301MB0668;23:5Xz6ON+xywYT3vvpkFe2oeX5irstb9hePaheEp4?= =?us-ascii?Q?fdSpuY4BLIEZmrg585Jc2MYWbN41TK9EUikNsFGIAKWEq3MnQorAbg1o7n+B?= =?us-ascii?Q?9kXWHay6ZstgAYdeweUjlu+x5ZghiPtU/uBpT1hewN9QPVOXxFt3V+cxoQL3?= =?us-ascii?Q?qg1R5JPjn+Q99oIf3x8AtU9A1KegAM6wyqi0m5eC1xM1MxvUKL+TE8cOA5oo?= =?us-ascii?Q?wOSgRVcbMTWs3P1ohSseMJSYbOe/CQs44WZDsyl6h7Qcl1jNVIoueYqpgHOC?= =?us-ascii?Q?7Pew43PSOvewnyazRx0OZrgDpPEjNZggvxA+T7Dm50C4tgD9GHbG8LD+OSw6?= =?us-ascii?Q?XVDV6N4RNm7Op+WpFRL6MAdXOkEexWFvqDkLoKXCqIlX+xbWAiil900cYVIf?= =?us-ascii?Q?M0Lbea5weMxdv7e6PZpH0UkRhwdXEjoAbQpG72VcnHzLn8s7mLYPfJidMIiQ?= =?us-ascii?Q?NC32o8sHwdImx/k1le13+9Q28W0rlA24eSPnkG+PqP09QDLIkAYr0LTEHgRy?= =?us-ascii?Q?8/J939M5XGbNAAreJV02XAnyZLxUXBS4/ZKk3k4tnJypOZyVGIa9+gySHBmK?= =?us-ascii?Q?ERfaLhW6ey7MUuO3UAuizBgfbs4lDGZOI6GG5S01XKSqztfgcjJP5xT+QsOL?= =?us-ascii?Q?BmagqRUi3MYmLNABmxi18uphGrOe9X9wtMTS2T5QfteDgeeukOsYIJ6lYDZh?= =?us-ascii?Q?JODEc7wuc3oQZtOy+N34KN64rTFtKOtzfviuF84b1+iVRF8RSvGNVvUmp34B?= =?us-ascii?Q?1Jl9Z1xkeEQDI5UrYjUbQZMZz5isjUGprQsOnQsPUAO9p3+bzFuVpVcflpO/?= =?us-ascii?Q?ZrZ+Pdk6JItNvuYEY0xl8sJJIPRkjVLuIdP/eGuTyQm51MZqnQLl1eW994f4?= =?us-ascii?Q?OUWR8voBdAZXAZOGeszz0K0kf0ECSr7XJ5PdTsGbzO7gh6+dp5D2tB+Hti1E?= =?us-ascii?Q?bjw6o7H6b6X0vTM2ndRbx0zkWgGSRVHNYNeE3joBBywxT7XmKtf1fHeq/23A?= =?us-ascii?Q?IGBGx8bgYoY5Opj7DZL4c+BDWbRuZTkek+5IEuvfVJqp8GA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB0668;5:lXEN1UF32mHjfVoyvyzRtOxb+uI1IsOzAoC1LBXSMB0HLrp03r0gxL0YN5LCcTxHvRlCsFoFR1MnaVtz2NYtmB2I+pmfXiucIKRIs30bzrWf1ReSVS3qKKi1Rv7ZdyCnK8Xh4swGO6CEi+NCetQmmw==;24:MlzWcDvQ3If4mwDcG7208SABPrMrbGIu8QIEMXvkKzw2LCtNHHfbqQyoY72tpJfMNWB+f4rOHJ2dw8V7MMNz4X2DufZ0RXmZ6YxLYrEHufQ=;20:379AlQz8g9McuMKCBq8z8m1ISSr2KLyPdSSF/S6Z8xccoIbsDdLobf3sL6nQlkqcc2ucILe/amAc3w2ytaA3hA== X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jul 2015 11:18:53.1179 (UTC) X-MS-Exchange-CrossTenant-Id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=72f988bf-86f1-41af-91ab-2d7cd011db47;Ip=[206.191.229.116];Helo=[064-smtp-out.microsoft.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB0668 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1437 Lines: 43 > From: David Miller > Sent: Thursday, July 16, 2015 12:13 > > From: Dexuan Cui > Date: Tue, 14 Jul 2015 02:58:03 -0700 > > > A helper function is also added. > > > > diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h > > @@ -236,6 +236,7 @@ struct vmbus_channel_offer { > > #define VMBUS_CHANNEL_LOOPBACK_OFFER 0x100 > > #define VMBUS_CHANNEL_PARENT_OFFER 0x200 > > #define VMBUS_CHANNEL_REQUEST_MONITORED_NOTIFICATION 0x400 > > +#define VMBUS_CHANNEL_TLNPI_PROVIDER_OFFER 0x2000 > > > > struct vmpacket_descriptor { > > u16 type; > > @@ -758,6 +759,12 @@ struct vmbus_channel { > > struct list_head percpu_list; > > }; > > > > +static inline bool is_hvsock_channel(const struct vmbus_channel *c) > > +{ > > + return !!(c->offermsg.offer.chn_flags & > > + VMBUS_CHANNEL_TLNPI_PROVIDER_OFFER); > > +} > > + > > This is not indented properly, plus it makes no sense to add a flag before > anyone even sets the flag. Hi David, Thanks for pointing out the indentation issue! I'll fix it in V3. The flag is set by the host: the c->offermsg is in the shared VMBus ringbuffer between the host and the guest, so it makes sense for us to check the flag. :-) -- Dexuan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/