From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by dpdk.org (Postfix) with ESMTP id 052A05930 for ; Mon, 19 May 2014 15:56:37 +0200 (CEST) Received: by mail-wi0-f176.google.com with SMTP id n15so4176250wiw.15 for ; Mon, 19 May 2014 06:56:47 -0700 (PDT) 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=i/JJbAfOg4eji2wQ9+Hc53NWFMX8y8P4xiOCGeVdVkM=; b=aJYCermv1FRPNao2OzhJZKjL2cvmM1YalpSE2Rld+KevAGLsq+QxYiAKpxtOJVHZoH GfWIMB0WzTv7bkjP4OxoUh2IqTAClGJlZXsrvijhI+QDMIHofZ2OHD9vmXBzKUqxXvbY /7bGASADC3h//dG7cw4KXovb/AvAmHH6y8G1SXpHvl35YU4mtJdFVePV12kGAZcRflja vjYZffeNnMVSfYNdnezPw6yeMn+W4g0KYTDMC4RnrG8VCVUzvvbWFiErQiA1GBdO/2XS 69NBNG9v19hC/WSzYymDWF647MlT5cbw3YSYL/dpMKGe0bvHz/UbCjy8suSLXhMIBz0F 8H9g== X-Gm-Message-State: ALoCoQm6zsr6lZuf0FEJf/CVpsyZuYWEGBJIDH9LXnyBTDA68N+rF66aO69gMIEZNIwjtxpHLY8b X-Received: by 10.180.198.178 with SMTP id jd18mr6521176wic.24.1400507806979; Mon, 19 May 2014 06:56:46 -0700 (PDT) Received: from glumotte.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id t18sm15201828wiv.16.2014.05.19.06.56.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 May 2014 06:56:46 -0700 (PDT) From: Olivier Matz To: dev@dpdk.org Date: Mon, 19 May 2014 15:56:13 +0200 Message-Id: <1400507789-18453-2-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 1.9.2 In-Reply-To: <1400507789-18453-1-git-send-email-olivier.matz@6wind.com> References: <1400507789-18453-1-git-send-email-olivier.matz@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 01/17] 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: Mon, 19 May 2014 13:56:38 -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 4608595..b3c8149 100644 --- a/lib/librte_pmd_e1000/igb_rxtx.c +++ b/lib/librte_pmd_e1000/igb_rxtx.c @@ -233,7 +233,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 37d02aa..f217ca1 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c @@ -367,7 +367,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. */ -- 1.9.2