diff --git a/net/Kconfig b/net/Kconfig
index 092a1c0902ac9205ad25831cf09be5064786be6e..e9600faa440432a05e071606c9813c97639ba2ea 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -422,6 +422,7 @@ source "net/ceph/Kconfig"
source "net/nfc/Kconfig"
source "net/psample/Kconfig"
source "net/ife/Kconfig"
+source "net/nettrace/Kconfig"
config LWTUNNEL
bool "Network light weight tunnels"
diff --git a/net/Makefile b/net/Makefile
index 45f3fbaae644e167fde0e2b63b935a21745f0fe7..0c8990098eb97484ab0feef3e4548807b3c8af2b 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -80,3 +80,4 @@ obj-$(CONFIG_XDP_SOCKETS) += xdp/
obj-$(CONFIG_MPTCP) += mptcp/
obj-$(CONFIG_MCTP) += mctp/
obj-$(CONFIG_NET_HANDSHAKE) += handshake/
+obj-$(CONFIG_NET_TRACE) += nettrace/
diff --git a/net/nettrace/Kconfig b/net/nettrace/Kconfig
new file mode 100644
index 0000000000000000000000000000000000000000..99203c71729a3092cc6dc1a3e6a2fccbe57a1d19
--- /dev/null
+++ b/net/nettrace/Kconfig
@@ -0,0 +1,6 @@
+config NET_TRACE
+ tristate "Net trace"
+ depends on KPROBES
+ default n
+ help
+ Trace net package from the kernel network proto stack.
diff --git a/net/nettrace/Makefile b/net/nettrace/Makefile
new file mode 100644
index 0000000000000000000000000000000000000000..a57c128fdba56eb8cf8e01ad1d78ec0944e66f1b
--- /dev/null
+++ b/net/nettrace/Makefile
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for nettrace.
+#
+nettrace-objs := core.o kprobe.o parser.o dump.o help.o group.o handler.o procfs.o utils.o mm.o
+obj-$(CONFIG_NET_TRACE) += nettrace.o
+
diff --git a/net/nettrace/Makefile.alone b/net/nettrace/Makefile.alone
new file mode 100644
index 0000000000000000000000000000000000000000..5f9a0aae28bfefd5aa764ec01be0ce6769429cdf
--- /dev/null
+++ b/net/nettrace/Makefile.alone
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Makefile.
+#
+
+nettrace-objs := core.o kprobe.o parser.o dump.o help.o group.o handler.o procfs.o utils.o
+obj-m := ntrace.o
+
+all: clean build
+
+build:
+ make -C $(KERNEL_DIR) M=$(shell pwd) modules
+
+clean:
+ make -C $(KERNEL_DIR) M=$(shell pwd) clean
+
+.PHONY: build
diff --git a/net/nettrace/core.c b/net/nettrace/core.c
new file mode 100644
index 0000000000000000000000000000000000000000..fdb909fc4f964b5b641133f8b334954a3d6073d9
--- /dev/null
+++ b/net/nettrace/core.c
@@ -0,0 +1,78 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Nettrace support.
+ *
+ * Copyright (C) 2025 ZTE Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#include
+#include
+#include
+#include "core.h"
+#include "help.h"
+#include "group.h"
+#include "procfs.h"
+
+enum nettrace_status nt_status = NT_INIT;
+
+#define MAX_DUMP_QUEUE_MEM_DEFAULT (SK_RMEM_MAX * 200)
+int max_dump_queue_mem = MAX_DUMP_QUEUE_MEM_DEFAULT;
+#define MAX_DUMP_SKB_CNT_DEFAULT (100 * 1000)
+unsigned int max_dump_skb_cnt = MAX_DUMP_SKB_CNT_DEFAULT;
+#define MAX_DUMP_FILE_SIZE_DEFAULT (100 * 1024 * 1024)
+unsigned int max_dump_file_size = MAX_DUMP_FILE_SIZE_DEFAULT;
+
+MODULE_DESCRIPTION("Network debugging tools \n \
+ insmod nettrace.ko \[probe=\\] \n \
+ \[output=\