Re: fxp entering promiscuous mode causing link to bounce



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.
Index: sys/dev/fxp/if_fxp.c
===================================================================
--- sys/dev/fxp/if_fxp.c (revision 233076)
+++ sys/dev/fxp/if_fxp.c (working copy)
@@ -902,7 +902,7 @@
FXP_LOCK(sc);
/* Clear wakeup events. */
CSR_WRITE_1(sc, FXP_CSR_PMDR, CSR_READ_1(sc, FXP_CSR_PMDR));
- fxp_init_body(sc, 1);
+ fxp_init_body(sc, 0);
fxp_stop(sc);
FXP_UNLOCK(sc);
}
@@ -2810,7 +2810,7 @@
if (((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) &&
((ifp->if_flags ^ sc->if_flags) &
(IFF_PROMISC | IFF_ALLMULTI | IFF_LINK0)) != 0)
- fxp_init_body(sc, 1);
+ fxp_init_body(sc, 0);
else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
fxp_init_body(sc, 1);
} else {
@@ -2916,7 +2916,7 @@
reinit++;
}
if (reinit > 0 && ifp->if_flags & IFF_UP)
- fxp_init_body(sc, 1);
+ fxp_init_body(sc, 0);
FXP_UNLOCK(sc);
VLAN_CAPABILITIES(ifp);
break;
_______________________________________________
freebsd-stable@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@xxxxxxxxxxx"

Relevant Pages

  • Re: No buffer space available
    ... fxp0: promiscuous mode disabled ... GEOM_STRIPE: Device md0 destroyed. ... GEOM_MIRROR: Device md1: provider da1 detected. ...
    (freebsd-questions)
  • Re: No buffer space available
    ... fxp0: promiscuous mode disabled ... GEOM_STRIPE: Device md0 destroyed. ... GEOM_MIRROR: Device md1: provider da1 detected. ...
    (freebsd-stable)
  • Re: No buffer space available
    ... fxp0: promiscuous mode disabled ... GEOM_STRIPE: Device md0 destroyed. ... GEOM_MIRROR: Device md1: provider da1 detected. ...
    (freebsd-stable)
  • 5.2 cvsup make buildworld error
    ... pci0: <ACPI PCI bus> on pcib0 ... miibus0: on fxp0 ... fxp0: promiscuous mode disabled ...
    (freebsd-questions)
  • Re: No buffer space available
    ... fxp0: promiscuous mode disabled ... GEOM_STRIPE: Device md0 destroyed. ... GEOM_MIRROR: Device md1: provider da1 detected. ...
    (freebsd-questions)