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 34D40DE4 for ; Mon, 1 Jun 2015 14:11:26 +0200 (CEST) Received: by wibut5 with SMTP id ut5so36447255wib.1 for ; Mon, 01 Jun 2015 05:11:26 -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; bh=gNtnnzy6igFN03HS4RThvDqQ/QlcCuAF4QEHx+VrAI0=; b=T667JZU6Py92iheI73bVi8hSygsTppnz8oTOkzZAeH3iEoQly9QfA2YWD/2DDd4NXJ LwnFwYqQ6Ji8PsAJLpLyJ1KstiAgHZ1Njax9P+VQam1owid+WkIS2iglOLeeWDMLDqyw 4nolrSSk5HwJv2KSBHBERJNRZBJYoqTIRCysEDrotXAR/Ip9WYSKIbMgr+czV2jYN73j ZyPUxK0iLeKwiGCYSAlisg9SugpV9hHlhsjPrOQlF9F7h6dHsvum9bgy/gmnRjz+ggKs T8FFx6WFsUOzqp6lpyVYGCxRY1DxI8OWsuaMfvukG9dr6DB/BsbnASoqmeXcRZFjABkV bZAA== X-Gm-Message-State: ALoCoQlmQhhVrItCjH2M2fw/S9DPlTfHNZgehoLDlW5voMPEDtc7UxG/8awKgp+y68j4nw7dMxru X-Received: by 10.180.72.145 with SMTP id d17mr20405285wiv.69.1433160685976; Mon, 01 Jun 2015 05:11:25 -0700 (PDT) Received: from alcyon.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id u13sm17435566wjw.37.2015.06.01.05.11.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jun 2015 05:11:25 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Mon, 1 Jun 2015 14:11:17 +0200 Message-Id: <1433160677-20847-1-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 Subject: [dpdk-dev] [PATCH] 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, 01 Jun 2015 12:11:26 -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. Signed-off-by: Didier Pallard --- 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 4f9ab22..d123612 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_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