From: Roland Dreier <[email protected]>
Date: Tue, 7 Feb 2012 11:51:46 -0800
Overall, looks great.
> @@ -843,9 +837,8 @@ static int ipoib_hard_header(struct sk_buff *skb,
> if (dst)
> n = dst_get_neighbour_noref_raw(dst);
> if ((!dst || !n) && daddr) {
> - struct ipoib_pseudoheader *phdr =
> - (struct ipoib_pseudoheader *) skb_push(skb, sizeof
> *phdr);
> - memcpy(phdr->hwaddr, daddr, INFINIBAND_ALEN);
> + struct ipoib_cb *cb = (struct ipoib_cb *) skb->cb;
> + memcpy(cb->hwaddr, daddr, INFINIBAND_ALEN);
I would simplify this to "!skb_dst(skb)", any failure of
dst_get_neighbour_noref_raw() (now and in the future) would be
transient.
You're trying to see if this is a "neigh resolvable" path or not, and
the correct test for that is whether a dst is attached to the SKB.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html