From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by dpdk.org (Postfix) with ESMTP id 63CA36934 for ; Fri, 9 May 2014 16:50:46 +0200 (CEST) Received: by mail-wi0-f181.google.com with SMTP id n15so1456160wiw.8 for ; Fri, 09 May 2014 07:50:52 -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=/N+XSR97sUzh3IP+pV4rmohpY3g+YZ2XIPvtyLap8oM=; b=fKQhzP+Cb07RqARNr86tFXb+kHRz9xV8AdPnN7R9rcBGEMPV3snigjmUJS41PFgCKO 3us/VPhnI8DDpCCG9yIRWjzhM0IvDP/zBbEn/jGniYhoRlwdJg4CZOQB0utVrfNmPx4s 6LrKXhQPbNIg0DWExwD8tjLH1Md+2VW7+P4HVIC6U0K9yDT93tEcJMMmobWjuB3E0WSq oc1EYXv0wCUi0MOEE8MxeqN5+TD8GgHyvXwJ72MoBxb+tHhjj8F99KfeeRd1upHdv3u/ 7fwQVHaoi1rhxHB9kp6T8HGqkC23JuKY7SOUxd+M6X++BvDMjJTMFN/s6p4o/v1/TooR pUDQ== X-Gm-Message-State: ALoCoQnAuNkvKXk7czApBQLfEdlwOPLJF4QBlOVr8xfrD8D6ZpIV8evvZAJQ35SBkq/fVKuevTvc X-Received: by 10.180.80.232 with SMTP id u8mr3703014wix.13.1399647052786; Fri, 09 May 2014 07:50:52 -0700 (PDT) Received: from glumotte.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id c2sm5744122wja.18.2014.05.09.07.50.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 May 2014 07:50:52 -0700 (PDT) From: Olivier Matz To: dev@dpdk.org Date: Fri, 9 May 2014 16:50:28 +0200 Message-Id: <1399647038-15095-2-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 1.9.2 In-Reply-To: <1399647038-15095-1-git-send-email-olivier.matz@6wind.com> References: <1399647038-15095-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 RFC 01/11] 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: Fri, 09 May 2014 14:50:47 -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 --- 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 55414b9..4e307c2 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