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 92F694403F; Thu, 16 May 2024 01:42:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1EE75402E9; Thu, 16 May 2024 01:42:47 +0200 (CEST) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by mails.dpdk.org (Postfix) with ESMTP id 4AC8B402E1 for ; Thu, 16 May 2024 01:42:45 +0200 (CEST) Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-6123726725eso5974922a12.3 for ; Wed, 15 May 2024 16:42:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1715816564; x=1716421364; 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=3oXuBAFGAVlOwNvH77qSn6sGNg5pgnumlsNwV2i4n9w=; b=mW0Pn8ufr8CPKZ98PtiJzxCAEvrr/oCL1BbfTSDI3b2mGWyTjbZ9/bcMjrlTA5mVk6 QWu/ykVyNgm7PuT2iSF5WttP40vOB0lx5d2XpbH0fh6qFU3Vit32OMDzJm37OuVuB5uT OLDNgR2+Wj2VxKE74nWZgDwZ7ZkY9ebLYL7XNU1ow30GGcU+KQcZhNDBDXYV/gwt6Dbw 2pOWirrOvzcQWIOM28isJHf5RkkjNiDtHNRQuMkbHFX6kj13wV81kxoqT4psOajiBg8V IrPu92iwfq3scEmD3K4UeXa07DSOWCYSdEgzHSeu6xT2PKtyE2SScOxfafpSd5xiOnhV pyBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715816564; x=1716421364; 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=3oXuBAFGAVlOwNvH77qSn6sGNg5pgnumlsNwV2i4n9w=; b=FilPjpk/LKpIQqYI54X0zLEjnnOJDamQ1cBEx9Stkypdyd0Ivq2EkLAa1RyD/JBwt5 Vn0ZO0oUnUlDnE7e/O4dOfj/OW5MoBGzmQNv9KHB03LjSE6LTKU6CGhvX54nMDYEHqwM NZp7ivrnruqroWPFXFv57LgS7w1kzCQ2V+oFUZjgSb3supfX4hK+RHTe619ZX5kZAJVr pTwiPAikW3wrCNbu/IKGTGIA5i0UZ6rgHhFJvQ+IMwJ0434WKcyh3lIlKjDji8RKwkaD /1J8OHi5SZ2dfxVb0lieW7s8Uj0JZxB23i5h2HDA3llKHq5RFz9tq/xMXNefabQjWV5L 0KXg== X-Gm-Message-State: AOJu0YyfALle7AXdXmYxbwFJWeJZarFT1tIXjkUt6Wx5OcqXCmIe9pEt myaBTA78m931eOszhTOfHDYbjuqvkthRiLthHr7lZi22uiJdAOS6lN8kyohgT/rfuObhK66Dwtl OXHo= X-Google-Smtp-Source: AGHT+IEfSO7xie9Cv79eASX6hLLVgoZ5+j/yPZrg1AdoJBbUUmX8y76oJoEv+el9kR/QEsX1gw3+Ng== X-Received: by 2002:a05:6a20:4313:b0:1af:cbe1:8a50 with SMTP id adf61e73a8af0-1afde0b5bfcmr17654056637.10.1715816564078; Wed, 15 May 2024 16:42:44 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f67b0cd494sm958479b3a.161.2024.05.15.16.42.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 16:42:43 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v4 0/8] Generic 64 bit counters for SW PMD's Date: Wed, 15 May 2024 16:40:52 -0700 Message-ID: <20240515234234.5015-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. v4 - cleanup the comments - handle null pmd as well Stephen Hemminger (8): 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 net/ring: use generic SW stats net/tap: use generic SW stats net/null: 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/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 | 91 ++++++++++++++++ lib/ethdev/ethdev_swstats.c | 109 +++++++++++++++++++ lib/ethdev/ethdev_swstats.h | 124 +++++++++++++++++++++ lib/ethdev/meson.build | 2 + lib/ethdev/version.map | 3 + 13 files changed, 458 insertions(+), 431 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