From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Loic PALLARDY <loic.pallardy@st.com>,
linux-remoteproc <linux-remoteproc@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 00/10] rpmsg: Make RPMSG name service modular
Date: Thu, 24 Sep 2020 12:18:53 -0600 [thread overview]
Message-ID: <20200924181853.GA1177445@xps15> (raw)
In-Reply-To: <20200924065355.GA20502@ubuntu>
On Thu, Sep 24, 2020 at 08:53:56AM +0200, Guennadi Liakhovetski wrote:
> Hi Mathieu,
>
> Sorry for a delayed response, after I'd sent that my message I've
> subscribed to remoteproc and it seems during that transition some
> messages were only delivered from the list and not directly to me
> or something similar has happened.
>
Ok
> On Tue, Sep 22, 2020 at 01:12:41PM -0600, Mathieu Poirier wrote:
> > Good day Guennadi,
> >
> > On Tue, 22 Sep 2020 at 02:09, Guennadi Liakhovetski
> > <guennadi.liakhovetski@linux.intel.com> wrote:
> > >
> > > Hi Mathieu,
> > >
> > > Thanks for the patches. I'm trying to understand the concept of
> > > this approach and I'm probably failing at that. It seems to me
> > > that this patch set is making the NS announcement service to a
> > > separate RPMsg device and I don't understand the reasoning for
> > > doing this. As far as I understand namespace announcements
> > > belong to RPMsg devices / channels, they create a dedicated
> > > endpoint on them with a fixed pre-defined address. But they
> > > don't form a separate RPMsg device. I think the current
> > > virtio_rpmsg_bus.c has that correctly: for each rpmsg device /
> > > channel multiple endpoints can be created, where the NS
> > > service is one of them. It's just an endpoing of an rpmsg
> > > device, not a complete separate device. Have I misunderstood
> > > anything?
> >
> > This patchset does not introduce any new features - the end result in
> > terms of functionality is exactly the same. It is also a carbon copy
> > of the work introduced by Arnaud (hence reusing his patches), with the
> > exception that the code is presented in a slightly different order to
> > allow for a complete dissociation of RPMSG name service from the
> > virtIO transport mechanic.
> >
> > To make that happen rpmsg device specific byte conversion operations
> > had to be introduced in struct rpmsg_device_ops and the explicit
> > creation of an rpmsg_device associated with the name service (that
> > wasn't needed when name service was welded to virtIO). But
> > associating a rpmsg_device to the name service doesn't change anything
> > - RPMSG devices are created the same way when name service messages
> > are received from the host or the remote processor.
>
> Yes, the current rpmsg-virtio code does create *one* rpmsg device when
> an NS announcement arrives.
Currently an rpmsg_device is created each time a NS announcement is received.
> Whereas with this patch set the first rpmsg
> device would be created to probe the NS service driver and the next one
> would still be created following the code borrowed from rpmsg-virtio
> when an NS announcement arrives. And I don't see how those two devices
> now make sense, sorry. I understand one device per channel, but two, of
> which one is for a certain endpoing only, whereas other endpoints don't
> create their devices, don't seem very logical to me.
In the current implementation the NS service channel is created automatically
when instantiating an rproc_vdev. An official rpmsg_device is not needed since
it is implicit. With this set (and as you noted above) an rpmsg_device to
represent the NS service is registered, the same way other services such as
rpmsg_chrdev are. After that nothing else changes and no other rpmgs_device
are created until NS request come in. When an NS request does come in an
rpmsg_device is created, and that for each request that is received.
>
> Thanks
> Guennadi
>
> > To prove my theory I ran the rpmsg_client_sample.c and it just worked,
> > no changes to client code needed.
> >
> > Let's keep talking, it's the only way we'll get through this.
> >
> > Mathieu
> >
> > >
> > > Thanks
> > > Guennadi
> > >
> > > On Mon, Sep 21, 2020 at 06:09:50PM -0600, Mathieu Poirier wrote:
> > > > Hi all,
> > > >
> > > > After looking at Guennadi[1] and Arnaud's patchsets[2] it became
> > > > clear that we need to go back to a generic rpmsg_ns_msg structure
> > > > if we wanted to make progress. To do that some of the work from
> > > > Arnaud had to be modified in a way that common name service
> > > > functionality was transport agnostic.
> > > >
> > > > This patchset is based on Arnaud's work but also include a patch
> > > > from Guennadi and some input from me. It should serve as a
> > > > foundation for the next revision of [1].
> > > >
> > > > Applies on rpmsg-next (4e3dda0bc603) and tested on stm32mp157. I
> > > > did not test the modularisation.
> > > >
> > > > Comments and feedback would be greatly appreciated.
> > > >
> > > > Thanks,
> > > > Mathieu
> > > >
> > > > [1]. https://patchwork.kernel.org/project/linux-remoteproc/list/?series=346593
> > > > [2]. https://patchwork.kernel.org/project/linux-remoteproc/list/?series=338335
> > > >
> > > > Arnaud Pouliquen (5):
> > > > rpmsg: virtio: rename rpmsg_create_channel
> > > > rpmsg: core: Add channel creation internal API
> > > > rpmsg: virtio: Add rpmsg channel device ops
> > > > rpmsg: Turn name service into a stand alone driver
> > > > rpmsg: virtio: use rpmsg ns device for the ns announcement
> > > >
> > > > Guennadi Liakhovetski (1):
> > > > rpmsg: Move common structures and defines to headers
> > > >
> > > > Mathieu Poirier (4):
> > > > rpmsg: virtio: Move virtio RPMSG structures to private header
> > > > rpmsg: core: Add RPMSG byte conversion operations
> > > > rpmsg: virtio: Make endianness conversion virtIO specific
> > > > rpmsg: ns: Make Name service module transport agnostic
> > > >
> > > > drivers/rpmsg/Kconfig | 9 +
> > > > drivers/rpmsg/Makefile | 1 +
> > > > drivers/rpmsg/rpmsg_core.c | 96 +++++++++++
> > > > drivers/rpmsg/rpmsg_internal.h | 102 +++++++++++
> > > > drivers/rpmsg/rpmsg_ns.c | 108 ++++++++++++
> > > > drivers/rpmsg/virtio_rpmsg_bus.c | 284 +++++++++----------------------
> > > > include/linux/rpmsg_ns.h | 83 +++++++++
> > > > include/uapi/linux/rpmsg.h | 3 +
> > > > 8 files changed, 487 insertions(+), 199 deletions(-)
> > > > create mode 100644 drivers/rpmsg/rpmsg_ns.c
> > > > create mode 100644 include/linux/rpmsg_ns.h
> > > >
> > > > --
> > > > 2.25.1
> > > >
next prev parent reply other threads:[~2020-09-24 18:18 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-22 0:09 [PATCH 00/10] rpmsg: Make RPMSG name service modular Mathieu Poirier
2020-09-22 0:09 ` [PATCH 01/10] rpmsg: virtio: rename rpmsg_create_channel Mathieu Poirier
2020-09-22 7:06 ` Guennadi Liakhovetski
2020-09-22 19:22 ` Mathieu Poirier
2020-09-22 0:09 ` [PATCH 02/10] rpmsg: core: Add channel creation internal API Mathieu Poirier
2020-09-30 6:35 ` Guennadi Liakhovetski
2020-10-01 14:46 ` Arnaud POULIQUEN
2020-09-22 0:09 ` [PATCH 03/10] rpmsg: virtio: Add rpmsg channel device ops Mathieu Poirier
2020-09-22 0:09 ` [PATCH 04/10] rpmsg: Move common structures and defines to headers Mathieu Poirier
2020-09-22 14:26 ` Arnaud POULIQUEN
2020-09-22 19:36 ` Mathieu Poirier
2020-09-30 6:54 ` Guennadi Liakhovetski
2020-09-22 0:09 ` [PATCH 05/10] rpmsg: virtio: Move virtio RPMSG structures to private header Mathieu Poirier
2020-09-22 14:27 ` Arnaud POULIQUEN
2020-09-30 7:03 ` Guennadi Liakhovetski
2020-10-07 17:14 ` Mathieu Poirier
2020-09-22 0:09 ` [PATCH 06/10] rpmsg: Turn name service into a stand alone driver Mathieu Poirier
2020-09-23 1:23 ` kernel test robot
2020-09-30 7:09 ` Guennadi Liakhovetski
2020-10-01 16:14 ` Arnaud POULIQUEN
2020-09-22 0:09 ` [PATCH 07/10] rpmsg: virtio: use rpmsg ns device for the ns announcement Mathieu Poirier
2020-09-22 0:09 ` [PATCH 08/10] rpmsg: core: Add RPMSG byte conversion operations Mathieu Poirier
2020-09-22 1:07 ` Randy Dunlap
2020-09-22 14:34 ` Arnaud POULIQUEN
2020-09-22 19:46 ` Mathieu Poirier
2020-09-23 11:56 ` Dan Carpenter
2020-09-30 7:11 ` Guennadi Liakhovetski
2020-09-22 0:09 ` [PATCH 09/10] rpmsg: virtio: Make endianness conversion virtIO specific Mathieu Poirier
2020-09-23 1:08 ` kernel test robot
2020-09-22 0:10 ` [PATCH 10/10] rpmsg: ns: Make Name service module transport agnostic Mathieu Poirier
2020-09-23 2:39 ` kernel test robot
2020-09-30 7:13 ` Guennadi Liakhovetski
2020-10-07 17:26 ` Mathieu Poirier
2020-09-22 8:09 ` [PATCH 00/10] rpmsg: Make RPMSG name service modular Guennadi Liakhovetski
2020-09-22 19:12 ` Mathieu Poirier
2020-09-24 6:53 ` Guennadi Liakhovetski
2020-09-24 18:18 ` Mathieu Poirier [this message]
[not found] <20200928094941.GA4848@ubuntu>
2020-09-28 19:33 ` Mathieu Poirier
2020-09-30 5:34 ` Guennadi Liakhovetski
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=20200924181853.GA1177445@xps15 \
--to=mathieu.poirier@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=guennadi.liakhovetski@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=loic.pallardy@st.com \
--cc=ohad@wizery.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox