From: Ian Campbell <ian.campbell@citrix.com>
To: Olaf Hering <olaf@aepfle.de>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>,
xen-devel@lists.xen.org, Wei Liu <wei.liu2@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH v3 4/4] libxl: add support for vscsi
Date: Fri, 13 Mar 2015 14:18:02 +0000 [thread overview]
Message-ID: <1426256282.32572.154.camel@citrix.com> (raw)
In-Reply-To: <20150313134420.GC25259@aepfle.de>
On Fri, 2015-03-13 at 14:44 +0100, Olaf Hering wrote:
> On Thu, Mar 12, Ian Campbell wrote:
>
> > On Thu, 2015-03-12 at 17:20 +0100, Olaf Hering wrote:
> > > On Wed, Mar 11, Ian Campbell wrote:
> > >
> > > > On Fri, 2015-03-06 at 10:45 +0100, Olaf Hering wrote:
> > > > > +int libxl_device_vscsi_parse_pdev(libxl__gc *gc, char *pdev, unsigned int *hst,
> > > > > + unsigned int *chn, unsigned int *tgt,
> > > > > + unsigned int *lun)
> > > > > +{
> > > > > +
> > > > > + return ERROR_NOPARAVIRT;
> > > > That's a rather odd error code to use here.
> > > What error should be returned?
> > Take a look at the list and find one that fits, or look at other similar
> > stub functions. If there is no suitable existing error code then feel
> > free to add one.
>
> NOPARAVIRT looked like a perfect fit, there are no PV drivers for BSD.
Which has no impact on the ability to parse a pdev or not.
(Also this error code is used when it is not possible to speak the pv
control protocol, but you weren't to know that)
> I will use something else then.
Thanks.
> > > > > +libxl_vscsi_hctl = Struct("vscsi_hctl", [
> > > > > + ("hst", uint32),
> > > > > + ("chn", uint32),
> > > > > + ("tgt", uint32),
> > > > > + ("lun", uint32),
> > > > > + ])
> > > > > +libxl_vscsi_dev = Struct("vscsi_dev", [
> > > > > + ("vscsi_dev_id", libxl_devid),
> > > > > + ("remove", bool),
> > > > > + ("p_devname", string),
> > > > > + ("pdev_type", libxl_vscsi_pdev_type),
> > > > > + ("pdev", libxl_vscsi_hctl),
> > > > > + ("vdev", libxl_vscsi_hctl),
> > > > Are these last two valid for LIBXL_VSCSI_PDEV_TYPE != HCTL?
> > > At least for vdev, which is always in HCTL format.
> > > pdev is kind of orphan in case of LIBXL_VSCSI_PDEV_TYPE_WWN. The code
> > > records pdev.lun somewhere, just in case. But in the end the LUN is
> > > already part of the cfg string so nothing needs to make use of pdev
> > > anymore.
> > Perhaps pdev should be in the !WWN part of a KeyedUnion then?
>
> Its not clear to me how a Union would look like. I will study the other
> usages. From a quick look the layout may look like:
>
> DEV { pdev, vdev }
> WWN { string, vdev }
> HCTL { pdev, vdev }
I don't think vdev should be in the union.
I don't know what the keys are so I can't comment on what should be in
them.
>
> > > > > + ])
> > > > > +
> > > > > +libxl_device_vscsi = Struct("device_vscsi", [
> > > > > + ("backend_domid", libxl_domid),
> > > > > + ("devid", libxl_devid),
> > > > > + ("v_hst", uint32),
> > > > > + ("vscsi_devs", Array(libxl_vscsi_dev, "num_vscsi_devs")),
> > > > > + ("feature_host", bool),
> > > > What is this feature thing? What does !host imply?
> > > This enables raw SCSI command passthrough in xenlinux. If the flag is
> > > off then each command is checked. The check allows many commands to
> > > passthrough, one command needs emulation and unhandled commands are
> > > rejected. The flag is a noop in pvops because it doesnt look at such
> > > flag. I was told its not required, dont know the details.
> > Sounds like it at the very least needs a better name.
>
> Ok, will rename it to feature_noemul or feature_xenlinux_raw_scsicmd or
> whatever.
Neither of those appear to be a good description of what you say quoted
above.
It sounds somewhat analogous to the pciback permissive mode, but I don't
know that for sure.
Also, should this be a defbool or not?
Ian.
next prev parent reply other threads:[~2015-03-13 14:18 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-06 9:45 [PATCH v3 0/4] libbxl: add support for pvscsi, iteration 3 Olaf Hering
2015-03-06 9:45 ` [PATCH v3 1/4] vscsiif.h: fix WWN notation for p-dev property Olaf Hering
2015-03-06 9:45 ` [PATCH v3 2/4] docs: add vscsi to xenstore-paths.markdown Olaf Hering
2015-03-06 13:55 ` Wei Liu
2015-03-06 15:07 ` Olaf Hering
2015-03-06 9:45 ` [PATCH v3 3/4] docs: add pvscsi.txt Olaf Hering
2015-03-06 13:55 ` Wei Liu
2015-03-06 15:11 ` Olaf Hering
2015-03-06 15:37 ` Wei Liu
2015-03-11 15:23 ` Ian Campbell
2015-03-06 9:45 ` [PATCH v3 4/4] libxl: add support for vscsi Olaf Hering
2015-03-06 14:31 ` Wei Liu
2015-03-06 15:25 ` Olaf Hering
2015-03-06 15:53 ` Wei Liu
2015-03-09 16:08 ` Olaf Hering
2015-03-09 16:46 ` Wei Liu
2015-03-11 15:24 ` Ian Campbell
2015-03-11 15:33 ` Ian Campbell
2015-03-11 16:02 ` Olaf Hering
2015-03-11 16:09 ` Ian Campbell
2015-03-13 13:49 ` Olaf Hering
2015-03-11 16:06 ` Olaf Hering
2015-03-12 16:07 ` Olaf Hering
2015-03-12 16:47 ` Ian Campbell
2015-03-13 13:45 ` Olaf Hering
2015-03-13 15:10 ` Wei Liu
2015-03-16 8:16 ` Olaf Hering
2015-03-16 11:30 ` Wei Liu
2015-03-12 16:20 ` Olaf Hering
2015-03-12 16:46 ` Ian Campbell
2015-03-13 13:44 ` Olaf Hering
2015-03-13 14:18 ` Ian Campbell [this message]
2015-03-26 12:55 ` Olaf Hering
2015-03-26 13:46 ` Ian Campbell
2015-03-27 7:38 ` Olaf Hering
2015-04-10 9:23 ` wating for backend changes (was Re: [PATCH v3 4/4] libxl: add support for vscsi) Olaf Hering
2015-04-14 15:55 ` Olaf Hering
2015-04-15 11:50 ` Ian Jackson
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=1426256282.32572.154.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=olaf@aepfle.de \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/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.