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 E8A17A0C4D; Fri, 13 Aug 2021 10:06:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AB09D41241; Fri, 13 Aug 2021 10:06:01 +0200 (CEST) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by mails.dpdk.org (Postfix) with ESMTP id EEB2640140 for ; Fri, 13 Aug 2021 10:05:59 +0200 (CEST) Received: by mail-pj1-f48.google.com with SMTP id n13-20020a17090a4e0d00b0017946980d8dso589201pjh.5 for ; Fri, 13 Aug 2021 01:05:59 -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=r7RHV26C3r735V3oVI0qAiTkxvq1SKxK4MX+9GdzERc=; b=UcAi1nLIZE0EuVT6VL0Wgz8ImGlep7EWMZeLfzkuQhmsd1qcbUF1VM/teh5mSyEmxa oMsWFrGm/n3en4sWi14m8lBRwMHZT3AN641Yf/f8C3dFc912QyeQKxfpmYeb483xeg8e 5oNEssJNq0bPSMok4CYdRpQO5XAv4Cgt0ZcvwtQLClnuwbrID92YzvDO74o67FmrtAk1 zIa/Q0ppkDEv8BGY0yM3e4dv7Mea/FlIFupkS2MNcOGHVaWJyrmKRtB6qq6MMrvrkNJA T1e7m71RGrUrePbanUEWHMrR5PUfSKCNkMVrJawifVmXT52XV9dr0GW0nVycTs5qCG56 e2gA== 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=r7RHV26C3r735V3oVI0qAiTkxvq1SKxK4MX+9GdzERc=; b=uUQa2QSPOG5weykPxRo7THDD/HfZGZFMHJjGjfGTlPo0YqfZHgbvdgfWz0TvXSaJ+7 Yu0nRfVesMxDdiH9X32D5lCuow/jAXVOHEvcvFSfplBdEf0EqaWTfO2w6yxIuQeIOJAm 1i5CWvn6scAIP1y2qWyUO6ocRR3Ii9fHCCHprKgEjeYXBNan/V9Lk/8h/opqR477rr0i OUGSrZELi2+4oLz0uVHGRxzXmpkhRhEltqBahbqGTHcsdvCnL59bAP9vHzb6K4MYg/fb s0FOD+N9U6JdezXk79OG0Nwb1CyqZHaCQyiedPczB4sJgd8h9nZtvAPYs5yTdPm/0SKb 3NMQ== X-Gm-Message-State: AOAM531iGnAMdEigDo8Y/Cnt1CI17Cclbotpn8cfVk24OCrd8U3kwwGX nJxn7zgnJq9AvOTlpAYGeadcdSMYZQNu0Q== X-Google-Smtp-Source: ABdhPJzMIRR+4St19aqFnNbKfD6ElrX4l/Ktv4g4Sgcdpl4aN/URZlV7XcMDiKDbARXqqfHNMwDKwQ== X-Received: by 2002:a17:90a:de16:: with SMTP id m22mr1458107pjv.54.1628841958864; Fri, 13 Aug 2021 01:05:58 -0700 (PDT) Received: from C02D70YZMD6R.bytedance.net ([139.177.225.227]) by smtp.gmail.com with ESMTPSA id 17sm1118192pjd.3.2021.08.13.01.05.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Aug 2021 01:05:58 -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: Fri, 13 Aug 2021 16:05:45 +0800 Message-Id: <20210813080548.38637-2-wangzhihong.wzh@bytedance.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20210813080548.38637-1-wangzhihong.wzh@bytedance.com> References: <20210809062548.30187-1-wangzhihong.wzh@bytedance.com> <20210813080548.38637-1-wangzhihong.wzh@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v5 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: bf56fce1fb45 ("app/testpmd: add retry option") Cc: stable@dpdk.org Signed-off-by: Zhihong Wang Acked-by: Xiaoyun Li --- 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