From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 5B9EBC5C6 for ; Mon, 22 Jun 2015 16:21:31 +0200 (CEST) Received: by wgqq4 with SMTP id q4so17887831wgq.1 for ; Mon, 22 Jun 2015 07:21:31 -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; bh=/9ZA8wleOKe9ogw6pDIZnLw8uHbZrUF2yycILYwxXIU=; b=HUkqOWjF4sGUjNyEkWsBSUcntdHNv82ftgyqcPI2gJVnLiKyIShkq8B0oXrHmBl6l3 gKfAJoKaDgHVSJrEgCkdtioHwM0zG/Xli8nRNSeG3ECgBbrRjvqwqXxdBrNhPYq121nF 7oecn6bncGIB4ddfJh9lkFyAMcIpeZnEcO4NYFoRNcuPIdXwF9DLp2oStlVzd0I8qTl7 2r8fELN5XqXlMIPnGFCF8MMcLpqTDACGsbl7g9jbiClU3iSELQa/TgoUZL63ZZiI/WQY kwp1zu7M+J+uA0HVAUL2Y0ZQJTlwM5sNxMfmpaDB4Etya6mZytdvNQKL8PpO2Xtg0EQj cEuA== X-Gm-Message-State: ALoCoQlZFyZhG2Db9n3cdnRLywZs7evFDKOqma+dXUHojEp5RGf0yfsT0Y55PBEJjM98CMWqAWTa X-Received: by 10.180.75.48 with SMTP id z16mr31603416wiv.49.1434982891176; Mon, 22 Jun 2015 07:21:31 -0700 (PDT) Received: from alcyon.dev.6wind.com (6wind.net2.nerim.net. [213.41.151.210]) by mx.google.com with ESMTPSA id v3sm17518252wiz.14.2015.06.22.07.21.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jun 2015 07:21:30 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Mon, 22 Jun 2015 16:21:18 +0200 Message-Id: <1434982878-6466-1-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1433160677-20847-1-git-send-email-david.marchand@6wind.com> References: <1433160677-20847-1-git-send-email-david.marchand@6wind.com> Subject: [dpdk-dev] [PATCH v2] ixgbe: fix TSO in IPv6 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, 22 Jun 2015 14:21:31 -0000 From: Didier Pallard When TSO is used with IPv6, generated frames are incorrect. L4 frame is OK, but length field of IPv6 header was not populated correctly. IXGBE_ADVTXD_TUCMD_IPV6 flag is set for better readability, even if it does nothing. Signed-off-by: Didier Pallard Signed-off-by: David Marchand Acked-by: Konstantin Ananyev --- drivers/net/ixgbe/ixgbe_rxtx.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index 7cc26ef..3ace8a8 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -375,10 +375,15 @@ ixgbe_set_xmit_ctx(struct ixgbe_tx_queue *txq, /* check if TCP segmentation required for this packet */ if (ol_flags & PKT_TX_TCP_SEG) { - /* implies IP cksum and TCP cksum */ - type_tucmd_mlhl = IXGBE_ADVTXD_TUCMD_IPV4 | - IXGBE_ADVTXD_TUCMD_L4T_TCP | - IXGBE_ADVTXD_DTYP_CTXT | IXGBE_ADVTXD_DCMD_DEXT; + /* implies IP cksum in IPv4 */ + if (ol_flags & PKT_TX_IP_CKSUM) + type_tucmd_mlhl = IXGBE_ADVTXD_TUCMD_IPV4 | + IXGBE_ADVTXD_TUCMD_L4T_TCP | + IXGBE_ADVTXD_DTYP_CTXT | IXGBE_ADVTXD_DCMD_DEXT; + else + type_tucmd_mlhl = IXGBE_ADVTXD_TUCMD_IPV6 | + IXGBE_ADVTXD_TUCMD_L4T_TCP | + IXGBE_ADVTXD_DTYP_CTXT | IXGBE_ADVTXD_DCMD_DEXT; tx_offload_mask.l2_len |= ~0; tx_offload_mask.l3_len |= ~0; -- 1.7.10.4