> Quoting Roland Dreier <[EMAIL PROTECTED]>: > Subject: Re: [PATCHv6 RFC] IPoIB CM Experimental support > > > > 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.
Let me know when you push it out, I'll start testing it. > > 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. You are right of course. sparse would have found it. -- MST _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
