[Xorp-hackers] Assert with multicast routing in fea, pif_index collision with "register_vif"

Bruce M Simpson bms at incunabulum.net
Thu Jun 5 01:22:03 PDT 2008


Hi,

The register vif is a virtual interface in the MROUTING code which is 
used to send PIM register messages upstream to the Rendezvous Point (RP) 
with the correct encapsulation.

The FEA code does not give the register vif any special handling, to 
avoid introducing a lot of special cases into the code. If you look at 
mfea_node.cc you will see the code which allocates a vif index in FEA 
space for the register VIF.

However: The MROUTING vif numbers are unrelated to ifindex, they do NOT 
occupy the same space. By the looks of it you've hit the assertion where 
the MFEA has allocated a VIF index inside the FEA, where there is a 
'real' system interface sharing the same index.

Unfortunately the MROUTING code does not allocate a real interface 
descriptor from the underlying system. If you look at the MROUTING code 
you will see it has a 32 vif limitation due to the API used.

This is why I strongly recommended looking at the other issues in 
MROUTING first before attempting to add multiple FIB support.

cheers
BMS

Ben Greear wrote:
> I am working on adding support for multiple multicast routing tables to 
> Linux & Xorp.
> I think I have it mostly implemented, but I'm still in heavy debugging....
>
> Today, I got to the point where I was getting an assert in FEA due to 
> what appears
> to be a vif-index collision:
>
> [ 2008/06/04 17:48:50 INFO xorp_fea MFEA ] Interface enabled Vif[rddVR2] 
> pif_index: 6 vif_index: 2 addr: 3.3.3.3 subnet: 3.3.3.0/24 broadcast: 
> 3.3.3.255 peer: 0.0.0.0 Flags: MULTICAST BROADCAST UNDERLYING_VIF_UP 
> MTU: 1500 DOWN IPv4 ENABLED
> [ 2008/06/04 17:48:50 INFO xorp_fea MFEA ] Interface started: 
> Vif[rddVR2] pif_index: 6 vif_index: 2 addr: 3.3.3.3 subnet: 3.3.3.0/24 
> broadcast: 3.3.3.255 peer: 0.0.0.0 Flags: MULTICAST BROADCAST 
> UNDERLYING_VIF_UP MTU: 1500 UP IPv4 ENABLED
> [ 2008/06/04 17:48:50 INFO xorp_fea MFEA ] Interface added: 
> Vif[register_vif] pif_index: 6 vif_index: 3 addr: 3.3.3.3 subnet: 
> 3.3.3.3/32 broadcast: 3.3.3.3 peer: 0.0.0.0 Flags: PIM_REGISTER 
> UNDERLYING_VIF_UP MTU: 1500
> [ 2008/06/04 17:48:50  FATAL xorp_fea:5016 FEA iftree.cc:1673 
> insert_ifindex ] Assertion (iter->second == ifp) failed
>
>
> The 'register_vif' interface has same pif_index, so it hits this assert 
> if iftree.cc
> (well, I'm running my own patches in fea, so that *could* be the 
> problem, but
> the code below is from the official tree, and looks like it would have 
> the same problem.)
>
> Any ideas on this?  I can paste my entire xorp config if someone is 
> interested...
>
> void
> IfTree::insert_ifindex(IfTreeInterface* ifp)
> {
>     IfIndexMap::iterator iter;
>
>     XLOG_ASSERT(ifp != NULL);
>
>     if (ifp->pif_index() == 0)
>         return;         // Ignore: invalid pif_index
>
>     iter = _ifindex_map.find(ifp->pif_index());
>     if (iter != _ifindex_map.end()) {
>         XLOG_ASSERT(iter->second == ifp);  /// This is what hits  ///
>         iter->second = ifp;
>         return;
>     }
>
>     _ifindex_map[ifp->pif_index()] = ifp;
> }
>
>
>   




More information about the Xorp-hackers mailing list