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 D0F1942369; Wed, 11 Oct 2023 20:13:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 65CA6400EF; Wed, 11 Oct 2023 20:13:40 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2070.outbound.protection.outlook.com [40.107.237.70]) by mails.dpdk.org (Postfix) with ESMTP id A262B400D7 for ; Wed, 11 Oct 2023 20:13:39 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HIMotutgQpqsTkpDzbG9aVMxC+AfNu+KLB3IqY/DfGLsvzxYtNAe6sDMRJBMeQCcfgC976QHgahbC12lePCsFsrRBfAMf6VtC+5BtPq9AJGmiv8by59KcYmnKQqLqL33O6uYaRHgLlQj7W8xkqD8Q6h3haKxngjK7LIzSVSbJcwgLMvWuk2yKZnRueWPuc/iY7egWaD9CO8LRGP3+RJU/qLUQsUGmUjHFc62GJaEKPldwDj9T1Touj2wxSsCYGz4Pmsn0mSEEcQkVpLZU+AsnBY/15ta2lc99JKOCA2Bwkdp7RIdba+7HZM75fPL31ItpaWo7d0d6nx8AgjR8/TzVA== 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=ZHIPQVbl0Vge/x946hcal9GyG74UddkaEOmIq+bLGGk=; b=Fcw8E2eCOdZOvpdIWii02LkwZr5hpIE4UlD/KV7tT4ZIlEBNdBmgAaQUyhSi1aS1ZyiWyKaCW6e5dRaImFVcAkUzh2qSVj+odJAe9du8T3uEMBc/pssf0gh4C0mRmVakRDpqgBb9f1Ke7dyuf8qbO43dEc8gDnLRNBkyQxSLvkcdMvfYI/76i0fKaOeFOcDPDfoKqTLNjKksNdOuk2ctAhNdUjmqBRd/9VgoWe1I0sx6at5ZgxqXD18dPZWt13X5oDuPsMkcOinOq5d7tjEYNU4boXAZvdIWkgDY1SqXFykkE7LFsWTUzQGVqzVphY80O/msQwjas10JNpSMud02xg== 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=ZHIPQVbl0Vge/x946hcal9GyG74UddkaEOmIq+bLGGk=; b=Hqp1rpEPso8TCLTE0q0jcFVadLxE1lR2bAlzJHugnN2MqOaNOg8jKsN9daYwNohCr68e6LlKA4p28opKJPawAYA23Z6RFlquZr5ngbLjwiejsd0hsSn+UhMtVbbJolSgi9YJpnaVGqxPvmO8VRfHqTGUoGLfvoIpYTWaNY9CfY4= 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 CH2PR12MB4214.namprd12.prod.outlook.com (2603:10b6:610:aa::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.37; Wed, 11 Oct 2023 18:13:37 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::102f:c69b:d3e5:7fe8]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::102f:c69b:d3e5:7fe8%4]) with mapi id 15.20.6863.032; Wed, 11 Oct 2023 18:13:37 +0000 Message-ID: Date: Wed, 11 Oct 2023 19:13:33 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 33/40] net/tap: check RSS hash algorithms Content-Language: en-US To: Jie Hai , dev@dpdk.org Cc: lihuisong@huawei.com, fengchengwen@huawei.com, liudongdong3@huawei.com References: <20230908080030.3837515-1-haijie1@huawei.com> <20231011092805.693171-1-haijie1@huawei.com> <20231011092805.693171-34-haijie1@huawei.com> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRTPtCKKm/6BQJjb9DJBQkC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jx8wb4j68umG2X++0dSta5eHAVhmtXvrqPW6Ku 3FQ= In-Reply-To: <20231011092805.693171-34-haijie1@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PR1P264CA0079.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:2cc::15) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CH2PR12MB4214:EE_ X-MS-Office365-Filtering-Correlation-Id: c90bd0d9-5b5e-4ea9-3686-08dbca85ca17 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mWWW579tCNhdzxtSOko37RpotMIYUO5NDxRE36NYtiL4WRTv72fixOvEHo1IjIaoHjzs2NUTxULcHu+G9qCFL7/sjxxksQEfpvXZGfTIl6RkZvlMo/lffgguwzBGQlnyDcTJ2vg8MdsDLOi6c6llE1UQAE4tACDKdHJO6YqDoSbzncmY973WU5WxFHqRijTSQdiwZCaqMOUruI+8VMriSW6brKsHz32gkIf10x3RPuWGbOuWScR7xxT5mKn2Zt+hq8H6nlLAMcAL7b2nZ1XTVYjNF9PX6GtAKbdlDfRCCFMVS1qb4TGenGbqT+CJuX3bfQFslw4ULMDxUrL6GB05+JU3CYwYBgsdB0vRJRblFL5L2DJ5nClxivmdzrUaZOvOH+N2Ax8T/LitfoGWrFj+yADNwch8bv13kyLQg9G8IKNrBuEt4QlE4p3/UZGm//XELD2diDh3l5oIWCFaSvfr7Lfb0Kx3M11ucrHXwGex+dELa6r0V1wgU5vHcCr+/yesgziJzEwuADAatWpeWBN3kcE0DuiPbF9jaepAriK5+v6NbsykUKmqGBHQtvEmmchTtDbf0QTBLosMmNlJAZxnVmX20pVFpN6BTK5FPEe+PEyJI0KRW6HIRqlPxSh//ST3R5oB/SeBmPj6DCI2mbQ8jw== 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:(13230031)(346002)(136003)(366004)(376002)(39860400002)(396003)(230922051799003)(64100799003)(186009)(1800799009)(451199024)(4326008)(66476007)(5660300002)(8676002)(44832011)(41300700001)(8936002)(6486002)(316002)(66946007)(31686004)(66556008)(2906002)(83380400001)(26005)(53546011)(86362001)(2616005)(38100700002)(36756003)(6506007)(6512007)(6666004)(478600001)(31696002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cUhXU285c2JoRUwwWUtFcXVnT1pLMkJCUzJaMkFXUE9LWm1JSitnUkRCM2VN?= =?utf-8?B?a3o1dkQzNVJsRlVzR0xsODZjUWRGZVowMjI4ekYvSzhDSklLaXM2SzVveWRu?= =?utf-8?B?SXFSWllucjROOWZTTzFEYm9LcE96ZEp0STYyK2RGNWp0OEY5Q3NmTzV4QjV6?= =?utf-8?B?ODNOWEVTZGlTZ20xRzZxbGEycHN0V1hFWmhuYmFCYk1WQlk5bGJHQ0REekpG?= =?utf-8?B?SEh2MjQyZllxN3lBUWN3K2I2OFJZc2t3eVlUYkxXS01mS2FzeDEyOTFrZXFQ?= =?utf-8?B?MER3U25YYVMwNmk1bUV4Z0tSQUpseml6SkxHRlVHWk4rTWxHcVVKTXQyVXQy?= =?utf-8?B?NDZZV01aTHkyWG1icXFqNlJCajFEczJ1MHIwbEJpS2Nxb3R0bFZQNVFidWlh?= =?utf-8?B?ZnhWcTlNOXdVS0dtMStHSEZwbjZ3K0tjbHZDZk1FZVQ3TjNRWnlqOXNwb0xQ?= =?utf-8?B?UmMxSml4QkQwQ24rbWE3R09lSThHbTBoSS8xaXExdFBFNVd6a2phdU94M1M4?= =?utf-8?B?YVd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V2RmY2SlMw?= =?utf-8?B?WUlsZ0JzbHJ3WkMzWlNKTlFFeWRhWkcvdmRiVzhlV2pYTUE0T0pEeE9Od0hk?= =?utf-8?B?RlRObUR2NTdJQlRZeGg5VVZYbUJFUnJGSDUzL0NRWWdYWTFncGdueGVGbHJS?= =?utf-8?B?SVVLa2VkV24zbmZTLzdHb25oNlJxUzgvNHBOeWdEVU96ZlhpZEJ0V25yczJ0?= =?utf-8?B?SGFTcFFKS2RzWkV3RytVUlcvSVRnK0Q4QU8wSzdtU1d2MFMzb0d6MElwUnlU?= =?utf-8?B?TWhvcjRwZHhUVUQrRWRzc0Y3WjM4OFJLM2FMTlBYWjl1M3Y1Z21yM0tQcFNs?= =?utf-8?B?cmJoVERwWVIrdUdsK0RGR3pvaTNsVGh0cFpBVy9HTFV1NnExajl1SmNJRHR5?= =?utf-8?B?blFsQnpoK2kvcmtJV0k3OEt6VmNpWGdCNHJtbDc3Yk8wdHk3WVdiV2R6S0J0?= =?utf-8?B?VGtlQkRncFhxbm9MU2IvNzB1WlhwS1V2cmFobEIzbjh6dzA2dDdzTStPckd4?= =?utf-8?B?WG9GN1BUTmR1WWFRK2w2UDJGM2hZZWRaKzJrWFY1US9NM3g4anNFQ0FpWHh1?= =?utf-8?B?VnhPMXB4VHdvYjBwdjltMktORlZOdE5ESG1TOFFDQ3pJYk1NMk5DeTJSdy9L?= =?utf-8?B?YzNldE1hTFlrN1BhaEcySk9MR2pnZG0vWUIyaDNVMzZlQlhFbWRFNUxyNHFN?= =?utf-8?Q?zuAg3AT75KsPf7i9BgGmiH9rL?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c90bd0d9-5b5e-4ea9-3686-08dbca85ca17 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2023 18:13:37.5335 (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: EIMJob/pMGeVLvG1JSVWQSnCrqu5uhNXOWeZD+JrCvygG1VhgBBbn4Dw3Cqcz2wg X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4214 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 10/11/2023 10:27 AM, Jie Hai wrote: > A new field 'algorithm' has been added to rss_conf, check it > in case of ignoring unsupported values. > > Signed-off-by: Jie Hai > --- > drivers/net/tap/rte_eth_tap.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c > index b25a52655fa2..5e4813637f0b 100644 > --- a/drivers/net/tap/rte_eth_tap.c > +++ b/drivers/net/tap/rte_eth_tap.c > @@ -1038,6 +1038,10 @@ tap_dev_configure(struct rte_eth_dev *dev) > TAP_LOG(INFO, "%s: %s: RX configured queues number: %u", > dev->device->name, pmd->name, dev->data->nb_rx_queues); > > + if (dev->data->dev_conf.rx_adv_conf.rss_conf.algorithm != > + RTE_ETH_HASH_FUNCTION_DEFAULT) > + return -EINVAL; > + > return 0; > } > > @@ -1894,6 +1898,10 @@ tap_rss_hash_update(struct rte_eth_dev *dev, > rte_errno = EINVAL; > return -rte_errno; > } > + if (rss_conf->algorithm != RTE_ETH_HASH_FUNCTION_DEFAULT) { > + rte_errno = EINVAL; > + return -rte_errno; > + } > if (rss_conf->rss_key && rss_conf->rss_key_len) { > /* > * Currently TAP RSS key is hard coded Similar to null PMD, I think 'tap_dev_configure()' update can be dropped.