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 64B4CA0A0A; Fri, 4 Jun 2021 09:18:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D9A7740147; Fri, 4 Jun 2021 09:18:06 +0200 (CEST) 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 2C7A84003C for ; Fri, 4 Jun 2021 09:18:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622791084; 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=+6A9bBkf7rLUNDwOT24lsQ2F7SxsZhhhJWv+h+2Mej8=; b=KNxh8BuN+HkBzC4ZCXFsfUqAcRXg9ZqXsuC50GKmgqi/iHy3sROpfsVZbf6r6av9N9ObJu 5OUDPgJNse/h1cocHgPtU86sD4EN+jJTadLzgwGNJezNCgHcEaJv/ycl73HJPs5Oy6XMBl 9B4+7TBCH011CMCMXqQTcI/d8iTuEXQ= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-327-tDYntv_nOUisdFfSZTGnJA-1; Fri, 04 Jun 2021 03:18:02 -0400 X-MC-Unique: tDYntv_nOUisdFfSZTGnJA-1 Received: by mail-wm1-f71.google.com with SMTP id m33-20020a05600c3b21b02901a44b1d2d87so731037wms.3 for ; Fri, 04 Jun 2021 00:18:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+6A9bBkf7rLUNDwOT24lsQ2F7SxsZhhhJWv+h+2Mej8=; b=NklJqq+L5k7F7/ctzHjfumTmyQsrNtKSRxe0ucLPEi2WQsrvI9UE+NPKk5A56N+xJM 2cakrNg9HYifNdMEmiC3i3MGQ6h4C/CpQNXd1RyHaEuJomfRBEc5ejJJcyhRKXCN6prY HKeN/FcUhk/PA+/VCEiPz0e8ESsCJctpVOJCPzKC7pLthMvxvReUYUI0NwI66yJRcYnP VPkkcOcL1RwBsEezQ2xWWhxPUmSWz+0eYM6Kzte+V/s3Os6zlLoQ5Bmjfmw+V/t58rSX 5uDtRFBp+uRh9PrGJVutYlg9xZB8LlavidW4YfE06KgW79tij8U34Dmy7Dx27cvyqzrj weDA== X-Gm-Message-State: AOAM53158uMebnqu3+qmSj2wF7Eqq/qOrtz43WAhdxuXgT8vcDd75hNd hwrx60xzNYCUWgKrqjT7ueaqr/0eNG4c5u2r14K/orvJHJd+fetbLZCYdZfv7EUT3JC7kb2XguP Gh8o= X-Received: by 2002:a05:6000:154e:: with SMTP id 14mr2213209wry.226.1622791081604; Fri, 04 Jun 2021 00:18:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypNVk6dh8spNKPoZMxJH+quIikfhWkFmfYVgJBWFGST248IjgRDaz36IWchZVIHGNm1KDbnA== X-Received: by 2002:a05:6000:154e:: with SMTP id 14mr2213199wry.226.1622791081472; Fri, 04 Jun 2021 00:18:01 -0700 (PDT) Received: from [192.168.1.205] (219-230-83-45.ftth.cust.kwaoo.net. [45.83.230.219]) by smtp.gmail.com with ESMTPSA id o9sm308887wro.97.2021.06.04.00.18.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Jun 2021 00:18:00 -0700 (PDT) To: Jiayu Hu , dev@dpdk.org Cc: maxime.coquelin@redhat.com, chenbo.xia@intel.com, yinan.wang@intel.com References: <1622189463-392610-1-git-send-email-jiayu.hu@intel.com> From: Maxime Coquelin Message-ID: <5ef4f376-1341-1c0f-5067-0c8a138d5578@redhat.com> Date: Fri, 4 Jun 2021 09:18:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <1622189463-392610-1-git-send-email-jiayu.hu@intel.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mcoqueli@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 0/2] provide thread unsafe async registration functions 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 5/28/21 10:11 AM, Jiayu Hu wrote: > Lock protection is needed during the vhost notifies the application of > device readiness, so the first patch is to add lock protection. After > performing locking, existed async vhost registration functions will cause > deadlock, as they acquire lock too. So the second patch is to provide > unsafe registration functions to support calling within vhost callback > functions. > > Jiayu Hu (2): > vhost: fix lock on device readiness notification > vhost: add thread unsafe async registration functions > > doc/guides/prog_guide/vhost_lib.rst | 12 +++ > lib/vhost/rte_vhost_async.h | 42 ++++++++++ > lib/vhost/version.map | 4 + > lib/vhost/vhost.c | 161 +++++++++++++++++++++++++++--------- > lib/vhost/vhost_user.c | 5 +- > 5 files changed, 180 insertions(+), 44 deletions(-) >