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 A305FA0555 for ; Thu, 9 Jun 2022 13:38:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E2DB40A7D; Thu, 9 Jun 2022 13:38:50 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id EB63E40220 for ; Thu, 9 Jun 2022 13:38:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654774728; 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=6cOl5CX9+Fs2ARGG/YyJrUFHRJw/IHWm5Er4aAvsjmw=; b=W+WpOAVggIvA3tlvm91hHef/v+X7ycSEylq5P4KUlw55AGm41ewvL19W8dysDfwcsEdMeE Jy/OPMWsO9mA2bQbPxXKoFbX+er3sAwJ6dXoTowWdcnxkxiw+QS3x4VXAM317Tyj/foOHS T3JCiwMs2UidWSOuYRGTiwCcFARJMGM= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-548--OwXP1enMXO_gUtMcdFxOw-1; Thu, 09 Jun 2022 07:38:47 -0400 X-MC-Unique: -OwXP1enMXO_gUtMcdFxOw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E07DD1C0514C; Thu, 9 Jun 2022 11:38:46 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.195.82]) by smtp.corp.redhat.com (Postfix) with ESMTP id D7ED01730C; Thu, 9 Jun 2022 11:38:45 +0000 (UTC) From: Kevin Traynor To: Chengwen Feng Cc: Bruce Richardson , Kevin Laatz , dpdk stable Subject: patch 'examples/dma: fix Tx drop statistics' has been queued to stable release 21.11.2 Date: Thu, 9 Jun 2022 12:36:58 +0100 Message-Id: <20220609113701.386938-71-ktraynor@redhat.com> In-Reply-To: <20220609113701.386938-1-ktraynor@redhat.com> References: <20220609113701.386938-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 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-default=true 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.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/13/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/6681d13cb4831d205f6c87d0b77f6475db889b6d Thanks. Kevin --- >From 6681d13cb4831d205f6c87d0b77f6475db889b6d Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Sun, 24 Apr 2022 14:07:40 +0800 Subject: [PATCH] examples/dma: fix Tx drop statistics [ upstream commit 7d3cb76fba200e1649842319facb932d9a05467d ] The Tx drop statistic was designed to be collected by rte_eth_dev_tx_buffer mechanism, but the application uses rte_eth_tx_burst to send packets and this lead the Tx drop statistic was not collected. This patch removes rte_eth_dev_tx_buffer mechanism to fix the problem. Fixes: 632bcd9b5d4f ("examples/ioat: print statistics") Signed-off-by: Chengwen Feng Acked-by: Bruce Richardson Acked-by: Kevin Laatz --- examples/dma/dmafwd.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/examples/dma/dmafwd.c b/examples/dma/dmafwd.c index a03ca05129..dd576bcf77 100644 --- a/examples/dma/dmafwd.c +++ b/examples/dma/dmafwd.c @@ -123,5 +123,4 @@ static uint32_t max_frame_size; static struct rte_ether_addr dma_ports_eth_addr[RTE_MAX_ETHPORTS]; -static struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS]; struct rte_mempool *dma_pktmbuf_pool; @@ -485,8 +484,11 @@ dma_tx_port(struct rxtx_port_config *tx_config) port_statistics.tx[tx_config->rxtx_port] += nb_tx; - /* Free any unsent packets. */ - if (unlikely(nb_tx < nb_dq)) + if (unlikely(nb_tx < nb_dq)) { + port_statistics.tx_dropped[tx_config->rxtx_port] += + (nb_dq - nb_tx); + /* Free any unsent packets. */ rte_mempool_put_bulk(dma_pktmbuf_pool, (void *)&mbufs[nb_tx], nb_dq - nb_tx); + } } } @@ -971,23 +973,4 @@ port_init(uint16_t portid, struct rte_mempool *mbuf_pool, uint16_t nb_queues) ret, portid); - /* Initialize TX buffers */ - tx_buffer[portid] = rte_zmalloc_socket("tx_buffer", - RTE_ETH_TX_BUFFER_SIZE(MAX_PKT_BURST), 0, - rte_eth_dev_socket_id(portid)); - if (tx_buffer[portid] == NULL) - rte_exit(EXIT_FAILURE, - "Cannot allocate buffer for tx on port %u\n", - portid); - - rte_eth_tx_buffer_init(tx_buffer[portid], MAX_PKT_BURST); - - ret = rte_eth_tx_buffer_set_err_callback(tx_buffer[portid], - rte_eth_tx_buffer_count_callback, - &port_statistics.tx_dropped[portid]); - if (ret < 0) - rte_exit(EXIT_FAILURE, - "Cannot set error callback for tx buffer on port %u\n", - portid); - /* Start device. 8< */ ret = rte_eth_dev_start(portid); -- 2.34.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-09 12:34:31.378205805 +0100 +++ 0071-examples-dma-fix-Tx-drop-statistics.patch 2022-06-09 12:34:29.812980755 +0100 @@ -1 +1 @@ -From 7d3cb76fba200e1649842319facb932d9a05467d Mon Sep 17 00:00:00 2001 +From 6681d13cb4831d205f6c87d0b77f6475db889b6d Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 7d3cb76fba200e1649842319facb932d9a05467d ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org