sync fix ioctl set failed
(cherry picked from commit eb8f8258945291802389ea0d94fc1290d0faea42)
This commit is contained in:
parent
210da617be
commit
75b40c1943
49
0171-fix-ioctl-set-failed.patch
Normal file
49
0171-fix-ioctl-set-failed.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
From 5924fd2879acbb52b12a61380b939cce30a133a9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: jiangheng <jiangheng14@huawei.com>
|
||||||
|
Date: Sun, 28 Apr 2024 10:44:15 +0800
|
||||||
|
Subject: [PATCH] fix ioctl set failed
|
||||||
|
|
||||||
|
---
|
||||||
|
src/lstack/api/lstack_wrap.c | 24 +++++++++++++++++++-----
|
||||||
|
1 file changed, 19 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/lstack/api/lstack_wrap.c b/src/lstack/api/lstack_wrap.c
|
||||||
|
index c90aa04..7101d98 100644
|
||||||
|
--- a/src/lstack/api/lstack_wrap.c
|
||||||
|
+++ b/src/lstack/api/lstack_wrap.c
|
||||||
|
@@ -690,13 +690,27 @@ static int32_t do_select(int32_t nfds, fd_set *readfds, fd_set *writefds, fd_set
|
||||||
|
if (select_posix_path() == PATH_KERNEL || \
|
||||||
|
select_fd_posix_path(_fd, &sock) == PATH_KERNEL) \
|
||||||
|
return _fcntl_fn(_fd, _cmd, val); \
|
||||||
|
- int32_t ret = _fcntl_fn(_fd, _cmd, val); \
|
||||||
|
- if (ret == -1) \
|
||||||
|
- return ret; \
|
||||||
|
- return _lwip_fcntl(_fd, _cmd, val); \
|
||||||
|
+ int32_t ret1 = _fcntl_fn(_fd, _cmd, val); \
|
||||||
|
+ if (ret1 == -1) { \
|
||||||
|
+ LSTACK_LOG(ERR, LSTACK, "fd(%d) kernel path call failed, errno is %d, maybe not error\n", \
|
||||||
|
+ _fd, errno); \
|
||||||
|
+ return ret1; \
|
||||||
|
+ } \
|
||||||
|
+ int32_t ret2 = _lwip_fcntl(_fd, _cmd, val); \
|
||||||
|
+ /*
|
||||||
|
+ * if function not implemented, fcntl get/set context will not be modifyed by user path,
|
||||||
|
+ * return kernel path result
|
||||||
|
+ */ \
|
||||||
|
+ if (ret2 == -1) { \
|
||||||
|
+ if (errno == ENOSYS) { \
|
||||||
|
+ return ret1; \
|
||||||
|
+ } \
|
||||||
|
+ LSTACK_LOG(ERR, LSTACK, "fd(%d) user path call failed, errno is %d, maybe not error\n", \
|
||||||
|
+ _fd, errno); \
|
||||||
|
+ } \
|
||||||
|
+ return ret2; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
-
|
||||||
|
/* --------------------------------------------------------
|
||||||
|
* ------- LD_PRELOAD mode replacement interface --------
|
||||||
|
* --------------------------------------------------------
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: gazelle
|
Name: gazelle
|
||||||
Version: 1.0.2
|
Version: 1.0.2
|
||||||
Release: 33
|
Release: 34
|
||||||
Summary: gazelle is a high performance user-mode stack
|
Summary: gazelle is a high performance user-mode stack
|
||||||
License: MulanPSL-2.0
|
License: MulanPSL-2.0
|
||||||
URL: https://gitee.com/openeuler/gazelle
|
URL: https://gitee.com/openeuler/gazelle
|
||||||
@ -187,6 +187,7 @@ Patch9167: 0167-fix-port-not-support-vlan-filter.patch
|
|||||||
Patch9168: 0168-fix-tcp-recv-does-not-return-pkg-when-ring-buffer-is.patch
|
Patch9168: 0168-fix-tcp-recv-does-not-return-pkg-when-ring-buffer-is.patch
|
||||||
Patch9169: 0169-add-tuple_fileter-error-info.patch
|
Patch9169: 0169-add-tuple_fileter-error-info.patch
|
||||||
Patch9170: 0170-adapt-dpdk-23.11-remove-kni.patch
|
Patch9170: 0170-adapt-dpdk-23.11-remove-kni.patch
|
||||||
|
Patch9171: 0171-fix-ioctl-set-failed.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
%{name} is a high performance user-mode stack.
|
%{name} is a high performance user-mode stack.
|
||||||
@ -228,6 +229,9 @@ install -Dpm 0640 %{_builddir}/%{name}-%{version}/src/ltran/ltran.conf %{b
|
|||||||
%config(noreplace) %{conf_path}/ltran.conf
|
%config(noreplace) %{conf_path}/ltran.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Apr 28 CST yinbin6 <yinbin8@huawei.com> - 1.0.2-34
|
||||||
|
- fix ioctl set failed
|
||||||
|
|
||||||
* Fri Apr 19 2024 yangchen555 <yangchen145@huawei.com> - 1.0.2-33
|
* Fri Apr 19 2024 yangchen555 <yangchen145@huawei.com> - 1.0.2-33
|
||||||
- adapt dpdk-23.11 remove kni
|
- adapt dpdk-23.11 remove kni
|
||||||
- add tuple_fileter error info
|
- add tuple_fileter error info
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user