remove chose_dlsym_handle function
(cherry picked from commit 615ffd6bbe09cf7ea41c981498b9f775e78c489e)
This commit is contained in:
parent
f523d26e67
commit
9c8e9466c6
@ -0,0 +1,63 @@
|
|||||||
|
From 970d9d6fd15c433af20bbbd7418c5e9773d58471 Mon Sep 17 00:00:00 2001
|
||||||
|
From: jiangheng <jiangheng12@huawei.com>
|
||||||
|
Date: Mon, 7 Mar 2022 21:08:13 +0800
|
||||||
|
Subject: [PATCH] remove chose_dlsym_handle function, set handle to RTLD_NEXT
|
||||||
|
|
||||||
|
---
|
||||||
|
src/api/posix_api.c | 33 +--------------------------------
|
||||||
|
1 file changed, 1 insertion(+), 32 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/api/posix_api.c b/src/api/posix_api.c
|
||||||
|
index eff9f46..bce07f5 100644
|
||||||
|
--- a/src/api/posix_api.c
|
||||||
|
+++ b/src/api/posix_api.c
|
||||||
|
@@ -64,33 +64,6 @@ void posix_api_fork(void)
|
||||||
|
posix_api->get_socket = chld_get_socket;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static int chose_dlsym_handle(void *__restrict* khandle)
|
||||||
|
-{
|
||||||
|
- void *dlhandle;
|
||||||
|
- int (*gazelle_epoll_create)(int size);
|
||||||
|
- dlhandle = dlopen ("liblstack.so", RTLD_LAZY);
|
||||||
|
- if (dlhandle == NULL) {
|
||||||
|
- return ERR_IF;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- gazelle_epoll_create = dlsym(dlhandle, "epoll_create");
|
||||||
|
- if (gazelle_epoll_create == NULL) {
|
||||||
|
- return ERR_MEM;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- dlclose(dlhandle);
|
||||||
|
-
|
||||||
|
- *khandle = RTLD_NEXT;
|
||||||
|
- if (dlsym(*khandle, "epoll_create") == gazelle_epoll_create) {
|
||||||
|
- RTE_LOG(ERR, EAL, "posix api use RTLD_DEFAULT\n");
|
||||||
|
- *khandle = RTLD_DEFAULT;
|
||||||
|
- } else {
|
||||||
|
- RTE_LOG(ERR, EAL, "posix api use RTLD_NEXT\n");
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- return ERR_OK;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
int posix_api_init(void)
|
||||||
|
{
|
||||||
|
/* the symbol we use here won't be NULL, so we don't need dlerror()
|
||||||
|
@@ -102,11 +75,7 @@ int posix_api_init(void)
|
||||||
|
|
||||||
|
posix_api = &posix_api_val;
|
||||||
|
|
||||||
|
- void *__restrict handle;
|
||||||
|
- int ret = chose_dlsym_handle(&handle);
|
||||||
|
- if (ret != ERR_OK) {
|
||||||
|
- return ret;
|
||||||
|
- }
|
||||||
|
+ void *__restrict handle = RTLD_NEXT;
|
||||||
|
|
||||||
|
/* glibc standard api */
|
||||||
|
CHECK_DLSYM_RET_RETURN(posix_api->socket_fn = dlsym(handle, "socket"));
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
@ -4,7 +4,7 @@
|
|||||||
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
|
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
|
||||||
Name: lwip
|
Name: lwip
|
||||||
Version: 2.1.3
|
Version: 2.1.3
|
||||||
Release: 6
|
Release: 7
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://savannah.nongnu.org/projects/lwip/
|
URL: http://savannah.nongnu.org/projects/lwip/
|
||||||
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.tar.gz
|
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.tar.gz
|
||||||
@ -28,6 +28,7 @@ Patch9015: 0016-lstack-support-mysql-mode.patch
|
|||||||
Patch9016: 0017-support-REUSEPOR-option.patch
|
Patch9016: 0017-support-REUSEPOR-option.patch
|
||||||
Patch9017: 0018-exec-gazelle_init_sock-before-read-event.patch
|
Patch9017: 0018-exec-gazelle_init_sock-before-read-event.patch
|
||||||
Patch9018: 0019-gazelle-reduce-copy-in-send.patch
|
Patch9018: 0019-gazelle-reduce-copy-in-send.patch
|
||||||
|
Patch9019: 0020-remove-chose_dlsym_handle-function-set-handle-to-RTL.patch
|
||||||
|
|
||||||
BuildRequires: gcc-c++ dos2unix dpdk-devel
|
BuildRequires: gcc-c++ dos2unix dpdk-devel
|
||||||
|
|
||||||
@ -56,6 +57,9 @@ cd %{_builddir}/%{name}-%{version}/src
|
|||||||
%{_libdir}/liblwip.a
|
%{_libdir}/liblwip.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 07 2022 jiangheng<jiangheng12@huawei.com> - 2.1.3-7
|
||||||
|
- remove chose_dlsym_handle function as it is redundant
|
||||||
|
|
||||||
* Mon Mar 07 2022 wu-changsheng<wuchangsheng2@huawei.com> - 2.1.3-6
|
* Mon Mar 07 2022 wu-changsheng<wuchangsheng2@huawei.com> - 2.1.3-6
|
||||||
- gazelle reduce copy in send
|
- gazelle reduce copy in send
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user