Re: [PATCH v10 1/1] can: usb: etas_es58X: add support for ETAS ES58X CAN USB interfaces

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

 



On 1/13/21 3:35 PM, Vincent MAILHOL wrote:
>> My understanding is that having a queue size being a power of two is
>> required in order not to use spinlocks (else, modulo operations would
>> break when the index wraparound back to zero). I tried to minimize the
>> number of spinlock: only one per bulk send or bulk receive.
> 
> Or do you mean to round up the skb_echo array length to the next power
> of two in the driver despite the actual size of the device FIFO? Did
> not think about that in the past but that should work.
> 
> I am going to think a bit more of how to improve that.

For the echo_skb rounding up might work, but you should round down, so that your
can directly use the masked value.

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: OpenPGP digital 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