On Thu, Aug 04, 2022 at 01:42:48PM +0200, Alexander Bluhm wrote: > On Thu, Aug 04, 2022 at 02:18:49AM +0300, Vitaliy Makkoveev wrote: > > Also, I like to have exclusive layer locks like `tcp_lock???, > > `udp_lock???, etc.. And take them with shared netlock held as the > > first step of inet sockets unlocking. > > With PRU_LOCK and PRU_UNLOCK each layer can decide itself which > kind is appropriate. For divert packet per PCB lock is trivial. > For loops delivering to all sockets like UDP multicast or RAW > sockets, a mutex per layer an easier start.
Can we please not use PRU_LOCK/UNLOCK but instead implement them as function pointers. I prefer simpler usrreq handlers. Especially since in some handlers other locks are grabbed in various places. -- :wq Claudio
