From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CCC5442C01; Thu, 1 Jun 2023 10:29:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A45AF406BA; Thu, 1 Jun 2023 10:29:44 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id ECC73406B3 for ; Thu, 1 Jun 2023 10:29:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685608182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wdqw0QFaHC5hM2ApalQPQQPwdJmJBVausmSpvJvIc+4=; b=NbZ97xnj7px5pak+eeMZJGcCC4/xpoNk7bo9OHDTK2V/f/QSk7N72t3+97VrZv1YkI42RA G+B4CoO9KZQ09Y/z86unRfICoz/l1OEPYU//Q4tyXSEc1bcShHTKKOaV9fwJBPk73TJ0BV 6WekisCzt9Mdlzki9bBickuFLlZPxMY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-462-1h77TupIN4eYYgGn4UlxVA-1; Thu, 01 Jun 2023 04:29:39 -0400 X-MC-Unique: 1h77TupIN4eYYgGn4UlxVA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0C637811E7C; Thu, 1 Jun 2023 08:29:39 +0000 (UTC) Received: from [10.39.208.25] (unknown [10.39.208.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8127A492B0A; Thu, 1 Jun 2023 08:29:37 +0000 (UTC) Message-ID: <16467869-9918-2526-1435-acf4615f9ba3@redhat.com> Date: Thu, 1 Jun 2023 10:29:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 To: Eelco Chaudron , "Xia, Chenbo" Cc: Thomas Monjalon , david.marchand@redhat.com, dev@dpdk.org References: <168431450017.558450.16680518469610688737.stgit@ebuild.local> <168431455219.558450.14986601389394385835.stgit@ebuild.local> <49ec9930-66b8-fc95-72ad-5cb012ed8635@redhat.com> <16690234.Ash8RoxBsO@thomas> <7f1be920-0318-ae7f-4c2e-cc08b2083f7c@redhat.com> <11c40eca-5847-dfb4-470d-7da86fe7e51e@redhat.com> From: Maxime Coquelin Subject: Re: [PATCH v3 4/4] vhost: add device op to offload the interrupt kick In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 6/1/23 10:15, Eelco Chaudron wrote: > > > On 1 Jun 2023, at 4:18, Xia, Chenbo wrote: > >>> -----Original Message----- >>> From: Maxime Coquelin >>> Sent: Wednesday, May 31, 2023 5:29 PM >>> To: Xia, Chenbo ; Thomas Monjalon >>> ; Eelco Chaudron ; >>> david.marchand@redhat.com >>> Cc: dev@dpdk.org >>> Subject: Re: [PATCH v3 4/4] vhost: add device op to offload the interrupt >>> kick >>> >>> >>> >>> On 5/31/23 08:19, Xia, Chenbo wrote: >>>>> -----Original Message----- >>>>> From: Maxime Coquelin >>>>> Sent: Tuesday, May 30, 2023 11:17 PM >>>>> To: Thomas Monjalon ; Eelco Chaudron >>>>> ; Xia, Chenbo ; >>>>> david.marchand@redhat.com >>>>> Cc: dev@dpdk.org >>>>> Subject: Re: [PATCH v3 4/4] vhost: add device op to offload the >>> interrupt >>>>> kick >>>>> >>>>> >>>>> >>>>> On 5/30/23 15:16, Thomas Monjalon wrote: >>>>>> 30/05/2023 15:02, Maxime Coquelin: >>>>>>> >>>>>>> On 5/17/23 11:09, Eelco Chaudron wrote: >>>>>>>> This patch adds an operation callback which gets called every time >>> the >>>>>>>> library wants to call eventfd_write(). This eventfd_write() call >>> could >>>>>>>> result in a system call, which could potentially block the PMD >>> thread. >>>>>>>> >>>>>>>> The callback function can decide whether it's ok to handle the >>>>>>>> eventfd_write() now or have the newly introduced function, >>>>>>>> rte_vhost_notify_guest(), called at a later time. >>>>>>>> >>>>>>>> This can be used by 3rd party applications, like OVS, to avoid >>> system >>>>>>>> calls being called as part of the PMD threads. >>>>>>>> >>>>>>>> Signed-off-by: Eelco Chaudron >>>>>>>> --- >>>>>>>> lib/vhost/meson.build | 2 ++ >>>>>>>> lib/vhost/rte_vhost.h | 23 +++++++++++++++++- >>>>>>>> lib/vhost/socket.c | 63 >>>>> ++++++++++++++++++++++++++++++++++++++++++++++--- >>>>>>>> lib/vhost/version.map | 9 +++++++ >>>>>>>> lib/vhost/vhost.c | 38 ++++++++++++++++++++++++++++++ >>>>>>>> lib/vhost/vhost.h | 58 ++++++++++++++++++++++++++++++++--- >>> --- >>>>> ------- >>>>>>>> 6 files changed, 171 insertions(+), 22 deletions(-) >>>>>>>> >>>>>>> >>>>>>> >>>>>>> The patch looks good to me, but that's the first time we use function >>>>>>> versioning in Vhost library, so I'd like another pair of eyes to be >>>>> sure >>>>>>> I don't miss anything. >>>>>>> >>>>>>> Reviewed-by: Maxime Coquelin >>>>>>> >>>>>>> Thomas, do we need to mention it somewhere in the release note? >>>>>> >>>>>> If compatibility is kept, I think we don't need to mention it. >>>>>> >>>>>> >>>>> >>>>> Thanks Thomas for the information. >>>>> >>>>> Maxime >>>> >>>> About release note, except the versioning, there is also one new API >>> introduced >>>> in this patch, so we still need to mention this in release note >>> >>> Right, good catch. >>> Eelco, let me know what you would put, I'll add it while applying (No >>> need for a new revision). >> >> Btw, the vhost_lib.rst also needs a new item.. > > What about the following? > > diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst > index e8bb8c9b7b..0f964d7a4a 100644 > --- a/doc/guides/prog_guide/vhost_lib.rst > +++ b/doc/guides/prog_guide/vhost_lib.rst > @@ -334,6 +334,11 @@ The following is an overview of some key Vhost API functions: > Clean DMA vChannel finished to use. After this function is called, > the specified DMA vChannel should no longer be used by the Vhost library. > > +* ``rte_vhost_notify_guest(int vid, uint16_t queue_id)`` > + > + Inject the offloaded interrupt received by the 'guest_notify' callback, > + into the vhost device's queue. > + > Vhost-user Implementations > -------------------------- > > Maxime do you want to add it, or do you want a new rev? That's fine, I just added it now :) Can you check the next-virtio main branch and confirm all is OK for your series? https://git.dpdk.org/next/dpdk-next-virtio/log/ Thanks, Maxime > >> Thanks, >> Chenbo >> >>> >>> Thanks, >>> Maxime >>> >>>> Thanks, >>>> Chenbo >