All of lore.kernel.org
 help / color / mirror / Atom feed
* Recommended NAPI practices for new drivers
@ 2016-09-29  5:05 Damien Dusha
  2016-09-29  6:35 ` Marc Kleine-Budde
  0 siblings, 1 reply; 2+ messages in thread
From: Damien Dusha @ 2016-09-29  5:05 UTC (permalink / raw)
  To: linux-can

Dear All,

I am currently writing a driver for the IFI CAN IP Core [1]*.  It uses
TX and RX FIFOs rather than mailboxes.

What is the current best practice for using NAPI? The models appear to
be quite different between drivers:

Uses NAPI for RX only:
 - rcan
 - xilinx
 - mscan
-  ti_hecc

Uses NAPI for RX and ERR:
 - flexcan
 - at91
 - m_can
 - ifi_canfd

Uses NAPI for the whole IRQ:
 - pch_can
 - c_can
 - ican3

Some others do not use NAPI at all, notably the venerable SJA1000 driver.

For new drivers, what scheme is recommended?

Kind regards.
Damien.


[1] http://www.ifi-pld.de/IP/NiosII_CAN/niosii_can.html
* Not to be confused with the recently-mainlined ifi-canfd core from
the same company.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Recommended NAPI practices for new drivers
  2016-09-29  5:05 Recommended NAPI practices for new drivers Damien Dusha
@ 2016-09-29  6:35 ` Marc Kleine-Budde
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2016-09-29  6:35 UTC (permalink / raw)
  To: Damien Dusha, linux-can


[-- Attachment #1.1: Type: text/plain, Size: 1175 bytes --]

On 09/29/2016 07:05 AM, Damien Dusha wrote:
> Dear All,
> 
> I am currently writing a driver for the IFI CAN IP Core [1]*.  It uses
> TX and RX FIFOs rather than mailboxes.
> 
> What is the current best practice for using NAPI? The models appear to
> be quite different between drivers:
> 
> Uses NAPI for RX only:
>  - rcan
>  - xilinx
>  - mscan
> -  ti_hecc
> 
> Uses NAPI for RX and ERR:
>  - flexcan
>  - at91
>  - m_can
>  - ifi_canfd
> 
> Uses NAPI for the whole IRQ:
>  - pch_can
>  - c_can
>  - ican3
> 
> Some others do not use NAPI at all, notably the venerable SJA1000 driver.
> 
> For new drivers, what scheme is recommended?

I'd go for RX-only NAPI.

Marc

BTW: I've a very old driver that's probably for this hardware.
Interested? It was written before socketcan was mainlined but never
adopted, as I didn't have access to the hardware anymore.

-- 
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   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-29  6:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-29  5:05 Recommended NAPI practices for new drivers Damien Dusha
2016-09-29  6:35 ` Marc Kleine-Budde

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.