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 354D5A0093; Fri, 29 Apr 2022 03:47:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C4E44410E3; Fri, 29 Apr 2022 03:47:36 +0200 (CEST) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by mails.dpdk.org (Postfix) with ESMTP id 55E2A40E50 for ; Fri, 29 Apr 2022 03:47:34 +0200 (CEST) Received: from kwepemi100019.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4KqFcK1MLdzCsRD; Fri, 29 Apr 2022 09:42:57 +0800 (CST) Received: from kwepemm600004.china.huawei.com (7.193.23.242) by kwepemi100019.china.huawei.com (7.221.188.189) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 29 Apr 2022 09:47:31 +0800 Received: from [10.67.103.231] (10.67.103.231) by kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 29 Apr 2022 09:47:31 +0800 Message-ID: <039b8952-26f9-f716-d968-1304e90e9717@huawei.com> Date: Fri, 29 Apr 2022 09:47:30 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: Question about flow_type_rss_offloads in rte_eth_dev_info To: Andrew Rybchenko , "dev@dpdk.org" CC: Thomas Monjalon , , huangdaode References: <2994c7eb-7ef4-d82d-0a49-ab3c9c8b675e@huawei.com> <51197e1e-4cbf-8a9e-8e05-c519f6a0f623@oktetlabs.ru> From: "lihuisong (C)" In-Reply-To: <51197e1e-4cbf-8a9e-8e05-c519f6a0f623@oktetlabs.ru> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.231] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600004.china.huawei.com (7.193.23.242) 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 Hi, Andrew "Supported RSS offload flow types" code in testpmd has been reworked in the following patchset: http://patchwork.dpdk.org/project/dpdk/list/?series=22657 Series title: fix RSS types display Please review, thanks. 在 2022/4/22 19:41, Andrew Rybchenko 写道: > 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. > .