I dont recall seeing this on RELENG_7, but I dont have a box to test with anymore confirm. On one box I upgraded to RELENG_8 I just noticed the nic will bounce if I enable tcpdump on it. Sure enough, trying on a different RELENG_8 box with an fxp nic shows the same result. eg tcpdump -ni fxp0 -c 20 fxp0: link state changed to DOWN fxp0: promiscuous mode enabled fxp0: link state changed to UP fxp0: link state changed to DOWN fxp0: promiscuous mode disabled fxp0: link state changed to UP I verified it on 2 different boxes. Is there a way to prevent this from happening ? fxp0@pci0:0:7:0: class=0x020000 card=0x000b8086 chip=0x12298086 rev=0x08 hdr=0x00 vendor = 'Intel Corporation' device = '82550/1/7/8/9 EtherExpress PRO/100(B) Ethernet Adapter' class = network subclass = ethernet bar [10] = type Memory, range 32, base 0xfebbb000, size 4096, enabled bar [14] = type I/O Port, range 32, base 0xd800, size 64, enabled bar [18] = type Memory, range 32, base 0xfe900000, size 1048576, enabled cap 01[dc] = powerspec 2 supports D0 D1 D2 D3 current D0 and fxp0@pci0:2:1:0: class=0x020000 card=0x00408086 chip=0x12298086 rev=0x0c hdr=0x00 vendor = 'Intel Corporation' device = '82550/1/7/8/9 EtherExpress PRO/100(B) Ethernet Adapter' class = network subclass = ethernet bar [10] = type Memory, range 32, base 0xfddff000, size 4096, enabled bar [14] = type I/O Port, range 32, base 0xdf00, size 64, enabled bar [18] = type Memory, range 32, base 0xfddc0000, size 131072, enabled cap 01[dc] = powerspec 2 supports D0 D1 D2 D3 current D0 fxp0: <Intel 82550 Pro/100 Ethernet> port 0xdf00-0xdf3f mem 0xfddff000-0xfddfffff,0xfddc0000-0xfdddffff irq 21 at device 1.0 on pci2 miibus0: <MII bus> on fxp0 inphy0: <i82555 10/100 media interface> PHY 1 on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow fxp0: Ethernet address: 00:02:b3:5d:ca:f6 fxp0: [ITHREAD] and fxp0: <Intel 82559 Pro/100 Ethernet> port 0xd800-0xd83f mem 0xfebbb000-0xfebbbfff,0xfe900000-0xfe9fffff irq 27 at device 7.0 on pci0 miibus0: <MII bus> on fxp0 inphy0: <i82555 10/100 media interface> PHY 1 on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow fxp0: Ethernet address: 00:d0:b7:db:5f:22 fxp0: [ITHREAD] dev.fxp.0.%desc: Intel 82550 Pro/100 Ethernet dev.fxp.0.%driver: fxp dev.fxp.0.%location: slot=1 function=0 dev.fxp.0.%pnpinfo: vendor=0x8086 device=0x1229 subvendor=0x8086 subdevice=0x0040 class=0x020000 dev.fxp.0.%parent: pci2 dev.fxp.0.int_delay: 1000 dev.fxp.0.bundle_max: 6 dev.fxp.0.rnr: 61 dev.fxp.0.stats.rx.good_frames: 1085200818 dev.fxp.0.stats.rx.crc_errors: 0 dev.fxp.0.stats.rx.alignment_errors: 0 dev.fxp.0.stats.rx.rnr_errors: 0 dev.fxp.0.stats.rx.overrun_errors: 319 dev.fxp.0.stats.rx.cdt_errors: 0 dev.fxp.0.stats.rx.shortframes: 0 dev.fxp.0.stats.rx.pause: 0 dev.fxp.0.stats.rx.controls: 0 dev.fxp.0.stats.rx.tco: 0 dev.fxp.0.stats.tx.good_frames: 1105041142 dev.fxp.0.stats.tx.maxcols: 0 dev.fxp.0.stats.tx.latecols: 0 dev.fxp.0.stats.tx.underruns: 0 dev.fxp.0.stats.tx.lostcrs: 149 dev.fxp.0.stats.tx.deffered: 0 dev.fxp.0.stats.tx.single_collisions: 0 dev.fxp.0.stats.tx.multiple_collisions: 0 dev.fxp.0.stats.tx.total_collisions: 0 dev.fxp.0.stats.tx.pause: 0 dev.fxp.0.stats.tx.tco: 0 -- ------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet services since 1994 www.sentex.net Cambridge, Ontario Canada http://www.tancsa.com/
If memory serves me right, Mike Tancsa wrote:> I dont recall seeing this on RELENG_7, but I dont have a box to test with anymore confirm. On one box I upgraded to RELENG_8 I just noticed the nic will bounce if I enable tcpdump on it. Sure enough, trying on a different RELENG_8 box with an fxp nic shows the same result.JFYI I see this on an ancient i386 system I have, running 9.0-RELEASE: fxp0: <Intel 82801BA/CAM (ICH2/3) Pro/100 Ethernet> port 0xac00-0xac3f mem 0xefdfe000-0xefdfefff irq 11 at device 8.0 on pci1 Same thing...going into or out of promiscuous mode makes the link bounce. fxp0: link state changed to DOWN fxp0: promiscuous mode enabled fxp0: link state changed to UP fxp0: link state changed to DOWN fxp0: promiscuous mode disabled fxp0: link state changed to UP Bruce. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 259 bytes Desc: OpenPGP digital signature Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20120316/207faa99/signature.pgp
On Fri, 16 Mar 2012 16:49:54 -0400, Mike Tancsa wrote: > I dont recall seeing this on RELENG_7, but I dont have a box to test > with anymore confirm. On one box I upgraded to RELENG_8 I just > noticed the nic will bounce if I enable tcpdump on it. Sure enough, > trying on a different RELENG_8 box with an fxp nic shows the same > result. > > eg > > tcpdump -ni fxp0 -c 20 > > fxp0: link state changed to DOWN > fxp0: promiscuous mode enabled > fxp0: link state changed to UP > fxp0: link state changed to DOWN > fxp0: promiscuous mode disabled > fxp0: link state changed to UP > > I verified it on 2 different boxes. Is there a way to prevent this > from happening ? Confirmed on 8.2-RELEASE. I hadn't noticed as I tend to use tcpdump -p Mar 17 14:00:03 t23 kernel: fxp0: link state changed to DOWN Mar 17 14:00:03 t23 kernel: fxp0: promiscuous mode enabled Mar 17 14:00:05 t23 kernel: fxp0: link state changed to UP Mar 17 14:00:14 t23 kernel: fxp0: link state changed to DOWN Mar 17 14:00:14 t23 kernel: fxp0: promiscuous mode disabled Mar 17 14:00:16 t23 kernel: fxp0: link state changed to UP I've also noticed that it consistently takes a couple of seconds after enabling or disabling promisc mode before coming back UP here. There were several updates to fxp between 7 and 8.0 through 8.1-STABLE upto 8.2-R, concerning UP/DOWN occurrence and timing at boot, around suspend/resume and dhclient. I'd been watching it with some suspicion regarding a suspend/resume issue (that turned out to be usb-related). cheers, Ian
On Fri, Mar 16, 2012 at 04:49:54PM -0400, Mike Tancsa wrote:> I dont recall seeing this on RELENG_7, but I dont have a box to test with anymore confirm. On one box I upgraded to RELENG_8 I just noticed the nic will bounce if I enable tcpdump on it. Sure enough, trying on a different RELENG_8 box with an fxp nic shows the same result. > > eg > > tcpdump -ni fxp0 -c 20 > > fxp0: link state changed to DOWN > fxp0: promiscuous mode enabled > fxp0: link state changed to UP > fxp0: link state changed to DOWN > fxp0: promiscuous mode disabled > fxp0: link state changed to UP > > I verified it on 2 different boxes. Is there a way to prevent this from happening ? >It looks like a regression introduced in flow control support. I think stable/7 also has the same code so you will see the same issue on stable/7. However if you don't see the issue on stable/7 I can't explain that. Anyway, try attached patch and let me know how it works. I found other places which will result in link DOWN/UP so changed them to get previous good behavior. -------------- next part -------------- A non-text attachment was scrubbed... Name: fxp.media.diff Type: text/x-diff Size: 920 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20120317/107d466f/fxp.media.bin
On 3/17/2012 6:58 PM, YongHyeon PYUN wrote:> On Fri, Mar 16, 2012 at 04:49:54PM -0400, Mike Tancsa wrote: >> >> tcpdump -ni fxp0 -c 20 >> >> fxp0: link state changed to DOWN >> fxp0: promiscuous mode enabled >> fxp0: link state changed to UP >> fxp0: link state changed to DOWN >> fxp0: promiscuous mode disabled >> fxp0: link state changed to UP >> >> I verified it on 2 different boxes. Is there a way to prevent this from happening ? >> > > It looks like a regression introduced in flow control support.Thanks very much, that indeed did fix it!! 0(smtp1)# patch < fxp.p Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |Index: sys/dev/fxp/if_fxp.c |==================================================================|--- sys/dev/fxp/if_fxp.c (revision 233076) |+++ sys/dev/fxp/if_fxp.c (working copy) -------------------------- Patching file sys/dev/fxp/if_fxp.c using Plan A... Hunk #1 succeeded at 900 (offset -2 lines). Hunk #2 succeeded at 2808 (offset -2 lines). Hunk #3 succeeded at 2914 (offset -2 lines). fxp0: promiscuous mode enabled fxp0: promiscuous mode disabled ... and not bounced link/dropped packets. dev.fxp.0.%desc: Intel 82550 Pro/100 Ethernet dev.fxp.0.%driver: fxp dev.fxp.0.%location: slot=1 function=0 dev.fxp.0.%pnpinfo: vendor=0x8086 device=0x1229 subvendor=0x8086 subdevice=0x0040 class=0x020000 dev.fxp.0.%parent: pci2 dev.fxp.0.int_delay: 1000 dev.fxp.0.bundle_max: 6 dev.fxp.0.rnr: 0 dev.fxp.0.stats.rx.good_frames: 9265 dev.fxp.0.stats.rx.crc_errors: 0 dev.fxp.0.stats.rx.alignment_errors: 0 dev.fxp.0.stats.rx.rnr_errors: 0 dev.fxp.0.stats.rx.overrun_errors: 0 dev.fxp.0.stats.rx.cdt_errors: 0 dev.fxp.0.stats.rx.shortframes: 0 dev.fxp.0.stats.rx.pause: 0 dev.fxp.0.stats.rx.controls: 0 dev.fxp.0.stats.rx.tco: 0 dev.fxp.0.stats.tx.good_frames: 9978 dev.fxp.0.stats.tx.maxcols: 0 dev.fxp.0.stats.tx.latecols: 0 dev.fxp.0.stats.tx.underruns: 0 dev.fxp.0.stats.tx.lostcrs: 3 dev.fxp.0.stats.tx.deffered: 0 dev.fxp.0.stats.tx.single_collisions: 0 dev.fxp.0.stats.tx.multiple_collisions: 0 dev.fxp.0.stats.tx.total_collisions: 0 dev.fxp.0.stats.tx.pause: 0 dev.fxp.0.stats.tx.tco: 0 ---Mike -- ------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet services since 1994 www.sentex.net Cambridge, Ontario Canada http://www.tancsa.com/