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 5B1C541CEC for ; Mon, 20 Feb 2023 17:41:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 52D30430AF; Mon, 20 Feb 2023 17:41:43 +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 E4522430A7 for ; Mon, 20 Feb 2023 17:41:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676911300; 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=CFloPvUE7SrT4Krc9+shZ19eUEkP5DA/nKstA+Tio3Y=; b=ObTglPR65LYK0JLkqYZkxGag5kbAJO4HY0sIGv6RmYBxrRMBGRo4yshbCjHaeJAA5ePuhU x9aJzKexR5yfsRlM1rs+blq5bQy96NP85T4XQGgwCr0NyFDchoivFO8Jg7ZkFwvXSJV/dS jOvaqH3vztZKASJgawRsid8q/Roj72Q= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-563-i-pJuRAOOjumRV3kL_D3dw-1; Mon, 20 Feb 2023 11:41:37 -0500 X-MC-Unique: i-pJuRAOOjumRV3kL_D3dw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C9995101A521; Mon, 20 Feb 2023 16:41:36 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id A129A492B05; Mon, 20 Feb 2023 16:41:35 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Ferruh Yigit , Aman Singh , Yuying Zhang , Robin Jarry , stable@dpdk.org Subject: [PATCH v2 2/9] app/testpmd: fix packet count in ieee15888 engine Date: Mon, 20 Feb 2023 17:40:56 +0100 Message-Id: <20230220164103.3041538-3-david.marchand@redhat.com> In-Reply-To: <20230220164103.3041538-1-david.marchand@redhat.com> References: <20230124104742.1265439-1-david.marchand@redhat.com> <20230220164103.3041538-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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 Don't count a packet has been transmitted before it is done. Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: David Marchand --- app/test-pmd/ieee1588fwd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c index fc4e2d014c..896d5ef26a 100644 --- a/app/test-pmd/ieee1588fwd.c +++ b/app/test-pmd/ieee1588fwd.c @@ -184,13 +184,13 @@ ieee1588_packet_fwd(struct fwd_stream *fs) /* Forward PTP packet with hardware TX timestamp */ mb->ol_flags |= RTE_MBUF_F_TX_IEEE1588_TMST; - fs->tx_packets += 1; if (rte_eth_tx_burst(fs->rx_port, fs->tx_queue, &mb, 1) == 0) { printf("Port %u sent PTP packet dropped\n", fs->rx_port); fs->fwd_dropped += 1; rte_pktmbuf_free(mb); return; } + fs->tx_packets += 1; /* * Check the TX timestamp. -- 2.39.2