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 4E9C5A0A02; Thu, 25 Mar 2021 09:32:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A056140D36; Thu, 25 Mar 2021 09:32:37 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 876BB40147 for ; Thu, 25 Mar 2021 09:32:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616661154; 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=TROHCvmwpt9keE4KL0tY5JvT5evv6UoOv8twh6dmkjE=; b=FNYp6TDtVoFe+Ed1iUJqgvXP5qcyZSYbp6iBXPBVZLYgrKXOziGbBfcC7fDIb1223aOi3I bipW47nCgpEujI+1JeDYGX2ePytR/st4JiMRcUu9hE+ht6yf4V1CXSeOyanH5N9PuJ2/is eeQRwsC/YWspSpzGsg1fb0kL1y45lGw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-117-IeQzp7LXNqaQ5iGs6mXe3Q-1; Thu, 25 Mar 2021 04:32:31 -0400 X-MC-Unique: IeQzp7LXNqaQ5iGs6mXe3Q-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 90C5D593AD; Thu, 25 Mar 2021 08:32:29 +0000 (UTC) Received: from [10.36.110.41] (unknown [10.36.110.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8304460D11; Thu, 25 Mar 2021 08:32:18 +0000 (UTC) To: Ilya Maximets Cc: Chenbo Xia , dev@dpdk.org, Adrian Moreno , Stefan Hajnoczi , Julia Suvorova , stable@dpdk.org, Zhiyong Yang References: <20210317202530.4145673-1-i.maximets@ovn.org> <20210317202530.4145673-2-i.maximets@ovn.org> From: Maxime Coquelin Message-ID: <9bc9ed67-521d-2c12-c965-cba3a69bbd77@redhat.com> Date: Thu, 25 Mar 2021 09:32:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210317202530.4145673-2-i.maximets@ovn.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 1/4] net/virtio: fix interrupt unregistering for listening socket 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 Sender: "dev" On 3/17/21 9:25 PM, Ilya Maximets wrote: > virtio_user_dev_server_reconnect() is typically called from the > interrupt context while checking the link state: > > vhost_user_update_link_state() > --> virtio_user_dev_server_reconnect() > > Under this conditions callback unregistering always fails. This means > that listenfd is never unregistered and continue to trigger interrupts. > For example, if second client will try to connect to the same socket, > the server will receive interrupts infinitely because it will not > accept them while listen fd is readable and generates epoll events. > > Fix that by moving reconfiguration of interrupts out of the > interrupt context to alarm handler. > > 'virtio_user_dev_delayed_handler' renamed to > 'virtio_user_dev_delayed_disconnect_handler' to better reflect its > purpose. > > Additionally improved error logging around interrupt management. > > Fixes: bd8f50a45d0f ("net/virtio-user: support server mode") > Cc: stable@dpdk.org > > Signed-off-by: Ilya Maximets > --- > > CC: Zhiyong Yang > > drivers/net/virtio/virtio_user/vhost_user.c | 4 +- > .../net/virtio/virtio_user/virtio_user_dev.c | 70 ++++++++++++++----- > .../net/virtio/virtio_user/virtio_user_dev.h | 2 +- > 3 files changed, 57 insertions(+), 19 deletions(-) > Reviewed-by: Maxime Coquelin Thanks, Maxime