Message ID | 20241014152431.2045377-6-dario.binacchi@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBCQ4XFG47UFRBQXPWS4AMGQEQO3YNKY@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 9957E3F382 for <linux-amarula@patchwork.amarulasolutions.com>; Mon, 14 Oct 2024 17:24:51 +0200 (CEST) Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-539fbbadca7sf706360e87.3 for <linux-amarula@patchwork.amarulasolutions.com>; Mon, 14 Oct 2024 08:24:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1728919491; cv=pass; d=google.com; s=arc-20240605; b=hpRGuFju3k8iD2X+I3NMxnUFYgO+JrPyy1NfTVEiyUeN0/wKw07BY8UGppQpSnozUi UC2fj8Ednlz9BPI8tPdNxNaBdms6n1PjW7MZR3Xs8mYjS+I9+XaFiXDArwbY5SoZJmBn mHcmgYBVJaBp02hJYlZz9QsJ34EnJAYkTAZ1QKh0hGl21ed9HvWCw854Ahf74Et2h493 qbCBfIdeMEwWl1IrVgO41JSofLVN+aPKTZqEON1mwtxHsBhHD72EkWkIeETQ0AcsL1rR u0H6sl5cXTcUh1J5bdU55rlRFrwR578qyYKaHUtQ4Lz/tE87i6a1x1yZ2waPP7BWQXpx 3EMw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ILLrI3grnj2ipVMC9JWSZcep6oocojxuq1cCmmL1L5o=; fh=+KKY6Bvg8ynWbrPGIuSLHNESsALeJNoaydkztJBZ8Uo=; b=MGRxJgJpsMT3oL8EGBkCoIUzK0BWQDKWDR+S3FV02zbgrSSYtIYJyhX3QZmaXy5AbX jpFvTR4a4DJMlWimHQG9Gww/37bj3zKblL6QAz+lX2maEfAUoi+2vatreV9yK3LYPw0e vRs0C5hI6+pv5w3XExPyD5rQIqEI3abfmzfm6yQP2d4tOyhbzaGzS6fhfWxznQk2V0/S BErU9aRuBub/l9sgXPjoGkyZxXGJdsdYshAMdEuj5cONrxIwKTzq/Ylx2iAvmQuTj6Iu qT+K6phacoLz/iqC4G7/6PrW4/np6oENoWlSK6aC3sNe/+I38MSwyxyaFatDlMTg+bpj zgfg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RhzTiPop; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1728919491; x=1729524291; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=ILLrI3grnj2ipVMC9JWSZcep6oocojxuq1cCmmL1L5o=; b=qPCipFfBIeZmuJ32VThc5CxRQEBop5VG6ZxnujjSfiutY8vnW0FdXiquhElR/7Un3s 0lZvrVwSESIr4leQRY6tjZNYfe4OLfxLTWsfmvJghCl43JAp6/hqLR2+DjJR2hD3xUKG 3gXEwQ4lSmALVzw56PCZAVeG5zuP0LadMC2OA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728919491; x=1729524291; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ILLrI3grnj2ipVMC9JWSZcep6oocojxuq1cCmmL1L5o=; b=uNLrXCZV9cm5Gox7io6P/yip1WeTqe8rhVGWLKPsr1VV7/WBrzdrB+C9G+FmOV6r2R NDrlkhbn6X7TN/JWucTWbu2UUQ1MCagSFxfTdBPIXCNs9ci9jg6lXXpU2v06zyewI2ba owksscF+MNZRAot5GLYOFq+wCe01ZKjAcjcHqsWdLYx1eYGaoxDEhM3iFfdi+y0oQjDh NNRX8OSJG1tDQu1KeWrNyV2/blc56j1t+3HMFTzboZRbcuUlT8SgzqJ4HHCcF3nsPp7X YXu9e7yOFeC3+MYDZqx8F/+TOPI1sxdiXZ++3qlWMFBsHxRCqY7QiHIC8qleh81I9ISM 1u0Q== X-Forwarded-Encrypted: i=2; AJvYcCU2EDvG9wS0EEmySwX7va63AE0yQh0XptmMOxo6uKHrAh4A94V0coBQgcQ8kfMgGn7MLOlUUBjPfmATwKsm@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yz4C2DBpXsJVvBi7Hy/wl5qpYNRozze9r2GWe1dLydrEreoqwr8 gARKU88j6MhszmNOuOvwBsTeO2Pfdo0Mnz35jWwWh/Xh9pRczJpocWtBgTKrOXAMyQ== X-Google-Smtp-Source: AGHT+IFom3u1GRbE4N8uFZANAoK/L4DW5mOlmtJVyylCdwsGDyyawlI5DQRDaQsgruMvn9naNj7E1Q== X-Received: by 2002:a05:6512:280a:b0:539:f6c4:c29d with SMTP id 2adb3069b0e04-539f6c4c3cfmr1726413e87.54.1728919490922; Mon, 14 Oct 2024 08:24:50 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:1c9f:b0:431:155e:348e with SMTP id 5b1f17b1804b1-43115f179e2ls10747345e9.0.-pod-prod-02-eu; Mon, 14 Oct 2024 08:24:49 -0700 (PDT) X-Received: by 2002:a05:600c:138a:b0:42c:b74c:d8c3 with SMTP id 5b1f17b1804b1-4311df5c5b0mr118197315e9.32.1728919489444; Mon, 14 Oct 2024 08:24:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728919489; cv=none; d=google.com; s=arc-20240605; b=Q5pnLyje8VC/t+8+JNURmd8m1WD3DDjK/1ulb11G24krhiYNCaXjoB/ELWM8Vm+GYH HfX0x4Rv3TLjeop9ZG9NIhm8TyTObJr/R42LGeDPP94qKxFBAnMS4P5cjGOYjZCAgxzH 5vPeoPHCRoTaA7RGyNkLI+CxAWVR2pKP7RzgWmVnv84xyAgGW8sutnYkQFQV7Zj2yIR6 AxieX4GPINzGGqBW9ZiGrccpB6EtixzjtgUVeJq/ZYmD2ho/0ZUMmAUeFAZySyfcTT76 bYw9K3p4+kZfEg2it1dyp3wl13ZIBhEqoZSyx10Zxlqul/muCCNU0mlhY06Xkq1jFgMN gwwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=pO1UlU+Kdbb/WHWYgWNeRFcofykWy+kMnflMuEIHEjY=; fh=dGLZOKN9V8tcsawm1ur1mnwhvDoTVzbByAl3wpaYkgg=; b=W45dYAZ1NoJvKq+6bG5oSvipgmjWjrThXnPiXY0PHJ5z3sPUgQBnN7oqr8L3S8VOPK YKU6iN6kGyZc6nwGG9XZQMkUbuno/TgInl8u8Cy3WEUOsHoJV06YNMSXxEQOYdpqg0Ba 6AgpRX598azqSvOZtxksa0L7CEHztZPVbPfuK88/hfiLovYiieH+Mb5Fv7dcPPY9X0hO Gcf4hn3M5ZAJldNLHp0sCtvSYi4DhmSRi0/0hoDxHP3tMyPnkrMxzHnfwz4Olx97RWW9 MCKofMGaZzSuUjDCMpNRQytb2V0V7WtwosjM+mvVLK5sfKFss/iALB+4h7b3v7KM4nVR yD6Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RhzTiPop; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-43118489f8csor30031495e9.3.2024.10.14.08.24.49 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Mon, 14 Oct 2024 08:24:49 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:600c:3b0d:b0:428:10d7:a4b1 with SMTP id 5b1f17b1804b1-4311df56e7bmr106900825e9.25.1728919488976; Mon, 14 Oct 2024 08:24:48 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.40.133]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d4b6bd1b7sm11629911f8f.37.2024.10.14.08.24.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2024 08:24:48 -0700 (PDT) From: Dario Binacchi <dario.binacchi@amarulasolutions.com> To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, michael@amarulasolutions.com, Dario Binacchi <dario.binacchi@amarulasolutions.com>, Marc Kleine-Budde <mkl@pengutronix.de>, Vincent Mailhol <mailhol.vincent@wanadoo.fr>, linux-can@vger.kernel.org Subject: [RFC PATCH 5/6] can: netlink: extend stats to the error types (ack, CRC, form, ...) Date: Mon, 14 Oct 2024 17:24:20 +0200 Message-ID: <20241014152431.2045377-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241014152431.2045377-1-dario.binacchi@amarulasolutions.com> References: <20241014152431.2045377-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RhzTiPop; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: <linux-amarula.amarulasolutions.com> X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>, <mailto:linux-amarula@amarulasolutions.com> List-Help: <https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>, <mailto:linux-amarula+help@amarulasolutions.com> List-Archive: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/> List-Unsubscribe: <mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>, <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe> |
Series |
|
Related |
show
|
diff --git a/include/uapi/linux/can/netlink.h b/include/uapi/linux/can/netlink.h index 02ec32d69474..8b33549e7e19 100644 --- a/include/uapi/linux/can/netlink.h +++ b/include/uapi/linux/can/netlink.h @@ -114,6 +114,12 @@ struct can_device_stats { __u32 bus_off; /* Changes to bus off state */ __u32 arbitration_lost; /* Arbitration lost errors */ __u32 restarts; /* CAN controller re-starts */ + __u32 bit_error; /* Bit error */ + __u32 stuff_error; /* Bit stuffing error */ + __u32 form_error; /* form error */ + __u32 ack_error; /* ack error */ + __u32 crc_error; /* CRC error */ + __u32 pad; }; /*
The CAN bus protocol specifies 5 CAN error types: - Bit Error [Transmitter] - Bit Stuffing Error [Receiver] - Form Error [Receiver] - ACK Error (Acknowledgment) [Transmitter] - CRC Error (Cyclic Redundancy Check) [Receiver] The patch also adds the corresponding counters to the statistics. Since each device/driver can determine which of these errors has occurred, why not export this information along with the more general counters? Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> --- include/uapi/linux/can/netlink.h | 6 ++++++ 1 file changed, 6 insertions(+)