DPDK patches and discussions
 help / color / mirror / Atom feed
From: Joao Martins <joao.m.martins@oracle.com>
To: Jan Blunck <jblunck@infradead.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Vincent JARDIN <vincent.jardin@6wind.com>,
	Thomas Monjalon <thomas.monjalon@6wind.com>,
	"Tan, Jianfeng" <jianfeng.tan@intel.com>,
	Konrad Rzeszutek Wilk <konrad@kernel.org>, dev <dev@dpdk.org>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Yuanhan Liu <yuanhan.liu@linux.intel.com>,
	Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [dpdk-dev] [PATCH] maintainers: claim responsability for xen
Date: Mon, 20 Feb 2017 17:36:03 +0000	[thread overview]
Message-ID: <58AB2903.2080402@oracle.com> (raw)
In-Reply-To: <CALe+Z0153tPoor2HpNXOX57t4E_coHaNcVLnwFtL=6LFE0nr7A@mail.gmail.com>

On 02/20/2017 09:56 AM, Jan Blunck wrote:
> On Fri, Feb 17, 2017 at 5:07 PM, Konrad Rzeszutek Wilk
> <konrad.wilk@oracle.com> wrote:
>> On Thu, Feb 16, 2017 at 10:51:44PM +0100, Vincent JARDIN wrote:
>>> Le 16/02/2017 à 14:36, Konrad Rzeszutek Wilk a écrit :
>>>>> Is it time now to officially remove Dom0 support?
>>>> So we do have an prototype implementation of netback but it is waiting
>>>> for review of xen-devel to the spec.
>>>>
>>>> And I believe the implementation does utilize some of the dom0
>>>> parts of code in DPDK.
>>>
>>> Please, do you have URLs/pointers about it? It would be interesting to share
>>> it with DPDK community too.
>>
>> Joao, would it be possible to include an tarball of the patches? I know
>> they are no in the right state with the review of the staging
>> grants API - they are incompatible, but it may help folks to get
>> a feel for what DPDK APIs you used?
>>
>> Staging grants API:
>> https://lists.xenproject.org/archives/html/xen-devel/2016-12/msg01878.html
> 
> The topic of the grants API is unrelated to the dom0 memory pool. The
> memory pool which uses xen_create_contiguous_region() is used in cases
> we know that there are no hugepages available.
Correct, I think what Konrad was trying to say was that xen-netback normally
lives in a PV domain which doesn't have superpages, therefore such driver would
need that memory pool part in order to work. The mentioned spec are additions to
xen netif ABI for backend to safely map a fixed set of grant references
(recycled overtime, provided by frontend) with the purpose of avoiding grant ops
- DPDK would be one of the users.

> Joao and I met in Dublin and I whined about not being able to call
> into the grants API from userspace and instead need to kick a kernel
> driver to do the work for every burst. It would be great if that could
> change in the future.
Hm, I recall about that discussion. AFAIK you can do both grant alloc/revoke of
pages through xengntshr_share_pages(...) and xengntshr_unshare(...) APIs
provided by libxengnttab[0] starting 4.7 or, libxc on older versions with
xc_gntshr_share_pages/xc_gntshr_munmap[2]. For the notification (or kicks) you
can allocate the event channel in the guest with libevtchn[1] starting 4.7, with
xenevtchn_bind_unbound_port(...) or libxc on older versions with
xc_evtchn_bind_unbound_port(...)[2]. And kick the guest with xenevtchn_notify or
xc_evtchn_notify(...) [latter on older versions]. In short these APIs are ioctls
to /dev/gntdev and /dev/evtchn. xenstore operations can also be done in
userspace with libxenstore[3].

To have the (similar) behavior of VRING_AVAIL_F_NO_INTERRUPT (i.e. avoiding the
kicks) you "just" don't set rsp_event in ring (e.g. no calls to
RING_FINAL_CHECK_FOR_RESPONSES), and keep checking for unconsumed Rx/Tx
responses. For guest request notification (to wake up the backend for new Tx/Rx
requests), you're dependent on whether backend requests it since it's the one
setting req_event index. If it indeed sets it then you gotta use the evtchn
notify that I depicted in the previous paragraph.

Hope that helps!

Joao

[0]
https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/libs/gnttab/include/xengnttab.h;hb=HEAD
[1]
https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/libs/evtchn/include/xenevtchn.h;hb=HEAD
[2]
https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/libxc/include/xenctrl_compat.h;hb=HEAD
[3]
https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/xenstore/include/xenstore.h;hb=HEAD

  reply	other threads:[~2017-02-20 17:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-07  7:38 Jianfeng Tan
2016-11-09 22:03 ` Thomas Monjalon
2016-11-10 18:59   ` Konrad Rzeszutek Wilk
2016-11-10 20:49     ` Tan, Jianfeng
2017-02-16 11:06       ` Thomas Monjalon
2017-02-16 13:02         ` Vincent JARDIN
2017-02-16 13:36         ` Konrad Rzeszutek Wilk
2017-02-16 16:17           ` Jan Blunck
2017-02-16 21:51           ` Vincent JARDIN
2017-02-17 16:07             ` Konrad Rzeszutek Wilk
2017-02-20  9:56               ` Jan Blunck
2017-02-20 17:36                 ` Joao Martins [this message]
2017-02-20 15:33               ` Joao Martins
2017-02-23  8:49                 ` Thomas Monjalon
2017-02-23 20:10                   ` Martinx - ジェームズ
2017-05-04 22:04                   ` Thomas Monjalon
2017-05-11 11:41                     ` Tan, Jianfeng
2017-06-19 13:22                       ` Thomas Monjalon

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=58AB2903.2080402@oracle.com \
    --to=joao.m.martins@oracle.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jblunck@infradead.org \
    --cc=jianfeng.tan@intel.com \
    --cc=konrad.wilk@oracle.com \
    --cc=konrad@kernel.org \
    --cc=thomas.monjalon@6wind.com \
    --cc=vincent.jardin@6wind.com \
    --cc=xen-devel@lists.xenproject.org \
    --cc=yuanhan.liu@linux.intel.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;
as well as URLs for NNTP newsgroup(s).