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 0113741D52; Thu, 23 Feb 2023 16:13:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AB3AA4316C; Thu, 23 Feb 2023 16:13:12 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2043.outbound.protection.outlook.com [40.107.94.43]) by mails.dpdk.org (Postfix) with ESMTP id A8AFF42B7E for ; Thu, 23 Feb 2023 16:13:10 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZA6j2MirWWhYfOCm5TeGyr29ONypxPrv6PobOIWDUvDui/TmJnwksSurzWlUP2gQfL8gSGTApVV2K4VJM5DRHj5T3PWBIwlrjIAGwPlgLwj5sWm67T+iJEM4Yh7tcZ83c0+s34/jxaKt7ZMGYRPe9gtet8hDPsIx0RTW5+94+slTjcYkc0aLtWuAVXo+JyxLWUag3WiT7dZopaMsuHeHjmvYlI/ygadhEz1/WiZT0DYyESnPXvZhCfmv1CmtYmuHwJglVSEs8US/UfMEnZDxnme0HPY8x6tOeVlgJmfwNLOCw6EmK+jP6r0f36XKHB9yGSoyhaK0vfyIo4p6iAxJZA== 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=qEsgikPt6CZmglk6jxAjAWrk86W3PYTHyAGUJcasf6I=; b=S6v8XCNDu3Qc185dptmMh/8JIJ3YA+t0uhlfRuyeNoSx0TmhMb675yoDYftOdWGVrgOzgkCxdpnlJ0vpxGWXgyWP32p/Y5Av0KKkwgBdctSFBXdML+GH7K6YGvkBE0LaQ8XNMexiKu6oOUhTOQ4yiGefyZYkpXb+diXmCozv+MQux5VWEaq0ZN37A2hhRp6b+q2f3RQ9v0kwREAsyMnEM23hvUwmf1kR4XL30QRT6XxnE50ehjkgsR6hiiEdL8WmGS52rSFzF8n0XIZy33mUW1KV1HuHWm/zwI6ym9+rQGBaAcVTcJ+4Kb8CA9/ySlpwZuMzP3rX0yFjgp1ydAmWIQ== 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=qEsgikPt6CZmglk6jxAjAWrk86W3PYTHyAGUJcasf6I=; b=HRe4P8KCIaMmoah72aRvRedIiHuLV1WCeSg7yhMra69f9aEVizm+iab8vtEz4tOGp2i/Emq0IrIXpuBiVOlwqi1CvgUYbt/FdhIBGq01DP7trhqJUOL69bGrZAsCL6v+ZdM8Kg+ucEt+oMRxjHuGrJb46jq7/BAhy+YYDcUHvqs= 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 DM4PR12MB7501.namprd12.prod.outlook.com (2603:10b6:8:113::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.21; Thu, 23 Feb 2023 15:13:08 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3614:22ed:ed5:5b48]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3614:22ed:ed5:5b48%8]) with mapi id 15.20.6134.021; Thu, 23 Feb 2023 15:13:08 +0000 Message-ID: <06caff77-f4d1-6039-341b-512ef6198152@amd.com> Date: Thu, 23 Feb 2023 15:13:02 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US To: Chaoyong He , dev@dpdk.org, Andrew Rybchenko Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Long Wu , Thomas Monjalon References: <20230221032909.16888-1-chaoyong.he@corigine.com> <20230221035548.28092-1-chaoyong.he@corigine.com> <20230221035548.28092-2-chaoyong.he@corigine.com> From: Ferruh Yigit Subject: Re: [PATCH v2 1/2] net/nfp: standardize the use of RSS-related codes In-Reply-To: <20230221035548.28092-2-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P265CA0094.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2bc::9) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DM4PR12MB7501:EE_ X-MS-Office365-Filtering-Correlation-Id: 250d9c52-6973-43fe-3552-08db15b07848 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6KHeL4p5iJsm+dRJgIOVfWZ65bEz5kq7avMnXrj2rpiMWzmabb68CGdMw6irYWTRs5AsOHGsmMnLHg75GsocxCD9pCjljDMcB9U0k1Ycu7cnDBkK+MaUT7KSjruYsR0lk5t8ca2x2RdedqFsZmK32CGwrgQI+97mMaREnxGT2qAohUR1q03SDtYVntMyUO9wRFlfPVS1fxLHsOdYCsxsVD/cNWdmAyq3SWEmaXiBN+WRwhSSE6ChYLd0DccYwTMhFJ0t9dJnB9S1EIdcjXSv2S4ppl5Oy+DUTAk9yFPiT1IIFCcIZlrrynnd+AIW4Mp6L/G+wFiQkY+J8YO9qOYIyjAhiG2MGr0FkvzWhHAGyhRfdp4ZwoNikguhtnsmUcyT7btE6DgI3WIunRX26oa2VNdNEBCLE44hSpp5vS+zYLtiDtvwpcQp0qjdJ6C2G3WTA2JaplIPR9QsbV8MbuBkVDGvpwBN/MGM0TQ0+2amwO+Jcc27A7o9dVjdPyNCMnaaeJgayvj1Bo4JXeJjgB5TckDJBts3N5YNw83wFqSm7tp/qpRfl43GCXwqR73vckuWirAEN4Je4KSOIhyeGbs7r9O9getolmBVVTUNUUDlcstapD0ztQDxtK9M98mTEcvat5E2h6byuAZH3dUXPtZ1NuhjLerNzroT5BliZza9P/8vA+rO1U+8l3Lmojgwi/OOyejLBV997nfNUi3steYxMrbg3sOPL3ZsCtd23t0v8WM= 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:(13230025)(4636009)(366004)(39860400002)(346002)(136003)(376002)(396003)(451199018)(478600001)(110136005)(6506007)(6666004)(6512007)(26005)(186003)(66556008)(66574015)(41300700001)(66946007)(66476007)(316002)(6486002)(4326008)(8676002)(53546011)(83380400001)(8936002)(44832011)(5660300002)(2906002)(38100700002)(31696002)(86362001)(54906003)(31686004)(2616005)(36756003)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bFAyQk0xaTFYY2RPV1JIK2RlT1lKRS9mRXlOS0cyb3g0alVTQ29YNWkrYVZH?= =?utf-8?B?eXU1dURrSjVraGFGMU9Gd2RZeDk2MVQrNmR5eVVWTmErM3JlREphL3FqU21D?= =?utf-8?B?clhVNUkyWmZXZ0luTjhVM1RxKzhZMDl6cC9OcGxxZHd0YWFwOXp4KytRc3NH?= =?utf-8?B?UmFtRjlxNGlBcUVGQzg5VURHNHJaTTBQR000UDQwQzFpMTUxaGJXQnlidnFK?= =?utf-8?B?dkU0cFQ5Rlps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J4UnpneUl0b2o2cUJZa2M0MWYvb09tK0kzVVF4?= =?utf-8?B?WUZlUjE1K1czZ1QwWktsSWtqcXdzdTIwYkUwanZ0ME1FSFlHRVBjell1MVJz?= =?utf-8?Q?oCuAtUCPupy2+E0UQcrQdGjz1?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 250d9c52-6973-43fe-3552-08db15b07848 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Feb 2023 15:13:08.2131 (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: SR/y4wYVqJ+5DsEjHLkxOZkhWV1gCYJx8rorRMvHxCjGCeVzHTEdc0vusRbatPVI X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7501 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 2/21/2023 3:55 AM, Chaoyong He wrote: > From: Long Wu > > The usage of RTE_ETH_MQ_RX_RSS and RTE_ETH_MQ_RX_RSS_FLAG are mixed in > nfp_net_configure(), use RTE_ETH_MQ_RX_RSS_FLAG uniformly. > > Signed-off-by: Long Wu > Reviewed-by: Chaoyong He > Reviewed-by: Niklas Söderlund > --- > drivers/net/nfp/nfp_common.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c > index 907777a9e4..a545a10013 100644 > --- a/drivers/net/nfp/nfp_common.c > +++ b/drivers/net/nfp/nfp_common.c > @@ -171,7 +171,7 @@ nfp_net_configure(struct rte_eth_dev *dev) > } > > /* Checking RX mode */ > - if (rxmode->mq_mode & RTE_ETH_MQ_RX_RSS && > + if (rxmode->mq_mode & RTE_ETH_MQ_RX_RSS_FLAG && > !(hw->cap & NFP_NET_CFG_CTRL_RSS_ANY)) { > PMD_INIT_LOG(INFO, "RSS not supported"); > return -EINVAL; They are same values, but when used as a mask, flag one can be more proper. BUT, Not sure how correct to '&' an enum element, enums supposed to be abstraction on underneath values, right? For this case user should know/care enum values which is wrong, perhaps to OR flags to make enum elements was a mistake on our end. Anyway, with above usage all enum elements that has RSS_FLAG is taken into account, like 'RTE_ETH_MQ_RX_VMDQ_RSS' (RSS mode with VMDq), are you sure that is the intention, is there a chance you meant: if (rxmode->mq_mode == RTE_ETH_MQ_RX_RSS && ...) btw, what if mq_mode is 'RTE_ETH_MQ_RX_VMDQ_DCB', is it supported? I just recognized there are various similar usage in drivers, and most of them comes from same commit [1], we can discuss and fix that separately. [1] 73fb89dd6a00 ("drivers/net: fix RSS hash offload flag if no RSS")