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 A914441E8E; Tue, 14 Mar 2023 09:59:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 85EA940F16; Tue, 14 Mar 2023 09:59:50 +0100 (CET) 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 4893D40A7E 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-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-266-RweKtrIQMLGcfVp_Ok67uw-1; Tue, 14 Mar 2023 04:59:46 -0400 X-MC-Unique: RweKtrIQMLGcfVp_Ok67uw-1 Received: by mail-pg1-f197.google.com with SMTP id v24-20020a631518000000b00502e6bfe335so3424809pgl.2 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=HdyZqRxXg7GXxY73iE2a27cMEpHrhdpwvpZCbj7sONhzOrPZLoZLD7KB9UN2ppAB/D Gzp0gw/Wj4a2E/R0cGSGRmCt21N/+3LqmwwKIWgguAsKep6SorsbA2UbdPWqkxcSdwmu AOseOupEqh/98hW5eXpNsHJnXpfFrfXozMxN+oqdJihZal5Pa1o39hndlzqqlk57pETr V5g9Mrazi2UuOvCxViw5W3L1KbbiuhucjKmni2XPPg5Db/BOZr178O/8DmMSeWN8l7Yh /EwCca711C9L/wxDtLjsT29ZM9xgJ608seJGdw7AcApTfwBLuRaAy4yCQrfQPMvaDMpd 6MAw== X-Gm-Message-State: AO0yUKUExYMOuYe+YbSRYQJ4y89PzNplU7wZfqaLjXFiVmEqdVNYiL9Z tVOIjun7qh1rxswrijgPVlMHb4MwjkZrVe8yuse50fgcHeDuOUbVPtcDiwWs2wQZgqF0jKqw0MD kCfbNQxc7PejAWQf5c06SZ2wJWTuQeA== X-Received: by 2002:a17:90a:4f85:b0:23b:2efa:44ed with SMTP id q5-20020a17090a4f8500b0023b2efa44edmr3600260pjh.8.1678784385655; 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: 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 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