Message ID | 20241029084525.2858224-6-dario.binacchi@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBCQ4XFG47UFRBL6CQK4QMGQEBF7Y6NI@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 3D12C3F380 for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 29 Oct 2024 09:47:44 +0100 (CET) Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2fb56e144absf31063391fa.0 for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 29 Oct 2024 01:47:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1730191663; cv=pass; d=google.com; s=arc-20240605; b=P/5VOgU10ktiqDndIrHhqrAg9ov1Y/AMOevmU2Czd/2+y/8JrUYIDn80Wn8PG6kFTj XAulWW9saOR5nHCtNO+ZLE215MsNzeD2NFSzScCPzU7OLUdHkbqAAUC75UHYLLYQSDQX tCl9YqkcFdWazd7rgobrZbaH+HWdyHOxvI7RW88VkPkf4VAFlCwUW+rQrc/FohmDrwbU 7KXAGXOylMQkcOLjyS28uegDXyep+r6AZKMvXa6gA0nW91zpO7p8zHV6QESk4pSz+ZqH gCWD0bnD6qnf0/UXbiggmmuavSog0ia1dqzv7sBRDAB0+bgnaBuTaCqh8A7/g6vbkxJr nuQQ== 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=pBqcR74t88TkOcrBKCSZZrPxiIj2zvFwFkHe0eEMBvI=; fh=7w3EfI5A76T7dlSwwe6I7peaZ6BHVUSnZR6ncXUbcdU=; b=KTCVAKBlDpEL+mZVNI098cqh3p/Zeay90blJKLzc32tDOMRjN0vVSlP48L81O6Caj/ CGKN/d+zCADdwzQ9a9ZDv2SlyrpYWLeUxZUujsKr7RmnFZCEIjYPdhZ21wI+7DtFY9mE yMcfHXI31qZr/7UhGLa8EUxWHPqSiTjhO8ShGSJ1aOvWZNGIcDNPhkU8US/iZjpetmsS 7P4mbfgsMnXGCNUdp83eYm+OXNpBDLGA7ng2dNEjfBM9KJPT44I9T2Q85swsQI9Q4miU GAWdTHViMgSIVfMa7UIN/bwM+Gob19T0HBdVCCWFgZkGaCVPM8KjgWpwOL7qcMwb61T2 xW1Q==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jqcxoSNl; 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=1730191663; x=1730796463; 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=pBqcR74t88TkOcrBKCSZZrPxiIj2zvFwFkHe0eEMBvI=; b=LDQuJa0Y5H4GPceFvtyZWkvZTRWpKfGlOvdsSl7rVuEGhP3p6/DlcneahOTQtvaMmP I/i++Zrw5CCQ644TgBlXMTbw9v1OkVF7meEhZEZeyz4KPAi8TaMqqPwQ7JN52CsZhKdT 9w1f2cvNax0VlCw95umr3v59NeF0I7vUY8AhU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730191663; x=1730796463; 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=pBqcR74t88TkOcrBKCSZZrPxiIj2zvFwFkHe0eEMBvI=; b=HkMIydjBn69bKy5WZUTunYvEhKKvPfIX6Qwgy9C8OICu7HB+sLGJ961qWC+nLPpufc dcnVo5T5Yv2J1R3Cs0wSXcYMaJJtqJrVlBHuT/js/IplJMVyn0kJD9GB1L/hzMjJyUc5 2jzkDBjrC+3uMIExoTXTQ7kRPnSDK25zDAS7XLLpw4YqZaVtyUV/XShfzsFzBHBVOkef YFczRSPbi2QwO5vYVtFUUvdwBRjG2Yv/kW0X7dws4y5whDcIxXuM3HGU0kZVCeVN2OMz FJnw8WdNJQoDReXbpbymXE0bCdmBaIwqBk20W8VkfrbmcX3fif7VzLxsGubQnDZyTzhR 9QKQ== X-Forwarded-Encrypted: i=2; AJvYcCWsZvEyI+3Ee9YE7n/lmmVJtCBkn8LPZnp6XfqjHnaZVyJwJuXc01oUXvnwHTiilaOFXOXCFBS3oRgQKGtQ@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwKAAProlr/A5MzCGz3TB7kgRIagD38F3oleUOWMM0Bm8SXVeWq Tmh53cd9+kKijNkbj9tYn0Bfl6xaYmDDafkgRlGBFogUU6ih9vwSfTR0SJPDyvD2Rw== X-Google-Smtp-Source: AGHT+IEPDJHl7cld7JIMrnCkhAmc5xGMyzoL+lBNjj2/dMFgf5RaZwcIkXCo1Yr7dZKtzVl84QFlhA== X-Received: by 2002:a2e:b53b:0:b0:2fb:6110:c5d5 with SMTP id 38308e7fff4ca-2fcbe096067mr35623891fa.43.1730191663412; Tue, 29 Oct 2024 01:47:43 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:4416:b0:5c9:1f95:5130 with SMTP id 4fb4d7f45d1cf-5cb999fb662ls86851a12.1.-pod-prod-07-eu; Tue, 29 Oct 2024 01:47:42 -0700 (PDT) X-Received: by 2002:a17:907:940e:b0:a9a:8034:3644 with SMTP id a640c23a62f3a-a9de5ec96e3mr1119020066b.14.1730191661942; Tue, 29 Oct 2024 01:47:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730191661; cv=none; d=google.com; s=arc-20240605; b=ITJ8ypJkb09w0LpVtUm7vonu+w8OdaefxyyLnzh+3zgJ3rjnfCDIcU6x3NR+Fk1770 94mZGT/dHYfHvqfGZgTM5/biZvyq793n9mG3ve5gmAINlLQ6h9nQfSDmJBlUAWXU2rIU VdIoSbYKZICS124qJLFAIrh0tnlxX/bHvcIBxsNOLDr9EvOqs7g/nYkDisxGapxUYGh0 RgBRm1DDF2Ewmce1SJkONUxxc6MjN8OLNLlopw3XWNwdLL3O/CWAm3Gd0jsRtCVgKgBH 9hxVC8/byFthywnhylNCo7VLlT1obCrrqAoUdFvmjTijfYJLLjBhSOIyN+yY4RwBPi9+ rMqA== 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=+TS+cafYkOpOnfMipNar/zvOqT/SxcL5voxlp49ONDY=; fh=ljoFiwPup6gC9YG4NMWOEWNdgUd1CKjWIIwpUvYy39c=; b=kjZSroGQKtOqljTeoOvd8iCHFTq4PMmIVHB3Jf9W2oN0PpxbUjjxc3BkyNtaP9E/1Y aaCzyBDKw/aok4MNVGAVT0Iec4JB39LpraeXyBoV05e5CvZXV7ZGi56VzALvVM2aQsfm FeERgRSLN3s786BZU85oCvkjiB073n0OX2FE6i9ElswAqYqie67U0pQhBQuT1EzA0a20 U7k9CYnrktGzZ35dJ39F8rhUfHlNuccGvB4RVXvsMdN3r8zCDXOD2bXrRMRO1eSLg1b4 SIPlhQYNvrD+n/m/eNSRoB/qmxKZTsYz0zpQHgjQG562Vud8B5d75myyHfAaJjRMYGdc AvIA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jqcxoSNl; 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 a640c23a62f3a-a9b1ea3cf37sor354960166b.1.2024.10.29.01.47.41 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Tue, 29 Oct 2024 01:47:41 -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:a17:907:9604:b0:a99:f4be:7a6a with SMTP id a640c23a62f3a-a9de61ce626mr916455666b.47.1730191661380; Tue, 29 Oct 2024 01:47:41 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-40-68-117.business.telecomitalia.it. [79.40.68.117]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b1dec7dacsm450134166b.9.2024.10.29.01.47.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2024 01:47:41 -0700 (PDT) From: Dario Binacchi <dario.binacchi@amarulasolutions.com> To: linux-kernel@vger.kernel.org Cc: linux-amarula@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 v2 5/6] can: netlink: extend stats to the error types (ack, CRC, form, ...) Date: Tue, 29 Oct 2024 09:44:49 +0100 Message-ID: <20241029084525.2858224-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241029084525.2858224-1-dario.binacchi@amarulasolutions.com> References: <20241029084525.2858224-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=jqcxoSNl; 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> --- (no changes since v1) include/uapi/linux/can/netlink.h | 6 ++++++ 1 file changed, 6 insertions(+)