From 3ba06855aff266b6b790404238bd92d2a2d776e0 Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Sat, 10 Sep 2022 05:31:03 +0800 Subject: [PATCH] Revert "Merge branch 'develop' into ipq60xx" This reverts commit 046f5955b37c1f44f3bcd492d00992d608ff6cee, reversing changes made to ae3e435020bed3fc3e7fe1818ae5c6a0ed76363f. --- fast-classifier/Makefile | 10 ---- shortcut-fe/Makefile | 23 --------- .../fast-classifier}/fast-classifier.c | 0 .../fast-classifier}/fast-classifier.h | 0 .../fast-classifier}/nl_classifier_test.c | 0 .../fast-classifier}/userspace_example.c | 0 .../patches}/Kconfig.patch | 0 .../patches}/Makefile.patch | 0 {patches => shortcut-fe/patches}/dev.c.patch | 0 .../patches}/nf_conntrack_proto_tcp.c.patch | 0 shortcut-fe/{ => shortcut-fe}/Kconfig | 0 shortcut-fe/{ => shortcut-fe}/sfe.h | 0 shortcut-fe/{ => shortcut-fe}/sfe_backport.h | 0 shortcut-fe/{ => shortcut-fe}/sfe_cm.c | 0 shortcut-fe/{ => shortcut-fe}/sfe_cm.h | 0 shortcut-fe/{ => shortcut-fe}/sfe_ipv4.c | 0 shortcut-fe/{ => shortcut-fe}/sfe_ipv6.c | 0 .../simulated-driver}/sfe_drv.c | 0 .../simulated-driver}/sfe_drv.h | 0 simulated-driver/Makefile | 51 ++++++++++++++++--- 20 files changed, 45 insertions(+), 39 deletions(-) delete mode 100644 fast-classifier/Makefile delete mode 100644 shortcut-fe/Makefile rename {fast-classifier => shortcut-fe/fast-classifier}/fast-classifier.c (100%) rename {fast-classifier => shortcut-fe/fast-classifier}/fast-classifier.h (100%) rename {fast-classifier => shortcut-fe/fast-classifier}/nl_classifier_test.c (100%) rename {fast-classifier => shortcut-fe/fast-classifier}/userspace_example.c (100%) rename {patches => shortcut-fe/patches}/Kconfig.patch (100%) rename {patches => shortcut-fe/patches}/Makefile.patch (100%) rename {patches => shortcut-fe/patches}/dev.c.patch (100%) rename {patches => shortcut-fe/patches}/nf_conntrack_proto_tcp.c.patch (100%) rename shortcut-fe/{ => shortcut-fe}/Kconfig (100%) rename shortcut-fe/{ => shortcut-fe}/sfe.h (100%) rename shortcut-fe/{ => shortcut-fe}/sfe_backport.h (100%) rename shortcut-fe/{ => shortcut-fe}/sfe_cm.c (100%) rename shortcut-fe/{ => shortcut-fe}/sfe_cm.h (100%) rename shortcut-fe/{ => shortcut-fe}/sfe_ipv4.c (100%) rename shortcut-fe/{ => shortcut-fe}/sfe_ipv6.c (100%) rename {simulated-driver => shortcut-fe/simulated-driver}/sfe_drv.c (100%) rename {simulated-driver => shortcut-fe/simulated-driver}/sfe_drv.h (100%) diff --git a/fast-classifier/Makefile b/fast-classifier/Makefile deleted file mode 100644 index 58dd06e01..000000000 --- a/fast-classifier/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -obj-$(CONFIG_FAST_CLASSIFIER) += fast-classifier.o - -ifeq ($(SFE_SUPPORT_IPV6),) -SFE_SUPPORT_IPV6=y -endif -ccflags-$(SFE_SUPPORT_IPV6) += -DSFE_SUPPORT_IPV6 - -ccflags-y += -I$(obj)/../shortcut-fe - -obj ?= . diff --git a/shortcut-fe/Makefile b/shortcut-fe/Makefile deleted file mode 100644 index 3b1ceaa44..000000000 --- a/shortcut-fe/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# -# Makefile for Shortcut FE. -# - -obj-m += shortcut-fe.o - -ifdef SFE_SUPPORT_IPV6 -obj-m += shortcut-fe-ipv6.o -endif - -obj-m += shortcut-fe-cm.o - -shortcut-fe-objs := \ - sfe_ipv4.o - -ifdef SFE_SUPPORT_IPV6 -shortcut-fe-ipv6-objs := \ - sfe_ipv6.o -endif - -shortcut-fe-cm-objs := \ - sfe_cm.o - diff --git a/fast-classifier/fast-classifier.c b/shortcut-fe/fast-classifier/fast-classifier.c similarity index 100% rename from fast-classifier/fast-classifier.c rename to shortcut-fe/fast-classifier/fast-classifier.c diff --git a/fast-classifier/fast-classifier.h b/shortcut-fe/fast-classifier/fast-classifier.h similarity index 100% rename from fast-classifier/fast-classifier.h rename to shortcut-fe/fast-classifier/fast-classifier.h diff --git a/fast-classifier/nl_classifier_test.c b/shortcut-fe/fast-classifier/nl_classifier_test.c similarity index 100% rename from fast-classifier/nl_classifier_test.c rename to shortcut-fe/fast-classifier/nl_classifier_test.c diff --git a/fast-classifier/userspace_example.c b/shortcut-fe/fast-classifier/userspace_example.c similarity index 100% rename from fast-classifier/userspace_example.c rename to shortcut-fe/fast-classifier/userspace_example.c diff --git a/patches/Kconfig.patch b/shortcut-fe/patches/Kconfig.patch similarity index 100% rename from patches/Kconfig.patch rename to shortcut-fe/patches/Kconfig.patch diff --git a/patches/Makefile.patch b/shortcut-fe/patches/Makefile.patch similarity index 100% rename from patches/Makefile.patch rename to shortcut-fe/patches/Makefile.patch diff --git a/patches/dev.c.patch b/shortcut-fe/patches/dev.c.patch similarity index 100% rename from patches/dev.c.patch rename to shortcut-fe/patches/dev.c.patch diff --git a/patches/nf_conntrack_proto_tcp.c.patch b/shortcut-fe/patches/nf_conntrack_proto_tcp.c.patch similarity index 100% rename from patches/nf_conntrack_proto_tcp.c.patch rename to shortcut-fe/patches/nf_conntrack_proto_tcp.c.patch diff --git a/shortcut-fe/Kconfig b/shortcut-fe/shortcut-fe/Kconfig similarity index 100% rename from shortcut-fe/Kconfig rename to shortcut-fe/shortcut-fe/Kconfig diff --git a/shortcut-fe/sfe.h b/shortcut-fe/shortcut-fe/sfe.h similarity index 100% rename from shortcut-fe/sfe.h rename to shortcut-fe/shortcut-fe/sfe.h diff --git a/shortcut-fe/sfe_backport.h b/shortcut-fe/shortcut-fe/sfe_backport.h similarity index 100% rename from shortcut-fe/sfe_backport.h rename to shortcut-fe/shortcut-fe/sfe_backport.h diff --git a/shortcut-fe/sfe_cm.c b/shortcut-fe/shortcut-fe/sfe_cm.c similarity index 100% rename from shortcut-fe/sfe_cm.c rename to shortcut-fe/shortcut-fe/sfe_cm.c diff --git a/shortcut-fe/sfe_cm.h b/shortcut-fe/shortcut-fe/sfe_cm.h similarity index 100% rename from shortcut-fe/sfe_cm.h rename to shortcut-fe/shortcut-fe/sfe_cm.h diff --git a/shortcut-fe/sfe_ipv4.c b/shortcut-fe/shortcut-fe/sfe_ipv4.c similarity index 100% rename from shortcut-fe/sfe_ipv4.c rename to shortcut-fe/shortcut-fe/sfe_ipv4.c diff --git a/shortcut-fe/sfe_ipv6.c b/shortcut-fe/shortcut-fe/sfe_ipv6.c similarity index 100% rename from shortcut-fe/sfe_ipv6.c rename to shortcut-fe/shortcut-fe/sfe_ipv6.c diff --git a/simulated-driver/sfe_drv.c b/shortcut-fe/simulated-driver/sfe_drv.c similarity index 100% rename from simulated-driver/sfe_drv.c rename to shortcut-fe/simulated-driver/sfe_drv.c diff --git a/simulated-driver/sfe_drv.h b/shortcut-fe/simulated-driver/sfe_drv.h similarity index 100% rename from simulated-driver/sfe_drv.h rename to shortcut-fe/simulated-driver/sfe_drv.h diff --git a/simulated-driver/Makefile b/simulated-driver/Makefile index 39aa130f1..0c710fe9d 100755 --- a/simulated-driver/Makefile +++ b/simulated-driver/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2015 The Linux Foundation. All rights reserved. +# Copyright (c) 2015,2016 The Linux Foundation. All rights reserved. # Permission to use, copy, modify, and/or distribute this software for # any purpose with or without fee is hereby granted, provided that the # above copyright notice and this permission notice appear in all copies. @@ -11,11 +11,50 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # -# Makefile for Shortcut FE simulated driver. -# -obj-m += shortcut-fe-drv.o +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk -shortcut-fe-drv-objs := \ - sfe_drv.o +PKG_NAME:=shortcut-fe-simulated-driver +PKG_RELEASE:=1 +PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/shortcut-fe +PKG_SOURCE_PROTO:=git +PKG_SOURCE_DATE:=2021-03-17 +PKG_SOURCE_VERSION:=697977d8d0ccf0ab596e5692d08608a75dd7f33d +PKG_MIRROR_HASH:=659fa82a431e15af797a6c7069faeee02810453ad8b576c51c29f95a1761a045 + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/shortcut-fe-drv + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Support + DEPENDS:=@TARGET_ipq60xx||@TARGET_ipq806x||TARGET_ipq807x +kmod-shortcut-fe + KCONFIG:= \ + CONFIG_NET_CLS_ACT=y \ + CONFIG_XFRM=y + TITLE:=Simulated sfe driver for ECM + FILES:=$(PKG_BUILD_DIR)/simulated-driver/shortcut-fe-drv.ko +endef + +define KernelPackage/shortcut-fe-drv/Description +Simulated sfe driver which act as an adapter to convert message +between a connection manager and the SFE core engine. +endef + +define Build/Compile + $(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \ + $(KERNEL_MAKE_FLAGS) \ + $(PKG_MAKE_FLAGS) \ + M="$(PKG_BUILD_DIR)/simulated-driver" \ + EXTRA_CFLAGS="-DSFE_SUPPORT_IPV6" \ + modules +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/shortcut-fe + $(CP) -rf $(PKG_BUILD_DIR)/simulated-driver/sfe_drv.h $(1)/usr/include/shortcut-fe +endef + +$(eval $(call KernelPackage,shortcut-fe-drv))