Re: svn commit: r367049 - stable/12/libexec/rc/rc.d

2020-10-29 Thread Cy Schubert
In message <20201029161751.ga2...@kib.kiev.ua>, Konstantin Belousov writes:
> On Mon, Oct 26, 2020 at 01:18:16AM +, Cy Schubert wrote:
> > Author: cy
> > Date: Mon Oct 26 01:18:15 2020
> > New Revision: 367049
> > URL: https://svnweb.freebsd.org/changeset/base/367049
> > 
> > Log:
> >   MFC r366857:
> >   Destroy cloned interfaces at netif stop, netif restart and shutdown.
> >   This is especially important during shutdown because a child interface
> >   of lagg with WOL enabled will not enable WOL at interface shutdown and
> >   thus no WOL to wake up the device (and machine).
> >   
> >   PR:   158734, 109980
> >   Reported by:  Antonio Huete Jimenez 
> > Marat N.Afanasyev 
> >   reviewed by:  kp
> > 
> > Modified:
> >   stable/12/libexec/rc/rc.d/netif
> > Directory Properties:
> >   stable/12/   (props changed)
> > 
> > Modified: stable/12/libexec/rc/rc.d/netif
> > ===
> ===
> > --- stable/12/libexec/rc/rc.d/netif Mon Oct 26 00:37:31 2020(r36704
> 8)
> > +++ stable/12/libexec/rc/rc.d/netif Mon Oct 26 01:18:15 2020(r36704
> 9)
> > @@ -28,7 +28,7 @@
> >  # PROVIDE: netif
> >  # REQUIRE: FILESYSTEMS iovctl serial sppp sysctl
> >  # REQUIRE: hostid ipfs
> > -# KEYWORD: nojailvnet
> > +# KEYWORD: nojailvnet shutdown
> >  
> >  . /etc/rc.subr
> >  . /etc/network.subr
> After this change, shutdown of my stable/12 router looks like this:
>
> Stopping devd.
> Waiting for PIDS: 1120.
> Oct 29 18:09:52 tom minissdpd[1619]: setsockopt(udp, IP_DROP_MEMBERSHIP)(vlan
> 1): Can't assign requested address
> /etc/rc.shutdown: WARNING: vlan1 does not exist.  Skipped.
> /etc/rc.shutdown: WARNING: vlan2 does not exist.  Skipped.
> /etc/rc.shutdown: WARNING: vlan3 does not exist.  Skipped.
> /etc/rc.shutdown: WARNING: vlan4 does not exist.  Skipped.
> /etc/rc.shutdown: WARNING: vlan5 does not exist.  Skipped.
> Stopping Network: lo0 re0 re1 pflog0 gif0.
> lo0: flags=8048 metric 0 mtu 16384
> options=680003
> groups: lo
> nd6 options=21
> re0: flags=8802 metric 0 mtu 1500
> options=201b
> ether e0:d5:5e:50:93:04
> media: Ethernet autoselect (1000baseT )
> status: active
> nd6 options=29
> re1: flags=8802 metric 0 mtu 1500
> options=201b
> ether e0:d5:5e:50:93:05
> media: Ethernet autoselect (100baseTX )
> status: active
> nd6 options=29
> pflog0: flags=100 metric 0 mtu 33160
> groups: pflog
> gif0: flags=8010 metric 0 mtu 1280
> options=8
> tunnel inet 176.36.249.139 --> 216.66.84.46
> groups: gif
> nd6 options=21
> Destroyed clone interfaces: gif0.
> Writing entropy file: .
> .
> Terminated
> Oct 29 18:09:53 tom syslogd: exiting on signal 15
> pflog0: promiscuous mode disabled
> Waiting (max 60 seconds) for system process `vnlru' to stop... done
> Waiting (max 60 seconds) for system process `syncer' to stop...
> Syncing disks, vnodes remaining... 14 2 2 1 1 1 0 0 0 0 done
>

The messages are innocuous. We could disable printing of the messages 
during shutdown though.

The patch resolves an issue where one or both interfaces with WOL enabled 
are members of a lagg(4) and since the lagg(4) is not torn down during 
shutdown WOL isn't enabled in the NIC prior to power off. This results in 
no WOL when interfaces are members of a lagg(4). Without the patch my 
machines with lagg(4) fail to wake on lan after being powered off.

Another alternative would be to tear down cloned interfaces in the kernel 
prior to calling device_shutdown or device_suspend for each physical 
interface, both of which enable WOL in drivers that support this feature.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  https://FreeBSD.org
NTP:   Web:  https://nwtime.org

The need of the many outweighs the greed of the few.


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r367049 - stable/12/libexec/rc/rc.d

