From patchwork Mon Aug 12 17:41:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 13760895 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C0855C3DA7F for ; Mon, 12 Aug 2024 17:43:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=fXYNwbibo3q9+9v2rnTRfaKvdJQgQ9R5OR8/YZpKJV0=; b=0IlJic5NM6eqDVxOljVsPVA+Gt 4hrp2DenRFJTF5h/DxefpP2v9ww2vUOvs8kzbEeBskjJxoY6c3iqwrVN5em3hexaXMEUYdplnEbuG 9NgQIk8aP5A8czWttQ34zDKm40DnE+akpE9wSM1e+CXTRSk1YhUU6nDoJONnm94LzaJ3E1Dwnt+5D G6+OJ/y6Bh0v+ac8dITBOwSwHEsNOcuqWA0GvOibRNoi1j+G6PWl/4gWRofoDhyrcUuNwXoERYyEz Dr/C+Q2u0UBjtXfU8m7ek5KwM+WsO6tZjYJp3LBKUumKcn8U4Uk2pjc+cyGIJI5+LKMXxYrDEaOcO jDxpv73A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdZ4U-000000014hT-2HAT; Mon, 12 Aug 2024 17:43:06 +0000 Received: from out-177.mta1.migadu.com ([2001:41d0:203:375::b1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdZ37-000000014KC-2yX8 for linux-arm-kernel@lists.infradead.org; Mon, 12 Aug 2024 17:41:43 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1723484497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=fXYNwbibo3q9+9v2rnTRfaKvdJQgQ9R5OR8/YZpKJV0=; b=xhtje9aWmJAotKGwyWjy/A18WJtnae2SsNhqtAqpYSpb7Z/a2zZQAFCXlEaP5Cqf40gWxH tYlpeN5xeXbWkq/Xq5k3UiphZd+MSwOZ/gWAuDtSFwzkj+msb6Pfx9RsTBIplv5PU2xUtF toZUU2DQQD+XdtQ6oMyvdrnSHe+NcFw= From: Sean Anderson To: Andrew Lunn , Radhey Shyam Pandey , netdev@vger.kernel.org Cc: Simon Horman , Jakub Kicinski , Russell King , "David S . Miller" , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Paolo Abeni , Michal Simek , Eric Dumazet , Sean Anderson Subject: [PATCH net-next v2 0/2] net: xilinx: axienet: Add statistics support Date: Mon, 12 Aug 2024 13:41:16 -0400 Message-Id: <20240812174118.3560730-1-sean.anderson@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240812_104142_042644_468562F5 X-CRM114-Status: UNSURE ( 7.53 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add support for hardware statistics counters (if they are enabled) in the AXI Ethernet driver. Unfortunately, the implementation is complicated a bit since the hardware might only support 32-bit counters. Changes in v2: - Switch to a seqlock-based implementation to allow fresher updates (rather than always using stale counter values from the previous refresh). - Take stats_lock unconditionally in __axienet_device_reset - Fix documentation mismatch Sean Anderson (2): net: xilinx: axienet: Report RxRject as rx_dropped net: xilinx: axienet: Add statistics support drivers/net/ethernet/xilinx/xilinx_axienet.h | 85 ++++++ .../net/ethernet/xilinx/xilinx_axienet_main.c | 259 +++++++++++++++++- 2 files changed, 343 insertions(+), 1 deletion(-)