All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH 4/4] libxl: add support for vscsi
Date: Mon, 2 Mar 2015 16:11:27 +0100	[thread overview]
Message-ID: <20150302151127.GA20719@aepfle.de> (raw)
In-Reply-To: <1425306666.21151.58.camel@citrix.com>

On Mon, Mar 02, Ian Campbell wrote:

> On Mon, 2015-03-02 at 15:20 +0100, Olaf Hering wrote:
> > Its used as <domid>/<vhost>/vscsi-devs/dev-<vscsi_dev_id>/.  What name
> > should be used to reference the devices? Also just "devid" even if it
> > refers to devices "private" to the vscsi host?
> Not sure. PCI uses vdevfn, which by extension would be vdevid here
> (assuming I've understood what you are suggesting correctly and
> therefore the analogy is valid).

After a quick grep its not clear what vdevfn represents. Will study that
code later. libxl_device_pci indicates that single_host:many_devices is
not used for PCI.

> Or could it be the case that there is no need to expose this value to
> the user in the first place and libxl could just make up the index
> numbers internally? Why would they want to configure it or retrieve it?

I think the actual number is internal to the backend/frontend.
Lets see -- the layout in the backend node is:

 <domid>/<N>/vscsi-devs/dev-<M>/{p-dev,v-dev,state}

N is libxl_device_vscsi->devid, just as every other backend.
M is libxl_device_vscsi->vscsi_devs->vscsi_dev_id.
One N can have several M (single host, many devices) which is different
to all other backends.

I think the issue is that if two M exists and 'scsi-detach' removes M==0
the next time something walks <domid>/<N>/vscsi-devs/ it will find just
a single entry with M==1. So this number has to be recorded.

> Is it actually the same as the offset into the vscsi_devs array?

Per the above it can not be the offset, the code has to handle holes.

> How is it intended to be different from the vdev field?

The vdev field is used to group several devices into a virtual
controller. The HOST in HOST:CHN:TGT:LUN matters. In this sense the
vscsi_dev_id is unrelated to the vdev field.

Olaf

  reply	other threads:[~2015-03-02 15:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-02 10:15 [PATCH 0/4] libbxl: add support for pvscsi, iteration 2 Olaf Hering
2015-03-02 10:15 ` [PATCH 1/4] vscsiif.h: remove reference to WWN Olaf Hering
2015-03-02 10:46   ` Jan Beulich
2015-03-02 10:50     ` Andrew Cooper
2015-03-02 10:55       ` Jürgen Groß
2015-03-02 11:00         ` Andrew Cooper
2015-03-02 10:59       ` Jan Beulich
2015-03-02 10:59   ` Juergen Gross
2015-03-02 14:34     ` Olaf Hering
2015-03-02 14:40       ` Olaf Hering
2015-03-02 14:55         ` Juergen Gross
2015-03-02 10:16 ` [PATCH 2/4] docs: add vscsi to xenstore-paths.markdown Olaf Hering
2015-03-02 10:16 ` [PATCH 3/4] docs: add pvscsi.txt Olaf Hering
2015-03-02 10:49   ` Jan Beulich
2015-03-02 11:04   ` Juergen Gross
2015-03-02 15:14     ` Olaf Hering
2015-03-02 15:35       ` Juergen Gross
2015-03-02 18:24         ` Olaf Hering
2015-03-02 10:16 ` [PATCH 4/4] libxl: add support for vscsi Olaf Hering
2015-03-02 14:20   ` Olaf Hering
2015-03-02 14:31     ` Ian Campbell
2015-03-02 15:11       ` Olaf Hering [this message]
2015-03-02 14:27   ` Olaf Hering

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=20150302151127.GA20719@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --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.