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 645AFA0C4E; Thu, 12 Aug 2021 15:19:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D95BA41215; Thu, 12 Aug 2021 15:19:13 +0200 (CEST) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by mails.dpdk.org (Postfix) with ESMTP id 801C14120E for ; Thu, 12 Aug 2021 15:19:12 +0200 (CEST) Received: by mail-pj1-f43.google.com with SMTP id a8so9454277pjk.4 for ; Thu, 12 Aug 2021 06:19:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J0rPUgA/i6EsA9XvxE6/M9owCtDcl90nCf88vqowKj0=; b=o5rtBT96oe5xWIW79EkebCyWRkurwJbmAKxa+ush0JsYmcObqiPpLJ2WGCX80rR0uN wJMQm3ssIxMWSN12rp7dVpdLyU04dqNAnxzF2NtCQEEZzsM/i6AGWfNolNNgOWlDikGo YKJJUrM3k1BMuWq+dC51yytd3T/StCM+LNapp6PsVrHjtmIE8D3tuOUIhApecxcTPYa1 55btBufaegEOt95XSPCkZ1U9SkoARTLbdQaEu7maO7o+68PZfJl2kZyC6+8+NJd6MWvz m3tGnr/PM0uMU64v7q9mhYMqwsww2997Wvv9mFLVBJfUYMTJnZ0mMeLhTqqH79hGRfjg 9kCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J0rPUgA/i6EsA9XvxE6/M9owCtDcl90nCf88vqowKj0=; b=iZ2AjVF4PvrvbWKPfPZfiXuRROctLCXvTCyH7Ob76yr6yU9vYCMY1MkT/Ak8XrW7tJ rVnrYiwnDqper+IzSVjD8m/U/RLfVykLcnTwoQvQ4zfsxwTUFcpnbvzK91v9yW3JgsSj SWTr9KKfbZr0uVV8gltGJhUR3KHv+BzTkVNDYFjy6GIz0oSgjbAL6sVpRcbuL2ZfT62D /L7D6l/PynBOz/9ZfEOCJ5P6lmfRLeUA8en80h1qB06zP5VnxqlMewBdrfLbq2fUf9oa lXyYBgBcSsMa7KNbMYB1DkyPERn+RD1J3MLNAqxt1A8sg1yvQ2JCmW31QGWWLY8Dxg6O DoVQ== X-Gm-Message-State: AOAM531Tw48P9qj3C80gjYKoOhwxh9ci6NUwB/Vst+UqM5PQZXfv2H16 OWOFmeIPUvdl9TJFToUm1zwTXJBjnxD5ZA== X-Google-Smtp-Source: ABdhPJy3RsyGO5Av/dEhJtUdB2Y91UfYTs6MkXpOm/9zgGopYZmaI0F+metZnLafXREEnMxpC7CzIw== X-Received: by 2002:a17:902:8d8a:b029:12d:3774:3630 with SMTP id v10-20020a1709028d8ab029012d37743630mr3512484plo.65.1628774351399; Thu, 12 Aug 2021 06:19:11 -0700 (PDT) Received: from C02D70YZMD6R.bytedance.net ([139.177.225.227]) by smtp.gmail.com with ESMTPSA id x24sm10273416pjk.43.2021.08.12.06.19.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Aug 2021 06:19:10 -0700 (PDT) From: Zhihong Wang To: dev@dpdk.org, ferruh.yigit@intel.com, xiaoyun.li@intel.com, aman.deep.singh@intel.com, irusskikh@marvell.com, cchemparathy@tilera.com Cc: Zhihong Wang , stable@dpdk.org Date: Thu, 12 Aug 2021 21:18:58 +0800 Message-Id: <20210812131901.25665-2-wangzhihong.wzh@bytedance.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20210812131901.25665-1-wangzhihong.wzh@bytedance.com> References: <20210809062548.30187-1-wangzhihong.wzh@bytedance.com> <20210812131901.25665-1-wangzhihong.wzh@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v4 1/4] app/testpmd: fix tx retry in flowgen 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" Fix tx_pkt number in tx retry logic. Fixes: bf56fce1fb4 ("app/testpmd: add retry option") Cc: stable@dpdk.org Signed-off-by: Zhihong Wang --- app/test-pmd/flowgen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c index 3bf6e1ce97..f2e6255c36 100644 --- a/app/test-pmd/flowgen.c +++ b/app/test-pmd/flowgen.c @@ -192,12 +192,12 @@ pkt_burst_flow_gen(struct fwd_stream *fs) /* * Retry if necessary */ - if (unlikely(nb_tx < nb_rx) && fs->retry_enabled) { + if (unlikely(nb_tx < nb_pkt) && fs->retry_enabled) { retry = 0; - while (nb_tx < nb_rx && retry++ < burst_tx_retry_num) { + while (nb_tx < nb_pkt && retry++ < burst_tx_retry_num) { rte_delay_us(burst_tx_delay_time); nb_tx += rte_eth_tx_burst(fs->tx_port, fs->tx_queue, - &pkts_burst[nb_tx], nb_rx - nb_tx); + &pkts_burst[nb_tx], nb_pkt - nb_tx); } } fs->tx_packets += nb_tx; -- 2.11.0