From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752998AbbHMPTh (ORCPT ); Thu, 13 Aug 2015 11:19:37 -0400 Received: from mail-bl2on0128.outbound.protection.outlook.com ([65.55.169.128]:45184 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752261AbbHMPTg (ORCPT ); Thu, 13 Aug 2015 11:19:36 -0400 From: KY Srinivasan To: Johannes Thumshirn , Keith Mange CC: "gregkh@linuxfoundation.org" , "linux-kernel@vger.kernel.org" , "devel@linuxdriverproject.org" , "ohering@suse.com" , "jbottomley@parallels.com" , "hch@infradead.org" , "linux-scsi@vger.kernel.org" , "apw@canonical.com" , "vkuznets@redhat.com" , "jasowang@redhat.com" Subject: RE: [PATCH RESEND V2 3/7] scsi: storvsc: Untangle the storage protocol negotiation from the vmbus protocol negotiation. Thread-Topic: [PATCH RESEND V2 3/7] scsi: storvsc: Untangle the storage protocol negotiation from the vmbus protocol negotiation. Thread-Index: AQHQ1dUGkP4QNkX+Fku3p6bBikqDUJ4KCiBA Date: Thu, 13 Aug 2015 15:18:57 +0000 Message-ID: References: <1439480609-11099-1-git-send-email-kys@microsoft.com> <1439480632-11144-1-git-send-email-kys@microsoft.com> <1439480632-11144-3-git-send-email-kys@microsoft.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=kys@microsoft.com; x-originating-ip: [2601:600:8c01:121d:31bf:e4ce:eb9d:b03d] x-microsoft-exchange-diagnostics: 1;BLUPR03MB471;5:G24Wx28U/faA/YwnXtyOLz9TuGHb61JjRREGiz1r0MwZqNRTpaEEhNfrU4bFf48eRNtX27bg7jKznwtDVPxltg++7dwX0AS8WP9cc688slbFR1u/gnlgcR1b2JGDOdPCSGwjJV07mPbR9BP+2VbCqw==;24:sAaaj+H3k0WALlZAjFvoIP674vOMF8WbpGRS5TQRTTGXCDhqLDLFpXdnZlKXUWiFYPhOnyVzIGXglY5D2DIjdk1pyrmAM+JmMWrWjRyqa5w=;20:vdAh6IMCH8wJMVW/QPxBPj23UEA+J4wnIl/0x6CmusyW8uHh8g4KMfRUyVwiW+vxq6z9lREAQE5S+CwpWgGxyg== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB471;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB373; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(108003899814671); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401001)(5005006)(3002001);SRVR:BLUPR03MB471;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB471; x-forefront-prvs: 0667289FF8 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(479174004)(199003)(164054003)(377454003)(13464003)(189002)(5001770100001)(93886004)(5005710100001)(86362001)(2421001)(5001860100001)(5001960100002)(10090500001)(575784001)(97736004)(87936001)(4001540100001)(81156007)(4001450100002)(19580405001)(19580395003)(5001830100001)(92566002)(2656002)(102836002)(76176999)(50986999)(54356999)(101416001)(68736005)(1511001)(77096005)(8990500004)(77156002)(86612001)(62966003)(189998001)(2950100001)(5002640100001)(33656002)(10400500002)(10290500002)(105586002)(2561002)(40100003)(64706001)(46102003)(99286002)(122556002)(106356001)(76576001)(74316001)(106116001)(5003600100002)(2900100001)(3826002)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:BLUPR03MB471;H:SN1PR0301MB1662.namprd03.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Aug 2015 15:18:57.2413 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB471 X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB373;2:tH4gjQe9TlhT3spJkahTa9TD9VcPVAgR2t7rvsBeHF1oroMF2ztwTl76s5hPSDnrs5JPcR5f+N4r1hweh1zyxKQduy6KieUUHCWfqhRuMrQkpjjCC2wCkKCsqL6t/6sgYuvIgQFP+UZv10EC9ScL5EbaxxIeMGHuakfb+FH91NM=;3:OvRWMfQSufsxoWawfwg3A6ldMNYWxCraLIOzrBSzFq6GI+TKLE4h+BgNV9bMM6EUvpLFK5F9weqATnE76tQLO9REnwKNM2Jt4tU048yheZcPVDIXhIS1Vd4HjYfwniZ3AuBd5RdNcwqCgpcby8gAtg==;25:6NOEUTDYeFY2fN46NG1U/emw7yWHStNEba+EWR+vT7nL1szzh7h9dVtSsuV+1h6G2W1UGiIQmte900hi9bjmC5UmhIl9cWBWU5Uy2IQdjsTctv63/2yoxJ6bgPs8iFWu26SFGEfjoabQ+wqx1XLxYc4Mgsdj5Zpk1enLYxBWrVJs4yBYqmaedBzzZa41GIPmCojCUPbUuh28NOBCGebV4+R+dYGg+k7wA71EehsRYJLrozLbnjWb6ChKOST+GFp/SmB2dFt13FZkA6dkplb0jg==;23:g9xqI+7RMEFYR5hRjr0h8PlzobHpYqsZAYq9KbB4R+gDUllBO/oEhoM0w0xtx52fmojqeUDV5yFuESAMOP+Bjjsjd6XtGnVQcVVTiNb0MVdrpKqlepFp0pjdshREB3IvGRkGsIAWvFdE7wF3pNVb0rgS9kw7EcPr2+H5htD0+tKh10SqUxlqthRUH84yBRID X-OriginatorOrg: microsoft.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t7DFJgeQ025740 > -----Original Message----- > From: Johannes Thumshirn [mailto:jthumshirn@suse.de] > Sent: Thursday, August 13, 2015 7:34 AM > To: KY Srinivasan ; Keith Mange > > Cc: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org; > devel@linuxdriverproject.org; ohering@suse.com; > jbottomley@parallels.com; hch@infradead.org; linux-scsi@vger.kernel.org; > apw@canonical.com; vkuznets@redhat.com; jasowang@redhat.com > Subject: Re: [PATCH RESEND V2 3/7] scsi: storvsc: Untangle the storage > protocol negotiation from the vmbus protocol negotiation. > > "K. Y. Srinivasan" writes: > > > From: Keith Mange > > > > Currently we are making decisions based on vmbus protocol versions > > that have been negotiated; use storage potocol versions instead. > > > > Tested-by: Alex Ng > > Signed-off-by: Keith Mange > > Signed-off-by: K. Y. Srinivasan > > --- > > drivers/scsi/storvsc_drv.c | 109 > +++++++++++++++++++++++++++++++++++--------- > > 1 files changed, 87 insertions(+), 22 deletions(-) > > > > diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c > > index 5f9d133..f29871e 100644 > > --- a/drivers/scsi/storvsc_drv.c > > +++ b/drivers/scsi/storvsc_drv.c > > @@ -56,14 +56,18 @@ > > * V1 RC > 2008/1/31: 2.0 > > * Win7: 4.2 > > * Win8: 5.1 > > + * Win8.1: 6.0 > > + * Win10: 6.2 > > */ > > > > #define VMSTOR_PROTO_VERSION(MAJOR_, MINOR_) ((((MAJOR_) > & 0xff) << 8) | \ > > (((MINOR_) & 0xff))) > > > > +#define VMSTOR_PROTO_VERSION_WIN6 > VMSTOR_PROTO_VERSION(2, 0) > > #define VMSTOR_PROTO_VERSION_WIN7 > VMSTOR_PROTO_VERSION(4, 2) > > #define VMSTOR_PROTO_VERSION_WIN8 > VMSTOR_PROTO_VERSION(5, 1) > > - > > +#define VMSTOR_PROTO_VERSION_WIN8_1 > VMSTOR_PROTO_VERSION(6, 0) > > +#define VMSTOR_PROTO_VERSION_WIN10 > VMSTOR_PROTO_VERSION(6, 2) > > > > /* Packet structure describing virtual storage requests. */ > > enum vstor_packet_operation { > > @@ -205,6 +209,46 @@ struct vmscsi_request { > > > > > > /* > > + * The list of storage protocols in order of preference. > > + */ > > +struct vmstor_protocol { > > + int protocol_version; > > + int sense_buffer_size; > > + int vmscsi_size_delta; > > +}; > > + > > +#define VMSTOR_NUM_PROTOCOLS 5 > > can't you just use ARRAY_SIZE() here, so you don't have to touch the > constant every time a new protocol is appended to the list? Certainly. These patches have been floating around for more than a month now and if it is ok with you, I will submit a patch on top of this current series to address the concern you have raised. James, please let me know. Regards, K. Y > > > + > > +const struct vmstor_protocol > vmstor_protocols[VMSTOR_NUM_PROTOCOLS] = { > > + { > > + VMSTOR_PROTO_VERSION_WIN10, > > + POST_WIN7_STORVSC_SENSE_BUFFER_SIZE, > > + 0 > > + }, > > + { > > + VMSTOR_PROTO_VERSION_WIN8_1, > > + POST_WIN7_STORVSC_SENSE_BUFFER_SIZE, > > + 0 > > + }, > > + { > > + VMSTOR_PROTO_VERSION_WIN8, > > + POST_WIN7_STORVSC_SENSE_BUFFER_SIZE, > > + 0 > > + }, > > + { > > + VMSTOR_PROTO_VERSION_WIN7, > > + PRE_WIN8_STORVSC_SENSE_BUFFER_SIZE, > > + sizeof(struct vmscsi_win8_extension), > > + }, > > + { > > + VMSTOR_PROTO_VERSION_WIN6, > > + PRE_WIN8_STORVSC_SENSE_BUFFER_SIZE, > > + sizeof(struct vmscsi_win8_extension), > > + } > > +}; > > + > > Thanks, > Johannes > -- > Johannes Thumshirn Storage > jthumshirn@suse.de +49 911 74053 689 > SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg > GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton > HRB 21284 (AG Nürnberg) > Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850 {.n++%ݶw{.n+{G{ayʇڙ,jfhz_(階ݢj"mG?&~iOzv^m ?I