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 4F35E41E28; Tue, 14 Mar 2023 12:07:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2E26E40F18; Tue, 14 Mar 2023 12:07:25 +0100 (CET) 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 EA14540A7E for ; Tue, 14 Mar 2023 12:07:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678792043; 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=gIJNT15mYGyxba4GahlIRlfjfIrFahOEwmdY4HYZBQ0=; b=RLsKiomAcBI/yktV+2eqjfKumh4AWsJk30nTSyWyoH/5dfpCihX+EvZUT5RBCaRCG2jwcW J1ALYUeoPEBxpg2W9WJzR2/I5SAPHmhjLTTeEj0bYIYEfeKacIAkV+Y7XRd+5LMUjaAdhT OJFrZLMWcN9X3/Qgm18qbkpGXMqDPA0= 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-477-3MrwqwMJOHCGK45AtRqOgA-1; Tue, 14 Mar 2023 07:07:20 -0400 X-MC-Unique: 3MrwqwMJOHCGK45AtRqOgA-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 E709485CCE2; Tue, 14 Mar 2023 11:07:18 +0000 (UTC) Received: from [10.39.208.25] (unknown [10.39.208.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 53B03400F55; Tue, 14 Mar 2023 11:07:17 +0000 (UTC) Message-ID: <629c72b7-b18e-3bd4-b412-2e26dab52306@redhat.com> Date: Tue, 14 Mar 2023 12:07:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH 3/3] net/vhost: fix Rx interrupt To: David Marchand , dev@dpdk.org, Chenbo Xia Cc: stable@dpdk.org, Jianfeng Tan , Junjie Chen , Hyong Youb Kim , Harman Kalra References: <20230309123752.2237828-1-david.marchand@redhat.com> <20230309123752.2237828-4-david.marchand@redhat.com> From: Maxime Coquelin 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: 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 3/14/23 09:59, David Marchand wrote: > On Thu, Mar 9, 2023 at 1:38 PM David Marchand wrote: >> >> In the situation when a port was started while no virtio driver was >> connected, Rx interrupts were broken. >> They were also broken after a virtio driver reconnects. >> >> There were several issues mixed in: >> - this driver was not exposing a fixed file descriptor per Rx queue, >> If a virtio driver was not connected yet, each Rx queue vector was >> pointing at a -1 fd, and an application could interpret this as a lack >> of Rx interrupt support, >> - when a virtio driver later (re)connected, this net/vhost driver was >> hacking into the EAL layer epoll fd to remove a old vring kickfd and >> insert the new vring kickfd. This hack constitutes a layer violation >> plus users of rte_eth_dev_rx_intr_ctl_q_get_fd() were not notified of >> this change, >> - in the case of reconnection, because the interrupt handle was >> reallocated, a 0 fd was failing to be removed from the EAL layer >> epoll fd, which resulted in never fixing the EAL epoll fd, >> >> To fix Rx interrupts: >> - allocating (eth_vhost_install_intr) / releasing >> (eth_vhost_uninstall_intr) the interrupt handle is moved when >> starting / closing the port, while setting / resetting per rxq fd is >> triggered by vhost events via some new helpers (see >> eth_vhost_configure_intr and eth_vhost_unconfigure_intr), >> - a "proxy" epoll fd is created per Rx queue at the time the interrupt >> handle is allocated, so applications can start waiting for events on >> those fds, even before a virtio driver initialises, >> - when available, vring kickd are populated in the "proxy" epoll fd, >> > > Maxime, Chenbo, > > Dukai confirms this series fix it, we can mark this patch as fixing: > Bugzilla ID: 1135 > > Do you want me to respin a series or can you fix when applying? I can do it while preparing the pull request. Thanks, Maxime > >> Fixes: 3f8ff12821e4 ("vhost: support interrupt mode") >> Fixes: 3d4cd4be577c ("net/vhost: fix interrupt mode") >> Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle") >> Cc: stable@dpdk.org >> >> Signed-off-by: David Marchand > > Thanks. > >