From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Coquelin Subject: Re: [PATCH v6 1/2] vhost: add support for interrupt mode Date: Fri, 13 Apr 2018 11:15:47 +0200 Message-ID: <68db4761-520a-1bc2-f7dc-fe75078d88c8@redhat.com> References: <1523206226-27205-1-git-send-email-junjie.j.chen@intel.com> <1523550514-44037-1-git-send-email-junjie.j.chen@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Junjie Chen , jianfeng.tan@intel.com, mtetsuyah@gmail.com Return-path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id D98671BC56 for ; Fri, 13 Apr 2018 11:15:50 +0200 (CEST) In-Reply-To: <1523550514-44037-1-git-send-email-junjie.j.chen@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 04/12/2018 06:28 PM, Junjie Chen wrote: > In some cases we want vhost dequeue work in interrupt mode to > release cpus to others when no data to transmit. So we install > interrupt handler of vhost device and interrupt vectors for each > rx queue when creating new backend according to vhost intrerupt > configuration. Thus, applications could register a epoll event fd > to associate rx queues with interrupt vectors. > > Signed-off-by: Junjie Chen > --- > Changes in v6: > - rebase code to master > Changes in v5: > - update license to DPDK new license format > - rebase code to master > Changes in v4: > - revert back license change > Changes in v3: > - handle failure in the middle of intr setup. > - use vhost API to enable interrupt. > - rebase to check rxq existence. > - update vhost API to support guest notification. > Changes in v2: > - update rx queue index. > - fill efd_counter_size for intr handler. > - update log. > drivers/net/vhost/rte_eth_vhost.c | 158 +++++++++++++++++++++++++++++++++++++- > lib/librte_vhost/vhost.c | 14 ++-- > 2 files changed, 163 insertions(+), 9 deletions(-) > Applied to dpdk-next-virtio/master. Please next time run checkpatch before posting, I had to fix below errors when applying. Thanks, Maxime ### [dpdk-dev,v6,1/2] vhost: add support for interrupt mode CHECK:BRACES: braces {} should be used on all arms of this statement #208: FILE: drivers/net/vhost/rte_eth_vhost.c:743: + if (rte_atomic32_read(&internal->started) == 1) { [...] else [...] ERROR:TRAILING_WHITESPACE: trailing whitespace #237: FILE: drivers/net/vhost/rte_eth_vhost.c:939: +^I$ ERROR:TRAILING_WHITESPACE: trailing whitespace #282: FILE: lib/librte_vhost/vhost.c:554: +^Ielse^I$ total: 2 errors, 0 warnings, 225 lines checked 0/1 valid patch