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 F1CC5A034F for ; Mon, 21 Feb 2022 16:38:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EDB374013F; Mon, 21 Feb 2022 16:38:56 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 1F07440DF6 for ; Mon, 21 Feb 2022 16:38:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645457935; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0vV1ip8wzwGvk3i7CG4rP4onXbgcMoXup0srNoGI0tQ=; b=GvlMOYMjrwpKHWo7ZKYMqtOs5iD8KQHDt6sigJIsfCW8MhCu1pbDr/SYrY8Or19osuyULO bQcovpgSUuhtPaNR13ti/fw3t8gkUsDoJt++1gTxl7P0+cxm7sZGjTBQ2alSYoulOTMThO A3JalSiA8YFN1x+NDxQ4iaH81vzj6lg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-669-EnNmjluROGePijDBijFc6w-1; Mon, 21 Feb 2022 10:38:50 -0500 X-MC-Unique: EnNmjluROGePijDBijFc6w-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 04075184608E; Mon, 21 Feb 2022 15:38:49 +0000 (UTC) Received: from rh.Home (unknown [10.39.195.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 06B3178DDE; Mon, 21 Feb 2022 15:38:47 +0000 (UTC) From: Kevin Traynor To: Viacheslav Ovsiienko Cc: Ferruh Yigit , dpdk stable Subject: patch 'app/testpmd: fix Tx scheduling interval' has been queued to stable release 21.11.1 Date: Mon, 21 Feb 2022 15:34:17 +0000 Message-Id: <20220221153625.152324-68-ktraynor@redhat.com> In-Reply-To: <20220221153625.152324-1-ktraynor@redhat.com> References: <20220221153625.152324-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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 Hi, FYI, your patch has been queued to stable release 21.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/26/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/bb1854bc690ec40310cfb964c7153904850d9b5f Thanks. Kevin --- >From bb1854bc690ec40310cfb964c7153904850d9b5f Mon Sep 17 00:00:00 2001 From: Viacheslav Ovsiienko Date: Tue, 23 Nov 2021 18:32:58 +0200 Subject: [PATCH] app/testpmd: fix Tx scheduling interval [ upstream commit 9fac5ca8edaebd0f6206193277876fdebb6f3eb2 ] The first "set txtimes" command parameter specifies the time interval between scheduled send bursts for single queue. This interval should be the same for all the forwarding ports. It requires to maintain the timing related variables on per queue basis instead of per core, as currently implemented. This resulted in wrong burst intervals if two or more cores were generating the scheduled traffic for two or more ports in txonly mode. This patch moves the timing variable to the fstream structure. Only txonly forwarding mode with enabled send scheduling is affected. Fixes: 4940344dab1d ("app/testpmd: add Tx scheduling command") Signed-off-by: Viacheslav Ovsiienko Acked-by: Ferruh Yigit --- app/test-pmd/testpmd.h | 1 + app/test-pmd/txonly.c | 20 ++++++-------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 2149ecd93a..9967825044 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -148,4 +148,5 @@ struct fwd_stream { uint64_t rx_bad_outer_ip_csum; /**< received packets having bad outer ip checksum */ + uint64_t ts_skew; /**< TX scheduling timestamp */ #ifdef RTE_LIB_GRO unsigned int gro_times; /**< GRO operation times */ diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c index e8c0c7b926..fc039a622c 100644 --- a/app/test-pmd/txonly.c +++ b/app/test-pmd/txonly.c @@ -60,12 +60,8 @@ static struct rte_ipv4_hdr pkt_ip_hdr; /**< IP header of transmitted packets. */ RTE_DEFINE_PER_LCORE(uint8_t, _ip_var); /**< IP address variation */ static struct rte_udp_hdr pkt_udp_hdr; /**< UDP header of tx packets. */ -RTE_DEFINE_PER_LCORE(uint64_t, timestamp_qskew); - /**< Timestamp offset per queue */ -RTE_DEFINE_PER_LCORE(uint32_t, timestamp_idone); /**< Timestamp init done. */ static uint64_t timestamp_mask; /**< Timestamp dynamic flag mask */ static int32_t timestamp_off; /**< Timestamp dynamic field offset */ static bool timestamp_enable; /**< Timestamp enable */ -static uint32_t timestamp_init_req; /**< Timestamp initialization request. */ static uint64_t timestamp_initial[RTE_MAX_ETHPORTS]; @@ -195,5 +191,5 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp, struct rte_ether_hdr *eth_hdr, const uint16_t vlan_tci, const uint16_t vlan_tci_outer, const uint64_t ol_flags, - const uint16_t idx, const struct fwd_stream *fs) + const uint16_t idx, struct fwd_stream *fs) { struct rte_mbuf *pkt_segs[RTE_MAX_SEGS_PER_PKT]; @@ -263,9 +259,8 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp, if (unlikely(timestamp_enable)) { - uint64_t skew = RTE_PER_LCORE(timestamp_qskew); + uint64_t skew = fs->ts_skew; struct tx_timestamp timestamp_mark; - if (unlikely(timestamp_init_req != - RTE_PER_LCORE(timestamp_idone))) { + if (unlikely(!skew)) { struct rte_eth_dev_info dev_info; unsigned int txqs_n; @@ -290,6 +285,5 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp, skew = timestamp_initial[fs->tx_port] + tx_pkt_times_inter + phase; - RTE_PER_LCORE(timestamp_qskew) = skew; - RTE_PER_LCORE(timestamp_idone) = timestamp_init_req; + fs->ts_skew = skew; } timestamp_mark.pkt_idx = rte_cpu_to_be_16(idx); @@ -301,5 +295,5 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp, *RTE_MBUF_DYNFIELD (pkt, timestamp_off, uint64_t *) = skew; - RTE_PER_LCORE(timestamp_qskew) = skew; + fs->ts_skew = skew; timestamp_mark.ts = rte_cpu_to_be_64(skew); } else if (tx_pkt_times_intra) { @@ -308,5 +302,5 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp, *RTE_MBUF_DYNFIELD (pkt, timestamp_off, uint64_t *) = skew; - RTE_PER_LCORE(timestamp_qskew) = skew; + fs->ts_skew = skew; timestamp_mark.ts = rte_cpu_to_be_64(skew); } else { @@ -462,5 +456,4 @@ tx_only_begin(portid_t pi) timestamp_mask = 0; timestamp_off = -1; - RTE_PER_LCORE(timestamp_qskew) = 0; dynf = rte_mbuf_dynflag_lookup (RTE_MBUF_DYNFLAG_TX_TIMESTAMP_NAME, NULL); @@ -505,5 +498,4 @@ tx_only_begin(portid_t pi) } } - timestamp_init_req++; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-21 15:22:46.128451386 +0000 +++ 0068-app-testpmd-fix-Tx-scheduling-interval.patch 2022-02-21 15:22:44.148704254 +0000 @@ -1 +1 @@ -From 9fac5ca8edaebd0f6206193277876fdebb6f3eb2 Mon Sep 17 00:00:00 2001 +From bb1854bc690ec40310cfb964c7153904850d9b5f Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9fac5ca8edaebd0f6206193277876fdebb6f3eb2 ] + @@ -20 +21,0 @@ -Cc: stable@dpdk.org