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 70E8A45E15; Tue, 3 Dec 2024 08:41:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3E5F940264; Tue, 3 Dec 2024 08:41:55 +0100 (CET) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by mails.dpdk.org (Postfix) with ESMTP id 487EB40261 for ; Tue, 3 Dec 2024 08:41:52 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.162.112]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Y2Xbq3cxSz1k11G; Tue, 3 Dec 2024 15:39:35 +0800 (CST) Received: from kwepemf500004.china.huawei.com (unknown [7.202.181.242]) by mail.maildlp.com (Postfix) with ESMTPS id B30D3140136; Tue, 3 Dec 2024 15:41:50 +0800 (CST) Received: from [10.67.121.175] (10.67.121.175) by kwepemf500004.china.huawei.com (7.202.181.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Tue, 3 Dec 2024 15:41:50 +0800 Message-ID: Date: Tue, 3 Dec 2024 15:41:49 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 From: Jie Hai Subject: Question on TX offload To: , "dev@dpdk.org" , Huisong Li , Dengdui Huang , fengchengwen , Ferruh Yigit , Thomas Monjalon , , Konstantin Ananyev , Aman Singh Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.121.175] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemf500004.china.huawei.com (7.202.181.242) 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 Hi, all maintainers and developers, Since the hns3 NIC support TSO for UDP (not UDP Fragmentation) and for ipv6 headers with extension header, When I test it with testpmd, it cannot be performed. The TCP segmentation flag is set only for the packets whose next header of L3 is TCP. I checked some information on the TSO and have doubts about current support for both cases. The commit 7238e63bce52 ("ethdev: add support for device offload capabilities") introduces TX offload including DEV_TX_OFFLOAD_UDP_TSO and DEV_TX_OFFLOAD_TCP_TSO. The former evolves into UDP fragmentation and the latter TCP segmentation. [1].RTE_ETH_TX_OFFLOAD_UDP_TSO -- RTE_MBUF_F_TX_UDP_SEG UDP Fragmentation Offload [2].RTE_ETH_TX_OFFLOAD_TCP_TSO -- RTE_MBUF_F_TX_TCP_SEG TCP segmentation offload, related to TCP packets. While the commit message see the TCP segmentation offload as Transmited segmentation offload.[1]Does the TCP segmentation offload contains UDP packets? There are many drivers support UDP segmatention offload similar to TCP segmatention offload, for example, atlantic、bnxt、cxgb4、hns3、i40e、iavf、ice、idpf、igb、ixgbe、mlx5, etc. Please refer to Linux kernel include/linux/netdev_features.h NETIF_F_GSO_UDP_L4_BIT, /* ... UDP payload GSO (not UFO) */ My questions are: [1]. Does the TCP segmentation offload(RTE_ETH_TX_OFFLOAD_TCP_TSO ) contains UDP packets? If yes, then the testpmd app should add flag for UDP packets. If no, a new offload should be added. Considering that maybe not all drivers support both of TCP and UDP Segmentation, How about distinguish the three capabilities and flags? [1].RTE_ETH_TX_OFFLOAD_TCP_TSO -- RTE_MBUF_F_TX_TCP_SEG TCP segmentation offload, related to TCP as L4. [2].RTE_ETH_TX_OFFLOAD_UDP_TSO -- RTE_MBUF_F_TX_UDP_SEG UDP segmentation offload, related to UDP as L4. [3].RTE_ETH_TX_OFFLOAD_UFO -- RTE_MBUF_F_TX_UFO_SEG UDP Fragmentation Offload [2]. TSO can be performed on packets with Ipv6 headers with extenstion? If yes, documention and testpmd app should be updated. If no, maybe documention should be updated more detailed. Thanks, Jie Hai