Re: More flags for logging

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

 



On 04.05.2021 00:02:49, Vincent MAILHOL wrote:
> > > ACK bit in data frame
> > > - Some logging hardware can act as a "spy", meaning that it records CAN
> > >   Frames, but does not set the ACK bit
> > > - A way to know for a given frame (FD or not), was the ACK bit set or
> > >   not.
> > > - Current API allow detecting missing ACK, but it does not report what
> > >   Frame had a missing ACK.
> >
> > This means the driver has to set a flag if it's configured in
> > listen-only mode. That should be possible.
>
> For my understanding, when a controller does not see the ACK bit,
> it stops the transmission and sends an error flag. For this
> reason, the frame is not received and thus simply does not appear
> in the log.

Hmmm. That's not correct for the mcp251xfd in RX-listen only mode:

| (2021-05-03 17:11:28.493992)  mcp251xfd0  RX - -  222   [8]  05 00 00 00 00 00 00 00
| (2021-05-03 17:11:28.994109)  mcp251xfd0  RX - -  222   [8]  06 00 00 00 00 00 00 00
| (2021-05-03 17:11:29.494298)  mcp251xfd0  RX - -  222   [8]  07 00 00 00 00 00 00 00
| (2021-05-03 17:11:29.994510)  mcp251xfd0  RX - -  222   [8]  08 00 00 00 00 00 00 00
| (2021-05-03 17:11:30.494635)  mcp251xfd0  RX - -  222   [8]  09 00 00 00 00 00 00 00

unplugged 3rd device here (that's used to send the ACK)

| (2021-05-03 17:11:30.998388)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00
| (2021-05-03 17:11:30.998662)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00
| (2021-05-03 17:11:30.998936)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00
| (2021-05-03 17:11:30.999210)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00
| (2021-05-03 17:11:30.999484)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00
| (2021-05-03 17:11:30.999758)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00
| (2021-05-03 17:11:31.000032)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00
| (2021-05-03 17:11:31.000306)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00
| (2021-05-03 17:11:31.000580)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00
| (2021-05-03 17:11:31.000854)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00
| (2021-05-03 17:11:31.001128)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00
| (2021-05-03 17:11:31.001402)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00
| (2021-05-03 17:11:31.001676)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00
| (2021-05-03 17:11:31.001950)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00
| (2021-05-03 17:11:31.002224)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00
| (2021-05-03 17:11:31.002498)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00
| (2021-05-03 17:11:31.002772)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00
| (2021-05-03 17:11:31.003046)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00
| (2021-05-03 17:11:31.003320)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00
| (2021-05-03 17:11:31.003594)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00


---

The flexcan (can0) does behave differently:

| (2021-05-03 17:16:43.004939)        can0  RX - -  222   [8]  08 00 00 00 00 00 00 00                                                                                                                                                                           
| (2021-05-03 17:16:43.005846)  mcp251xfd0  RX - -  222   [8]  08 00 00 00 00 00 00 00                                                                                                                                                                           
| (2021-05-03 17:16:43.505052)        can0  RX - -  222   [8]  09 00 00 00 00 00 00 00                                                                                                                                                                           
| (2021-05-03 17:16:43.505729)  mcp251xfd0  RX - -  222   [8]  09 00 00 00 00 00 00 00                                                                                                                                                                           
| (2021-05-03 17:16:44.005193)        can0  RX - -  222   [8]  0A 00 00 00 00 00 00 00                                                                                                                                                                           
| (2021-05-03 17:16:44.005856)  mcp251xfd0  RX - -  222   [8]  0A 00 00 00 00 00 00 00                                                                                                                                                                           

unplugged 3rd device here (that's used to send the ACK)

| (2021-05-03 17:16:44.507358)  mcp251xfd0  RX - -  222   [8]  0B 00 00 00 00 00 00 00                                                                                                                                                                           
| (2021-05-03 17:16:44.507399)  mcp251xfd0  RX - -  222   [8]  0B 00 00 00 00 00 00 00                                                                                                                                                                           
| (2021-05-03 17:16:44.508142)  mcp251xfd0  RX - -  222   [8]  0B 00 00 00 00 00 00 00                                                                                                                                                                           

Thomas, is that worth investigating in your side?

regards,
Marc

--
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Attachment: signature.asc
Description: PGP signature


[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