From patchwork Thu Jul 25 12:08:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Graf X-Patchwork-Id: 261678 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 45D0F2C00C1 for ; Thu, 25 Jul 2013 22:08:13 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755407Ab3GYMIK (ORCPT ); Thu, 25 Jul 2013 08:08:10 -0400 Received: from merlin.infradead.org ([205.233.59.134]:36384 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755386Ab3GYMIH (ORCPT ); Thu, 25 Jul 2013 08:08:07 -0400 Received: from 77-56-192-57.dclient.hispeed.ch ([77.56.192.57] helo=localhost.localdomain) by merlin.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1V2KL0-0007T5-Cb; Thu, 25 Jul 2013 12:08:06 +0000 From: Thomas Graf To: davem@davemloft.net Cc: netdev@vger.kernel.org Subject: [PATCH net-next] pktgen: Use ip_send_check() to compute checksum Date: Thu, 25 Jul 2013 14:08:04 +0200 Message-Id: <54f9ca8fb7748c23eec49ad0fa055f2036cde5b7.1374753893.git.tgraf@suug.ch> X-Mailer: git-send-email 1.8.3.1 X-SRS-Rewrite: SMTP reverse-path rewritten from by merlin.infradead.org See http://www.infradead.org/rpr.html Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Thomas Graf --- net/core/pktgen.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 929eb7b..2b3a74e 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -2755,8 +2755,7 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev, iph->frag_off = 0; iplen = 20 + 8 + datalen; iph->tot_len = htons(iplen); - iph->check = 0; - iph->check = ip_fast_csum((void *)iph, iph->ihl); + ip_send_check(iph); skb->protocol = protocol; skb->dev = odev; skb->pkt_type = PACKET_HOST;