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 ABDA3A04BC; Tue, 29 Sep 2020 17:40:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1882F1D168; Tue, 29 Sep 2020 17:40:43 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 0C98D2BC7 for ; Tue, 29 Sep 2020 17:40:40 +0200 (CEST) IronPort-SDR: BAxRrthXLGpheu8kdpLfVHcojWyCE1xIg1E43RG5jgQ9MMR9YrSP7EkMYI3Pcy8XijhONhcaBm l4HtAcxN2ZCg== X-IronPort-AV: E=McAfee;i="6000,8403,9759"; a="161444354" X-IronPort-AV: E=Sophos;i="5.77,319,1596524400"; d="scan'208";a="161444354" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 08:40:34 -0700 IronPort-SDR: 3ZU4qRfq98YmAnsgEXJVK1Dkm/lAYWJR/s1WXjtjbwdM74J/OXejQL7jnQkurays/7YVxWNpdG SA7tv+hLuTuA== X-IronPort-AV: E=Sophos;i="5.77,319,1596524400"; d="scan'208";a="491829340" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.220.198]) ([10.213.220.198]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 08:40:30 -0700 To: "Wei Hu (Xavier)" , dev@dpdk.org Cc: xavier.huwei@huawei.com References: <20200818120254.72792-1-huwei013@chinasoftinc.com> <20200925124719.26001-1-huwei013@chinasoftinc.com> <20200925124719.26001-5-huwei013@chinasoftinc.com> From: Ferruh Yigit Message-ID: <4c774e3b-a6a6-83fe-2dad-cdfcf3aa0ded@intel.com> Date: Tue, 29 Sep 2020 16:40:27 +0100 MIME-Version: 1.0 In-Reply-To: <20200925124719.26001-5-huwei013@chinasoftinc.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v4 4/6] 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/25/2020 1:47 PM, 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 --disable-device-start > b) port config 0 tx_offload multi_segs on Hi Xavier, I confirm previously mentioned wrong sized packet is fixed with about setting, thanks for this. > c) set fwd txonly > d) set txsplit rand > e) set txpkts 2048,2048,2048,2048 > f) 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. > > 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. > > 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) <...>