From 5fe55fdd52a336f1cb9370e218efded8eeefde63 Mon Sep 17 00:00:00 2001 From: jiangheng Date: Sun, 29 Sep 2024 11:35:29 +0800 Subject: [PATCH] adapt for interrupt mode (cherry picked from commit 2c32351b0205b715b687964679acb4282b4ec8fe) --- 0168-lwip-adapt-interrupt-mode.patch | 50 ++++++++++++++++++++++++++++ lwip.spec | 6 +++- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 0168-lwip-adapt-interrupt-mode.patch diff --git a/0168-lwip-adapt-interrupt-mode.patch b/0168-lwip-adapt-interrupt-mode.patch new file mode 100644 index 0000000..a43610e --- /dev/null +++ b/0168-lwip-adapt-interrupt-mode.patch @@ -0,0 +1,50 @@ +From 2516715e8d2987b5dffc0226d67850d84891b236 Mon Sep 17 00:00:00 2001 +From: jiangheng +Date: Mon, 23 Sep 2024 21:38:53 +0800 +Subject: [PATCH] lwip: adapt interrupt mode + +--- + src/api/sys_arch.c | 6 +++++- + src/include/arch/sys_arch.h | 2 +- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/api/sys_arch.c b/src/api/sys_arch.c +index dcfd0a4..4c42950 100644 +--- a/src/api/sys_arch.c ++++ b/src/api/sys_arch.c +@@ -76,14 +76,18 @@ u64_t sys_now_us(void) + return (rte_rdtsc() / g_sys_cycles_per_us); + } + +-void sys_timer_run(void) ++u32_t sys_timer_run(void) + { + u32_t sleeptime; + + sleeptime = sys_timeouts_sleeptime(); + if (sleeptime == 0) { + sys_check_timeouts(); ++ /* get netx timeout */ ++ sleeptime = sys_timeouts_sleeptime(); + } ++ ++ return sleeptime; + } + + /* +diff --git a/src/include/arch/sys_arch.h b/src/include/arch/sys_arch.h +index 55c204f..edaab4f 100644 +--- a/src/include/arch/sys_arch.h ++++ b/src/include/arch/sys_arch.h +@@ -89,7 +89,7 @@ u8_t *sys_hugepage_malloc(const char *name, unsigned size); + void sys_mempool_var_init(struct memp_desc *memp, char *desc, u16_t size, u16_t num, + u8_t *base, struct memp **tab, struct stats_mem *stats); + +-void sys_timer_run(void); ++u32_t sys_timer_run(void); + u32_t sys_now(void); + u64_t sys_now_us(void); + +-- +2.33.0 + diff --git a/lwip.spec b/lwip.spec index 49cffd1..9872374 100644 --- a/lwip.spec +++ b/lwip.spec @@ -4,7 +4,7 @@ Summary: lwip is a small independent implementation of the TCP/IP protocol suite Name: lwip Version: 2.2.0 -Release: 57 +Release: 58 License: BSD URL: http://savannah.nongnu.org/projects/lwip/ Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip @@ -179,6 +179,7 @@ Patch9163: 0164-LWIPOPTS-support-setsockopt-SO_SNDBUF.patch Patch9164: 0165-LOG-modified-gazelle-log-level-and-add-item-in-mib2.patch Patch9165: 0166-cleancode-rename-log-level.patch Patch9166: 0167-lwip-add-pingpong-mode-support.patch +Patch9167: 0168-lwip-adapt-interrupt-mode.patch BuildRequires: gcc-c++ dos2unix dpdk-devel @@ -208,6 +209,9 @@ cd %{_builddir}/%{name}-%{version}/src %{_libdir}/liblwip.a %changelog +* Fri Sep 27 2024 jiangheng - 2.2.0-58 +- adapt for interrupt mode + * Fri Sep 27 2024 jiangheng - 2.2.0-57 - add pingpong mode support -- Gitee