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 BF58DA04AF; Thu, 17 Sep 2020 13:16:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CDAE21D5F4; Thu, 17 Sep 2020 13:16:39 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id D40DC1D5EF for ; Thu, 17 Sep 2020 13:16:37 +0200 (CEST) IronPort-SDR: 8+MjMw9L9u/lmiKIuUO1qeRuyL3ievVE0mO+1BeaASjGzx0SBcwaL4Ojb0ol8n6MvKOe1J637o GACzDOajvtbQ== X-IronPort-AV: E=McAfee;i="6000,8403,9746"; a="157077151" X-IronPort-AV: E=Sophos;i="5.76,436,1592895600"; d="scan'208";a="157077151" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2020 04:16:35 -0700 IronPort-SDR: 8R98UPd75sNRsQkyADr9oeseXKFElqmptu077bBy79Zv/zDxgo05Rkn+Vvz6iTCPV7+F746Fp3 hlSNp3SqNYIA== X-IronPort-AV: E=Sophos;i="5.76,436,1592895600"; d="scan'208";a="307432170" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.251.82.126]) ([10.251.82.126]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2020 04:16:33 -0700 To: Chengchang Tang , "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> <607b4776-d34f-60f3-c421-dae12401639e@huawei.com> From: Ferruh Yigit Message-ID: <9ef16fc3-39b0-f086-2a2d-e51a4ce33909@intel.com> Date: Thu, 17 Sep 2020 12:16:31 +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: <607b4776-d34f-60f3-c421-dae12401639e@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed 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 9/17/2020 8:10 AM, Chengchang Tang wrote: > > > On 2020/9/15 0:23, Ferruh Yigit wrote: >> 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? > > Yes, I miss it. If the txsplit is not set and the txpkts is set, the txonly > fwd engine will only send single segment packets, and there will be a payload > error for the data_len will be refreshed by the sum of the segment size. > I am getting the size error when 'txsplit' is 'on' or 'rand'. In that case packet header are correct (after your patch) but wireshark complains the size of the packet on wire is different than the values in headers. And the size of the actual packet is reported by wireshark as the size of the first segment. > May be the data_len should be the first segment size if the txsplit is not set? > I will fix it in the next version. >> >> 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? > > OK, I will fix it in next version. Thanks, appreciated.