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 90AB1A04B6; Thu, 17 Sep 2020 09:10:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 96C131D53F; Thu, 17 Sep 2020 09:10:40 +0200 (CEST) Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) by dpdk.org (Postfix) with ESMTP id DC8A51D52F for ; Thu, 17 Sep 2020 09:10:38 +0200 (CEST) Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id C39974DEF723652EBFB3; Thu, 17 Sep 2020 15:10:36 +0800 (CST) Received: from [127.0.0.1] (10.65.81.238) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.487.0; Thu, 17 Sep 2020 15:10:28 +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> CC: , From: Chengchang Tang Message-ID: <607b4776-d34f-60f3-c421-dae12401639e@huawei.com> Date: Thu, 17 Sep 2020 15:10:27 +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: 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/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. 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. > <...> > . >