kern/85239: assigning an address to ng_fec(4) iface causes panic

Evgueni V. Gavrilov aquatique at rusunix.org
Wed Aug 24 05:50:18 GMT 2005


The following reply was made to PR kern/85239; it has been noted by GNATS.

From: "Evgueni V. Gavrilov" <aquatique at rusunix.org>
To: bug-followup at FreeBSD.org,
	Maksim Yevmenkin <maksim.yevmenkin at gmail.com>,
	Brooks Davis <brooks at one-eyed-alien.net>
Cc:  
Subject: Re: kern/85239: assigning an address to ng_fec(4) iface causes panic
Date: Wed, 24 Aug 2005 12:47:27 +0700

 Thanks for response.
 
 I've applied Maksim's patch (with some modifications since 6.0-BETA3 
 holds ng_fec.c 1.18, not 1.20)
 
 The short response: it works finally :)
 
 But assigning an address to fec iface being down causes frezze, so I 
 made following startup:
 
 $ cat /etc/fec0
 mkpeer fec dummy fec
 msg fec0: add_iface "em0"
 msg fec0: add_iface "em1"
 msg fec0: set_mode_mac
 
 $ cat /etc/start_if.fec0
 #!/bin/sh
 echo "=============================="
 echo "==   Giga Channel startup   =="
 /usr/sbin/ngctl -f /etc/fec0 && echo "==   fec0 node created      =="
 /sbin/ifconfig fec0 up && echo "==   fec0 brought up        =="
 echo "==   sleeping for 20 secs   =="
 echo "==   (let GigaChannel up)   =="
 sleep 20
 echo "=============================="
 
 This way ng_fec works with some minor issues at startup: after assigning 
 an address both ports in the bundle (em0 && em1) go down, than in 
 several seconds they do go up and down again, and finally both ports in 
 the bundle go up :)
 
 Aug 24 12:22:01 <kern.crit> blackbird kernel: fec0: port em0 in bundle 
 is down
 Aug 24 12:22:01 <kern.crit> blackbird kernel: fec0: port em1 in bundle 
 is down
 Aug 24 12:22:03 <kern.notice> blackbird kernel: em0: link state changed 
 to UP
 Aug 24 12:22:03 <kern.notice> blackbird kernel: em1: link state changed 
 to UP
 Aug 24 12:28:15 <kern.crit> blackbird kernel: fec0: port em0 in bundle 
 is down
 Aug 24 12:28:15 <kern.crit> blackbird kernel: fec0: port em1 in bundle 
 is down
 Aug 24 12:28:15 <kern.crit> blackbird kernel: fec0: port em0 in bundle is up
 Aug 24 12:28:15 <kern.crit> blackbird kernel: fec0: port em1 in bundle is up
 Aug 24 12:28:16 <kern.crit> blackbird kernel: fec0: port em0 in bundle 
 is down
 Aug 24 12:28:16 <kern.crit> blackbird kernel: fec0: port em1 in bundle 
 is down
 Aug 24 12:28:18 <kern.crit> blackbird kernel: fec0: port em0 in bundle is up
 Aug 24 12:28:19 <kern.crit> blackbird kernel: fec0: port em1 in bundle is up
 
 $ ifconfig -a
 em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
          options=b<RXCSUM,TXCSUM,VLAN_MTU>
          ether 00:07:e9:05:a4:28
          media: Ethernet autoselect (1000baseTX <full-duplex>)
          status: active
 em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
          options=b<RXCSUM,TXCSUM,VLAN_MTU>
          ether 00:07:e9:05:a4:28
          media: Ethernet autoselect (1000baseTX <full-duplex>)
          status: active
 pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33208
 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
          inet 127.0.0.1 netmask 0xff000000
 fec0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
          inet 172.16.0.127 netmask 0xffff0000 broadcast 172.16.255.255
          ether 00:07:e9:05:a4:28
          media: Ethernet none
          status: active
 
 # netstat -hi
 Name    Mtu Network       Address              Ipkts Ierrs    Opkts 
 Oerrs  Coll
 em0    1500 <Link#1>      00:07:e9:05:a4:28      23K     0     1.9K 
 0     0
 em1    1500 <Link#2>      00:07:e9:05:a4:28     2.2K     0      19K 
 0     0
 pflog 33208 <Link#3>                               0     0        0 
 0     0
 lo0   16384 <Link#4>                             255     0      255 
 0     0
 lo0   16384 your-net      localhost              255     -      255 
 -     -
 fec0   1500 <Link#5>      00:07:e9:05:a4:28      25K     3      21K 
 0     0
 fec0   1500 172.16        blackbird              21K     -      22K 
 -     -
 
 Uptime is 20 minutes.
 
 Thanks for you time. I think people would appreciate having this fix 
 within RELENG_6 berfore release time :)


More information about the freebsd-bugs mailing list