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 D427D43212; Fri, 27 Oct 2023 08:16:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C39FC40DFD; Fri, 27 Oct 2023 08:16:04 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id CB02E402AA for ; Fri, 27 Oct 2023 08:15:42 +0200 (CEST) Received: from dggpeml100024.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SGsjL2H4hzpWZd; Fri, 27 Oct 2023 14:10:46 +0800 (CST) Received: from [10.67.121.161] (10.67.121.161) by dggpeml100024.china.huawei.com (7.185.36.115) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Fri, 27 Oct 2023 14:15:40 +0800 Subject: Re: [PATCH v2] app/testpmd: fix UDP cksum error for UFO enable To: Huisong Li , CC: , , , , References: <20230728021310.15970-1-lihuisong@huawei.com> <20230802025520.8000-1-lihuisong@huawei.com> From: fengchengwen Message-ID: <20989101-d626-d3f3-933c-f67b5ac1bcde@huawei.com> Date: Fri, 27 Oct 2023 14:15:40 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20230802025520.8000-1-lihuisong@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.161] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml100024.china.huawei.com (7.185.36.115) X-CFilter-Loop: Reflected X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Acked-by: Chengwen Feng On 2023/8/2 10:55, Huisong Li wrote: > The command "tso set " is used to enable UFO, please > see commit ce8e6e742807 ("app/testpmd: support UFO in checksum engine") > > The above patch configures the RTE_MBUF_F_TX_UDP_SEG to enable UFO only if > tso_segsz is set. Then tx_prepare() may call rte_net_intel_cksum_prepare() > to compute pseudo header checksum (because some PMDs may supports TSO). > As a result, if the peer sends UDP packets, all packets with UDP checksum > error are received for the PMDs only supported TSO. > > So enabling UFO also depends on if driver has RTE_ETH_TX_OFFLOAD_UDP_TSO > capability. Similarly, TSO also need to do like this. > > In addition, this patch also fixes cmd_tso_set_parsed() for UFO to make > it better to support TSO and UFO. > > Fixes: ce8e6e742807 ("app/testpmd: support UFO in checksum engine") > > Signed-off-by: Huisong Li ...