Re: [RFC PATCH] can-roundtrip-stats: a tool to benchmark transmission time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 26.06.22 11:54, Vincent MAILHOL wrote:
On Sun. 26 juin 2022 à 18:10, Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> wrote:

My ultimate goal was to add the TX timestamp feature to candump from
can-utils [3], however, I faced a blocker: the TX timestamps are sent
to the error queue of the sender's socket meaning that a listener
(such as candump) will not see those TX timestamp on his error queue
because this is a different socket as the sender. If anyone knows a
method to access the error queue of another process's socket, let me
know (I guess that you need to be root, but did not find how to do
it).

I don't think there's an official way to read the TX timestamps (i.e.
error queue) of a socket that's outside of your process.

What I was thinking is that tools such as tcpdump are able to get TX
packets of ethernet interfaces even if not normally visible (because
contrary to CAN, there is no default loopback). I was wondering if the
same could be done with error queues, but as you can guess my research
did lead anywhere. I also guess there is no official support but then,
I am wondering how hard it would be to hack the error queues to expose
them to the privileged processes.

I wonder whether error queues are the right mechanism or if control messages needed to be extended here - like for (hardware) rx timestamps.

E.g. the packet socket can access the vlan tag with a control message. And when there would be a such a message for tx timetamps we could create an identical cmesg API that could be used by CAN and PACKET sockets.

Because I did not manage to add the feature to candump, I am sharing
instead this standalone tool, hoping someone might find it useful.

I'm not sure which is the best tool to add this to...cangen,
cansequence. Maybe evolve these tools into some kind of CAN ping
command.

cansend and canplayer would be candidates for such a feature too.

Best regards,
Oliver



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux