lwipopts: add lwip debug log macro
(cherry picked from commit 57bff555e8e4a2484f243ddb6b8d9808afbc7218)
This commit is contained in:
parent
119fff08b7
commit
22a23033c5
75
0083-lwipopts-add-lwip-debug-log-macro.patch
Normal file
75
0083-lwipopts-add-lwip-debug-log-macro.patch
Normal file
@ -0,0 +1,75 @@
|
||||
From afa156f10bdabe937e37080918f669937343eb54 Mon Sep 17 00:00:00 2001
|
||||
From: yangchen <yangchen145@huawei.com>
|
||||
Date: Tue, 28 Nov 2023 09:22:34 +0800
|
||||
Subject: [PATCH] lwipopts: add lwip debug log macro
|
||||
|
||||
---
|
||||
src/include/lwiplog.h | 15 ++++++++-------
|
||||
src/include/lwipopts.h | 10 +++++++++-
|
||||
2 files changed, 17 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/include/lwiplog.h b/src/include/lwiplog.h
|
||||
index f278ff4..80ed0fc 100644
|
||||
--- a/src/include/lwiplog.h
|
||||
+++ b/src/include/lwiplog.h
|
||||
@@ -43,21 +43,22 @@
|
||||
|
||||
#if GAZELLE_USE_DPDK_LOG
|
||||
|
||||
-#define LWIP_LOG_WARN LWIP_DBG_LEVEL_WARNING
|
||||
-#define LWIP_LOG_ERROR LWIP_DBG_LEVEL_SERIOUS
|
||||
-#define LWIP_LOG_FATAL LWIP_DBG_LEVEL_SEVERE
|
||||
+#define LWIP_LOG_WARN LWIP_DBG_LEVEL_WARNING
|
||||
+#define LWIP_LOG_ERROR LWIP_DBG_LEVEL_SERIOUS
|
||||
+#define LWIP_LOG_FATAL LWIP_DBG_LEVEL_SEVERE
|
||||
+#define RTE_LOGTYPE_LWIP RTE_LOGTYPE_USER2
|
||||
|
||||
#define LWIP_PLATFORM_LOG(level, fmt, ...) \
|
||||
do { \
|
||||
if ((level) & LWIP_LOG_FATAL) { \
|
||||
- RTE_LOG(ERR, EAL, fmt, ##__VA_ARGS__); \
|
||||
+ RTE_LOG(ERR, LWIP, fmt, ##__VA_ARGS__); \
|
||||
abort(); \
|
||||
} else if ((level) & LWIP_LOG_ERROR) { \
|
||||
- RTE_LOG(ERR, EAL, fmt, ##__VA_ARGS__); \
|
||||
+ RTE_LOG(ERR, LWIP, fmt, ##__VA_ARGS__); \
|
||||
} else if ((level) & LWIP_LOG_WARN) { \
|
||||
- RTE_LOG(WARNING, EAL, fmt, ##__VA_ARGS__); \
|
||||
+ RTE_LOG(WARNING, LWIP, fmt, ##__VA_ARGS__); \
|
||||
} else { \
|
||||
- RTE_LOG(INFO, EAL, fmt, ##__VA_ARGS__); \
|
||||
+ RTE_LOG(INFO, LWIP, fmt, ##__VA_ARGS__); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
diff --git a/src/include/lwipopts.h b/src/include/lwipopts.h
|
||||
index 9ab5cde..06b3ae5 100644
|
||||
--- a/src/include/lwipopts.h
|
||||
+++ b/src/include/lwipopts.h
|
||||
@@ -41,7 +41,6 @@
|
||||
#define LWIP_PERF 1
|
||||
#define LWIP_RECORD_PERF 0
|
||||
|
||||
-//#define LWIP_DEBUG 1
|
||||
#define GAZELLE_USE_DPDK_LOG 1
|
||||
|
||||
#define GAZELLE_ENABLE 1
|
||||
@@ -262,6 +261,15 @@
|
||||
|
||||
#define SIOCSHIWAT 1
|
||||
|
||||
+/*
|
||||
+ ------------------------------------
|
||||
+ --------- Debug log options --------
|
||||
+ ------------------------------------
|
||||
+*/
|
||||
+#define LWIP_DEBUG 1
|
||||
+
|
||||
+#define GAZELLE_DEBUG LWIP_DBG_ON
|
||||
+
|
||||
/*
|
||||
------------------------------------
|
||||
---------- Netif options ----------
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
|
||||
Name: lwip
|
||||
Version: 2.1.3
|
||||
Release: 85
|
||||
Release: 86
|
||||
License: BSD
|
||||
URL: http://savannah.nongnu.org/projects/lwip/
|
||||
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip
|
||||
@ -96,6 +96,7 @@ Patch9078: 0079-enable-vlan-define.patch
|
||||
Patch9079: 0080-enable-ipv6.patch
|
||||
Patch9080: 0081-ip6-hdr.patch
|
||||
Patch9081: 0082-add-vlanid-in-netif.patch
|
||||
Patch9082: 0083-lwipopts-add-lwip-debug-log-macro.patch
|
||||
|
||||
BuildRequires: gcc-c++ dos2unix dpdk-devel
|
||||
|
||||
@ -126,7 +127,10 @@ cd %{_builddir}/%{name}-%{version}/src
|
||||
%{_libdir}/liblwip.a
|
||||
|
||||
%changelog
|
||||
* Mon Nov 27 2023 zhengjiebing <zhengjiebing@cmss.chinamobile.com> - 2.1.3-84
|
||||
* Mon Nov 27 2023 yangchen <yangchen145@huawei.com> - 2.1.3-86
|
||||
- lwipopts: add lwip debug log macro
|
||||
|
||||
* Mon Nov 27 2023 zhengjiebing <zhengjiebing@cmss.chinamobile.com> - 2.1.3-85
|
||||
- add vlan_id in netif
|
||||
|
||||
* Fri Nov 24 2023 zhangxingrong <zhangxingrong@uniontech.com> - 2.1.3-84
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user