Thread (2 messages) flat view 2 messages, 2 authors, 2012-02-07

Re: [PATCH net-next V2] gro: introduce gro_mac_header_len

From: David Miller <davem@davemloft.net>
Date: 2012-02-07 20:33:38
Also in: linux-rdma

From: Roland Dreier <roland@kernel.org>
Date: Tue, 7 Feb 2012 11:51:46 -0800

Overall, looks great.
quoted hunk ↗ jump to hunk
@@ -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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help