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 044654401F; Tue, 14 May 2024 17:38:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D0B7402F2; Tue, 14 May 2024 17:38:57 +0200 (CEST) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mails.dpdk.org (Postfix) with ESMTP id 55D2440156 for ; Tue, 14 May 2024 17:38:56 +0200 (CEST) Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1eca195a7c8so47008785ad.2 for ; Tue, 14 May 2024 08:38:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1715701135; x=1716305935; 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=vGeUa6N7gXKOrNjF4TlX8cfKfvDGFv1WjJ/pppJZ+HU=; b=ZKDKGtlrbjuodaBeMweqPyq5qOW7zR/ULH9L4aVFRIKXk2d878eTzn9ov1qXtQMgRH E0Tft2zkvKyBgpVsETd8nsiTgMKGnZWcWKjdg+JP8ModgWLl3zcYyepei+ve1p2dZr+p bspJiIJrE14cmYE1gnQyOx7CRa+krnZDjc3EwLkD5XIyobFgNmUrgyb5ecMg+f3pAq2+ JesdhfP30GPIX8GgHhR3AN3r8hTDGWO30Cvdt+gf0UI7tTHgPMdTNHyJsZ3PNo+3huhm HQwIUkh2FlykFmv8O4Qyl/OhIu0t7Q6MvPvXIpfHp9cKOYRFNSzewU2mSkcg2oBUWlcm umsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715701135; x=1716305935; 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=vGeUa6N7gXKOrNjF4TlX8cfKfvDGFv1WjJ/pppJZ+HU=; b=AvjF0T5z6obZsQeuzlasa/QZk9/WsMv4bkvqk/xz6UYexA5b84aB1RwaWCXmaH0OJB x6WIR9VQxEFnGq3yOLOiZCpeoAuxPE6Jk/Okgj9Rl1xEb0J8C3JVsL6/qT27+ORcbyRk kST01JmXWeBeDv+qxb5RFLY6BMIXmHqs5HVXLGNRSqgKnmqNW34IWvstTmgwL339ZSqs 01u6TPVc8ACd7f6ndGF/nPXG3MgnHve3rtwfm6q+A2mN5aTZS4GpiWW1DFFBMpfeyB/l Vle1uz68VSpglsIBwYj4LKFixuZnvZi4ko1MuUMruBg3QptFEasfpS7xlyFPKDHBaIX9 k5dg== X-Gm-Message-State: AOJu0Yxk5Zhrl0K3zBM1PUcr5+rav2dqDsexnYnd1wmIRHzcGja/yZ/4 9O9/8kfR6Wxh0xlZywtbyvaCCBLBWSVmK9IWLxrRuZR8g1sCpt/JW2L5zWDLe14Bwo+O+SWAMG6 jr9o= X-Google-Smtp-Source: AGHT+IFODxoXYZO0KkRzIOl1VcctsilQ5fe5ngU8pqXZMDMPNyuT/4QlYEEKyZ5uO20gdOWDRX0kKg== X-Received: by 2002:a17:902:d2c8:b0:1eb:3dad:aced with SMTP id d9443c01a7336-1ef43c0f658mr156719055ad.11.1715701135506; Tue, 14 May 2024 08:38:55 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0c137f14sm99256415ad.259.2024.05.14.08.38.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 08:38:55 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v3 0/7] Generic SW counters Date: Tue, 14 May 2024 08:35:03 -0700 Message-ID: <20240514153845.42489-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, tap and ring. Solves the problem where counters could tear because of 32 bit load/store on 32 bit platforms. v3 - fix missing const on 32 bit - add some docbook comments - get rid of unused statistics from previous version Stephen Hemminger (7): eal: generic 64 bit counter ethdev: add internal helper of SW driver statistics net/af_packet: use SW stats helper net/af_xdp: use generic SW stats net/pcap: use generic SW stats net/ring: use generic SW stats net/tap: use generic SW stats drivers/net/af_packet/rte_eth_af_packet.c | 82 +++----------- drivers/net/af_xdp/rte_eth_af_xdp.c | 98 +++++------------ 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 | 91 ++++++++++++++++ lib/ethdev/ethdev_swstats.c | 106 ++++++++++++++++++ lib/ethdev/ethdev_swstats.h | 124 +++++++++++++++++++++ lib/ethdev/meson.build | 2 + lib/ethdev/version.map | 3 + 12 files changed, 438 insertions(+), 368 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