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 39F1B41D9B; Tue, 28 Feb 2023 11:19:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC35640EE4; Tue, 28 Feb 2023 11:19:12 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2066.outbound.protection.outlook.com [40.107.96.66]) by mails.dpdk.org (Postfix) with ESMTP id 7CF024021F for ; Tue, 28 Feb 2023 11:19:11 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fFEkDJczEoK/WpDFC0z76NEHtSbp0ueqh7PLP9xBJOwr9ZU132e6CcfzpKFsAeH07N60OdDYOkiE8T74jBaYeYSaljI4BzlttpvQVaK/q/ULZ+J5hilK7NyvdKxgz9Z4eSSxrIoys7/1Z1Mm4gHCP8wRG6CFz6LIiT4x2GNw0cEFWk8+/n663RxLebmT4CqoTJTk34tceky3AEqvn7GCN2tGOMosEiJPu2mPcGrfioDn8w/Elmq1+wv9oHvGpDtEJKd6qxkDoE6kVrvRp4iICMpoJ9QRkinV4wsO4ZKGSDwFNWTXSjue5RhBp8GEEyq/Z5lfRE87ruuLLiyEclSyeg== 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=vlH9gUNCtFtptk4Yw7DZwsbMb/RBbAT+s0VQJAMo53g=; b=MNXXvU2WuctBarlE///2xyDo96p78LSi5To1GCK4KJy791agHH5m5ZANd7LFV26cH+S1H1235fRKlnjUpoj81PcmOiNwBG2nA20ca1VDm2SqlMvuyWSjhLdQyIn1iHuQEFHq7Ra9FXvR4mPhmvNLTof9Tsjn2B8LZly1IQoEuIPt5Y04rhqYaFjKnCfPtF2ooX8zxU51S95n1Np0pXnqW57koGUeIUkmkA6PLf3jEybNJT9sSZ5sMOUQiSY2ACbrmiJ1JZwXCWYfUJyfOWkzkWDmScgVid6kTxNHW6XN0CwnsHQakWW7iZnCLnI1MCgj7PFmvkhlXvPZSnQGEyY9FA== 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=vlH9gUNCtFtptk4Yw7DZwsbMb/RBbAT+s0VQJAMo53g=; b=34/4Wr5fRAOV72iDHz59ElwJ3IqDCIQVvvKRCsvbu7/CFh9rJcVRYXfqYDQmpPuQFG4oxJhI6WF021VqapfNF0rwi3PrGST/NAyyf5zcPQfkW8E/Vhubh4CAw5CBz1aKPY4LyGNZtCi7ugoIez9jGRIGbi4c25bDkZoxzO34z9E= 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 CH0PR12MB5058.namprd12.prod.outlook.com (2603:10b6:610:e1::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.30; Tue, 28 Feb 2023 10:19: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%7]) with mapi id 15.20.6134.030; Tue, 28 Feb 2023 10:19:08 +0000 Message-ID: Date: Tue, 28 Feb 2023 10:19: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 , Niklas Soderlund , 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> <06caff77-f4d1-6039-341b-512ef6198152@amd.com> From: Ferruh Yigit Subject: Re: [PATCH v2 1/2] net/nfp: standardize the use of RSS-related codes In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0542.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:319::7) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CH0PR12MB5058:EE_ X-MS-Office365-Filtering-Correlation-Id: 68c5a901-ebf8-4159-a58a-08db19753a0e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iIK9ev3pKw4bJot5OyujuqbV/uTQKajrjbXuF2EbtXnP1wbBqfWKXLzExGjO+cVqRzXV/ECFFQq0jP1fa7eqHqF6A1GSMK3wXy/TykxxbxmU29jBDGi9rPqBqOGKBFujtt4E4xnBMFaVOUn1XUI4L0j0h31oUsIllg1sLX2ImDFfG2M5xvbUWoZtK9eSW7QOD/avMcpjTN7hy5g1rJ6JsU+3fR3oeA09GdneLKD4sH/A5Ym8mNBjv3+VCnZSlJamUHqBAokFSdnRqXOsv6xpGadZ51bb1KQHl1n+a271+Zrzaso7lrqFtGZFDq2Ws/Vt19IqD5UrMw0jM6VeTGJPg9pea6IzIYl5ivQ13TKff2EGSU23trj0f1lLz/V1Bxb1IDOywFou5Aie9WivcxqltOqAjGphI3vcAt9xHv0pl3iVMlG2WEu4tqtKLCtaVybN4JNdxzuD4pI2SQz8UeaeDzQks9a+copBycA0l9s0PO3npU9t3QYvGjnBOYtjFB24vjFOfRa4GXmjJfzyJMAgPGt2sXIhHPIwM+gU8dr/Z9pKy0IqxdlUsgBWPo7XT8Md1EJq4silHIcrQD1aQNwYmhPkOLnv8h96ahUK+FNXhqc9HEsX/whGFU/FjXPY8PUDS/3Ko3T+wiT03dwraT6J2nxThlXT7xcD63kmTwXoG1Sl9OrLtUQO5oHUWqY5PcYgjzSyRW9Paju2AT9ZqtcwfQ1KRk74JwniQa8LxXqnK+A= 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)(396003)(136003)(376002)(346002)(451199018)(38100700002)(86362001)(31696002)(36756003)(2906002)(44832011)(66946007)(66556008)(66476007)(41300700001)(8676002)(4326008)(5660300002)(8936002)(2616005)(53546011)(6512007)(6506007)(186003)(26005)(83380400001)(66574015)(110136005)(54906003)(478600001)(316002)(6666004)(6486002)(31686004)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cWh0LzJuSjBrd3BncmhlYWttTE9LSjNZQVFQWnh2MnAxai9STGhTZG9sVnRY?= =?utf-8?B?a01RSVI3VUxyb013ajVYNjAyZG4xWEV4b1kreHVaMnN0S0RxUUtSZldnVUwz?= =?utf-8?B?Tkp1OVRGcGxwK0RtenRPMEJuK3hEL1BtNFJmMjBVcEJJVVlRVU9SZXAwN2h0?= =?utf-8?B?SWtLNWJFWXp4dWVHaHdNM1NKNjRyVHlNVzgyK2k3WHBNalBiRldpMzdoNFdw?= =?utf-8?B?MXE1d1ZZMWc0Q25oenF6S1ZGRVh4aFNVSHBpOVBvR3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kdXc4TTBoVW5CMWhXWmpsVS9KVEp0ZTdIaXp4ZWYyVXBvRTZ4?= =?utf-8?Q?iGWhQJUIPnNjMWr+4wZ4DwFkE?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 68c5a901-ebf8-4159-a58a-08db19753a0e X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Feb 2023 10:19:08.0994 (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: pYgn7tQls/sg0PxZf7vn5UXQ+QqW1aGmmvN/BoOHa4judE0F7vp/MHn+OFEU3OJK X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5058 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/28/2023 8:46 AM, Chaoyong He wrote: >> 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? >> > For now, we don't support 'RTE_ETH_MQ_RX_VMDQ_DCB'. > My point was it is not checked in the driver, and that is the case for most of the drivers, which means if user requests it, it will be silently ignored, and if application depends on this feature this will break the app. So 'mq_mode' config option is not honored properly, for majority of the cases all user/driver interested in is RSS, only a few drivers that support other multi queue modes handles other cases. We may improve this bit better in the ethdev layer, like providing a mq_mode capability, etc... >> >> 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. >> > I saw you plan drop the RFC commit [1], so what we should do about this patch? > 1. Keep our modify. > 2. Follow your modify. > 3. We just drop this commit. (your patch series will correct it anyway). > Please give me an advice to guide my next move, thanks. > Keep your modify, when we continue to '&' 'rxmode->mq_mode' value, should use _FLAG as you are updating in your patch. >> [1] >> 73fb89dd6a00 ("drivers/net: fix RSS hash offload flag if no RSS")