From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] testpmd: fix tso with csum engine Date: Thu, 13 Oct 2016 16:01:37 +0200 Message-ID: <4155546.K4Q8W0cgmd@xps13> References: <1476366030-28321-1-git-send-email-olivier.matz@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, pablo.de.lara.guarch@intel.com To: Olivier Matz Return-path: Received: from mail-yw0-f178.google.com (mail-yw0-f178.google.com [209.85.161.178]) by dpdk.org (Postfix) with ESMTP id 7A95211DE for ; Thu, 13 Oct 2016 16:01:41 +0200 (CEST) Received: by mail-yw0-f178.google.com with SMTP id w3so53830877ywg.1 for ; Thu, 13 Oct 2016 07:01:41 -0700 (PDT) In-Reply-To: <1476366030-28321-1-git-send-email-olivier.matz@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-10-13 15:40, Olivier Matz: > The commit that disabled tso for small packets was broken during the > rebase. The problem is the IP checksum is not calculated in software if: > - TX IP checksum is disabled > - TSO is enabled > - the current packet is smaller than tso segment size > > When checking if the PKT_TX_IP_CKSUM flag should be set (in case > of tso), use the local tso_segsz variable, which is set to 0 when the > packet is too small to require tso. Therefore the IP checksum will be > correctly calculated in software. > > Moreover, we should not use tunnel segment size for non-tunnel tso, else > TSO will stay disabled for all packets. > > Fixes: 97c21329d42b ("app/testpmd: do not use TSO for small packets") > > Signed-off-by: Olivier Matz Applied, thanks