[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20131130.161749.1028599462373827329.davem@davemloft.net>
Date: Sat, 30 Nov 2013 16:17:49 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: fan.du@...driver.com
Cc: steffen.klassert@...unet.com, netdev@...r.kernel.org
Subject: Re: [PATCH net] {pktgen, xfrm} re-caculate IPv4 checksum after
transformation
From: Fan Du <fan.du@...driver.com>
Date: Fri, 29 Nov 2013 10:59:09 +0800
> @@ -2786,6 +2786,8 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev,
> #ifdef CONFIG_XFRM
> if (!process_ipsec(pkt_dev, skb, protocol))
> return NULL;
> + iph = ip_hdr(skb);
> + ip_send_check(iph);
> #endif
This is rediculous. You're computing the checksum _twice_ unconditionally,
even if process_ipsec() does _nothing_.
Make process_ipsec() fix the checksum, but only if it actually does
something which makes the recomputation even necessary.
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists