On 28.03.2023 13:49:05, Vincent MAILHOL wrote: [...] > > >> + int status, len; > > >> + > > >> + if (can_dropped_invalid_skb(netdev, skb)) > > >> + return NETDEV_TX_OK; > > >> + > > >> + netif_stop_queue(netdev); > > > In your driver, you send the CAN frames one at a time and wait for the > > > rx_handler to restart the queue. This approach dramatically degrades > > > the throughput. Is this a device limitation? Is the device not able to > > > manage more than one frame at a time? > > > > > > > This device will not NAK on TX frame not complete, it only NAK on TX > > endpoint > > memory not processed, so we'll send next frame unitl TX complete(TI) > > interrupt > > received. > > > > The device can polling status register via TX/RX endpoint, but it's more > > complex. > > We'll plan to do it when first driver landing in mainstream. > > OK for me to have this as a next step. Marc, what do you think? Fine with me. First make it work, then make it fast. But I think this will never be a fast and resource-efficient USB CAN adapter. There are exiting drivers with an open and documented USB interface (gs_usb) and Open Source µC implementations (candlelight) with better performance. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung Nürnberg | Phone: +49-5121-206917-129 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Attachment:
signature.asc
Description: PGP signature