Re: [mpls-linux-devel] mpls-linux on 64 bit kernel
Status: Beta
Brought to you by:
jleu
From: Jorge B. [DTI2] <jo...@dt...> - 2010-05-18 09:09:48
|
El 18/05/2010 0:15, Chris Robson escribió: > > Ashan > > I'm currently trying to test this but having lock up problems. However, > I have cornered the problem to the following code snip. Note the > conditional compile statement. This maybe the cause of the x86_64 > system locking up, but (and a big but) it also locks up with my x86_32 > systems as well. Will be collecting more data tomorrow but if anyone > has any ideas I'm all ears. FYI, the lock up occurs when > mpls_opcode_peek is called from mpls_skb_recv(). > > int mpls_opcode_peek(struct sk_buff *skb) > { > u32 shim; > > #define CAN_WE_ASSUME_32BIT_ALIGNED 0 > #if CAN_WE_ASSUME_32BIT_ALIGNED > shim = ntohl(*((u32*)&skb->network_header)); > #else > memcpy(&shim,skb->network_header,sizeof(u32)); > shim = ntohl(shim); > #endif > > if (!(MPLSCB(skb)->flag)) { > MPLSCB(skb)->ttl = shim & 0xFF; > MPLSCB(skb)->flag = 1; > } > MPLSCB(skb)->bos = (shim >> 8 ) & 0x1; > MPLSCB(skb)->exp = (shim >> 9 ) & 0x7; > MPLSCB(skb)->label = (shim >> 12) & 0xFFFFF; > > return MPLS_RESULT_RECURSE; > } Ok, that rang a bell. The problem is that in arches with BITS_PER_LONG > 32, some of the members of the skbuff are not pointers (network_header, transport_header, ...) but offsets. I'll cook a patch and send it to you to test. Regards, Jorge -- ============================================================== Jorge Boncompte - Ingenieria y Gestion de RED DTI2 - Desarrollo de la Tecnologia de las Comunicaciones -------------------------------------------------------------- C/ Abogado Enriquez Barrios, 5 14004 CORDOBA (SPAIN) Tlf: +34 957 761395 / FAX: +34 957 450380 ============================================================== - Sin pistachos no hay Rock & Roll... - Without wicker a basket cannot be made. ============================================================== |