All of lore.kernel.org
 help / color / mirror / Atom feed
From: "al1img ." <al1img@gmail.com>
To: Juergen Gross <jgross@suse.com>
Cc: xen-devel@lists.xenproject.org,
	Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Subject: Re: [PATCH 0/2] libxl: add PV display device driver interface
Date: Thu, 23 Mar 2017 13:32:11 +0200	[thread overview]
Message-ID: <CACvf2oXU+Ga5VXHUZhH7i7_MmDq+Upjt3MqsmbVkOVya-WZoxQ@mail.gmail.com> (raw)
In-Reply-To: <1192be01-11f3-f1d7-949a-2787d7ae7e61@suse.com>

Hi Juergen,

I've checked the mentioned commits. And I don't see how it can be done.
The duplication I see it is in libxl_device_type.add and
libxl_device_type.list functions
for different PV devices. These functions have a lot of common code
which I've tried
to move to macros in my patches.

2017-03-23 12:21 GMT+02:00 Juergen Gross <jgross@suse.com>:
> On 23/03/17 11:10, Oleksandr Grytsov wrote:
>> From: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
>>
>> Hi all,
>>
>> We are working on series of PV drivers (display, sound, input etc.) and
>> would like to add their support to libxl and xl. These patches add PV display
>> device. PV display is based on [1] protocol.
>>
>> During implementation I see a lot of code duplication. This problem was
>> mentioned in [2]. One of the solutions was to implement common parts in IDL
>> and make them autogenerated. On my side, to minimize the copy/pasting
>> I've moved common parts into macro functions: LIBXL_DEFINE_DEVICE_COMMIT,
>> LIBXL_DEFINE_DEVICE_LIST_GET, LIBXL_DEFINE_DEVICE_GETINFO etc.
>> Existing PV devices implementations can be reworked to use these macros as
>> well. Any other proposals to avoid the duplications are welcome.
>
> Did you look into the device type framework I introduced with commit
> 74e857c6c7f9 and some followups? Maybe it is possible to expand this
> framework by adding more callbacks to struct libxl_device_type and
> have some common function(s) in libxl_device.c?
>
> Juergen



-- 
Best Regards,
Oleksandr Grytsov.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-03-23 11:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-23 10:10 [PATCH 0/2] libxl: add PV display device driver interface Oleksandr Grytsov
2017-03-23 10:10 ` [PATCH 1/2] " Oleksandr Grytsov
2017-03-23 10:10 ` [PATCH 2/2] xl: add PV display device commands Oleksandr Grytsov
2017-03-23 10:21 ` [PATCH 0/2] libxl: add PV display device driver interface Juergen Gross
2017-03-23 11:32   ` al1img . [this message]
2017-03-23 12:08     ` Juergen Gross
2017-03-23 14:23       ` al1img .
2017-03-23 14:58         ` Juergen Gross
2017-03-23 15:55           ` al1img .
2017-03-24 10:35             ` Oleksandr Grytsov
2017-03-27 15:10               ` Wei Liu

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=CACvf2oXU+Ga5VXHUZhH7i7_MmDq+Upjt3MqsmbVkOVya-WZoxQ@mail.gmail.com \
    --to=al1img@gmail.com \
    --cc=jgross@suse.com \
    --cc=oleksandr_grytsov@epam.com \
    --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.