17 Star 12 Fork 76

src-openEuler/dpdk

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0072-common-nfp-use-new-kvargs-process-API.patch 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
huangdengdui 提交于 2024-11-11 18:33 . sync some patchs from upstreaming
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/dpdk.git
[email protected]:src-openeuler/dpdk.git
src-openeuler
dpdk
dpdk
master

搜索帮助