From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@epam.com>
To: Stefano Stabellini <sstabellini@kernel.org>,
Oleksandr Andrushchenko <andr2000@gmail.com>
Cc: vlad.babchuk@gmail.com, andrii.anisov@gmail.com,
Stefano Stabellini <stefano@aporeto.com>,
al1img@gmail.com, JBeulich@suse.com,
xen-devel@lists.xenproject.org, joculator@gmail.com
Subject: Re: [PATCH v3] ring.h: introduce macros to handle monodirectional rings with multiple req sizes
Date: Thu, 23 Feb 2017 09:08:10 +0200 [thread overview]
Message-ID: <6dd5cb01-1eb3-ea97-53d5-9100cd9dde8c@epam.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1702220904410.9912@sstabellini-ThinkPad-X260>
Hi, Stefano!
On 02/22/2017 07:10 PM, Stefano Stabellini wrote:
> On Wed, 22 Feb 2017, Oleksandr Andrushchenko wrote:
>> Hi, Stefano, Jan!
>> 1. Stefano, are you still NOT considering adding
>> functionality to avoid memory copying? We discussed
>> this a little bit here [1].
> Hi Oleksandr,
>
> these macros are the generic versions of what pvcalls and xen-9pfs need,
> and these protocols use memory copies.
These macros will live in generic ring.h. It means that
they can be used not only by pvcalls/9pfs, but others are
allowed to use them too (kbdif/fbif/displif/??).
That being said, I am not convinced that this is a good idea
to introduce a memory copying while dealing with the packets
in an IRQ handler, for example.
So, my point is that we should give a possibility to directly
access ring's contents, which will not be used in your case.
> I cannot introduce memory sharing
> interfaces as part of this patch, because they wouldn't comply to
> pvcalls or xen-9pfs
Again, you are thinking of pvcalls/9pfs, but none of the macros
say they are for these use-cases: anyone can use them
> and I don't have another test case for them.
> But if you had a patch to introduce them in ring.h, I would be happy to
> help you review it.
>
No, I don't have any, sorry
>> 2. Will you also provide macros/inlines for fixed sized packets?
>> So, others do not reinvent the wheel again on top of your code.
> I thought I already did: you can read/write fixed sized packets using
> the two read/write_packet functions.
I was thinking of something like we have for req/resp
DEFINE_RING_TYPES(fsif, struct fsif_request, struct fsif_response);
so you don't need to care of sizeof(req/resp/event)
Thank you,
Oleksandr
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-02-23 7:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-21 23:25 [PATCH v3] ring.h: introduce macros to handle monodirectional rings with multiple req sizes Stefano Stabellini
2017-02-22 7:16 ` Oleksandr Andrushchenko
2017-02-22 7:40 ` Jan Beulich
2017-02-22 7:47 ` Oleksandr Andrushchenko
2017-02-22 7:54 ` Jan Beulich
2017-02-22 17:10 ` Stefano Stabellini
2017-02-23 7:08 ` Oleksandr Andrushchenko [this message]
2017-02-23 18:45 ` Stefano Stabellini
2017-02-27 7:02 ` Oleksandr Andrushchenko
2017-02-27 22:17 ` Stefano Stabellini
2017-02-28 7:11 ` Oleksandr Andrushchenko
2017-02-28 19:46 ` Stefano Stabellini
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=6dd5cb01-1eb3-ea97-53d5-9100cd9dde8c@epam.com \
--to=oleksandr_andrushchenko@epam.com \
--cc=JBeulich@suse.com \
--cc=al1img@gmail.com \
--cc=andr2000@gmail.com \
--cc=andrii.anisov@gmail.com \
--cc=joculator@gmail.com \
--cc=sstabellini@kernel.org \
--cc=stefano@aporeto.com \
--cc=vlad.babchuk@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).