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 35D50A0540 for ; Fri, 8 Jul 2022 12:55:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 100934021E; Fri, 8 Jul 2022 12:55:08 +0200 (CEST) Received: from mail-oa1-f44.google.com (mail-oa1-f44.google.com [209.85.160.44]) by mails.dpdk.org (Postfix) with ESMTP id 78A244021E for ; Fri, 8 Jul 2022 12:55:06 +0200 (CEST) Received: by mail-oa1-f44.google.com with SMTP id 586e51a60fabf-f2a4c51c45so28744127fac.9 for ; Fri, 08 Jul 2022 03:55:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=GkIQiz5AjpqYLWCUaRR5+WAGhixNPPHMPjyQJhHzSL8=; b=WxNWcL1WXnPxCJIZTa9CvQotOHFKwa8WLZ8c9ZKQdksajTJbSiHoxyP/TmsPyW72Rz s8WOg5wjrGS5wUShwifHdlqnmmJNViAmnAZLOQO1S/RHQbkCJ9+p8j3RNGqyYqgj0V4i 07Hu3Blk6I0Dz+hy0lSgeEGs+PHWP2yZWrmqlHl1JyycQhz/ZU0rJ5uD5noFlf5GqOup u2ipRLyr28ABNZQTO8CHz1zZGXvTeWzOudC2gOFBJoRVzTJk6+l/f7KkIId2eq1OOrFO 3FTuk/GaXZHcStI+DfJHUDVqHnK5Sc104Ev6445Dfn1ayDRFT0M+8V+S1rKpPuzzBS8Q CYOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=GkIQiz5AjpqYLWCUaRR5+WAGhixNPPHMPjyQJhHzSL8=; b=iUaLHis10LWV2ZIme7pVCPODG0uNH7TtyE2LvndZMgXEP+J+6HgkqskMlBaxXyfffx ywVrYj9XlC1/LKWcB0D9LDp0YIR3WBYpN3Tw6vDbj0wr0aw77TciqrwfP/qofaHepzAf +p9unynTFKMPKGBmN+K/npNrlbC/xKi+xCKB1fRU8Og89BBMMFlk9Sumolh/04dtvhED lJPOqpwxMj+9SRAOYCSlPT2OfSI24LG+8Y3IIkh5adm5ygfx9Bj2SwsKzekTWxVwrm4j WggVL5XV1i5xVJqCmz4PhJsV9tebPzGQHp9CIWx/7QssIZvc6Zn4Qa/JRIpCEhoLFmfA aPEw== X-Gm-Message-State: AJIora+/PezAM785g6uHulkAjGA9tusedcFPNta1NAKf1O0YT5Qp0G0y yqTzjwlaavphUAwdKroGW44= X-Google-Smtp-Source: AGRyM1uJh67XZcGbe+jpmqIi39mKGwe9nJzgCpVAYlZ/ITjdY7QGivRqHCxBRMoifq6J3Cbs3BEsJA== X-Received: by 2002:a05:6870:1787:b0:10c:1f1b:6371 with SMTP id r7-20020a056870178700b0010c1f1b6371mr5618453oae.260.1657277705576; Fri, 08 Jul 2022 03:55:05 -0700 (PDT) Received: from [192.168.1.112] ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id p127-20020acad885000000b00339cc89bb7dsm785361oig.20.2022.07.08.03.55.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 03:55:04 -0700 (PDT) Message-ID: Subject: Re: [PATCH 21.11] examples/vhost: fix retry logic on Rx path From: Luca Boccassi To: Yuan Wang , stable@dpdk.org Cc: maxime.coquelin@redhat.com, chenbo.xia@intel.com, jiayu.hu@intel.com, cheng1.jiang@intel.com, weix.ling@intel.com Date: Fri, 08 Jul 2022 11:55:02 +0100 In-Reply-To: <20220708171435.60845-1-yuanx.wang@intel.com> References: <20220708171435.60845-1-yuanx.wang@intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1+plugin MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Sat, 2022-07-09 at 01:14 +0800, Yuan Wang wrote: > [ upstream commit 1907ce4baec392a750fbeba5e946920b2f00ae73 ] > > 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. > > Fixes: be800696c26e ("examples/vhost: use burst enqueue and dequeue from lib") > > Signed-off-by: Yuan Wang > Reviewed-by: Chenbo Xia > --- >  examples/vhost/main.c | 79 ++++++++++++++++++------------------------- >  1 file changed, 33 insertions(+), 46 deletions(-) Thanks, applied. -- Kind regards, Luca Boccassi