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 619F6A0093; Fri, 22 Apr 2022 13:41:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 04D1D410D5; Fri, 22 Apr 2022 13:41:16 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 6437940042 for ; Fri, 22 Apr 2022 13:41:14 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 8633291; Fri, 22 Apr 2022 14:41:13 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 8633291 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1650627673; bh=SwD/r/Lqg1Dpdiooqvd+aPAwDy/DVorYWg4hirbY4cs=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=gIDHSBOW024Jf585pWWGO7JUAha+H9X1iAFC7vRO7js54PRZuz+kmGejDqCmnYP3r nHAdQeXYv9zLXS8DcZSToI4dUHPqwsOaMAD+V3oix4eK0Fvh7QnhwEELc7xy3TGx6C 4q0jAx6M6lEYDRBruQzlM46Qw70qQAJPNUldXq3E= Message-ID: <51197e1e-4cbf-8a9e-8e05-c519f6a0f623@oktetlabs.ru> Date: Fri, 22 Apr 2022 14:41:12 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: Question about flow_type_rss_offloads in rte_eth_dev_info Content-Language: en-US To: "lihuisong (C)" , "dev@dpdk.org" Cc: Thomas Monjalon , ferruh.yigit@xilinx.com, huangdaode References: <2994c7eb-7ef4-d82d-0a49-ab3c9c8b675e@huawei.com> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <2994c7eb-7ef4-d82d-0a49-ab3c9c8b675e@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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, On 4/22/22 06:55, lihuisong (C) wrote: > Hi, all. > > The RTE_ETH_FLOW_XXX macros, are used to display supported flow types > for PMD based on the rte_eth_dev_info.flow_type_rss_offloads in the > port_infos_display() of testpmd. That's true and it is wrong in testpmd. RTE_ETH_RSS_* and RTE_ETH_FLOW_* are intentionally disconnected right now. flow_type_rss_offloads docmentation is a bit misleading saying that "the bit offset also means flow type". For example, RTE_ETH_RSS_L4_CHKSUM and RTE_ETH_RSS_L3_SRC_ONLY hardly mean flow type. I think the documentation must be fixed - it should just refer to RTE_ETH_RSS_* defines. So, returning to testpmd, "Supported RSS offload flow types" code should be reworked to avoid RTE_ETH_FLOW_* usage. flowtype_to_str() should be kept intact since it is used for FDIR commands which operate with flows, not RSS bit-field. A new function should be implemented which uses maps RTE_ETH_RSS_* bits into string to be printed. > And PMD assigns RSS offload capability bit, like RTE_ETH_RSS_XXX, to > this field. > The usage of RTE_ETH_RSS_XXX macros are described as follows in: > /* >  * Below macros are defined for RSS offload types, they can be used to >  * fill rte_eth_rss_conf.rss_hf or rte_flow_action_rss.types. >  */ > #define RTE_ETH_RSS_IPV4               RTE_BIT64(2) > > But RTE_ETH_FLOW_MAX is 24, and the number of RTE_ETH_FLOW_XXX micro far > less than > the number of RTE_ETH_RSS_XXX. If PMD sets RSS offload capability bit > out range of > RTE_ETH_FLOW_XXX, like RTE_ETH_RSS_L3_SRC_ONLY, to this field, testpmd > will display > "user defined 63" when run 'show port info 0'. This is a problem that I > have now. > > On the other hand, rx_adv_conf.rte_eth_rss_conf.rss_hf from App must be > within the > rte_eth_dev_info.flow_type_rss_offloads in dev_configure. > > To sum up, I'm a little confused right now. > How should PMD populate the field "flow_type_rss_offloads" in struct > rte_eth_dev_info? flow_type_rss_offloads should be populated in terms of RTE_ETH_RSS_* bits. Andrew.