From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 44C3243812 for ; Thu, 4 Jan 2024 06:53:23 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 39C70402E8; Thu, 4 Jan 2024 06:53:23 +0100 (CET) Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) by mails.dpdk.org (Postfix) with ESMTP id D58724013F; Thu, 4 Jan 2024 06:53:20 +0100 (CET) Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-428fb6aa0adso1002341cf.1; Wed, 03 Jan 2024 21:53:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704347600; x=1704952400; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=8Ta7egW6iwXHi5igTDY4bE8tQox6sGX3Y99nsAWXnes=; b=LA4cmH1iZ0BDXMt0GY3nQzsAIeb2LoFcFfb+s8O1TRWyzdY3YbqawKyVtmFWjF32RG w061XH13PyJoyKSHc+68gjK/m0M7xxLPR03BmFwSG4BwXcungcKOCZkZrn7xsuD8Byfo STs4pb6KMUBYuheG0VPmMp8wrOow8T4wF+ql4vW82CYT/FsCj17SllaRT2YGVfmCoC+D c/XMrOkILrfJiGp6xWCJLzKkjc2pD72Kxiu1oTuTjCeGnZ3o63YVL3eap9yFTb8dtvnH X73E8FaQmRHuB1+fx1XQNIIM9w9YeRQk25l7zKOx4wP1FIpoS3h2oCCiPRoMROvX8exx Jm7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704347600; x=1704952400; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8Ta7egW6iwXHi5igTDY4bE8tQox6sGX3Y99nsAWXnes=; b=uqXYwC34C9kMcP0T42opMsnqVSSrAcUxDtKBGvsKdIXlVyWGifXaT7BNgp/+DO3ndF hQ3ckL7Jhujv0Jc8TgbvJUxV9zGGjiTuHKGyVQ+xorh/LZMwTkLFrh885jq7+b8Ov7SC p99xJn8ZTyRRyYNqNEmLlfIDZAd34WJpJtaST92bZZ3q8Z0s+Z8XkhTGq9rIkJlooC5L +QoYKyGbdpubTwiCcAqyNN/C68p7u41hYD2JHbEazZY0LI0q+A+HiNsIfZ9a2VjNVTHI bVjtPOKGyMcvlRDmGhJFXVAtT37z2wYNo38IehW2Seapwppd0NxLx4qAJZ6axgXPoBpc 4mHg== X-Gm-Message-State: AOJu0Yxyhqa4GlVO0iHs+LndXwJ8O6HAh5mIZB2yqJVgJ3jEwFoHiB6b FxJj9oHiyHtyL3R+9JlpNI+5GTsEyD1BzrrCxhk= X-Google-Smtp-Source: AGHT+IEpvfn8wLWvH00m61o/bTUFcoKGi+ypl+fWkxHvjNsLAvuG+2KVzmOZf136zAdrUzTQnF2K1LJbH9SCEuydM8M= X-Received: by 2002:a05:622a:191:b0:427:fa8c:82a7 with SMTP id s17-20020a05622a019100b00427fa8c82a7mr29362qtw.44.1704347599941; Wed, 03 Jan 2024 21:53:19 -0800 (PST) MIME-Version: 1.0 References: <20240103012912.4334-1-kaiwenx.deng@intel.com> In-Reply-To: <20240103012912.4334-1-kaiwenx.deng@intel.com> From: Jerin Jacob Date: Thu, 4 Jan 2024 11:22:53 +0530 Message-ID: Subject: Re: [PATCH v1] app/testpmd: use Tx preparation in txonly engine To: Kaiwen Deng Cc: dev@dpdk.org, stable@dpdk.org, qiming.yang@intel.com, yidingx.zhou@intel.com, Aman Singh , Yuying Zhang , David Marchand , Ferruh Yigit Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Wed, Jan 3, 2024 at 7:38=E2=80=AFAM Kaiwen Deng = wrote: > > Txonly forwarding engine does not call the Tx preparation API > before transmitting packets. This may cause some problems. > > TSO breaks when MSS spans more than 8 data fragments. Those > packets will be dropped by Tx preparation API, but it will cause > MDD event if txonly forwarding engine does not call the Tx preparation > API before transmitting packets. > > We can reproduce this issue by these steps list blow on ICE and I40e. > > ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -- -i > --tx-offloads=3D0x00008000 > > testpmd>set txpkts 64,128,256,512,64,128,256,512,512 > testpmd>set burst 1 > testpmd>start tx_first 1 > > This commit will use Tx preparation API in txonly forwarding engine. > > Fixes: 655131ccf727 ("app/testpmd: factorize fwd engines Tx") > Cc: stable@dpdk.org > > Signed-off-by: Kaiwen Deng > --- > app/test-pmd/txonly.c | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c > index c2b88764be..60d69be3f6 100644 > --- a/app/test-pmd/txonly.c > +++ b/app/test-pmd/txonly.c > @@ -339,6 +339,7 @@ pkt_burst_transmit(struct fwd_stream *fs) > struct rte_ether_hdr eth_hdr; > uint16_t nb_tx; > uint16_t nb_pkt; > + uint16_t nb_prep; > uint16_t vlan_tci, vlan_tci_outer; > uint64_t ol_flags =3D 0; > uint64_t tx_offloads; > @@ -396,7 +397,17 @@ pkt_burst_transmit(struct fwd_stream *fs) > if (nb_pkt =3D=3D 0) > return false; > > - nb_tx =3D common_fwd_stream_transmit(fs, pkts_burst, nb_pkt); > + nb_prep =3D rte_eth_tx_prepare(fs->tx_port, fs->tx_queue, More performant version will be to have two versions of fwd_engine.packet_fwd based on the offload. And fix up the correct tx_only_engine.packet_fwd at runtime based on the offload selected.