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 51C80A0545; Mon, 20 Jun 2022 09:36:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 41E2541132; Mon, 20 Jun 2022 09:36:29 +0200 (CEST) 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 9EB4541132 for ; Mon, 20 Jun 2022 09:36:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655710587; 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: in-reply-to:in-reply-to:references:references; bh=xY1NAA+AOCxLMN5rIBNcfoSNIf8byqKb+gg2xVF0xkg=; b=UiXZHAGyucwaBJMjnPkP++HZPf3zeUYB9HHIM4am+XR5lQZwzYjp2k1Ai9ve1gmp9jIPWM lIdORrybUG9VWLFNsf/4M9SCMEV6wrP14VCqoP/ZxaTFOZahEN7qp0dCw4yMCl+Ai/p5jj WMCbtiu68Ykbc8no/KJYnhjoc1wxMUw= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-346-kAIJ75SLOwOPaYRARfy4-g-1; Mon, 20 Jun 2022 03:36:23 -0400 X-MC-Unique: kAIJ75SLOwOPaYRARfy4-g-1 Received: by mail-lf1-f72.google.com with SMTP id br5-20020a056512400500b00479a5157134so5109130lfb.5 for ; Mon, 20 Jun 2022 00:36:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xY1NAA+AOCxLMN5rIBNcfoSNIf8byqKb+gg2xVF0xkg=; b=pQh+uPNxjzZ2+WClNMkTsmRTaWAjQ+QNTm3p5gtJk45BZJaZ9osKGXUxvjiH5gmGAF eMfzeJUpFumaL53apRf8NYoXJiSEpnssmqjN0CD7+XXs1c8GkjM0xOsTjahwAxB1+6nM dglaXUogbO6r6IM9RozaoCKFfdqdepCXVGiI6cpjP0fAXVSvAvELXGVbHps8V+49wzWH 1VxGqE7uXpCE7IwhS2aSk93b/UMQF+EOFfbKE2VG803H01/ljCQ+4lX2mL7mzKBlQac4 xCxBH0cJqt6urE1eOhdEPgyeZtoTFzuvwjoWDa/5eEoeFHXxwSf+zedIypzDkyWZIHq3 xJag== X-Gm-Message-State: AJIora8U6g+wBf0/MJti5q86UyrVHlbjv1uK3Pv1TFJMFwi8vUiIzkdx mmT50xaLYATtWdOzrT8Q44ueSKPoKtjLBOBVly+UEnyZp1Umjfbi7bW3dEfc+8r/YigdQuDXX6C KD4s7UMwHXos+JysZC9A= X-Received: by 2002:a2e:3613:0:b0:258:e0cc:d83b with SMTP id d19-20020a2e3613000000b00258e0ccd83bmr10974703lja.297.1655710582131; Mon, 20 Jun 2022 00:36:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t3i6BBI5sRL903brIJwgmp/lbaQMMLBcB7XhpWGLOKJylFX/DOcgN68Y/LUy7tgdWb313ONu9/aVBwUjfeosA= X-Received: by 2002:a2e:3613:0:b0:258:e0cc:d83b with SMTP id d19-20020a2e3613000000b00258e0ccd83bmr10974682lja.297.1655710581846; Mon, 20 Jun 2022 00:36:21 -0700 (PDT) MIME-Version: 1.0 References: <20220518162505.1691401-1-yuanx.wang@intel.com> <20220617070144.710487-1-yuanx.wang@intel.com> In-Reply-To: From: David Marchand Date: Mon, 20 Jun 2022 09:36:10 +0200 Message-ID: Subject: Re: [PATCH v2] examples/vhost: fix retry logic on eth rx path To: "Xia, Chenbo" , "maxime.coquelin@redhat.com" Cc: "Wang, YuanX" , "dev@dpdk.org" , "Hu, Jiayu" , "He, Xingguang" , "stable@dpdk.org" , "Ling, WeiX" , jin.liu@corigine.com, louis.peens@corigine.com, peng.zhang@corigine.com, Heinrich Kuhn Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 Mon, Jun 20, 2022 at 5:20 AM Xia, Chenbo wrote: > > drain_eth_rx() uses rte_vhost_avail_entries() to calculate > > the available entries to determine if a retry is required. > > However, this function only works with split rings, and > > calculating packed rings will return the wrong value and cause > > unnecessary retries resulting in a significant performance penalty. > > > > This patch fix that by using the difference between tx/rx burst > > as the retry condition. > > Does it mean we don't need the API rte_vhost_avail_entries() anymore? > > Jiayu/Yuan/Maxime, what do you think? FWIW, I still see a user: virtio-forwarder/virtio_vhostuser.c: * This check ensures that we do not call rte_vhost_avail_entries virtio-forwarder/virtio_worker.c: try_rcv = rte_vhost_avail_entries((int)relay->vio.vio_dev, Cc'd a few Corigine guys. -- David Marchand