From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f172.google.com (mail-ob0-f172.google.com [209.85.214.172]) by dpdk.org (Postfix) with ESMTP id AFD5D5A98 for ; Wed, 25 Feb 2015 16:52:18 +0100 (CET) Received: by mail-ob0-f172.google.com with SMTP id nt9so4668771obb.3 for ; Wed, 25 Feb 2015 07:52:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=q+Xe4v8bdyyKfRw1SJfPqCIl8wxeMYIEH6XT0f5KcL0=; b=h1y5MDE7PLQUy1Yih6hFFRLveLIiEHdhwpmguYSthp4X8svQLOTI/aSUWwgY8elDt6 YnvX+LErg+XJDIuDDxOndDMkeTIDmfucHXeLzRRc/9ypWjVHr7V8oND+VuqrRMc7Z4Yv C0pOFzWdM/WPCfdjzNxKp1u8Pl/xinqqVSqmY0GUdai5t5EhdDFZbgTfxY4OWkhywQpq xdJ9dYQzXPjbvM/QEeVgev8rp0IvqIPA2CZ+wN5SRRsChT9OHPzqdINRzfrPX7sZYtkU 3pPntF5xi9aG8TD0sEtau8P+FOSgq663hZdSeeV/JZy5VM2V+fSaj+xpzbpDaBrf7V7x UpPA== X-Gm-Message-State: ALoCoQldT/U4k/Quj+/2ZhNfDlMKFoJaM/zXOs3js1QJglc0DSo8I07a1LJOPs6/O4Np++yGP5Vq MIME-Version: 1.0 X-Received: by 10.202.102.21 with SMTP id a21mr2566542oic.118.1424879538047; Wed, 25 Feb 2015 07:52:18 -0800 (PST) Received: by 10.76.133.162 with HTTP; Wed, 25 Feb 2015 07:52:17 -0800 (PST) In-Reply-To: References: <1424710542-14637-1-git-send-email-danny.zhou@intel.com> <1424710542-14637-6-git-send-email-danny.zhou@intel.com> Date: Wed, 25 Feb 2015 16:52:17 +0100 Message-ID: From: David Marchand To: "Zhou, Danny" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v5 5/6] eal: add per rx queue interrupt handling based on VFIO X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Feb 2015 15:52:19 -0000 On Wed, Feb 25, 2015 at 4:29 PM, Zhou, Danny wrote: > > > > > *From:* David Marchand [mailto:david.marchand@6wind.com] > *Sent:* Wednesday, February 25, 2015 6:22 PM > *To:* Zhou, Danny > *Cc:* dev@dpdk.org; Liang, Cunming > *Subject:* Re: [dpdk-dev] [PATCH v5 5/6] eal: add per rx queue interrupt > handling based on VFIO > > > > > > DZ: To avoid recreating the epoll instance for each queue, the struct > rte_intr_handle(or a new structure added to ethdev) > > should be extended by adding fields storing per-queue pfd. This way, it > could reduce user/kernel context switch overhead > > when calling epoll_create() each time. > > > > Sounds good? > > > > You don't need a epfd per queue. And hardcoding epfd == eventfd will give > a not very usable api. > > > > Plus, epoll is something linux-specific, so you can't move it out of > eal/linux. > > I suppose you need an abstraction here (and in the future we could add > something for bsd ?). > > > > DZ: libev provides abstraction layer which is a good candidate to > integrate, rather than > > reinventing one I think. The BSD support can be implemented in the files > under > > lib\librte_eal\bsdapp\eal folder by calling BSD specific APIs. Maybe it is > a good idea to introduce > > a separated component like OS Adaption Layer into EAL in the future once > DPDK is widely adopted in > > BSD as well as Windows, then all DPDK components invoke Linux specific > APIs could instead calling abstraction APIs. > > > > Adding an abstraction here specifically for epoll does not resolve all the > porting/migration problem in my mind. > Yes, reusing this kind of library (or libevent) looks like a good idea. Hum, I would say eal/common is there for the common part and for the different abstractions. Do you see anything that would not fit in ? > eventfds creation can not be handled by ethdev, since it needs > infrastructure and informations from within the eal/linux. > > Again, do we need an abstraction ? > > > > ethdev must be the one that does the mappings between port/queue and > eventfds (or any object that represents a way to wake up for a given > port/queue). > > > > DZ: agreed after revisiting code. Let us follow your direction to create a > ethdev API, similar to > rte_eth_dev_rx_queue_intr_enable()/rte_eth_dev_rx_queue_intr_disable(), to > use portiid and queueid as arguments. Then this ethdev API uses the mapped > eventfds to invoke corresponding EAL API, waiting for interrupt event > notification from kernel. A V6 patchset will be created for this. > Ok, I will look at it when available. -- David Marchand