From patchwork Mon Jun 10 23:10:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 13692565 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 AE742C27C5F for ; Mon, 10 Jun 2024 23:10:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=RfDkopk/soTghKBK+Qqsd04mH6AiBOv4wk+3eUoy78g=; b=gs/D2dQeQa32rn nZl0JBfG6eKd0aeFrnmVDghkblhPZYKuziVYe7565vWJFnhge5iH+CmhoU/uP4u2kYHjPJ3N4dInA eH5dCdOJbHrWSNhOsr1X8WfiYu/VYAWPUhaV/FEFOhTEAVNZKvy/44Q2sUzXf4cBYbOA0tU9VgE31 dU11BQBjsg+Hxgea8czmBiqcroCCKxZyWqoCcEphGGYyN2flFgcPpxPHtXJ1YTksYoD4b4l1OMsds g/oW3pNzCl23T3LXUCpwzyUoU2+69PIs+OWDyOwdkuKxG0TatDI5Iu9XfQm7AvnRveuUcWXeeEAZq +7jNfh/pLfV1csJZIx1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sGo9t-00000006mwn-1Py1; Mon, 10 Jun 2024 23:10:37 +0000 Received: from out-175.mta0.migadu.com ([2001:41d0:1004:224b::af]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sGo9p-00000006mu8-38HP for linux-arm-kernel@lists.infradead.org; Mon, 10 Jun 2024 23:10:35 +0000 X-Envelope-To: radhey.shyam.pandey@amd.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1718061029; 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=FDA59kZrpAKz7084CN5HZMkmVitgKCZsjBBJnQ6cgj8=; b=wK7AYb5srn+BvhVJWYZhr8hTCWe3vVWq74rQqoFySP/cYlCN4f0qC6yBS0J1klT+Hli3uV uJub072MBWc0IZyDo/0Kx24/hxdW6lja6SaaZCTUHGJstbK+UawMY0E44Yx/v/++8Cpnxb mFtfwBDa3f9rL9pQkudw07cPj087Wjk= X-Envelope-To: netdev@vger.kernel.org X-Envelope-To: linux-arm-kernel@lists.infradead.org X-Envelope-To: michal.simek@amd.com X-Envelope-To: kuba@kernel.org X-Envelope-To: linux@armlinux.org.uk X-Envelope-To: pabeni@redhat.com X-Envelope-To: edumazet@google.com X-Envelope-To: linux-kernel@vger.kernel.org X-Envelope-To: davem@davemloft.net X-Envelope-To: sean.anderson@linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sean Anderson To: Radhey Shyam Pandey , netdev@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Michal Simek , Jakub Kicinski , Russell King , Paolo Abeni , Eric Dumazet , linux-kernel@vger.kernel.org, "David S . Miller" , Sean Anderson Subject: [PATCH net-next 0/3] net: xilinx: axienet: Add statistics support Date: Mon, 10 Jun 2024 19:10:19 -0400 Message-Id: <20240610231022.2460953-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-20240610_161034_081738_4F7BAB75 X-CRM114-Status: UNSURE ( 7.33 ) 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. In the future, we could add a simpler alternate implementation for 64-bit counters enabled with a device-tree property, but for now I've gone with a unified implementation. Sean Anderson (3): net: xilinx: axienet: Use NL_SET_ERR_MSG instead of netdev_err net: xilinx: axienet: Report RxRject as rx_dropped net: xilinx: axienet: Add statistics support drivers/net/ethernet/xilinx/xilinx_axienet.h | 81 ++++++ .../net/ethernet/xilinx/xilinx_axienet_main.c | 275 +++++++++++++++++- 2 files changed, 349 insertions(+), 7 deletions(-)