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 A7E2343F81; Thu, 16 May 2024 17:43:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2BEB3402E9; Thu, 16 May 2024 17:43:40 +0200 (CEST) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mails.dpdk.org (Postfix) with ESMTP id 6B3794029B for ; Thu, 16 May 2024 17:43:38 +0200 (CEST) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-6f44dd41a5cso399203b3a.0 for ; Thu, 16 May 2024 08:43:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1715874217; x=1716479017; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+6vf3mKVCBLyPICyBtBqRuM+TC+Ug5LL8NTEYPgQgDM=; b=Rz8U2k1Xyk7ASSYCEvBp9u72MpmEQkY5XHATrwM0LcxRHtHo1qGM/Od/4n3/MP0mur J8aamfMpcumvZRwcqD24HCgYcXfcKgmv9Ez5gBpaQRFCFiIzPmZImWRl6566a/AFQri1 D56V/WDkraao2anOY91eAOaH1qy5QBRg06m7EeqEV7RHvs/qcc7eM3wCSN+d2q5uwAHB sB4FrT9o6IqQOlGF+N9DIGEKO4O/lTvmJ+ZwO1GenUNGcA6nl5xXGW6h8sYRvZFEJmFJ sQiRpxJ8CyHRf6EM5LHzZy8U7CU9ecJ9z/KmfUjgk2W6GltXsEgRmDlRK4NXJyyMn3J4 MPHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715874217; x=1716479017; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+6vf3mKVCBLyPICyBtBqRuM+TC+Ug5LL8NTEYPgQgDM=; b=FU2wnH+yE0dHdgggSHe2TO5bVBIsuu2RKKW7XmasSRbyONAlvjtHjdqOM3HOcpg5Qx Et+G7fiNoKrr1ftuqrHvskNB9bycE8aJyrW86KGVnnUNh/AqkkdHG33kT/92qg6HvpvO S7mJwGDSxcTBrrfCZ7rA+UCNSKCRfN1nfFQsKnrdjr8JT68vyVw4skIPpBY6rt21dwLM oeQT1yaYjJlj9/rM36Yt770qzQhDqjqWjQhZDozEeQT+u23VE3U6jUr1leGEOa89m3cQ aCvm5z6KV7txF+Nllkh93Kg2VJrxQWTyRHsOdM4SIGJ3xRvL9YJGFz7/7FKY+6kacOPK U1fw== X-Gm-Message-State: AOJu0YwtJBY4uOifGxFVPUTLqFrNbVlWDaevmVngOrlgUSpR0R5NesCT XaxCtUEAK+BfO8jZ6XVA+wLQzHuY/ahg7oGkl58sU8b6IkDYliKmqJD1H1xQMymjMLt85g09DIL VFkk= X-Google-Smtp-Source: AGHT+IGfFu+T0TNAYnSf1mLOVy9GBD21YW9VXbkOzhKV4fymbOqdk1+c4GnUhGktp+1mIdZKuh+qTw== X-Received: by 2002:a05:6a00:2daa:b0:6ea:c2c7:5d6a with SMTP id d2e1a72fcca58-6f4e0298969mr25271004b3a.2.1715874217379; Thu, 16 May 2024 08:43:37 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f67b526b44sm2457430b3a.149.2024.05.16.08.43.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 08:43:37 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v5 0/9] Generic 64 bit counters Date: Thu, 16 May 2024 08:40:36 -0700 Message-ID: <20240516154327.64104-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240510050507.14381-1-stephen@networkplumber.org> References: <20240510050507.14381-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 Adds common code for collecting basic statistics used by many SW based PMD's such as af_packet, af_xdp, null, tap and ring. Solves the problem where counters could tear because of 32 bit load/store on 32 bit platforms. v5 - use consume/release memory order for update on 32 bit case - initialize mbuf in ring test which was causing byte counts to be messed up. Stephen Hemminger (9): eal: generic 64 bit counter ethdev: add common counters for statistics net/af_packet: use generic SW stats net/af_xdp: use generic SW stats net/pcap: use generic SW stats test/pmd_ring: initialize mbufs net/ring: use generic SW stats net/tap: use generic SW stats net/null: use generic SW stats app/test/test_pmd_ring.c | 22 ++-- drivers/net/af_packet/rte_eth_af_packet.c | 82 +++----------- drivers/net/af_xdp/rte_eth_af_xdp.c | 98 +++++------------ drivers/net/null/rte_eth_null.c | 80 +++----------- drivers/net/pcap/pcap_ethdev.c | 125 +++++----------------- drivers/net/ring/rte_eth_ring.c | 71 +++++------- drivers/net/tap/rte_eth_tap.c | 88 +++------------ drivers/net/tap/rte_eth_tap.h | 15 +-- lib/eal/include/meson.build | 1 + lib/eal/include/rte_counter.h | 98 +++++++++++++++++ lib/ethdev/ethdev_swstats.c | 109 +++++++++++++++++++ lib/ethdev/ethdev_swstats.h | 124 +++++++++++++++++++++ lib/ethdev/meson.build | 2 + lib/ethdev/version.map | 3 + 14 files changed, 480 insertions(+), 438 deletions(-) create mode 100644 lib/eal/include/rte_counter.h create mode 100644 lib/ethdev/ethdev_swstats.c create mode 100644 lib/ethdev/ethdev_swstats.h -- 2.43.0