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 99506A00C4; Sat, 6 Aug 2022 00:01:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B9A4042C38; Sat, 6 Aug 2022 00:00:40 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 978AB40697 for ; Sat, 6 Aug 2022 00:00:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659736836; x=1691272836; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=/PMF7LK3Rss+u7W5zvSXLq6pGHQrQX8k9ZYCmTiY9q0=; b=DxoPLhaWj3/fNWwWZSVJAKmDAS/pycinEhurFpwVIuGFwzE8MRdDFuPA /Fmd5wdFDLZi2oJqq/k8XJi0FYmpAlsFX3CKMRYhl1JphOgbCZItkrc8P 3IVVBvKlVETZnUB4J6E2XvBtXBQBjksVR3sj4vRCKj5v+w2F4PNxnfYTq 4Gx5IPAyLyTXjBk/UsBnyoW1hf0Y7ktPHJL9SC0Z+Xf1q8/KobTAQvCAQ ctWVesENfs90qlthFEYUhAU0t/EGI1O+ZloemSh6gisR21rPCzVrGLVa4 xt5XPqSuXVKnC6R7EY3SxZ5mCiUPDhRGS1YXSY8sAzpi2rhOwNfbNwpc0 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10430"; a="273348509" X-IronPort-AV: E=Sophos;i="5.93,217,1654585200"; d="scan'208";a="273348509" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Aug 2022 15:00:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,217,1654585200"; d="scan'208";a="693137542" Received: from silpixa00400573.ir.intel.com (HELO silpixa00400573.ger.corp.intel.com.) ([10.237.223.157]) by FMSMGA003.fm.intel.com with ESMTP; 05 Aug 2022 15:00:31 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Subject: [PATCH 01/10] port: add output port packet drop statistics couters Date: Fri, 5 Aug 2022 22:00:20 +0000 Message-Id: <20220805220029.1096212-2-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220805220029.1096212-1-cristian.dumitrescu@intel.com> References: <20220805220029.1096212-1-cristian.dumitrescu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Add packet drop statistics counters for the output ports. Required by the non-blocking output port behavior where the packets that cannot be sent at the time of the operation are dropped as opposed to the send operation being retried potentially forever for the same packets. Signed-off-by: Cristian Dumitrescu --- lib/port/rte_swx_port.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/port/rte_swx_port.h b/lib/port/rte_swx_port.h index 5e29100f59..1dbd95ae87 100644 --- a/lib/port/rte_swx_port.h +++ b/lib/port/rte_swx_port.h @@ -185,12 +185,18 @@ typedef void /** Output port statistics counters. */ struct rte_swx_port_out_stats { - /** Number of packets. */ + /** Number of packets successfully transmitted. */ uint64_t n_pkts; - /** Number of bytes. */ + /** Number of bytes successfully transmitted. */ uint64_t n_bytes; + /** Number of packets dropped. */ + uint64_t n_pkts_drop; + + /** Number of bytes dropped. */ + uint64_t n_bytes_drop; + /** Number of packets cloned successfully. */ uint64_t n_pkts_clone; -- 2.34.1