2020-10-29 Thread Konstantin Belousov
On Mon, Oct 26, 2020 at 01:18:16AM +, Cy Schubert wrote:
> Author: cy
> Date: Mon Oct 26 01:18:15 2020
> New Revision: 367049
> URL: https://svnweb.freebsd.org/changeset/base/367049
> 
> Log:
>   MFC r366857:
>   Destroy cloned interfaces at netif stop, netif restart and shutdown.
>   This is especially important during shutdown because a child interface
>   of lagg with WOL enabled will not enable WOL at interface shutdown and
>   thus no WOL to wake up the device (and machine).
>   
>   PR: 158734, 109980
>   Reported by:Antonio Huete Jimenez 
>   Marat N.Afanasyev 
>   reviewed by:kp
> 
> Modified:
>   stable/12/libexec/rc/rc.d/netif
> Directory Properties:
>   stable/12/   (props changed)
> 
> Modified: stable/12/libexec/rc/rc.d/netif
> ==
> --- stable/12/libexec/rc/rc.d/netif   Mon Oct 26 00:37:31 2020
> (r367048)
> +++ stable/12/libexec/rc/rc.d/netif   Mon Oct 26 01:18:15 2020
> (r367049)
> @@ -28,7 +28,7 @@
>  # PROVIDE: netif
>  # REQUIRE: FILESYSTEMS iovctl serial sppp sysctl
>  # REQUIRE: hostid ipfs
> -# KEYWORD: nojailvnet
> +# KEYWORD: nojailvnet shutdown
>  
>  . /etc/rc.subr
>  . /etc/network.subr
After this change, shutdown of my stable/12 router looks like this:

Stopping devd.
Waiting for PIDS: 1120.
Oct 29 18:09:52 tom minissdpd[1619]: setsockopt(udp, 
IP_DROP_MEMBERSHIP)(vlan1): Can't assign requested address
/etc/rc.shutdown: WARNING: vlan1 does not exist.  Skipped.
/etc/rc.shutdown: WARNING: vlan2 does not exist.  Skipped.
/etc/rc.shutdown: WARNING: vlan3 does not exist.  Skipped.
/etc/rc.shutdown: WARNING: vlan4 does not exist.  Skipped.
/etc/rc.shutdown: WARNING: vlan5 does not exist.  Skipped.
Stopping Network: lo0 re0 re1 pflog0 gif0.
lo0: flags=8048 metric 0 mtu 16384
options=680003
groups: lo
nd6 options=21
re0: flags=8802 metric 0 mtu 1500
options=201b
ether e0:d5:5e:50:93:04
media: Ethernet autoselect (1000baseT )
status: active
nd6 options=29
re1: flags=8802 metric 0 mtu 1500
options=201b
ether e0:d5:5e:50:93:05
media: Ethernet autoselect (100baseTX )
status: active
nd6 options=29
pflog0: flags=100 metric 0 mtu 33160
groups: pflog
gif0: flags=8010 metric 0 mtu 1280
options=8
tunnel inet 176.36.249.139 --> 216.66.84.46
groups: gif
nd6 options=21
Destroyed clone interfaces: gif0.
Writing entropy file: .
.
Terminated
Oct 29 18:09:53 tom syslogd: exiting on signal 15
pflog0: promiscuous mode disabled
Waiting (max 60 seconds) for system process `vnlru' to stop... done
Waiting (max 60 seconds) for system process `syncer' to stop...
Syncing disks, vnodes remaining... 14 2 2 1 1 1 0 0 0 0 done
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367049 - stable/12/libexec/rc/rc.d

2020-10-25 Thread Cy Schubert
Author: cy
Date: Mon Oct 26 01:18:15 2020
New Revision: 367049
URL: https://svnweb.freebsd.org/changeset/base/367049

Log:
  MFC r366857:
  Destroy cloned interfaces at netif stop, netif restart and shutdown.
  This is especially important during shutdown because a child interface
  of lagg with WOL enabled will not enable WOL at interface shutdown and
  thus no WOL to wake up the device (and machine).
  
  PR:   158734, 109980
  Reported by:  Antonio Huete Jimenez 
Marat N.Afanasyev 
  reviewed by:  kp

Modified:
  stable/12/libexec/rc/rc.d/netif
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/libexec/rc/rc.d/netif
==
--- stable/12/libexec/rc/rc.d/netif Mon Oct 26 00:37:31 2020
(r367048)
+++ stable/12/libexec/rc/rc.d/netif Mon Oct 26 01:18:15 2020
(r367049)
@@ -28,7 +28,7 @@
 # PROVIDE: netif
 # REQUIRE: FILESYSTEMS iovctl serial sppp sysctl
 # REQUIRE: hostid ipfs
-# KEYWORD: nojailvnet
+# KEYWORD: nojailvnet shutdown
 
 . /etc/rc.subr
 . /etc/network.subr
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"