lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 2 Jan 2022 17:33:57 +0100
From:   Marc Kleine-Budde <mkl@...gutronix.de>
To:     Dario Binacchi <dario.binacchi@...rulasolutions.com>
Cc:     linux-kernel@...r.kernel.org,
        Michael Nazzareno Trimarchi <michael@...rulasolutions.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Wolfgang Grandegger <wg@...ndegger.com>,
        linux-can@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] can: flexcan: switch the i.MX series to timestamp based
 rx-offload

On 02.01.2022 16:58:13, Dario Binacchi wrote:
> As explained by commit b3cf53e988ce ("can: flexcan: add support for
> timestamp based rx-offload"), the controller has 64 message buffers but
> it uses only 6 for reception. Enabling timestamp mode, instead of FIFO,
> allows you to use the maximum number of messages for reception.
> 
> Signed-off-by: Dario Binacchi <dario.binacchi@...rulasolutions.com>
> Signed-off-by: Michael Nazzareno Trimarchi <michael@...rulasolutions.com>

NACK - according to the data sheet these controllers cannot receive RTR
messages via mailboxes.

See Section "26.4.8.1 Remote Frames" of the mx25 rev. 2 data sheet:

| When a remote request frame is received by FlexCAN, its ID is compared
| to the IDs of the transmit message buffers with CODE field 0b1010. If
| there is a matching ID, then this message buffer frame is transmitted.
| If the matching message buffer has the RTR bit set, then FlexCAN
| transmits a remote frame as a response.
| 
| A received remote request frame is not stored in a receive buffer. It is
| only used to trigger a transmission of a frame in response. The mask
| registers are not used in remote frame matching, and all ID bits (except
| RTR) of the incoming received frame must match.
| 
| In the case that a remote request frame is received and matches a
| message buffer, this message buffer immediately enters the internal
| arbitration process, but is considered as normal Tx message buffer, with
| no higher priority. The data length of this frame is independent of the
| DLC field in the remote frame that initiated its transmission.
| 
| If the Rx FIFO is enabled (the FEN bit in the MCR is set to 1), FlexCAN
| does not generate an automatic response for remote request frames that
| match the FIFO filtering criteria. If the remote frame matches one of
| the target IDs, it is stored in the FIFO and presented to the ARM. For
| filtering formats A and B, it is possible to select whether remote
| frames are accepted or not. For format C, remote frames are always
| accepted (if they match the ID).

This is in general not acceptable for all users. If you can live with
this limitation, please make it runtime configurable, e.g. via the
ethtool interface.

Not sure which ethtool callback to use, yet, but we can figure this out
together. Please create an RFC patch, where you put the struct
devtype_data into the priv instead of a pointer to it. In a second patch
we can add the ethtool code to change the struct
devtype_data::devtype_data::quirks.

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 |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