From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id CB1702E8B for ; Wed, 26 Nov 2014 15:54:14 +0100 (CET) Received: by mail-wg0-f42.google.com with SMTP id z12so3996784wgg.29 for ; Wed, 26 Nov 2014 07:05:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=Bh8v7KE+mwfoawNaynDX4M8MWOqUMV8kvh52HjLeteM=; b=W7pX7JIQ1+NRCPhSR8+YKv8c1G+2tBVzMnziawyAGBKLognyQCfNJ0HBEbzyi11xDN Ikr47CWWIJuA70IaNRR/JeC4o7CPKMcj+b8Fel0P82f3bObfJqQelA/z2vxUIJCDY6L1 eleiCCMRY2bO9oEAh21djzLyobBgFAf2tZ+tBujW96M8wg5D7bwEbQPHqRVW7CzXFmih HHjJxrotQ9v6IewM6Sf4ml8XiR2HHDqcgzG5gv1qQXUQJutiJPIf2fTvcehroie8Suph g13f416Tz0FP/It34/c94CbS3nKFbbdZkKN4uk44iQknXjsIlxnn9gYh6vgFynreXmth Q1aA== X-Gm-Message-State: ALoCoQnLLPPwdHptUORNUcuTVA2AWbid9yGH1e9d1ze+hm32jMQYNU2A4YgloDUWj4UtsL1Sp9x4 X-Received: by 10.180.101.104 with SMTP id ff8mr36780394wib.12.1417014311988; Wed, 26 Nov 2014 07:05:11 -0800 (PST) Received: from glumotte.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id bm1sm6682819wjb.45.2014.11.26.07.05.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Nov 2014 07:05:11 -0800 (PST) From: Olivier Matz To: dev@dpdk.org Date: Wed, 26 Nov 2014 16:04:43 +0100 Message-Id: <1417014295-29064-2-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1417014295-29064-1-git-send-email-olivier.matz@6wind.com> References: <1416524335-22753-1-git-send-email-olivier.matz@6wind.com> <1417014295-29064-1-git-send-email-olivier.matz@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: jigsaw@gmail.com Subject: [dpdk-dev] [PATCH v4 01/13] igb/ixgbe: fix IP checksum calculation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 14:54:15 -0000 According to IntelĀ® 82599 10 GbE Controller Datasheet (Table 7-38), both L2 and L3 lengths are needed to offload the IP checksum. Note that the e1000 driver does not need to be patched as it already contains the fix. Signed-off-by: Olivier Matz Acked-by: Konstantin Ananyev --- lib/librte_pmd_e1000/igb_rxtx.c | 2 +- lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_pmd_e1000/igb_rxtx.c b/lib/librte_pmd_e1000/igb_rxtx.c index 0dca7b7..b406397 100644 --- a/lib/librte_pmd_e1000/igb_rxtx.c +++ b/lib/librte_pmd_e1000/igb_rxtx.c @@ -262,7 +262,7 @@ igbe_set_xmit_ctx(struct igb_tx_queue* txq, if (ol_flags & PKT_TX_IP_CKSUM) { type_tucmd_mlhl = E1000_ADVTXD_TUCMD_IPV4; - cmp_mask |= TX_MAC_LEN_CMP_MASK; + cmp_mask |= TX_MACIP_LEN_CMP_MASK; } /* Specify which HW CTX to upload. */ diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c index f9b3fe3..ecebbf6 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c @@ -374,7 +374,7 @@ ixgbe_set_xmit_ctx(struct igb_tx_queue* txq, if (ol_flags & PKT_TX_IP_CKSUM) { type_tucmd_mlhl = IXGBE_ADVTXD_TUCMD_IPV4; - cmp_mask |= TX_MAC_LEN_CMP_MASK; + cmp_mask |= TX_MACIP_LEN_CMP_MASK; } /* Specify which HW CTX to upload. */ -- 2.1.0