vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On Thu, 26 Jul 2007 21:56, Lutz Hamann wrote: > Hi, > > attached patch allows trunk on my T40p to use em0 and ath0 in failover. > Otherwise ath0 never gets detected as active since it always reports > link_state as unknown. > > This basically reverts one of the changes introduced in rev 1.11. > > em0 at pci2 dev 1 function 0 "Intel PRO/1000MT (82540EP)" rev 0x03: irq 4, > address 00:09:6b:53:4d:02 ath0: AR5211 4.2 phy 3.0 rf5111 1.7, WOR1W, > address 00:05:4e:41:29:21 > > Both interfaces are up and connected. > > Without patch: > trunk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 > lladdr 00:09:6b:53:4d:02 > trunk: trunkproto failover > trunkport ath0 > trunkport em0 master,active > groups: trunk egress > media: Ethernet autoselect > status: active > inet 10.40.1.108 netmask 0xffffff00 broadcast 10.40.1.255 > inet6 fe80::209:6bff:fe53:4d02%trunk0 prefixlen 64 scopeid 0x5 > > With patch: > trunk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 > lladdr 00:09:6b:53:4d:02 > trunk: trunkproto failover > trunkport ath0 active > trunkport em0 master,active > groups: trunk egress > media: Ethernet autoselect > status: active > inet 10.40.1.108 netmask 0xffffff00 broadcast 10.40.1.255 > inet6 fe80::209:6bff:fe53:4d02%trunk0 prefixlen 64 scopeid 0x5 > > -- > Lutz Hamann <l.hamann@diompika.org> > Lambda Networks Ltd, PO Box 450 234, Mpika, Zambia > Phone +260-96-6 644 682, Fax +260-21-4 370 112 > > > Index: if_trunk.h > ================================================== ================= > RCS file: /cvs/src/sys/net/if_trunk.h,v > retrieving revision 1.12 > diff -u -r1.12 if_trunk.h > --- if_trunk.h 26 Apr 2007 08:57:59 -0000 1.12 > +++ if_trunk.h 26 Jul 2007 07:22:09 -0000 > @@ -117,7 +117,7 @@ > #define tp_capabilities tp_if->if_capabilities /* > capabilities */ > #define TRUNK_PORTACTIVE(_tp) ( \ > - (LINK_STATE_IS_UP((_tp)->tp_link_state)) && \ > + ((_tp)->tp_link_state != LINK_STATE_DOWN) && \ > ((_tp)->tp_ifflags & IFF_UP) \ > ) The LINK_STATE_IS_UP macro simply checks if the tp_link_state is greater than LINK_STATE_DOWN, meaning that the link is considered active if tp_link_state is not one of LINK_STATE_DOWN or LINK_STATE_UNKNOWN (values defined in sys/net/if.h). Since the above patch resolves the problem, the tp_link_state for your ath(4) interface is presumably LINK_STATE_UNKNOWN. I think it would be better to find out why this is the case and resolve this problem (it obviously should be > LINK_STATE_DOWN if it is indeed active). PS. I started looking through ath(4) related code the other night, but soon got lost in a code maze. Perhaps some of the network interface gurus can comment/suggest where to look... -- ---------------------------------------------------------------------------- => Joel Sing | joel@ionix.com.au | 0419 577 603 <= ---------------------------------------------------------------------------- "Real stupidity beats artificial intelligence every time." - Terry Pratchett, Hogfather |