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 4A5A1A0545 for ; Mon, 20 Jun 2022 09:36:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1BF0B40150; Mon, 20 Jun 2022 09:36:27 +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 ADB9A40150 for ; Mon, 20 Jun 2022 09:36:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655710585; 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=XJWRhTE3pAaiWa3FcY65f9G1L/C1rJmMvx1H6VPjGMjhEymw4ks2Y36ixTFoI9sh/h3P6t 3H8CJDX3Z/yZLBzaor249yEDSUc8Alm53aeZmLHwRKSyjahRiTUxkg5Sr6IuUp0Ttn1PjD RkNJWaEkTOgPM4FctHaz9p5zmTJSKQ0= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-312-gCMBBV08OOStD6YN9KDTuQ-1; Mon, 20 Jun 2022 03:36:23 -0400 X-MC-Unique: gCMBBV08OOStD6YN9KDTuQ-1 Received: by mail-lf1-f69.google.com with SMTP id q22-20020a0565123a9600b0047f6b8e1babso1163622lfu.21 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=P33oI2F4P5RRYYfpnaaWcgT3ioGz15yGIl9aKWIChqZZsV/Zn1Y5C04hA8x8SRC5dc NTlnG8IqxqBGsSI1Dn7AvmHy5GrK9tazIYsntc+mri7zeE8C7S8YzZl4jwnpdQOBRqGK 1EmUAAJun1LHQnRIN27805n9o64uKKVDWNGYF6bTa/Dh6srM65CiByH0mjiLkT97jdMC WYKdz+zfWP6JJXxz+idgpGd+XTKHXMtYVKnGZ4RHeoeIJ+uyhg6Vchhsute2HtHPsU3w gc5/we7Gutbhtsas6ryirB4XbbksKYto2FYGPqBrFHPNB5gFPLoQI1Le60dXAgURnlLH 4OTQ== X-Gm-Message-State: AJIora/3AmTLETpejZ5Igd53MW1CZXXcHVZ1f6clc8VGTQ9Gx0IJXZOd d8nhiRMDAJJhfPp11SJQdI9HXh5lva2b77rnlD604aJ88qbBoNf8753hnhUGGRDylYkvQKqLeX4 freDmf3byfdxFf42Sq3A79iY= X-Received: by 2002:a2e:3613:0:b0:258:e0cc:d83b with SMTP id d19-20020a2e3613000000b00258e0ccd83bmr10974694lja.297.1655710582079; 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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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