reinit support ok
This commit is contained in:
parent
c5540e65a4
commit
0eb6029669
39
0019-reinit-support-return-ok.patch
Normal file
39
0019-reinit-support-return-ok.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From d6d940b4a57cefdfa8efe751480cd4e7a1c10613 Mon Sep 17 00:00:00 2001
|
||||
From: wuchangsheng <wuchangsheng2@huawei.com>
|
||||
Date: Thu, 6 Oct 2022 17:09:03 +0800
|
||||
Subject: [PATCH] reinit support return ok
|
||||
|
||||
---
|
||||
lib/librte_eal/linux/eal/eal.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c
|
||||
index 92f1b56..7673b18 100644
|
||||
--- a/lib/librte_eal/linux/eal/eal.c
|
||||
+++ b/lib/librte_eal/linux/eal/eal.c
|
||||
@@ -1081,6 +1081,7 @@ rte_eal_init(int argc, char **argv)
|
||||
int i, fctret, ret;
|
||||
pthread_t thread_id;
|
||||
static rte_atomic32_t run_once = RTE_ATOMIC32_INIT(0);
|
||||
+ static uint32_t reinit_ok = 0;
|
||||
const char *p;
|
||||
static char logid[PATH_MAX];
|
||||
char cpuset[RTE_CPU_AFFINITY_STR_LEN];
|
||||
@@ -1094,7 +1095,14 @@ rte_eal_init(int argc, char **argv)
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ if (argc > 1 && !strncmp(argv[1], "reinit-ok", strlen("reinit-ok"))) {
|
||||
+ reinit_ok = 1;
|
||||
+ }
|
||||
+
|
||||
if (!rte_atomic32_test_and_set(&run_once)) {
|
||||
+ if (reinit_ok) {
|
||||
+ return 0;
|
||||
+ }
|
||||
rte_eal_init_alert("already called initialization.");
|
||||
rte_errno = EALREADY;
|
||||
return -1;
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: dpdk
|
||||
Version: 19.11
|
||||
Release: 20
|
||||
Release: 21
|
||||
Packager: packaging@6wind.com
|
||||
URL: http://dpdk.org
|
||||
%global source_version 19.11
|
||||
@ -43,6 +43,7 @@ Patch33: 0017-fix-internal-cfg-and-fbarray-attach-mememory-leak.patch
|
||||
Patch34: 0018-fix-error-that-the-secondary-attach-fails-due-to-detach.patch
|
||||
Patch35: CVE-2021-3839.patch
|
||||
Patch36: CVE-2022-0669.patch
|
||||
Patch37: 0019-reinit-support-return-ok.patch
|
||||
|
||||
Patch6000: backport-vhost-handle-mbuf-allocation-failure.patch
|
||||
Patch6001: backport-0001-CVE-2022-2132.patch
|
||||
@ -200,6 +201,9 @@ strip -g $RPM_BUILD_ROOT/lib/modules/${namer}/extra/dpdk/rte_kni.ko
|
||||
/usr/sbin/depmod
|
||||
|
||||
%changelog
|
||||
* Thu Oct 6 2022 wuchangsheng <wuchangsheng2@huawei.com> - 19.11-21
|
||||
- reinit support return ok
|
||||
|
||||
* Fri Sep 9 2022 jiangheng <jiangheng14@huawei.com> - 19.11-20
|
||||
- fix CVE-2022-28199
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user