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 D9115A0C45; Tue, 21 Sep 2021 19:27:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5EB5640151; Tue, 21 Sep 2021 19:27:42 +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 1F2114003C for ; Tue, 21 Sep 2021 19:27:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632245260; 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=/gUv9Ka766bkFSco4zRKQm62V01qYwok4fVCgkBrzsg=; b=HksR7vgocLmioi8kBIr1u7JGl7MXJGd5BJbramJ2ktJu+6F8eL7BpntXmE0QOouln25pAA bytvNvAwZqg9gdBL5Lp9LNenSbN45g0psEpz684hNC7vI7+R9VouKbxhKceCSFIN7tG0mY IFj+yVLqJdRBvHYOl1FWGVzZWMfhLXI= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-237-NO2M7oQpO5iww8-PzczIFw-1; Tue, 21 Sep 2021 13:27:39 -0400 X-MC-Unique: NO2M7oQpO5iww8-PzczIFw-1 Received: by mail-wr1-f72.google.com with SMTP id j16-20020adfa550000000b0016012acc443so4076693wrb.14 for ; Tue, 21 Sep 2021 10:27:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:cc:references:from:subject:in-reply-to :content-transfer-encoding; bh=/gUv9Ka766bkFSco4zRKQm62V01qYwok4fVCgkBrzsg=; b=SulI9xHo0HP54eKH51n8g1hG71W0qtj02tmEpI/1NJE2xrhJuC2Z1Uw0nsJGGiel6d DxeksR/w/UqdifjDDsSjn3v/wIKe+e8rjLvOdOMCmTZ7hyi0YESsWGH9ILezM36cfJT/ +DfTQgWQoj+Yqk3TIdNSKpzm6eJtcQVRpXYwh46Pvz+H3yH7hjH/DFX3DldIU1i3j7mM c6i7Gxn2JhCZBwVjT7186mw9HH4yn8yzzqJJcyzVVXx+zZ5cGQfqH/rzb2yTXlzT6Mso FIM1l9bZbhT9IBpJy7oDz3Ze8O5bIxtDQDZ7lCHuZpvgUr4qE5eGRxARNhDU5+Y0QoIe QShw== X-Gm-Message-State: AOAM533ktudxeLMBuGRHhjcb4gdtAmQImmH/HLwScYUWwTKAd6Lk7WMr Vh7Vy5FAr195SWWOT+x9I/fUBZeJH4qMMsOe+b2ybmbbLtW3S7Dsx0k+xoy3VSiQsG/V6yd0FNb Iyok= X-Received: by 2002:a5d:608e:: with SMTP id w14mr36631352wrt.18.1632245258070; Tue, 21 Sep 2021 10:27:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyjRWIorHueQD9I7xmFk+NkX8bB7FsounpDbiAUY5XfquLbnkJD8e04MKahM/ycgSyAOv+9w== X-Received: by 2002:a5d:608e:: with SMTP id w14mr36631335wrt.18.1632245257924; Tue, 21 Sep 2021 10:27:37 -0700 (PDT) Received: from [192.168.0.36] ([78.18.26.217]) by smtp.gmail.com with ESMTPSA id r5sm19433972wrm.79.2021.09.21.10.27.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Sep 2021 10:27:37 -0700 (PDT) Message-ID: Date: Tue, 21 Sep 2021 18:27:36 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 To: Xuan Ding , dev@dpdk.org, maxime.coquelin@redhat.com, chenbo.xia@intel.com Cc: jiayu.hu@intel.com, cheng1.jiang@intel.com, bruce.richardson@intel.com, sunil.pai.g@intel.com, YvonneX.Yang@intel.com References: <20210909055758.106588-1-xuan.ding@intel.com> <20210916025807.72941-1-xuan.ding@intel.com> From: Kevin Traynor In-Reply-To: <20210916025807.72941-1-xuan.ding@intel.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com 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: 7bit Subject: Re: [dpdk-dev] [PATCH v3] vhost: add unsafe API to check inflight packets 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 16/09/2021 03:58, Xuan Ding wrote: > In async data path, when vring state changes, it is necessary to > know the number of inflight packets in DMA engine. This patch > provides a thread unsafe API to return the number of inflight > packets without using any lock. > > Signed-off-by: Xuan Ding > --- > v3: > * Fixed one typo. > * Revised the doc to be more accuracy. > > v2: > * Fixed some format issues. > --- > doc/guides/prog_guide/vhost_lib.rst | 5 +++++ > doc/guides/rel_notes/release_21_11.rst | 5 +++++ > lib/vhost/rte_vhost_async.h | 14 ++++++++++++++ > lib/vhost/version.map | 3 +++ > lib/vhost/vhost.c | 26 ++++++++++++++++++++++++++ > 5 files changed, 53 insertions(+) > Should there be a change to the vring_state_changed() in vhost example app to go along with this patch? It would help to understand the operation if this API was used.