[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 4/4] tools/xl: Add pcid daemon to xl


  • To: <dmitry.semenets@xxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Tue, 27 Sep 2022 18:20:50 +0100
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Dmytro Semenets <dmytro_semenets@xxxxxxxx>, Anastasiia Lukianenko <anastasiia_lukianenko@xxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>
  • Delivery-date: Tue, 27 Sep 2022 17:21:08 +0000
  • Ironport-data: A9a23:G0B0fq4z8TRMSwbgU8bCVQxRtK/HchMFZxGqfqrLsTDasY5as4F+v mAYD2zTbP7Yamv9Kt4kb4Sxp0pUsMDWzdNnHQo4pHs1Hi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvymTras1hlZHWdMUD0mhQ9oh9k3i4tphcnRKw6Ws Jb5rta31GWNglaYCUpJrfPYwP9TlK6q4mlA7wZhPasjUGL2zBH5MrpOfcldEFOgKmVkNrbSb /rOyri/4lTY838FYj9yuu+mGqGiaue60Tmm0hK6aYD76vRxjnVaPpIAHOgdcS9qZwChxLid/ jnvWauYEm/FNoWU8AgUvoIx/ytWZcWq85efSZSzXFD6I+QrvBIAzt03ZHzaM7H09c5cOlBP3 vsENQshRR/S3Oi4z6CGcPJj05FLwMnDZOvzu1llxDDdS/0nXYrCU+PB4towMDUY354UW6yEP oxANGQpPE+ojx5nYz/7DLo3mvuogX/uNSVVsluPqYI84nTJzRw327/oWDbQUozRFJoKxx3Jz o7A1z7kOS0nLuKG8x6c6UiWj7DpnnzHUqtHQdVU8dY12QbOlwT/EiY+WV6qveO+vVWzXt9ZJ lAP0ic2pK10/0uuJvH/UAe/u2WspQMHVpxbFOhSwB+Kzq3Y8gOIHF8ORzRKaMElnMIuTDls3 ViM9/vgAzV0rLSOSHOUwbOJrjK7PyUTLmgqaDcNSE0O5NyLiJE+iFfDQ8huFIaxj8bpAnfgz jaSti88ir4Py8kR2M2T8VXGnyi94IPESwMz6xnMdm2g5wJ9IoWiYuSA9lzz/ftGaoGDQTGpu 3wJmNOX6uwUOpiLmDaQW+UGHLyv5PGtPSXVhBhkGJxJyti20yf9J8YKumg4fRo3dJZfEdP0X KPNkShq1Z54O2e3VoNcbNPqAcol35XaDtuwA5g4ceFySpR2cQaG+gRnakiRw33hnSAQrE0vB XuIWZ3yVChHUMyL2BLzHr5AiuFzmkjS0EuJHfjGIwKbPa1yjZJ/YZMMKxOwY+8w98toSy2Fo o8EZ6NmJ/iyOdASgxU7E6ZJdTjmzlBhX/gaTvC7kcbcSjeK4El7V5fsLUoJIuSJZZh9mObS5 W2aUURF0lf5jnCvAVzUNCw5MeyyDMYu9SNT0ckQ0bGAhBAejXuHtv9DJ/Pbg5F+nACc8RKEZ 6ZcIJjRahi+Yj/G5y4cffHAkWCWTzzy3FrmAsZQSGJgF3KWb1CWp4SMk8qG3HVmMxdbQuNk/ eD+j1mLHcddL+mgZe6PAM+SI5qKlSB1sIpPs4Hge7G/pG2EHFBWFhHM
  • Ironport-hdrordr: A9a23:lnlzbaBRPEOGGovlHems55DYdb4zR+YMi2TC1yhKJyC9Vvbo8/ xG/c5rsCMc5wx9ZJhNo7y90ey7MBThHP1OkOss1NWZPDUO0VHAROoJ0WKh+UyCJ8SXzJ866U 4KSclD4bPLYmRHsQ==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Jul 13, 2022 at 06:03:11PM +0300, dmitry.semenets@xxxxxxxxx wrote:
> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
> 
> 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@xxxxxxxx>
> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
> Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@xxxxxxxx>
> Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>

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



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.