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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Roland Dreier <roland@xxxxxxxxxx>
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Home]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]

Add to Google Powered by Linux