[PATCH net-next v2 4/4] ibmveth: Add support for Large Receive Offload

Eric Dumazet eric.dumazet at gmail.com
Tue Apr 28 10:10:12 AEST 2015


On Mon, 2015-04-27 at 17:10 -0500, Thomas Falcon wrote:




> +				if (be16_to_cpu(skb->protocol) == ETH_P_IP) {
> +					skb_set_network_header(skb, 0);
> +					skb_set_transport_header(skb, sizeof(struct iphdr));
> +					iph = ip_hdr(skb);
> +

All this should really be :

if (skb->protocol == htons(ETH_P_IP)) {
	iph = (struct iphdr *)skb->data;

Because setting network header and a (potentially wrong) transport
header is confusing at this stage.

(It should be done later in core networking stack)




More information about the Linuxppc-dev mailing list