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 7CD9A42C42; Tue, 6 Jun 2023 20:09:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 509344067B; Tue, 6 Jun 2023 20:09:15 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2072.outbound.protection.outlook.com [40.107.102.72]) by mails.dpdk.org (Postfix) with ESMTP id 5C1FB40223 for ; Tue, 6 Jun 2023 20:09:14 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=khJNgbnc4yxjMPnIZm5fkr1QeDSvNaYirkvyUtr/fx261OhmmHKnf6t/Fqup7slq5zLe0X4sLx3OzU14lTGiYF+aUKCC/nKJU/oyo6cRQ0wUsM1bGcV+UdF4YAoeZcDB25QX216ATp673WxQyoNIuxKP1VPJJRs+PlAEb8EbePQ1tPBwI4a3G7aTpuDhhLG96ldBZMYA/expnDkU1+/tJKKENta6bP4NjUl3gh/YzxrfsW7jVfliUaO6XwUsrTCF6t9bnKURLzZD2iIjvpVBgfgWA5iCeMTSSMgy2LfVrYfMn5FCZXDNx4yThnjaDzPIEp6AfXiHRdAeenmchYAMbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bhN4gr/IUZibXg9LBxUOFjZNbe2skXffMjZsOPiRJjE=; b=N1TSxJhHXA66v5JiswB0k3ze0F1TSxKZOU6twQFpf0XW1kuiQBm5W4QLXWnzUajiCLcVb+1sZ9hWvZAw887NHfyztvqyTzkSvWSXmxD0CyYZ5bogHPMdg28HIZzfPuyppab6Cz/oCmnRodO9NDLgSJO5zZvkAOa2llWKerwGH+rOtBFhVcU9vttQzk1bjEAMul4N3dBq13kYw95Thk1i0DWT3JwbXAznw9J3J1IzY1f3KuHax4eWjkOfVAFETZl4mVzvRgarHXGpDMIurGhbBdVJiUyK5ty8NdIi8KC1Hxsb9u+mgQqqQXKKXtRBWt+2HqD8KsWwwEWUYPIKTvl/eg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bhN4gr/IUZibXg9LBxUOFjZNbe2skXffMjZsOPiRJjE=; b=sJ+9efxzWLOo60BB5+5iCSI+L/T0IwS3BwrS5quW0kzbPmxDD0lgve5IASRTWPBTVH0NWGBQz01+Dd7jALGk/G4duRvqmpU+YpSL/NersD2WzaMRPNA9brZ0s/uzXoXbBn1iYzAg4o2rPjxHnsTO1rz6k7brLjt5Cdhuxc8h0o0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by DM4PR12MB7597.namprd12.prod.outlook.com (2603:10b6:8:10b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.32; Tue, 6 Jun 2023 18:09:09 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::cf07:30f7:a92a:c53b]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::cf07:30f7:a92a:c53b%4]) with mapi id 15.20.6455.030; Tue, 6 Jun 2023 18:09:09 +0000 Message-ID: <38f4bfd4-fced-bd0b-6261-1b34cd894dda@amd.com> Date: Tue, 6 Jun 2023 19:09:03 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [RFC] app/testpmd: use RSS conf from software when configuring DCB Content-Language: en-US To: zhoumin , aman.deep.singh@intel.com, yuying.zhang@intel.com Cc: dev@dpdk.org, maobibo@loongson.cn, Qiming Yang , Wenjun Wu References: <20230412095239.1709477-1-zhoumin@loongson.cn> <70e19912-ab95-ea91-b77f-028d2bbf4ef3@loongson.cn> <84cee6de-3b42-11ac-202e-22ff24ee289e@loongson.cn> From: Ferruh Yigit In-Reply-To: <84cee6de-3b42-11ac-202e-22ff24ee289e@loongson.cn> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO2P265CA0047.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:61::35) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DM4PR12MB7597:EE_ X-MS-Office365-Filtering-Correlation-Id: 6886c91b-d5da-4e8c-a224-08db66b92016 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9EUjgoVhVQM/xJZv+C2B3+/evnVB0lZ1hWmp4rd5H2SrwlV8/r4jrjfzybz6J2qN+TirabOUGIC5XV3YqOYnUBxaLoYmvXCF4twPPv+9BBvknkSURciE3bALFzvCm23dKOwUiCN5UqbSnoKGhsoNs3kYqOvRQwwlaiSXw0GeWr0rTBG5LYM6ypAT98elVDVIf+sRAv5xpyfqivIBz0OZ1CjAgLvq2qZtVg28sqg1wVCedScpHekd9fbyy4k28JGIf5ZdEtSCRXx7sNpSHdJTfg4VXKbW7htnxj4CnagdOl7w5T5IEl398laTf8uyPMWPGhpvl6yJDov+B2aVAcmorJbUXyTYaoEKRdHBMEbhapRkG0J4B23JfuvkTs3+7QmvXubx1gtM662RkWZEsUhfB3Mdm5/3UDyPPE2lYAcZNA3DYyxSl/SOrS4RmTP0Zj3gieCCgqud3jnoRBZwKC6HM6dBqlx4s2fWRhmh1mN4B5sBdFaWBQpw4IIpCYcShxr9bXxST5vezpuAFWl7t2Ki1kE2SCSS/V4urQr/9N3NLSf243BQ03juEoVv5igUcmFT6i1I5xSKUJzsoQk24RJ0cV+Pm1cJbts4wABVwscHBBqKS6PX/pAKPpnSABVUnNL5+mp1S3x4Euujo4md6ICeoA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(136003)(39860400002)(396003)(366004)(376002)(451199021)(6506007)(26005)(186003)(53546011)(6512007)(2616005)(31686004)(83380400001)(6666004)(36756003)(54906003)(2906002)(6486002)(8676002)(8936002)(44832011)(478600001)(31696002)(5660300002)(41300700001)(86362001)(38100700002)(316002)(66556008)(66946007)(66476007)(4326008)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZUZuK3Q2TXREdmdXZXZQMUYvRiszMUh6WFZXOHhxV2w3WXZyMnZLYkh2cUlE?= =?utf-8?B?NktwT3BCYmtLNEt3WW5FK21lUDVvNzVHdEkyQVJjQ3N1OXdWb2JiZXU3bWlO?= =?utf-8?B?ZkZ1SWZtWk9GSlhVS01qZGRjazJtRHNOdkFkUFJvWDVzakFrTFZnN0t6UDFm?= =?utf-8?B?VGQ2QTN3RVhHYXg0OFoyWE1SdFpqNmF6cklnVy9qemVOMHZ2b29PTUV2aTdG?= =?utf-8?B?dWQ0TVVxYXNDM0hzNXgyOERlK1hTR2kreExmeCt4QTFJNUFnWExzVFpzeWNx?= =?utf-8?B?WWpYe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zZ2lIS05y?= =?utf-8?Q?zPVHIlhZMX0TJ7uomqhFJnT3g?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6886c91b-d5da-4e8c-a224-08db66b92016 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2023 18:09:09.8466 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: f4TiP25BLuG0Zk2P2XSqUsGrt8M9bV00Z6tm+WKoYOJYLND+yyFrl9MWkI8DlMj2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7597 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 On 5/8/2023 2:21 AM, zhoumin wrote: > Kindly ping. > Hi Min, Sorry for the delay. > Should we solve this problem by modifying PMDs? > > Is it suitable to maintain the RSS configurations for NIC by testpmd in > order to set DCB? > > > On Thur, Apr 27, 2023 at 4:33PM, zhoumin wrote: >> Kindly ping. >> >> Any comments or suggestions will be appreciated. >> >> Best regards >> Min >> >> >> On 2023/4/12 下午5:52, Min Zhou wrote: >>> In the testpmd command, we have to stop the port firstly before >>> configuring >>> the DCB. However, some PMDs may execute a hardware reset during the port >>> stop, such as ixgbe. Some kind of reset operations of PMD could clear >>> the >>> configurations of RSS in the hardware register. This would cause the >>> loss >>> of RSS configurations that were set during the testpmd >>> initialization. As >>> a result, I find that I cannot enable RSS and DCB at the same time in >>> the >>> testpmd command when using Intel 82599 NIC. >>> cc'ed ixgbe maintainers too. @Qiming, @Wenjun, are you testing DCB with RSS configuration? Min, Can you please give more detail on the problem, do you have in only on device reset, or is there a generic problem on enabling DCB with RSS? Also can you please describe how/why removing RSS configuration (this patch) helps on the problem? Thanks, ferruh >>> Although this patch can solve the problem I encountered, is there any >>> risk >>> of using rss conf from software instead of reading from the hardware >>> register when configuring DCB? >>> >>> Signed-off-by: Min Zhou >>> --- >>>   app/test-pmd/testpmd.c | 11 +---------- >>>   1 file changed, 1 insertion(+), 10 deletions(-) >>> >>> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c >>> index 5cb6f92523..3c382267b8 100644 >>> --- a/app/test-pmd/testpmd.c >>> +++ b/app/test-pmd/testpmd.c >>> @@ -4247,14 +4247,12 @@ const uint16_t vlan_tags[] = { >>>   }; >>>     static  int >>> -get_eth_dcb_conf(portid_t pid, struct rte_eth_conf *eth_conf, >>> +get_eth_dcb_conf(portid_t pid __rte_unused, struct rte_eth_conf >>> *eth_conf, >>>            enum dcb_mode_enable dcb_mode, >>>            enum rte_eth_nb_tcs num_tcs, >>>            uint8_t pfc_en) >>>   { >>>       uint8_t i; >>> -    int32_t rc; >>> -    struct rte_eth_rss_conf rss_conf; >>>         /* >>>        * Builds up the correct configuration for dcb+vt based on the >>> vlan tags array >>> @@ -4296,12 +4294,6 @@ get_eth_dcb_conf(portid_t pid, struct >>> rte_eth_conf *eth_conf, >>>           struct rte_eth_dcb_tx_conf *tx_conf = >>>                   ð_conf->tx_adv_conf.dcb_tx_conf; >>>   -        memset(&rss_conf, 0, sizeof(struct rte_eth_rss_conf)); >>> - >>> -        rc = rte_eth_dev_rss_hash_conf_get(pid, &rss_conf); >>> -        if (rc != 0) >>> -            return rc; >>> - >>>           rx_conf->nb_tcs = num_tcs; >>>           tx_conf->nb_tcs = num_tcs; >>>   @@ -4313,7 +4305,6 @@ get_eth_dcb_conf(portid_t pid, struct >>> rte_eth_conf *eth_conf, >>>           eth_conf->rxmode.mq_mode = >>>                   (enum rte_eth_rx_mq_mode) >>>                       (rx_mq_mode & RTE_ETH_MQ_RX_DCB_RSS); >>> -        eth_conf->rx_adv_conf.rss_conf = rss_conf; >>>           eth_conf->txmode.mq_mode = RTE_ETH_MQ_TX_DCB; >>>       } > > Best regards, > > Min >