From: Greg KH <greg@kroah.com>
To: Ky Srinivasan <ksrinivasan@novell.com>
Cc: devel@driverdev.osuosl.org, Virtualization@lists.osdl.org,
Haiyang Zhang <haiyangz@microsoft.com>, Greg KH <gregkh@suse.de>
Subject: Re: [PATCH]: An implementation of HyperV KVP functionality
Date: Fri, 12 Nov 2010 10:47:53 -0800 [thread overview]
Message-ID: <20101112184753.GA20893@kroah.com> (raw)
In-Reply-To: <4CDD1FAA02000030000903B8@novprvoes0310.provo.novell.com>
On Fri, Nov 12, 2010 at 11:06:18AM -0700, Ky Srinivasan wrote:
> >> +typedef struct kvp_msg {
> >> + __u32 kvp_key; /* Key */
> >> + __u8 kvp_value[0]; /* Corresponding value */
> >> +} kvp_msg_t;
> >
> > I thought that kvp_value was really KVP_VALUE_SIZE?
>
> kvp_value is typed information and KVP_VALUE_SIZE specifies the
> maximum size of the supported value. For instance if kvp_value is a
> string (which is the case for all the values currently supported),
> KVP_VALUE_SIZE specifies the maximum size of the string that will be
> supported.
So it's a variable length structure? How do you konw how long the
structure is, does that depend on the key?
> > And no typedefs, you did run your code through checkpatch.pl, right?
> > Why ignore the stuff it spits back at you?
> I will fix this.
> >
> >
> >> +static char *kvp_keys[KVP_MAX_KEY] = {"FullyQualifiedDomainName",
> >> + "IntegrationServicesVersion",
> >> + "NetworkAddressIPv4",
> >> + "NetworkAddressIPv6",
> >> + "OSBuildNumber",
> >> + "OSName",
> >> + "OSMajorVersion",
> >> + "OSMinorVersion",
> >> + "OSVersion",
> >> + "ProcessorArchitecture",
> >> + };
> >
> > Why list these at all, as more might come in the future, and the kernel
> > really doesn't care about them, right?
> The core HyperV KVP protocol is such that the host iterates through an
> index (starting with 0); the guest is free to associate a key with the
> index and return the associated value. The host side iteration is
> stopped when the guest returns a failure on an index. MSFT has
> specified the keys and their ordinal value in their KVP specification.
> The array you see above is part of that specification.
So you match on the string name of the key? I'm confused, as I didn't
think I saw you matching on the string name, only the key value.
Also, as the kernel isn't handling the key type (with one exception),
why even list these in the kernel at all? I'm all for documenting
stuff, but don't use code memory for documentation :)
> >> --- linux.trees.git.orig/include/linux/connector.h 2010-11-09 17:22:15.000000000
> > -0500
> >> +++ linux.trees.git/include/linux/connector.h 2010-11-11 13:14:52.000000000
> > -0500
> >> @@ -42,8 +42,9 @@
> >> #define CN_VAL_DM_USERSPACE_LOG 0x1
> >> #define CN_IDX_DRBD 0x8
> >> #define CN_VAL_DRBD 0x1
> >> +#define CN_KVP_IDX 0x9 /* MSFT KVP functionality */
> >
> > Did you reserve this number with anyone? Who?
>
> I sent an email to Evgeniy Polyakov (Johnpol@2ka.mipt). The mail
> bounced back. I was hoping you would help me register this index.
> Would it make sense to have a separate patch to deal with registering
> this index?
Yes, as I can not modify non-staging code without an ack from that
maintainer. And I'm pretty sure that Evgeniy's address has just
changed, use "Evgeniy Polyakov <zbr@ioremap.net>" instead.
thanks,
greg k-h
next prev parent reply other threads:[~2010-11-12 18:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-11 20:03 [PATCH]: An implementation of HyperV KVP functionality Ky Srinivasan
2010-11-11 20:49 ` Stephen Hemminger
2010-11-12 16:57 ` Ky Srinivasan
2010-11-12 16:57 ` Ky Srinivasan
2010-11-12 16:57 ` Ky Srinivasan
2010-11-11 21:15 ` Greg KH
2010-11-12 18:06 ` Ky Srinivasan
2010-11-12 18:47 ` Greg KH [this message]
2010-11-12 20:59 ` Ky Srinivasan
2010-11-12 21:38 ` Greg KH
2010-11-11 21:19 ` Greg KH
2010-11-12 18:29 ` Ky Srinivasan
2010-11-12 19:22 ` Greg KH
2010-11-14 10:46 ` Dor Laor
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=20101112184753.GA20893@kroah.com \
--to=greg@kroah.com \
--cc=Virtualization@lists.osdl.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=haiyangz@microsoft.com \
--cc=ksrinivasan@novell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.