[openib-general] [PATCHv6 RFC] IPoIB CM Experimental support

Roland Dreier rdreier at cisco.com
Wed Feb 7 11:03:46 PST 2007


 > > I noticed some funny code in ipoib_cm_skb_reap():
 > > 
 > > 	__be32 mtu = cpu_to_be32(priv->mcast_mtu);
 > > 
 > > // htonl(__be32)??
 > > 			icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu));
 > > // no htonl() here -- is this correct?
 > > 			icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, dev);
 > > 
 > > what is the right thing?
 > 
 > Both are right I think.

You're right -- the mistake is making mtu __be32 and preswapping it.
I'll fix it up in my tree.

 > These two functions seem to accept parameters in different format:
 > 
 > include/net/icmp.h:extern void  icmp_send(struct sk_buff *skb_in,  int type, int
 > 					  code, __be32 info);
 > 
 > 
 > include/linux/icmpv6.h:extern void                icmpv6_send(struct sk_buff *skb,
 > include/linux/icmpv6.h-                                       int type, int code,
 > include/linux/icmpv6.h-                                       __u32 info,
 > include/linux/icmpv6.h-                                       struct net_device *dev);
 > 
 > BTW, I just looked at ip_gre.c and it has the same code.

no, it leaves mtu as an int rather than swapping it.

 - R.




More information about the general mailing list