From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 23A74A04C7; Mon, 14 Sep 2020 18:23:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C649B1BE98; Mon, 14 Sep 2020 18:23:46 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 2FDB21BE95 for ; Mon, 14 Sep 2020 18:23:44 +0200 (CEST) IronPort-SDR: 2UtYxB98fqWyNkapdlwnhmE3MW3j0BVw5dk0HaMG4DBzjC8nVyBQbeJIpzELD27aQxiQI/gqqq jAT9ZK1Efb+w== X-IronPort-AV: E=McAfee;i="6000,8403,9744"; a="156544359" X-IronPort-AV: E=Sophos;i="5.76,426,1592895600"; d="scan'208";a="156544359" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2020 09:23:44 -0700 IronPort-SDR: 5lkp+xBjRDAojiuOxYYmJriyqCaAhWSmHoDurg8l1pP1eh0x8BL2Y9SGSowzoqTYVR0e5bGvug t65c8uBtZ58A== X-IronPort-AV: E=Sophos;i="5.76,426,1592895600"; d="scan'208";a="507197205" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.247.225]) ([10.213.247.225]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2020 09:23:42 -0700 To: "Wei Hu (Xavier)" , Wenzhuo Lu , Beilei Xing , Bernard Iremonger , Yongseok Koh , Konstantin Ananyev , Pablo de Lara Cc: dev@dpdk.org, xavier.huwei@huawei.com References: <20200818120254.72792-1-huwei013@chinasoftinc.com> <20200820014204.25035-1-huwei013@chinasoftinc.com> <20200820014204.25035-4-huwei013@chinasoftinc.com> From: Ferruh Yigit Message-ID: Date: Mon, 14 Sep 2020 17:23:38 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <20200820014204.25035-4-huwei013@chinasoftinc.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2 3/4] app/testpmd: fix packet header in txonly mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 8/20/2020 2:42 AM, Wei Hu (Xavier) wrote: > From: Chengchang Tang > > In txonly forward mode, the packet header is fixed by the initial > setting, including the packet length and checksum. So when the packets > varies, this may cause a packet header error. Currently, there are two > methods in txonly mode to randomly change the packets. > 1. Set txsplit random and txpkts (x[,y]*), the number of segments > each packets will be a random value between 1 and total number of > segments determined by txpkts settings. > The step as follows: > a) ./testpmd -w xxx -l xx -n 4 -- -i --rxd xxxx --txd xxxx > b) set fwd txonly > c) set txsplit rand > d) set txpkts 2048,2048,2048,2048 > e) start > The nb_segs of the packets sent by testpmd will be 1~4. The real packet > length will be 2048, 4096, 6144 and 8192. But in fact the packet length > in ip header and udp header will be fixed by 8178 and 8158. Although I confirm the patch fixes the ip & udp header packet size for "txsplit=rand" config, I am always getting actual packet size wrong, independent from 'txsplit', and it is always first segment size. Am I doing something wrong? And not related to this patch but why setting 'txpkts' requires "--rxd xxxx --txd xxxx" options explicitly set? If you are already there can you also remove this restriction? > > 2. Set txonly-multi-flow. the ip address will be varied to generate > multiple flow. > The step as follows: > a) ./testpmd -w xxx -l xx -n 4 -- -i --txonly-multi-flow > b) set fwd txonly > c) start > The ip address of each pkts will change randomly, but since the header > is fixed, the checksum may be a error value. +1, I confirm fixing the checksum error. > > Therefore, this patch adds a function to update the packet length and > check sum in the pkts header when the txsplit mode is set to rand or > multi-flow is set. > > Fixes: 82010ef55e7c ("app/testpmd: make txonly mode generate multiple flows") > Fixes: 79bec05b32b7 ("app/testpmd: add ability to split outgoing packets") > Cc: stable@dpdk.org > > Signed-off-by: Chengchang Tang > Signed-off-by: Wei Hu (Xavier) <...>