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 AFA8241E8E for ; Tue, 14 Mar 2023 09:59:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A940241144; Tue, 14 Mar 2023 09:59:51 +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 5080340F16 for ; Tue, 14 Mar 2023 09:59:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678784387; 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=iNubTKRpHYoW8BAlCXux9751UVljMWqn5oogKhlfsMQ=; b=SOz/DKHqDQ8aWPMCxi4FeZJbYowO7bwl6U0mz6W9pzPNv3JaQXIDwcMiUiMrKqmvEOZzAM UIAmeJ1LHz8NAJryDo3JnE8WzYrMD4VnzzmCGloPuSq+YPC3VS52eeodTdUxQbjY9aJa01 27A9O9+tWqn35wd+2Ywuhq5nD8NGk2o= Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-393-_oPQ9BLbP-CCuCQY41iP1Q-1; Tue, 14 Mar 2023 04:59:46 -0400 X-MC-Unique: _oPQ9BLbP-CCuCQY41iP1Q-1 Received: by mail-pf1-f200.google.com with SMTP id bx9-20020a056a00428900b005f077bc6e5eso8079907pfb.16 for ; Tue, 14 Mar 2023 01:59:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678784385; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iNubTKRpHYoW8BAlCXux9751UVljMWqn5oogKhlfsMQ=; b=27q4K/CCOlDkpOjmWeXVETRWJEdG1sp/Gq3ik7pjpRofeTFu7IxveXfACH4fUeSh3f T+23evwsiGNWKlcoxI2RPj5q1qsh6DQViDWrITuf+ivPDXc8HPRt+lYBSRv41jGOlaa1 1rC+n8OMh6r64Bgxos8uvxgyP4tlgZlH6CsVecukj/+G+RdqhznTWGYcnwCjRLFd7e94 N2+yj9k0720/EGav8aN6Yr5Tpvke1x/o363BoDCAEOwbspDMoS3s+me6aNIJgUfmmSBh F/9C08WFJtspoOydxq8fL8V+Be3/TfmI6FSwiYMKOm0ZRCYQuzZN0qkqAZZ9pF+9dYk3 fFWQ== X-Gm-Message-State: AO0yUKV5JtxhKJCQEmUWd7jWpHmzbxrgfVsbH6Pt7u2BKba/ZJ/97wQT URRRBo1a9aZMS5BPldKxzez4wO0B4ilbtUnt8210z07VqnNlH9TEqy3f9+xvnLMmxmF9bVlN2tr 6UkkrVv7h+kX1D4a8HJEvPd4= X-Received: by 2002:a17:90a:4f85:b0:23b:2efa:44ed with SMTP id q5-20020a17090a4f8500b0023b2efa44edmr3600263pjh.8.1678784385656; Tue, 14 Mar 2023 01:59:45 -0700 (PDT) X-Google-Smtp-Source: AK7set9wCV4mZyVx9Rdl7jAtcZ4YjCmL3YNL/+IOo5Ta2C3ULAjhkqnL4r+Zs0XmNxO3+TFbtqYrjoDQVqBjrCEUKx8= X-Received: by 2002:a17:90a:4f85:b0:23b:2efa:44ed with SMTP id q5-20020a17090a4f8500b0023b2efa44edmr3600246pjh.8.1678784385375; Tue, 14 Mar 2023 01:59:45 -0700 (PDT) MIME-Version: 1.0 References: <20230309123752.2237828-1-david.marchand@redhat.com> <20230309123752.2237828-4-david.marchand@redhat.com> In-Reply-To: <20230309123752.2237828-4-david.marchand@redhat.com> From: David Marchand Date: Tue, 14 Mar 2023 09:59:34 +0100 Message-ID: Subject: Re: [PATCH 3/3] net/vhost: fix Rx interrupt To: dev@dpdk.org, Maxime Coquelin , Chenbo Xia Cc: stable@dpdk.org, Jianfeng Tan , Junjie Chen , Hyong Youb Kim , Harman Kalra X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Thu, Mar 9, 2023 at 1:38=E2=80=AFPM 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? > 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. --=20 David Marchand