On 11/30/18 4:26 PM, Kurt Van Dijck wrote: > On vr, 30 nov 2018 15:13:16 +0100, Patrick Menschel wrote: >>> Ok, it means we should support different programming models for >>> different transfer sizes. > > Given that packets that exceed the traditional 1500 bytes from ethernet > serve 1 single PGN, I find it hard to implement different programming models > for that 1 application > > The 'sensible buffer size' is broken by design. > IMHO, you cannot define such thing, since that is application knowledge. We've just stumbled over AF_ALG https://elixir.bootlin.com/linux/latest/source/crypto/af_alg.c#L826 which basically does the thing we need. - wait for socketmem - allocate mem - memcpy from user space to mem - insert into some list - rinse, repeat Oleksij will look at it next week. 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 |
Attachment:
signature.asc
Description: OpenPGP digital signature