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 3A162A0C56; Thu, 12 Aug 2021 13:11:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2BBAE41208; Thu, 12 Aug 2021 13:11:17 +0200 (CEST) Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by mails.dpdk.org (Postfix) with ESMTP id 1496241200 for ; Thu, 12 Aug 2021 13:11:16 +0200 (CEST) Received: by mail-pj1-f49.google.com with SMTP id w13-20020a17090aea0db029017897a5f7bcso10121759pjy.5 for ; Thu, 12 Aug 2021 04:11:15 -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=nVO1WodA8mvTTE6QgbOlSdX0g3PKLSZwNqLEj/BQTvgqLGmfC2UI9YrgYQ4nHVED5/ V8iik7lxaa/49aWOuc3hrOc0GuMbQEQ7LTypVMnU8FRqITd1OlnxTOdqiSY+GDirseIR SREK3/JPHqmrfcJsU6vw0X2iz9rh89c1s7hpN3Dpiubrq+9w8RuOTTpmNjjzX1SoIKfO 2D+7CPmbUvWYJDWrDuvhL80JXE9lz1jBD4ArAnZrE2CAfWzVzx5rIX1gx0GklS6mwrgX pXGM6nRfDzsw2YN82ovLKTCU7reJrhye1s+GW5dQtZWiohI7Wz/wi5u80z0ZXhsPnOHL 8NaA== 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=QqmmTSIFihlGdeRhYPNC4iGuCFpvksj9Wht6yNOLSkk5nJV5uEkh8S2+INp0vH3Jfk fIyaMoDR9c5M1oiZVHGr/tY3b7E+gmSbms7o+xZTZwYq9w5ojOWyii0t6zINCyUKJTRW WyHIiZwrPKyIeUl1N2H2jmwh8Q3DJWSVf/KbKEveJksUej+AGBh1tDpi4j0KFZlz6+1s f58v641WVZjG6Dsh2Lp+lJKAW6QmJETicvGAABvvusmqedrikbKFs+CCRFX+HbxXEpdj enfDstdw3b3SKIjSMpkl5MFcqwDAoRElTQ+6tWXA8OuefzQFR7EP15lcgja363lton20 Il2w== X-Gm-Message-State: AOAM533Jx/8IFcJCWE1gmUhLAQkaQ8W/hQg/6cGBhJIklDTyfJ8D8QCe WvRU0VR01r8iS4btby8s0Ldf97qL6Ht0R2TI X-Google-Smtp-Source: ABdhPJyC2hngC/bA2PURFLD4nix7MkB7tZEPuixMYXDtYHCG+vev4JCR+ySnRuuihi/97HbzbDsLWg== X-Received: by 2002:a65:6799:: with SMTP id e25mr3438894pgr.59.1628766675020; Thu, 12 Aug 2021 04:11:15 -0700 (PDT) Received: from C02D70YZMD6R.bytedance.net ([139.177.225.243]) by smtp.gmail.com with ESMTPSA id l126sm3291830pgl.14.2021.08.12.04.11.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Aug 2021 04:11:14 -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 19:11:02 +0800 Message-Id: <20210812111105.54307-2-wangzhihong.wzh@bytedance.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20210812111105.54307-1-wangzhihong.wzh@bytedance.com> References: <20210809062548.30187-1-wangzhihong.wzh@bytedance.com> <20210812111105.54307-1-wangzhihong.wzh@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 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