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 7FCCD42C03; Thu, 1 Jun 2023 15:58:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0E31440DDC; Thu, 1 Jun 2023 15:58:43 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 752BB406BA for ; Thu, 1 Jun 2023 15:58:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685627920; 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=L2GWcAGQslOp2GwseJW5JQjaGjcNqmotIzkOKURD1Oo=; b=eZDUjOS30gHr60M6fh5IN/GvgxYV1xuMPvdtZm5c29BBGpyK96nldIgC1JQt73HcgFcFHB H5Fi8lflCExfXX+E7GGCZzj/HhCsZHlhUrVQsuIwbFbdX0DsC0KIpbXog5MmfnsGu+5cgT 0XyvPVdg34g3xFTnf9m/okGLX75yRbs= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-425-ysjVN-fPMeGfIs1BM1lbHA-1; Thu, 01 Jun 2023 09:58:36 -0400 X-MC-Unique: ysjVN-fPMeGfIs1BM1lbHA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 65E742823802; Thu, 1 Jun 2023 13:58:36 +0000 (UTC) Received: from [10.39.208.25] (unknown [10.39.208.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6A62E407DEC0; Thu, 1 Jun 2023 13:58:33 +0000 (UTC) Message-ID: <4104867a-0335-7288-e375-cf046ee10cb3@redhat.com> Date: Thu, 1 Jun 2023 15:58:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v3 14/28] vhost: add helper for interrupt injection To: David Marchand Cc: dev@dpdk.org, chenbo.xia@intel.com, mkp@redhat.com, fbl@redhat.com, jasowang@redhat.com, cunming.liang@intel.com, xieyongji@bytedance.com, echaudro@redhat.com, eperezma@redhat.com, amorenoz@redhat.com, lulu@redhat.com References: <20230525162551.70359-1-maxime.coquelin@redhat.com> <20230525162551.70359-15-maxime.coquelin@redhat.com> From: Maxime Coquelin In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 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: 8bit 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 5/26/23 10:54, David Marchand wrote: > On Thu, May 25, 2023 at 6:26 PM Maxime Coquelin > wrote: >> @@ -900,6 +905,24 @@ vhost_need_event(uint16_t event_idx, uint16_t new_idx, uint16_t old) >> return (uint16_t)(new_idx - event_idx - 1) < (uint16_t)(new_idx - old); >> } >> >> +static __rte_always_inline void >> +vhost_vring_inject_irq(struct virtio_net *dev, struct vhost_virtqueue *vq) >> +{ >> + int ret; >> + >> + ret = dev->backend_ops->inject_irq(dev, vq); >> + if (ret) { > > No need for ret. Agree. Fixed here and also in the new API introduced by Eelco. Thanks, Maxime >> + if (dev->flags & VIRTIO_DEV_STATS_ENABLED) >> + vq->stats.guest_notifications_error++; >> + return; >> + } >> + >> + if (dev->flags & VIRTIO_DEV_STATS_ENABLED) >> + vq->stats.guest_notifications++; >> + if (dev->notify_ops->guest_notified) >> + dev->notify_ops->guest_notified(dev->vid); >> +} >> + >> static __rte_always_inline void >> vhost_vring_call_split(struct virtio_net *dev, struct vhost_virtqueue *vq) >> { > >