All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Olaf Hering <olaf@aepfle.de>
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 v5 3/5] libxl: add support for vscsi
Date: Wed, 13 May 2015 15:44:06 +0100	[thread overview]
Message-ID: <1431528246.8263.307.camel@citrix.com> (raw)
In-Reply-To: <1430918892-20928-4-git-send-email-olaf@aepfle.de>

Just looking at the API functions on this pass.

General comment though: Please go through and rewrap any lines longer
than 75-80, I saw quite a few as I was scrolling.

> @@ -3628,6 +3643,7 @@ static inline void libxl__update_config_vtpm(libxl__gc *gc,
>   * devices have same identifier. */
>  #define COMPARE_DEVID(a, b) ((a)->devid == (b)->devid)
>  #define COMPARE_DISK(a, b) (!strcmp((a)->vdev, (b)->vdev))
> +#define COMPARE_VSCSI(a, b) ((a)->v_hst == (b)->v_hst)

Does this end up doing the correct thing given that vscsi is a bit
different and the libxl_device_vscsi is actually a bus? Shouldn't
something somewhere be taking care that vscsi->vscsi_devs is up to date,
not just the list of the vscsi busses?


>  #define COMPARE_PCI(a, b) ((a)->func == (b)->func &&    \
>                             (a)->bus == (b)->bus &&      \
>                             (a)->dev == (b)->dev)
> libxl_vscsi_dev = Struct("vscsi_dev", [
> +    ("vscsi_dev_id",     libxl_devid),
> +    ("remove",           bool),

What is this remove field?

A libxl_vscsi_dev describes a device, not the actions which can be
performed on the device. Those are in the names of the functions.

> +    ("pdev",             libxl_vscsi_pdev),
> +    ("vdev",             libxl_vscsi_hctl),
> +    ])
> +
> +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")),
> +    ("next_vscsi_dev_id", libxl_devid),

This one also seems odd.

If you need to store state internally within libxl then you will have to
arrange to store it somewhere else, the public API structs are not
appropriate.

  parent reply	other threads:[~2015-05-13 14:44 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-06 13:28 [PATCH v5 0/5] libbxl: add support for pvscsi, iteration 5 Olaf Hering
2015-05-06 13:28 ` [PATCH v5 1/5] vscsiif.h: fix WWN notation for p-dev property Olaf Hering
2015-05-13 14:11   ` Ian Campbell
2015-05-06 13:28 ` [PATCH v5 2/5] docs: add vscsi to xenstore-paths.markdown Olaf Hering
2015-05-13 14:12   ` Ian Campbell
2015-05-06 13:28 ` [PATCH v5 3/5] libxl: add support for vscsi Olaf Hering
2015-05-13 14:23   ` Ian Campbell
2015-05-15  6:29     ` Olaf Hering
2015-05-13 14:44   ` Ian Campbell [this message]
2015-05-13 15:12     ` Ian Campbell
2015-05-13 17:31       ` Olaf Hering
2015-05-15  4:11         ` Jürgen Groß
2015-05-15  5:58           ` Olaf Hering
2015-05-15  8:47             ` Ian Campbell
2015-05-15  9:35               ` Juergen Gross
2015-05-15  9:46                 ` Ian Campbell
2015-05-15  9:48                   ` Ian Campbell
2015-05-13 17:56       ` George Dunlap
2015-05-13 15:24     ` Olaf Hering
2015-05-06 13:28 ` [PATCH v5 4/5] vscsiif.h: add some notes about xenstore layout Olaf Hering
2015-05-13 14:14   ` Ian Campbell
2015-05-06 13:28 ` [PATCH v5 5/5] Scripts to create and delete xen-scsiback nodes in Linux target framework Olaf Hering
2015-05-13 14:18   ` Ian Campbell
2015-05-13 14:37     ` 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=1431528246.8263.307.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.