On 04/02/2015 02:33 AM, Dan Egnor wrote: > That seems surprisingly awful for something that's an established generic > interface for all CAN hardware on this operating system! No matter how many > mailboxes the controller might support, the operating system simply does not > support prioritized transmission. You have access to all queueing disc in linux, to prioritize your CAN frames until they are send via the CAN driver into the hardware. This is currently done in all drivers via a single TX queue. In default configuration (without a special queueing discipline), you have multiple FIFO from the userspace (the sockets) that are combined into a single FIFO (queueing disc + TX routine in driver + hardward). However, if you need more control, fist make use of a queueing disc. Then, if you still suffer from prio inversion, we can have a look at your hardware. For now, all drivers, even those with multiple TX buffers, configure them into one large TX-FIFO. We can define and implement a new per interface option (or options, if needed) that switches the hardware between FIFO and priority based sending. This however is still a problem, if all your HW buffers are filled with low prio CAN frames before a high prio one has the change to be transferred into the hardware. This leads us to the implementation of multiple TX queues from the linux stack into the driver. This is manly used on big server Ethernet card, so that more than one processor can send packages. We have to check if a) we can attach a queueing disc to a TX queue and b) if these multiple TX queues are properly used on a single processor system. regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |