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

Re: [Embedded-pv-devel] [PATCH v15] This is the ABI for the two halves of a para-virtualized sound driver to communicate with each to other.



On Thu, 2017-01-26 at 13:23 +0200, Oleksandr Andrushchenko wrote:
> On 01/26/2017 01:09 PM, Dario Faggioli wrote:
> > > On 01/24/2017 09:13 PM, Konrad Rzeszutek Wilk wrote:
> > > > On Mon, Dec 05, 2016 at 03:05:29PM +0200, Oleksandr
> > > > Andrushchenko wrote:
> > > > > + * Example for the frontend running in domain 5, instance of
> > > > > the
> > > > > driver
> > > > > + * in the front is 0 (single or first PV driver), device id
> > > > > 2,
> > > > > + * first stream (0):
> > > > > + * /local/domain/<frontend_id>/device/vsnd/<drv_idx>/
> > > > > + *         device/<dev_id>/stream/<stream_idx>/type = "p"
> > > > > + * /local/domain/5/device/vsnd/0/device/2/stream/0/type =
> > > > > "p"
> > > > Why do you need 'device' ?
> > > > Could not this be:
> > > > 
> > > > /local/domain/5/device/vsnd/0/2/stream/0/type = "p" ?
> > > then one has to know that "2" stands for device.
> > > see above, I would keep "device" here
> >   /local/domain/5/device/vsnd/0/dev-2/stream-0/type = "p"
> > 
> > Or, with no '-':
> > 
> >   /local/domain/5/device/vsnd/0/dev2/stream0/type = "p"
> > 
> > Just my 2 cents...
> 1. Well, the only reason I have "device" here is for clarity
> and consistency: sound card owns PCM devices, PCM device owns
> streams
> We could probably have "pcm-dev" instead of "device" here,
> so we do not collide with xen device.
>
Sure. Or maybe even just 'pcm' (matter of taste, to large extent).

> 2. "dev-%d" or "dev%d", "stream-%d" or "stream%d"
> IMO, we already have indices employed in xenstore,
> e.g. "domain/5", not "domain-5" or "domain5"
> So, is the PCM device in question any different from domain
> from this POV? To me - not, so this is why I use "device/%d"
> 
True. Well, actually, have both. For instance, blkif, when multiqueue
is available are enabled, looks like this:

 /local/domain/1/device/vbd/0/multi-queue-num-queues = "2"
 /local/domain/1/device/vbd/0/queue-0 = ""
 /local/domain/1/device/vbd/0/queue-0/ring-ref = "<ring-ref#0>"
 /local/domain/1/device/vbd/0/queue-0/event-channel = "<evtchn#0>"
 /local/domain/1/device/vbd/0/queue-1 = ""
 /local/domain/1/device/vbd/0/queue-1/ring-ref = "<ring-ref#1>"
 /local/domain/1/device/vbd/0/queue-1/event-channel = "<evtchn#1>"

So, while I after all thing I agree with you on point 1) (i.e., on
having device, or pcm-dev, or pcm, the latter being my prefernce), I
think it would be ok to manage streams like blkif manages queues, and
hence using stream-0, stream-1, etc.

Regards,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Embedded-pv-devel mailing list
Embedded-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel

 


Rackspace

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