public inbox for linux-can@vger.kernel.org
 help / color / mirror / Atom feed
From: Davide Caratti <dcaratti@redhat.com>
To: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: Filippo Storniolo <fstornio@redhat.com>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	Robin van der Gracht <robin@protonic.nl>,
	Oleksij Rempel <o.rempel@pengutronix.de>,
	kernel@pengutronix.de, "David S. Miller" <davem@davemloft.net>,
	Urs Thuermann <urs.thuermann@volkswagen.de>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	linux-can@vger.kernel.org,
	Stefano Garzarella <sgarzare@redhat.com>,
	Radu Rendec <rrendec@redhat.com>
Subject: Re: [PATCH RFC can-next 3/3] can: add can diag interface
Date: Thu, 2 Apr 2026 18:24:03 +0200	[thread overview]
Message-ID: <ac6YI19sCfSmgvyh@dcaratti.users.ipa.redhat.com> (raw)
In-Reply-To: <ba4170ca-3e74-49f4-856f-dca130db05ad@hartkopp.net>

On Thu, Apr 02, 2026 at 03:07:53PM +0200, Oliver Hartkopp wrote:
> Hello Filippo,
> 
> many thanks for your patches.
> 
> I'm not yet convinced we would need this kind of interface as many features
> in ss(8) are only relevant for IP and not really for CAN.
> 
> Btw. having an overview over PIDs and open sockets might be a nice
> informational feature.


hi, 

thanks for reading!
(an unsolicited answer to the above sentence, just because of the
"Suggested-by:" tag in patch 3/3 :) )

Enumerating open sockets with {uid, pid, interface, protocol} looked to me
a good-enough reason for adding support for ss(8): this is done also by
other non-IP socket families, such as AF_XDP [1] and AF_PACKET for the same
purpose. An alternative would be a tool like tcpstates [2], but it needs to
add tracepoints as well; the diag module (at the expense of serializing
'can_create()' with 'proto.release()' with a mutex) looked a cheaper
solution.

[1] speaking of this, I wonder whether we should pack some of the info we
have now in 'rep', e.g. the result of 'getname()', into a dedicated
attribute. That would save from returning zeros for modules that have stub
getname(), like can_bcm. WDYT?
[2] https://github.com/iovisor/bcc/blob/master/tools/tcpstates.py

-- 
davide


  reply	other threads:[~2026-04-02 16:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-02 10:54 [PATCH RFC can-next 0/3] Introduce diag support for CAN Filippo Storniolo
2026-04-02 10:54 ` [PATCH RFC can-next 1/3] af_can: ensure sk_protocol is always set on socket creation Filippo Storniolo
2026-04-02 10:54 ` [PATCH RFC can-next 2/3] af_can: store socket pointers in struct netns_can Filippo Storniolo
2026-04-02 10:54 ` [PATCH RFC can-next 3/3] can: add can diag interface Filippo Storniolo
2026-04-02 13:07   ` Oliver Hartkopp
2026-04-02 16:24     ` Davide Caratti [this message]
2026-04-08 17:15       ` Oliver Hartkopp
2026-04-02 18:13     ` Filippo Storniolo
2026-04-08 16:54       ` Oliver Hartkopp
2026-04-13 18:04         ` Filippo Storniolo
2026-04-14  6:52           ` Oliver Hartkopp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ac6YI19sCfSmgvyh@dcaratti.users.ipa.redhat.com \
    --to=dcaratti@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fstornio@redhat.com \
    --cc=horms@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=robin@protonic.nl \
    --cc=rrendec@redhat.com \
    --cc=sgarzare@redhat.com \
    --cc=socketcan@hartkopp.net \
    --cc=urs.thuermann@volkswagen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox