All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony.perard@citrix.com>
To: <dmitry.semenets@gmail.com>
Cc: <xen-devel@lists.xenproject.org>,
	Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>,
	Wei Liu <wl@xen.org>, Juergen Gross <jgross@suse.com>,
	Dmytro Semenets <dmytro_semenets@epam.com>,
	Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>,
	Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Subject: Re: [PATCH v2 4/4] tools/xl: Add pcid daemon to xl
Date: Tue, 27 Sep 2022 18:20:50 +0100	[thread overview]
Message-ID: <YzMw8i7w7HyINjEp@perard.uk.xensource.com> (raw)
In-Reply-To: <20220713150311.4152528-4-dmitry.semenets@gmail.com>

On Wed, Jul 13, 2022 at 06:03:11PM +0300, dmitry.semenets@gmail.com wrote:
> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> 
> Add pcid daemon (based on vchan-node2) implements pcid protocol. Protocol is
> OS independed and should work on ane supported OS.
> 
> Add essential functionality to handle pcid protocol:
> - define required constants
> - prepare for handling remote requests
> - prepare and send an error packet
> 
> pcid server used if domain has passthrough PCI controller and we wants
> assign some device to other domain.
> pcid server should be launched in domain owns the PCI controller and process
> request from other domains.
> 
> Message exchange imnplementation based on JSON via libvchan. Supported
> messages:
> - make_assignable
> - revert_assignable
> - is_device_assigned
> - resource_list
> - reset_device
> - write_bdf
> 
> Signed-off-by: Dmytro Semenets <dmytro_semenets@epam.com>
> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
> Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>

Hi Dmitry,

I don't think libxl is the right place to implement a daemon, and xl
isn't the place to start a new daemon either. Could you look into
creating a new binary which implements only "pcid"?

I understand that making use of the facilities in libxl makes writing
this daemon a bit easier, but still I don't think the code belong to
libxl. Maybe some of libxl's code could be moved to libxlu (utils) if
that help, but I'm not sure.

Also, this patch is way to big, makes too many changes, including
changes to existing libxl's API which we try to avoid. (Adding new
functions is fine, changing the prototype of existing one is what we try
to avoid.)

As for the protocol, it might be better to have the description
somewhere in "docs/" instead of within a C header. I'm not sure which
sub-directory as we have protocols in different one, like in "misc" or
"design" or "features", but "misc" might be the one. Also, the document
should say somewhere that the protocol is based on JSON, as that's
missing in pcid.h.

Thanks,

-- 
Anthony PERARD


  reply	other threads:[~2022-09-27 17:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13 15:03 [PATCH v2 1/4] tools: remove xenstore entries on vchan server closure dmitry.semenets
2022-07-13 15:03 ` [PATCH v2 2/4] tools: allow vchan XenStore paths more then 64 bytes long dmitry.semenets
2022-08-01  8:59   ` Juergen Gross
2022-08-01  9:11     ` Dmytro Semenets
2022-08-01  9:17       ` Juergen Gross
2022-09-27 15:00   ` Anthony PERARD
2022-07-13 15:03 ` [PATCH v2 3/4] tools/libs/light: Add vchan support to libxl dmitry.semenets
2022-07-13 15:03 ` [PATCH v2 4/4] tools/xl: Add pcid daemon to xl dmitry.semenets
2022-09-27 17:20   ` Anthony PERARD [this message]
2022-08-01  8:57 ` [PATCH v2 1/4] tools: remove xenstore entries on vchan server closure Juergen Gross
2022-09-22  6:29   ` Jan Beulich
2022-09-27 14:37     ` Anthony PERARD

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=YzMw8i7w7HyINjEp@perard.uk.xensource.com \
    --to=anthony.perard@citrix.com \
    --cc=anastasiia_lukianenko@epam.com \
    --cc=dmitry.semenets@gmail.com \
    --cc=dmytro_semenets@epam.com \
    --cc=jgross@suse.com \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=volodymyr_babchuk@epam.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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.