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 79B0544044; Fri, 17 May 2024 02:13:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EBA184029F; Fri, 17 May 2024 02:13:14 +0200 (CEST) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mails.dpdk.org (Postfix) with ESMTP id 24F984027F for ; Fri, 17 May 2024 02:13:13 +0200 (CEST) Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-2b27eec1eb1so660265a91.0 for ; Thu, 16 May 2024 17:13:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1715904792; x=1716509592; 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=S9tvkTWoiDd+ZFVCjo7CvR0xaVByMKYz3eo/RLa0fKE=; b=poLxAeIdMgcK2AplwV+bVoqmA//nNAP1GS3OkM/3Q+a5OrpOFK5N/HOdAPJn+bfe9v HlxfN7LkM0U/LpEIJPbbixukcqMEjJh5Ud/p6cQwSFzoc58251JgBX/hoaZ+NlmU2GDk WAT7UZ7hzuE76OY/GLPAK6cMf+Iu7qj2VFwX6M/BlhKynzRXaPUab71njcksneR63KS+ FeXHN+CwoB/FWjSj0K4iuioDrLHUB+GnQ4kLvSRxd1haVrugDJjoLVM1G0KYtcjRzOKa mbza6CkMGMUl6u0fQ4979MseS/Xhstu8bDLF/1zJO7Yb610XsUFf8g3LUoRsy7N+Uw0E 2bYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715904792; x=1716509592; 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=S9tvkTWoiDd+ZFVCjo7CvR0xaVByMKYz3eo/RLa0fKE=; b=TErIKmLuLH41xrD9GG09F4LBoOO1emM346OYHHwHwjHx0tk3ELw7ryfG6g25Ej9C/5 M7YJ2ckR4Tax/+ixIVldT8t+4q/K7rwNKgoFL0HFPDZoZVpnjc4rzGpQ76w1YK+hSrBc FKWZzeWdjA92aA5IK9YFEWxUDdChlWlSLtoGAVFL6WaYIqzH7pocHWOLuXV5j3JyRp4i 4sPBeDK1/9mGObmnmmeslYzdg+avA+MPtXNi0n6fG094ExTkzptOIz/Pf+mbz0Xd2HGI JL38dlfrocuSB/dzkaTcoaba8GOe1xTiUKgXR57TyhtiFmX4XFgxXf8qQCUySI/j3rDt Hrdg== X-Gm-Message-State: AOJu0YwpVmrZjZ92THpzYvFeaUSxtPsQjH3sB57AgC2hik6QsFVlUNZL 3o0gLAHQYTjBM+gY3LWEQl1umNqYmy2m+Olb+AEV4dStdbM+igQRsZLddRFZx5rd6X9KrZNXde2 wkTo= X-Google-Smtp-Source: AGHT+IHo3PZmc9PJXqAerVWQ+nYWPkwCzYxe1ZJMtP/KxkfF0Xaeoi/WwTlqEqrq7f5xSo/87zOycQ== X-Received: by 2002:a17:90a:17a5:b0:2b9:e3:355f with SMTP id 98e67ed59e1d1-2b900e33640mr13215939a91.8.1715904791837; Thu, 16 May 2024 17:13:11 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2b9f5820ce9sm3337495a91.56.2024.05.16.17.13.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 17:13:11 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v6 0/9] Generic 64 bit counters for SW drivers Date: Thu, 16 May 2024 17:12:00 -0700 Message-ID: <20240517001302.65514-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. v6 - address initialization of mbuf in test/pmd_ring 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 | 26 ++++- 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, 486 insertions(+), 436 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