Re: interface media without netlock

2022-08-14 Thread Alexander Bluhm
On Sun, Aug 14, 2022 at 10:35:34PM +0200, Jeremie Courreges-Anglas wrote: > Works fine on GENERIC.MP. OK bluhm@ > Index: dev/fdt/if_cad.c > === > RCS file: /cvs/src/sys/dev/fdt/if_cad.c,v > retrieving revision 1.11 > diff -u -p -r1.1

Re: interface media without netlock

2022-08-14 Thread Vitaliy Makkoveev
> On 14 Aug 2022, at 23:35, Jeremie Courreges-Anglas wrote: > > On Sun, Aug 14 2022, Vitaliy Makkoveev wrote: >> I propose to avoid netlock relocking for SIOCGIFSFFPAGE too. > > sigh, that seems to be needed indeed. > >> Also, since the relock should be avoided for many commands, I prefer >> t

Re: interface media without netlock

2022-08-14 Thread Jeremie Courreges-Anglas
On Sun, Aug 14 2022, Vitaliy Makkoveev wrote: > I propose to avoid netlock relocking for SIOCGIFSFFPAGE too. sigh, that seems to be needed indeed. > Also, since the relock should be avoided for many commands, I prefer > to have something like below: > > switch(cmd){ > case SIOCGIFMED

Re: interface media without netlock

2022-08-14 Thread Vitaliy Makkoveev
I propose to avoid netlock relocking for SIOCGIFSFFPAGE too. Also, since the relock should be avoided for many commands, I prefer to have something like below: switch(cmd){ case SIOCGIFMEDIA: case ...: relock = 1; break; } i

Re: interface media without netlock

2022-08-14 Thread Jeremie Courreges-Anglas
On Sun, Aug 14 2022, Jeremie Courreges-Anglas wrote: > On Thu, Jul 28 2022, Alexander Bluhm wrote: >> Hi, >> >> The netlock for SIOCSIFMEDIA and SIOCGIFMEDIA ioctl is not necessary. >> Legacy drivers run with kernel lock, interface media is MP safe or >> has kernel lock. >> >> ixl(4) talks about

Re: interface media without netlock

2022-08-14 Thread Jeremie Courreges-Anglas
On Thu, Jul 28 2022, Alexander Bluhm wrote: > Hi, > > The netlock for SIOCSIFMEDIA and SIOCGIFMEDIA ioctl is not necessary. > Legacy drivers run with kernel lock, interface media is MP safe or > has kernel lock. > > ixl(4) talks about net lock but in fact has kernel lock. > > Problem is that smtpd

Re: interface media without netlock

2022-07-31 Thread Claudio Jeker
On Sun, Jul 31, 2022 at 12:24:01PM +0100, Stuart Henderson wrote: > On 2022/07/28 13:30, Alexander Bluhm wrote: > > Problem is that smtpd(8) periodically checks media status. > > Really?! I bet it is the other simple protocol daemon, snmpd(8) -- :wq Claudio

Re: interface media without netlock

2022-07-31 Thread Stuart Henderson
On 2022/07/28 13:30, Alexander Bluhm wrote: > Problem is that smtpd(8) periodically checks media status. Really?!

Re: interface media without netlock

2022-07-30 Thread Mark Kettenis
> Date: Thu, 28 Jul 2022 13:30:12 +0200 > From: Alexander Bluhm > > Hi, > > The netlock for SIOCSIFMEDIA and SIOCGIFMEDIA ioctl is not necessary. > Legacy drivers run with kernel lock, interface media is MP safe or > has kernel lock. > > ixl(4) talks about net lock but in fact has kernel lock.

interface media without netlock

2022-07-28 Thread Alexander Bluhm
Hi, The netlock for SIOCSIFMEDIA and SIOCGIFMEDIA ioctl is not necessary. Legacy drivers run with kernel lock, interface media is MP safe or has kernel lock. ixl(4) talks about net lock but in fact has kernel lock. Problem is that smtpd(8) periodically checks media status. This stops network if