代码拉取完成,页面将自动刷新
From da4cbebd60eab9feb65055ea849eae75683dde43 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <[email protected]>
Date: Wed, 9 Oct 2024 04:50:30 +0000
Subject: [PATCH] common/nfp: use new kvargs process API
[ upstream commit 3977d07df186e6f4c79802db19451f51703a3d60 ]
The nfp_parse_class_options() function could handle both key=value and
only-key, so it should use rte_kvargs_process_opt() instead of
rte_kvargs_process() to parse.
Signed-off-by: Chengwen Feng <[email protected]>
Acked-by: Chaoyong He <[email protected]>
---
drivers/common/nfp/nfp_common_pci.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/common/nfp/nfp_common_pci.c b/drivers/common/nfp/nfp_common_pci.c
index 723035d..5c36052 100644
--- a/drivers/common/nfp/nfp_common_pci.c
+++ b/drivers/common/nfp/nfp_common_pci.c
@@ -170,10 +170,8 @@ nfp_parse_class_options(const struct rte_devargs *devargs)
if (kvargs == NULL)
return dev_class;
- if (rte_kvargs_count(kvargs, RTE_DEVARGS_KEY_CLASS) != 0) {
- rte_kvargs_process(kvargs, RTE_DEVARGS_KEY_CLASS,
- nfp_kvarg_dev_class_handler, &dev_class);
- }
+ rte_kvargs_process_opt(kvargs, RTE_DEVARGS_KEY_CLASS,
+ nfp_kvarg_dev_class_handler, &dev_class);
rte_kvargs_free(kvargs);
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。