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 7B1AEA04BB; Thu, 17 Sep 2020 13:48:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 530B91D621; Thu, 17 Sep 2020 13:48:17 +0200 (CEST) Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by dpdk.org (Postfix) with ESMTP id 6E684E07 for ; Thu, 17 Sep 2020 13:48:15 +0200 (CEST) Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 508C0105246B5C248B7D; Thu, 17 Sep 2020 19:48:14 +0800 (CST) Received: from [127.0.0.1] (10.65.81.238) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Thu, 17 Sep 2020 19:48:05 +0800 To: Ferruh Yigit , "Wei Hu (Xavier)" , Wenzhuo Lu , Beilei Xing , Bernard Iremonger , Yongseok Koh , Konstantin Ananyev , Pablo de Lara 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> <9ef16fc3-39b0-f086-2a2d-e51a4ce33909@intel.com> CC: , From: Chengchang Tang Message-ID: <1a009854-28c1-5702-fbfa-6f7f12c22428@huawei.com> Date: Thu, 17 Sep 2020 19:48:04 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <9ef16fc3-39b0-f086-2a2d-e51a4ce33909@intel.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.65.81.238] X-CFilter-Loop: Reflected 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 2020/9/17 19:16, Ferruh Yigit wrote: > 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. Maybe it should be configured with multi_segs offload. If the 'txsplit' is 'on' or 'rand', the txonly engine will send a multi segments packets. I tested it on hns3 PMD, which support a multi_segs by default configuration. So, I miss to add these information to the commit log. For some PMDs, the multi_segs is not support as default. >> 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. >>> <...> > > > . >