mirror of
https://github.com/breeze303/nss-packages.git
synced 2025-12-16 16:57:29 +00:00
qca-nss-drv: update to 12.3.r2
This commit is contained in:
parent
779523dcc6
commit
bffc154981
@ -3,6 +3,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=libnl-nss
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_DEPENDS:=libnl
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@ -10,7 +11,7 @@ define Package/libnl-nss
|
||||
SECTION:=Libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Framework to communicate between userspace applications and the kernel.
|
||||
DEPENDS:=+libpthread +libnl +kmod-qca-nss-drv-netlink
|
||||
DEPENDS:=+libpthread +libnl +@NSS_DRV_CRYPTO_ENABLE +kmod-qca-nss-drv-netlink
|
||||
endef
|
||||
|
||||
define Package/libnl-nss/description
|
||||
@ -18,8 +19,8 @@ define Package/libnl-nss/description
|
||||
endef
|
||||
|
||||
TOOL_CFLAGS:= -I$(STAGING_DIR)/usr/include/qca-nss-clients \
|
||||
-I$(STAGING_DIR)/usr/include/qca-nss-drv \
|
||||
-I$(STAGING_DIR)/usr/include/libnl3
|
||||
-I$(STAGING_DIR)/usr/include/qca-nss-drv \
|
||||
-I$(STAGING_DIR)/usr/include/libnl3
|
||||
|
||||
TOOL_LDFLAGS:= -L$(STAGING_DIR)/lib
|
||||
|
||||
|
||||
@ -36,8 +36,9 @@ define KernelPackage/qca-nss-drv-gre
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Kernel driver for NSS (connection manager) - GRE
|
||||
DEPENDS:=@TARGET_ipq_ipq806x||TARGET_ipq806x||TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq807x||TARGET_ipq807x_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64||TARGET_ipq_ipq50xx||TARGET_ipq_ipq50xx_64 \
|
||||
+kmod-qca-nss-drv +kmod-gre6
|
||||
DEPENDS:=@(TARGET_ipq_ipq806x||TARGET_ipq806x||TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq807x||TARGET_ipq807x_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64||TARGET_ipq_ipq50xx||TARGET_ipq_ipq50xx_64||TARGET_ipq50xx) \
|
||||
+@NSS_DRV_GRE_ENABLE +kmod-gre6 \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv
|
||||
FILES:=$(PKG_BUILD_DIR)/gre/qca-nss-gre.ko $(PKG_BUILD_DIR)/gre/test/qca-nss-gre-test.ko
|
||||
AUTOLOAD:=$(call AutoLoad,51,qca-nss-gre)
|
||||
endef
|
||||
@ -51,7 +52,8 @@ define KernelPackage/qca-nss-drv-l2tpv2
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Kernel driver for NSS (connection manager) - l2tp
|
||||
DEPENDS:=+kmod-qca-nss-drv +kmod-ppp +kmod-l2tp
|
||||
DEPENDS:=@NSS_DRV_L2TP_ENABLE +kmod-ppp +kmod-l2tp \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv
|
||||
FILES:=$(PKG_BUILD_DIR)/l2tp/l2tpv2/qca-nss-l2tpv2.ko
|
||||
KCONFIG:=CONFIG_L2TP=y
|
||||
AUTOLOAD:=$(call AutoLoad,51,qca-nss-l2tpv2)
|
||||
@ -66,7 +68,8 @@ define KernelPackage/qca-nss-drv-pptp
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Kernel driver for NSS (connection manager) - PPTP
|
||||
DEPENDS:=+kmod-qca-nss-drv +kmod-pptp
|
||||
DEPENDS:=+@NSS_DRV_PPTP_ENABLE +kmod-pptp \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv
|
||||
FILES:=$(PKG_BUILD_DIR)/pptp/qca-nss-pptp.ko
|
||||
AUTOLOAD:=$(call AutoLoad,51,qca-nss-pptp)
|
||||
endef
|
||||
@ -80,7 +83,9 @@ define KernelPackage/qca-nss-drv-pppoe
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Kernel driver for NSS (connection manager) - PPPoE
|
||||
DEPENDS:=@TARGET_ipq807x +kmod-qca-nss-drv +kmod-ppp +kmod-pppoe +kmod-bonding
|
||||
DEPENDS:=+@NSS_DRV_PPPOE_ENABLE +kmod-ppp +kmod-pppoe \
|
||||
+PACKAGE_kmod-bonding:kmod-bonding \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv
|
||||
FILES:=$(PKG_BUILD_DIR)/pppoe/qca-nss-pppoe.ko
|
||||
AUTOLOAD:=$(call AutoLoad,51,qca-nss-pppoe)
|
||||
endef
|
||||
@ -94,7 +99,9 @@ define KernelPackage/qca-nss-drv-map-t
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Kernel driver for NSS (connection manager) - MAP-T
|
||||
DEPENDS:=+kmod-qca-nss-drv +kmod-nat46
|
||||
DEPENDS:=+@NSS_DRV_MAPT_ENABLE \
|
||||
+PACKAGE_kmod-nat46:kmod-nat46 \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv
|
||||
FILES:=$(PKG_BUILD_DIR)/map/map-t/qca-nss-map-t.ko
|
||||
AUTOLOAD:=$(call AutoLoad,51,qca-nss-map-t)
|
||||
endef
|
||||
@ -108,7 +115,8 @@ define KernelPackage/qca-nss-drv-tun6rd
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Kernel driver for NSS (connection manager) - tun6rd
|
||||
DEPENDS:=+kmod-qca-nss-drv +kmod-sit +6rd
|
||||
DEPENDS:=+@NSS_DRV_TUN6RD_ENABLE +kmod-sit +6rd \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv
|
||||
FILES:=$(PKG_BUILD_DIR)/qca-nss-tun6rd.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,qca-nss-tun6rd)
|
||||
endef
|
||||
@ -122,7 +130,8 @@ define KernelPackage/qca-nss-drv-tunipip6
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Kernel driver for NSS (connection manager) - DS-lite and ipip6 Tunnel
|
||||
DEPENDS:=+kmod-qca-nss-drv +kmod-iptunnel6 +kmod-ip6-tunnel
|
||||
DEPENDS:=+@NSS_DRV_TUNIPIP6_ENABLE +kmod-iptunnel6 +kmod-ip6-tunnel \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv
|
||||
FILES:=$(PKG_BUILD_DIR)/tunipip6/qca-nss-tunipip6.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,qca-nss-tunipip6)
|
||||
endef
|
||||
@ -137,7 +146,19 @@ define KernelPackage/qca-nss-drv-bridge-mgr
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Kernel driver for NSS bridge manager
|
||||
DEPENDS:=@TARGET_ipq807x +kmod-qca-nss-drv +kmod-qca-nss-drv-vlan-mgr
|
||||
DEPENDS:=@(TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq807x||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64||TARGET_ipq60xx) \
|
||||
+TARGET_ipq_ipq807x:kmod-qca-nss-drv-vlan-mgr \
|
||||
+TARGET_ipq_ipq807x_64:kmod-qca-nss-drv-vlan-mgr \
|
||||
+TARGET_ipq807x:kmod-qca-nss-drv-vlan-mgr \
|
||||
+TARGET_ipq60xx:kmod-qca-nss-drv-vlan-mgr \
|
||||
+TARGET_ipq_ipq60xx:kmod-qca-nss-drv-vlan-mgr \
|
||||
+TARGET_ipq_ipq60xx_64:kmod-qca-nss-drv-vlan-mgr \
|
||||
+@NSS_DRV_BRIDGE_ENABLE \
|
||||
+PACKAGE_kmod-bonding:kmod-bonding \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv
|
||||
ifneq ($(CONFIG_PACKAGE_kmod-qca-ovsmgr),)
|
||||
DEPENDS+=kmod-qca-ovsmgr
|
||||
endif
|
||||
FILES:=$(PKG_BUILD_DIR)/bridge/qca-nss-bridge-mgr.ko
|
||||
AUTOLOAD:=$(call AutoLoad,51,qca-nss-bridge-mgr)
|
||||
endef
|
||||
@ -150,7 +171,9 @@ define KernelPackage/qca-nss-drv-clmapmgr
|
||||
SECTION:=kernel
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
DEPENDS:=+kmod-qca-nss-drv +kmod-qca-nss-drv-eogremgr
|
||||
DEPENDS:=+@NSS_DRV_CLMAP_ENABLE \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv \
|
||||
+kmod-qca-nss-drv-eogremgr
|
||||
TITLE:=NSS clmap Manager for QCA NSS driver
|
||||
FILES:=$(PKG_BUILD_DIR)/clmapmgr/qca-nss-clmapmgr.ko
|
||||
endef
|
||||
@ -164,7 +187,9 @@ define KernelPackage/qca-nss-drv-dtlsmgr
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Kernel driver for NSS (connection manager) - dtlsmgr
|
||||
DEPENDS:=+kmod-qca-nss-drv +kmod-qca-nss-cfi-cryptoapi
|
||||
DEPENDS:=+@NSS_DRV_DTLS_ENABLE \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv \
|
||||
+PACKAGE_kmod-qca-nss-cfi-cryptoapi:kmod-qca-nss-cfi-cryptoapi
|
||||
FILES:=$(PKG_BUILD_DIR)/dtls/$(DTLSMGR_DIR)/qca-nss-dtlsmgr.ko
|
||||
endef
|
||||
|
||||
@ -177,7 +202,10 @@ define KernelPackage/qca-nss-drv-tlsmgr
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Kernel driver for NSS (connection manager) - tlsmgr
|
||||
DEPENDS:=@TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq807x||TARGET_ipq807x_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64 +kmod-qca-nss-drv +kmod-qca-nss-cfi-cryptoapi
|
||||
DEPENDS:=@(TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq807x||TARGET_ipq807x_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64||TARGET_ipq60xx) \
|
||||
+@NSS_DRV_TLS_ENABLE \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv \
|
||||
+PACKAGE_kmod-qca-nss-cfi-cryptoapi:kmod-qca-nss-cfi-cryptoapi
|
||||
FILES:=$(PKG_BUILD_DIR)/tls/qca-nss-tlsmgr.ko
|
||||
endef
|
||||
|
||||
@ -190,8 +218,11 @@ define KernelPackage/qca-nss-drv-ipsecmgr
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Kernel driver for NSS (ipsec manager) - ipsecmgr
|
||||
DEPENDS:=@TARGET_ipq806x||TARGET_ipq_ipq806x||TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq807x||TARGET_ipq807x_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64 \
|
||||
+kmod-qca-nss-drv +kmod-qca-nss-ecm +kmod-qca-nss-cfi-cryptoapi
|
||||
DEPENDS:=@(TARGET_ipq806x||TARGET_ipq807x) \
|
||||
+@NSS_DRV_TSTAMP_ENABLE \
|
||||
+@NSS_DRV_IPSEC_ENABLE \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv \
|
||||
+PACKAGE_kmod-qca-nss-cfi-cryptoapi:kmod-qca-nss-cfi-cryptoapi
|
||||
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-l2tpv2),)
|
||||
DEPENDS+=+kmod-qca-nss-drv-l2tpv2
|
||||
endif
|
||||
@ -208,8 +239,9 @@ define KernelPackage/qca-nss-drv-ovpn-mgr
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Kernel driver for NSS OpenVPN manager
|
||||
DEPENDS:=+kmod-qca-nss-drv +kmod-qca-nss-cfi-cryptoapi +kmod-tun +kmod-ipt-conntrack \
|
||||
@TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64
|
||||
DEPENDS:=@(TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq807x||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64||TARGET_ipq60xx) \
|
||||
+@NSS_DRV_OVPN_ENABLE +kmod-qca-nss-drv +kmod-tun +kmod-ipt-conntrack \
|
||||
+PACKAGE_kmod-qca-nss-cfi-cryptoapi:kmod-qca-nss-cfi-cryptoapi
|
||||
FILES:=$(PKG_BUILD_DIR)/openvpn/src/qca-nss-ovpn-mgr.ko
|
||||
endef
|
||||
|
||||
@ -222,8 +254,9 @@ define KernelPackage/qca-nss-drv-ovpn-link
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Kernel driver for interfacing NSS OpenVPN manager with ECM
|
||||
DEPENDS:=+kmod-qca-nss-drv-ovpn-mgr +@PACKAGE_kmod-qca-nss-ecm \
|
||||
@TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64
|
||||
DEPENDS:=@(TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq807x||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64||TARGET_ipq60xx) \
|
||||
+kmod-qca-nss-drv-ovpn-mgr \
|
||||
+@PACKAGE_kmod-qca-nss-ecm
|
||||
FILES:=$(PKG_BUILD_DIR)/openvpn/plugins/qca-nss-ovpn-link.ko
|
||||
endef
|
||||
|
||||
@ -235,7 +268,8 @@ define KernelPackage/qca-nss-drv-pvxlanmgr
|
||||
SECTION:=kernel
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
DEPENDS:=+kmod-qca-nss-drv
|
||||
DEPENDS:=+@NSS_DRV_PVXLAN_ENABLE \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv
|
||||
TITLE:=NSS PVXLAN Manager for QCA NSS driver
|
||||
FILES:=$(PKG_BUILD_DIR)/pvxlanmgr/qca-nss-pvxlanmgr.ko
|
||||
endef
|
||||
@ -248,7 +282,9 @@ define KernelPackage/qca-nss-drv-eogremgr
|
||||
SECTION:=kernel
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
DEPENDS:=+kmod-qca-nss-drv +kmod-qca-nss-drv-gre
|
||||
DEPENDS:=+@NSS_DRV_GRE_ENABLE \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv \
|
||||
+kmod-qca-nss-drv-gre
|
||||
TITLE:=NSS EOGRE Manager for QCA NSS driver
|
||||
FILES:=$(PKG_BUILD_DIR)/eogremgr/qca-nss-eogremgr.ko
|
||||
endef
|
||||
@ -261,7 +297,9 @@ define KernelPackage/qca-nss-drv-clmapmgr
|
||||
SECTION:=kernel
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
DEPENDS:=+kmod-qca-nss-drv +kmod-qca-nss-drv-eogremgr
|
||||
DEPENDS:=+@NSS_DRV_CLMAP_ENABLE \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv \
|
||||
+kmod-qca-nss-drv-eogremgr
|
||||
TITLE:=NSS clmap Manager for QCA NSS driver
|
||||
FILES:=$(PKG_BUILD_DIR)/clmapmgr/qca-nss-clmapmgr.ko
|
||||
endef
|
||||
@ -275,14 +313,15 @@ define KernelPackage/qca-nss-drv-lag-mgr
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Kernel driver for NSS LAG manager
|
||||
DEPENDS:=@!TARGET_ipq95xx +kmod-qca-nss-drv \
|
||||
+TARGET_ipq_ipq807x:kmod-qca-nss-drv-vlan-mgr \
|
||||
+TARGET_ipq_ipq807x_64:kmod-qca-nss-drv-vlan-mgr \
|
||||
+TARGET_ipq807x:kmod-qca-nss-drv-vlan-mgr \
|
||||
+TARGET_ipq_ipq60xx:kmod-qca-nss-drv-vlan-mgr \
|
||||
+TARGET_ipq_ipq60xx_64:kmod-qca-nss-drv-vlan-mgr \
|
||||
+TARGET_ipq60xx:kmod-qca-nss-drv-vlan-mgr \
|
||||
+kmod-bonding
|
||||
DEPENDS:=+@NSS_DRV_LAG_ENABLE \
|
||||
+TARGET_ipq_ipq807x:kmod-qca-nss-drv-vlan-mgr \
|
||||
+TARGET_ipq_ipq807x_64:kmod-qca-nss-drv-vlan-mgr \
|
||||
+TARGET_ipq807x:kmod-qca-nss-drv-vlan-mgr \
|
||||
+TARGET_ipq_ipq60xx:kmod-qca-nss-drv-vlan-mgr \
|
||||
+TARGET_ipq_ipq60xx_64:kmod-qca-nss-drv-vlan-mgr \
|
||||
+TARGET_ipq60xx:kmod-qca-nss-drv-vlan-mgr \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv \
|
||||
+kmod-bonding
|
||||
FILES:=$(PKG_BUILD_DIR)/lag/qca-nss-lag-mgr.ko
|
||||
AUTOLOAD:=$(call AutoLoad,51,qca-nss-lag-mgr)
|
||||
endef
|
||||
@ -295,7 +334,8 @@ define KernelPackage/qca-nss-drv-vxlanmgr
|
||||
SECTION:=kernel
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
DEPENDS:=+kmod-qca-nss-drv +kmod-vxlan
|
||||
DEPENDS:=+@NSS_DRV_VXLAN_ENABLE +@NSS_DRV_PVXLAN_ENABLE +kmod-vxlan \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv
|
||||
TITLE:=NSS VxLAN Manager for QCA NSS driver
|
||||
FILES:=$(PKG_BUILD_DIR)/vxlanmgr/qca-nss-vxlanmgr.ko
|
||||
AUTOLOAD:=$(call AutoLoad,51,qca-nss-vxlanmgr)
|
||||
@ -310,7 +350,10 @@ define KernelPackage/qca-nss-drv-vlan-mgr
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Kernel driver for NSS vlan manager
|
||||
DEPENDS:=@TARGET_ipq807x +kmod-qca-nss-drv +kmod-bonding
|
||||
DEPENDS:=@(TARGET_ipq_ipq807x||TARGET_ipq_ipq806x||TARGET_ipq807x||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64||TARGET_ipq60xx) \
|
||||
+@NSS_DRV_VLAN_ENABLE \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv \
|
||||
+PACKAGE_kmod-bonding:kmod-bonding
|
||||
FILES:=$(PKG_BUILD_DIR)/vlan/qca-nss-vlan.ko
|
||||
AUTOLOAD:=$(call AutoLoad,51,qca-nss-vlan)
|
||||
endef
|
||||
@ -324,8 +367,9 @@ define KernelPackage/qca-nss-drv-igs
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Support
|
||||
TITLE:=Action for offloading traffic to an IFB interface to perform ingress shaping.
|
||||
DEPENDS:=@TARGET_ipq806x||TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64||TARGET_ipq_ipq50xx||TARGET_ipq_ipq50xx_64 \
|
||||
+kmod-qca-nss-drv +kmod-sched-core +kmod-ifb +kmod-qca-nss-drv-qdisc
|
||||
DEPENDS:=@(TARGET_ipq806x||TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq807x||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64||TARGET_ipq60xx||TARGET_ipq_ipq50xx||TARGET_ipq_ipq50xx_64||TARGET_ipq50xx) \
|
||||
+@NSS_DRV_IGS_ENABLE +kmod-sched-core +kmod-ifb +kmod-qca-nss-drv-qdisc \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv
|
||||
FILES:=$(PKG_BUILD_DIR)/nss_qdisc/igs/act_nssmirred.ko
|
||||
endef
|
||||
|
||||
@ -337,7 +381,8 @@ define KernelPackage/qca-nss-drv-match
|
||||
SECTION:=kernel
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
DEPENDS:=+kmod-qca-nss-drv
|
||||
DEPENDS:=+@NSS_DRV_MATCH_ENABLE \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv
|
||||
TITLE:=NSS Match for QCA NSS driver
|
||||
FILES:=$(PKG_BUILD_DIR)/match/qca-nss-match.ko
|
||||
endef
|
||||
@ -351,7 +396,8 @@ define KernelPackage/qca-nss-drv-mirror
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Support
|
||||
TITLE:=Module for mirroring packets from NSS to host.
|
||||
DEPENDS:=@!TARGET_ipq95xx +kmod-qca-nss-drv
|
||||
DEPENDS:=+@NSS_DRV_MIRROR_ENABLE \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv
|
||||
FILES:=$(PKG_BUILD_DIR)/mirror/qca-nss-mirror.ko
|
||||
endef
|
||||
|
||||
@ -364,7 +410,10 @@ define KernelPackage/qca-nss-drv-netlink
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=NSS NETLINK Manager for QCA NSS driver
|
||||
DEPENDS:=@TARGET_ipq807x +kmod-qca-nss-drv +kmod-pppoe +kmod-qca-nss-drv-dtlsmgr
|
||||
DEPENDS:=@(TARGET_ipq806x||TARGET_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64||TARGET_ipq60xx||TARGET_ipq_ipq50xx||TARGET_ipq_ipq50xx_64||TARGET_ipq50xx) \
|
||||
+@NSS_DRV_C2C_ENABLE +@NSS_DRV_GRE_REDIR_ENABLE +@NSS_DRV_IPV4_REASM_ENABLE +@NSS_DRV_IPV6_ENABLE +@NSS_DRV_IPV6_REASM_ENABLE +@NSS_DRV_RMNET_ENABLE +@NSS_DRV_OAM_ENABLE +@NSS_DRV_QRFS_ENABLE \
|
||||
+kmod-pppoe +kmod-qca-nss-drv-dtlsmgr \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv
|
||||
FILES:=$(PKG_BUILD_DIR)/netlink/qca-nss-netlink.ko
|
||||
endef
|
||||
|
||||
@ -377,7 +426,8 @@ define KernelPackage/qca-nss-drv-qdisc
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Support
|
||||
TITLE:=Qdisc for configuring shapers in NSS
|
||||
DEPENDS:=@TARGET_ipq807x +kmod-qca-nss-drv
|
||||
DEPENDS:=+@NSS_DRV_SHAPER_ENABLE +@NSS_DRV_IGS_ENABLE \
|
||||
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv
|
||||
FILES:=$(PKG_BUILD_DIR)/nss_qdisc/qca-nss-qdisc.ko
|
||||
KCONFIG:=CONFIG_NET_CLS_ACT=y
|
||||
AUTOLOAD:=$(call AutoLoad,58,qca-nss-qdisc)
|
||||
@ -417,7 +467,7 @@ EXTRA_CFLAGS+= \
|
||||
-I$(STAGING_DIR)/usr/include/qca-nss-drv \
|
||||
-I$(STAGING_DIR)/usr/include/qca-nss-crypto \
|
||||
-I$(STAGING_DIR)/usr/include/qca-nss-cfi \
|
||||
-I$(STAGING_DIR)/usr/include/qca-nss-ecm \
|
||||
-I$(STAGING_DIR)/usr/include/qca-nss-ecm \
|
||||
-I$(STAGING_DIR)/usr/include/qca-ssdk \
|
||||
-I$(STAGING_DIR)/usr/include/qca-ssdk/fal \
|
||||
-I$(STAGING_DIR)/usr/include/nat46
|
||||
@ -461,7 +511,7 @@ endif
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-ipsecmgr),)
|
||||
EXTRA_CFLAGS+= -I$(PKG_BUILD_DIR)/exports \
|
||||
-I$(STAGING_DIR)/usr/include/qca-nss-ecm
|
||||
-I$(STAGING_DIR)/usr/include/qca-nss-ecm
|
||||
NSS_CLIENTS_MAKE_OPTS+=ipsecmgr=y
|
||||
endif
|
||||
|
||||
@ -502,6 +552,10 @@ ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-map-t),)
|
||||
NSS_CLIENTS_MAKE_OPTS+=map-t=y
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-ovpn-mgr),)
|
||||
NSS_CLIENTS_MAKE_OPTS+=ovpn-mgr=y
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-ovpn-link),)
|
||||
NSS_CLIENTS_MAKE_OPTS+=ovpn-link=y
|
||||
endif
|
||||
@ -528,15 +582,15 @@ endif
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE) -C "$(LINUX_DIR)" $(strip $(NSS_CLIENTS_MAKE_OPTS)) \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
M="$(PKG_BUILD_DIR)" \
|
||||
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
|
||||
DTLSMGR_DIR="$(DTLSMGR_DIR)" \
|
||||
IPSECMGR_DIR="$(IPSECMGR_DIR)" \
|
||||
SoC=$(SOC) \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
modules
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
M="$(PKG_BUILD_DIR)" \
|
||||
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
|
||||
DTLSMGR_DIR="$(DTLSMGR_DIR)" \
|
||||
IPSECMGR_DIR="$(IPSECMGR_DIR)" \
|
||||
SoC=$(SOC) \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,qca-nss-drv-gre))
|
||||
@ -552,9 +606,9 @@ $(eval $(call KernelPackage,qca-nss-drv-vlan-mgr))
|
||||
$(eval $(call KernelPackage,qca-nss-drv-vxlanmgr))
|
||||
$(eval $(call KernelPackage,qca-nss-drv-pvxlanmgr))
|
||||
$(eval $(call KernelPackage,qca-nss-drv-ovpn-mgr))
|
||||
$(eval $(call KernelPackage,qca-nss-drv-ovpn-link))
|
||||
$(eval $(call KernelPackage,qca-nss-drv-dtlsmgr))
|
||||
$(eval $(call KernelPackage,qca-nss-drv-tlsmgr))
|
||||
$(eval $(call KernelPackage,qca-nss-drv-ovpn-link))
|
||||
$(eval $(call KernelPackage,qca-nss-drv-match))
|
||||
$(eval $(call KernelPackage,qca-nss-drv-map-t))
|
||||
$(eval $(call KernelPackage,qca-nss-drv-tunipip6))
|
||||
|
||||
@ -32,10 +32,13 @@ define KernelPackage/qca-nss-crypto
|
||||
SECTION:=kernel
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Cryptographic API modules
|
||||
DEPENDS:=@(TARGET_ipq807x||TARGET_ipq60xx) +kmod-qca-nss-drv +nss-eip-firmware
|
||||
DEPENDS:=@(TARGET_ipq807x||TARGET_ipq60xx) \
|
||||
+@NSS_DRV_CRYPTO_ENABLE \
|
||||
+kmod-qca-nss-drv \
|
||||
+nss-eip-firmware
|
||||
TITLE:=Kernel driver for NSS crypto driver
|
||||
FILES:=$(PKG_BUILD_DIR)/$(NSS_CRYPTO_DIR)/src/qca-nss-crypto.ko \
|
||||
$(PKG_BUILD_DIR)/$(NSS_CRYPTO_DIR)/tool/qca-nss-crypto-tool.ko
|
||||
$(PKG_BUILD_DIR)/$(NSS_CRYPTO_DIR)/tool/qca-nss-crypto-tool.ko
|
||||
AUTOLOAD:=$(call AutoLoad,52,qca-nss-crypto)
|
||||
endef
|
||||
|
||||
|
||||
184
qca/qca-nss-drv/Config.in
Normal file
184
qca/qca-nss-drv/Config.in
Normal file
@ -0,0 +1,184 @@
|
||||
menu "Configuration"
|
||||
depends on PACKAGE_kmod-qca-nss-drv
|
||||
|
||||
comment "Build Options"
|
||||
|
||||
config NSS_DRV_BRIDGE_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable BRIDGE"
|
||||
config NSS_DRV_C2C_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable C2C"
|
||||
config NSS_DRV_CLMAP_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable CLMAP"
|
||||
config NSS_DRV_CRYPTO_ENABLE
|
||||
bool
|
||||
default y
|
||||
prompt "Enable CRYPTO"
|
||||
config NSS_DRV_DTLS_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable DTLS"
|
||||
config NSS_DRV_EDMA_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable EDMA"
|
||||
config NSS_DRV_GRE_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable GRE"
|
||||
config NSS_DRV_GRE_REDIR_ENABLE
|
||||
bool
|
||||
default n
|
||||
depends on NSS_DRV_GRE_ENABLE
|
||||
prompt "Enable GRE_REDIR"
|
||||
config NSS_DRV_GRE_TUNNEL_ENABLE
|
||||
bool
|
||||
default n
|
||||
depends on NSS_DRV_GRE_ENABLE
|
||||
prompt "Enable GRE_TUNNEL"
|
||||
config NSS_DRV_IGS_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable IGS"
|
||||
config NSS_DRV_IPSEC_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable IPSEC"
|
||||
config NSS_DRV_IPV4_REASM_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable IPV4_REASM"
|
||||
config NSS_DRV_IPV6_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable IPV6"
|
||||
config NSS_DRV_IPV6_REASM_ENABLE
|
||||
bool
|
||||
default n
|
||||
depends on NSS_DRV_IPV6_ENABLE
|
||||
prompt "Enable IPV6_REASM"
|
||||
config NSS_DRV_L2TP_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable L2TP"
|
||||
config NSS_DRV_LAG_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable LAG"
|
||||
config NSS_DRV_MAPT_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable MAPT"
|
||||
config NSS_DRV_MATCH_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable MATCH"
|
||||
config NSS_DRV_MIRROR_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable MIRROR"
|
||||
config NSS_DRV_OAM_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable OAM"
|
||||
config NSS_DRV_PORTID_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable PORTID"
|
||||
config NSS_DRV_PPE_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable PPE"
|
||||
config NSS_DRV_PPPOE_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable PPPOE"
|
||||
config NSS_DRV_PPTP_ENABLE
|
||||
bool
|
||||
default y
|
||||
prompt "Enable PPTP"
|
||||
config NSS_DRV_PVXLAN_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable PVXLAN"
|
||||
config NSS_DRV_QRFS_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable QRFS"
|
||||
config NSS_DRV_QVPN_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable QVPN"
|
||||
config NSS_DRV_OVPN_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable OVPN"
|
||||
config NSS_DRV_RMNET_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable RMNET"
|
||||
config NSS_DRV_SHAPER_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable SHAPER"
|
||||
config NSS_DRV_SJACK_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable SJACK"
|
||||
config NSS_DRV_TLS_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable TLS"
|
||||
config NSS_DRV_TRUSTSEC_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable TRUSTSEC"
|
||||
config NSS_DRV_TRUSTSEC_RX_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable TRUSTSEC_RX"
|
||||
depends on NSS_DRV_TRUSTSEC_ENABLE
|
||||
config NSS_DRV_TSTAMP_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable TSTAMP"
|
||||
config NSS_DRV_TUN6RD_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable TUN6RD"
|
||||
config NSS_DRV_TUNIPIP6_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable TUNIPIP6"
|
||||
config NSS_DRV_VIRT_IF_ENABLE
|
||||
bool
|
||||
default y
|
||||
prompt "Enable VIRT_IF"
|
||||
config NSS_DRV_VLAN_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable VLAN"
|
||||
config NSS_DRV_VXLAN_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable VXLAN"
|
||||
config NSS_DRV_WIFI_ENABLE
|
||||
bool
|
||||
default n
|
||||
prompt "Enable WIFI"
|
||||
config NSS_DRV_WIFI_EXT_VDEV_ENABLE
|
||||
bool
|
||||
default n
|
||||
depends on NSS_DRV_WIFI_ENABLE
|
||||
prompt "Enable WIFI EXT VDEV"
|
||||
config NSS_DRV_WIFI_MESH_ENABLE
|
||||
bool
|
||||
default n
|
||||
depends on NSS_DRV_WIFI_ENABLE
|
||||
prompt "Enable WIFI MESH"
|
||||
endmenu
|
||||
@ -5,11 +5,58 @@ PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/nss-drv.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2022-03-07
|
||||
PKG_SOURCE_VERSION:=397c88cf184e0eb011dd44ad82c2dfae60ece1b4
|
||||
PKG_MIRROR_HASH:=a3bea305d85fcec3d77f9b40d06a71b65ccf3d8b98018d9c8c23d6ad95e6aedc
|
||||
PKG_SOURCE_DATE:=2023-01-20
|
||||
PKG_SOURCE_VERSION:=87ab60002e7dd6f2c12535af279bf09781617eef
|
||||
PKG_MIRROR_HASH:=f582d83892bd1d3b21e2c26dee92e2bc639a5e7c8f8802512a086d4068b58a9a
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_NSS_DRV_BRIDGE_ENABLE \
|
||||
CONFIG_NSS_DRV_C2C_ENABLE \
|
||||
CONFIG_NSS_DRV_CLMAP_ENABLE \
|
||||
CONFIG_NSS_DRV_CRYPTO_ENABLE \
|
||||
CONFIG_NSS_DRV_DMA_ENABLE \
|
||||
CONFIG_NSS_DRV_DTLS_ENABLE \
|
||||
CONFIG_NSS_DRV_EDMA_ENABLE \
|
||||
CONFIG_NSS_DRV_GRE_ENABLE \
|
||||
CONFIG_NSS_DRV_GRE_REDIR_ENABLE \
|
||||
CONFIG_NSS_DRV_GRE_TUNNEL_ENABLE \
|
||||
CONFIG_NSS_DRV_IGS_ENABLE \
|
||||
CONFIG_NSS_DRV_IPSEC_ENABLE \
|
||||
CONFIG_NSS_DRV_IPV4_REASM_ENABLE \
|
||||
CONFIG_NSS_DRV_IPV6_ENABLE \
|
||||
CONFIG_NSS_DRV_IPV6_REASM_ENABLE \
|
||||
CONFIG_NSS_DRV_L2TP_ENABLE \
|
||||
CONFIG_NSS_DRV_LAG_ENABLE \
|
||||
CONFIG_NSS_DRV_MAPT_ENABLE \
|
||||
CONFIG_NSS_DRV_MATCH_ENABLE \
|
||||
CONFIG_NSS_DRV_MIRROR_ENABLE \
|
||||
CONFIG_NSS_DRV_OAM_ENABLE \
|
||||
CONFIG_NSS_DRV_PORTID_ENABLE \
|
||||
CONFIG_NSS_DRV_PPE_ENABLE \
|
||||
CONFIG_NSS_DRV_PPPOE_ENABLE \
|
||||
CONFIG_NSS_DRV_PPTP_ENABLE \
|
||||
CONFIG_NSS_DRV_PVXLAN_ENABLE \
|
||||
CONFIG_NSS_DRV_QRFS_ENABLE \
|
||||
CONFIG_NSS_DRV_QVPN_ENABLE \
|
||||
CONFIG_NSS_DRV_OVPN_ENABLE \
|
||||
CONFIG_NSS_DRV_RMNET_ENABLE \
|
||||
CONFIG_NSS_DRV_SHAPER_ENABLE \
|
||||
CONFIG_NSS_DRV_SJACK_ENABLE \
|
||||
CONFIG_NSS_DRV_TLS_ENABLE \
|
||||
CONFIG_NSS_DRV_TRUSTSEC_ENABLE \
|
||||
CONFIG_NSS_DRV_TRUSTSEC_RX_ENABLE \
|
||||
CONFIG_NSS_DRV_TSTAMP_ENABLE \
|
||||
CONFIG_NSS_DRV_TUN6RD_ENABLE \
|
||||
CONFIG_NSS_DRV_TUNIPIP6_ENABLE \
|
||||
CONFIG_NSS_DRV_VIRT_IF_ENABLE \
|
||||
CONFIG_NSS_DRV_VLAN_ENABLE \
|
||||
CONFIG_NSS_DRV_VXLAN_ENABLE \
|
||||
CONFIG_NSS_DRV_WIFI_ENABLE \
|
||||
CONFIG_NSS_DRV_WIFI_EXT_VDEV_ENABLE \
|
||||
CONFIG_NSS_DRV_WIFI_MESH_ENABLE
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
@ -21,23 +68,27 @@ define KernelPackage/qca-nss-drv
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
DEPENDS:=@(TARGET_ipq807x||TARGET_ipq60xx) +kmod-qca-nss-dp
|
||||
TITLE:=Kernel driver for NSS (core driver)
|
||||
TITLE:=Qualcomm NSS core driver
|
||||
FILES:=$(PKG_BUILD_DIR)/qca-nss-drv.ko
|
||||
AUTOLOAD:=$(call AutoLoad,32,qca-nss-drv)
|
||||
endef
|
||||
|
||||
define KernelPackage/qca-nss-drv/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define KernelPackage/qca-nss-drv/install
|
||||
$(INSTALL_DIR) $(1)/lib/debug
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/etc/sysctl.d
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/firmware
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/firmware
|
||||
$(INSTALL_DIR) $(1)/lib/debug
|
||||
|
||||
$(INSTALL_BIN) ./files/qca-nss-drv.debug $(1)/lib/debug/qca-nss-drv
|
||||
$(INSTALL_BIN) ./files/qca-nss-drv.init $(1)/etc/init.d/qca-nss-drv
|
||||
$(INSTALL_BIN) ./files/qca-nss-drv.sysctl $(1)/etc/sysctl.d/qca-nss-drv.conf
|
||||
$(INSTALL_BIN) ./files/qca-nss-drv.hotplug $(1)/etc/hotplug.d/firmware/10-qca-nss-fw
|
||||
$(INSTALL_BIN) ./files/qca-nss-drv.conf $(1)/etc/config/nss
|
||||
$(INSTALL_BIN) ./files/qca-nss-drv.hotplug $(1)/etc/hotplug.d/firmware/10-qca-nss-fw
|
||||
$(INSTALL_BIN) ./files/qca-nss-drv.debug $(1)/lib/debug/qca-nss-drv
|
||||
|
||||
endef
|
||||
|
||||
@ -45,9 +96,22 @@ define KernelPackage/qca-nss-drv/Description
|
||||
This package contains a NSS driver for QCA chipset
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_TARGET_BOARD), "ipq807x")
|
||||
SOC="ipq807x_64"
|
||||
subtarget:=$(CONFIG_TARGET_BOARD)
|
||||
else ifeq ($(CONFIG_TARGET_BOARD), "ipq60xx")
|
||||
SOC="ipq60xx_64"
|
||||
subtarget:=$(SUBTARGET)
|
||||
endif
|
||||
|
||||
define Build/InstallDev
|
||||
mkdir -p $(1)/usr/include/qca-nss-drv
|
||||
$(CP) $(PKG_BUILD_DIR)/exports/* $(1)/usr/include/qca-nss-drv/
|
||||
ifneq (, $(findstring $(subtarget), "ipq807x" "ipq807x_64" "ipq60xx" "ipq60xx_64" "ipq50xx" "ipq50xx_64"))
|
||||
$(RM) $(1)/usr/include/qca-nss-drv/nss_ipsecmgr.h
|
||||
# $(INSTALL_DIR) $(1)/usr/include/qca-nss-clients
|
||||
# $(CP) $(NSS_CLIENTS_DIR)/exports/nss_ipsecmgr.h $(1)/usr/include/qca-nss-clients/.
|
||||
endif
|
||||
endef
|
||||
|
||||
EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/qca-nss-gmac \
|
||||
@ -57,58 +121,140 @@ EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/qca-nss-gmac \
|
||||
|
||||
ifneq (, $(findstring $(CONFIG_TARGET_BOARD), "ipq807x" "ipq60xx"))
|
||||
EXTRA_CFLAGS+= -DNSS_MEM_PROFILE_MEDIUM
|
||||
LOW_MEM_PROFILE_MAKE_OPTS=y
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_KERNEL_SKB_FIXED_SIZE_2K),y)
|
||||
EXTRA_CFLAGS+= -DNSS_SKB_FIXED_SIZE_2K
|
||||
endif
|
||||
|
||||
DRV_MAKE_OPTS:=
|
||||
ifeq ($(LOW_MEM_PROFILE_MAKE_OPTS),y)
|
||||
DRV_MAKE_OPTS+= \
|
||||
NSS_DRV_C2C_ENABLE=n \
|
||||
NSS_DRV_CAPWAP_ENABLE=n \
|
||||
NSS_DRV_CLMAP_ENABLE=n \
|
||||
NSS_DRV_CRYPTO_ENABLE=y \
|
||||
NSS_DRV_DTLS_ENABLE=n \
|
||||
NSS_DRV_GRE_ENABLE=n \
|
||||
NSS_DRV_GRE_REDIR_ENABLE=n \
|
||||
NSS_DRV_GRE_TUNNEL_ENABLE=n \
|
||||
NSS_DRV_IGS_ENABLE=n \
|
||||
NSS_DRV_IPSEC_ENABLE=n \
|
||||
NSS_DRV_LAG_ENABLE=n \
|
||||
NSS_DRV_L2TP_ENABLE=n \
|
||||
NSS_DRV_MAPT_ENABLE=n \
|
||||
NSS_DRV_OAM_ENABLE=n \
|
||||
NSS_DRV_PPTP_ENABLE=n \
|
||||
NSS_DRV_PORTID_ENABLE=n \
|
||||
NSS_DRV_PVXLAN_ENABLE=n \
|
||||
NSS_DRV_QRFS_ENABLE=n \
|
||||
NSS_DRV_QVPN_ENABLE=n \
|
||||
NSS_DRV_RMNET_ENABLE=n \
|
||||
NSS_DRV_SHAPER_ENABLE=n \
|
||||
NSS_DRV_SJACK_ENABLE=n \
|
||||
NSS_DRV_TLS_ENABLE=n \
|
||||
NSS_DRV_TRUSTSEC_ENABLE=n \
|
||||
NSS_DRV_TSTAMP_ENABLE=n \
|
||||
NSS_DRV_TUN6RD_ENABLE=n \
|
||||
NSS_DRV_TUNIPIP6_ENABLE=n \
|
||||
NSS_DRV_VXLAN_ENABLE=n \
|
||||
NSS_DRV_MATCH_ENABLE=n \
|
||||
NSS_DRV_MIRROR_ENABLE=n \
|
||||
NSS_DRV_PPPOE_ENABLE=n \
|
||||
NSS_DRV_VIRT_IF_ENABLE=n \
|
||||
NSS_DRV_VLAN_ENABLE=n \
|
||||
NSS_DRV_BRIDGE_ENABLE=n \
|
||||
NSS_DRV_WIFI_EXT_VDEV_ENABLE=n \
|
||||
NSS_DRV_WIFI_MESH_ENABLE=n
|
||||
ifndef CONFIG_NSS_DRV_BRIDGE_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_BRIDGE_ENABLE=n
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TARGET_BOARD), "ipq807x")
|
||||
SOC="ipq807x_64"
|
||||
else ifeq ($(CONFIG_TARGET_BOARD), "ipq60xx")
|
||||
SOC="ipq60xx_64"
|
||||
ifndef CONFIG_NSS_DRV_C2C_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_C2C_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_CLMAP_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_CLMAP_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_CRYPTO_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_CRYPTO_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_DMA_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_DMA_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_DTLS_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_DTLS_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_EDMA_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_EDMA_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_GRE_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_GRE_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_GRE_REDIR_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_GRE_REDIR_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_GRE_TUNNEL_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_GRE_TUNNEL_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_IGS_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_IGS_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_IPSEC_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_IPSEC_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_IPV4_REASM_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_IPV4_REASM_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_IPV6_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_IPV6_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_IPV6_REASM_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_IPV6_REASM_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_L2TP_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_L2TP_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_LAG_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_LAG_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_MAPT_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_MAPT_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_MATCH_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_MATCH_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_MIRROR_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_MIRROR_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_OAM_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_OAM_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_PORTID_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_PORTID_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_PPE_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_PPE_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_PPPOE_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_PPPOE_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_PPTP_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_PPTP_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_PVXLAN_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_PVXLAN_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_QRFS_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_QRFS_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_QVPN_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_QVPN_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_OVPN_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_OVPN_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_RMNET_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_RMNET_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_SHAPER_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_SHAPER_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_SJACK_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_SJACK_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_TLS_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_TLS_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_TRUSTSEC_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_TRUSTSEC_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_TRUSTSEC_RX_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_TRUSTSEC_RX_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_TSTAMP_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_TSTAMP_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_TUN6RD_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_TUN6RD_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_TUNIPIP6_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_TUNIPIP6_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_VIRT_IF_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_VIRT_IF_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_VLAN_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_VLAN_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_VXLAN_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_VXLAN_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_WIFI_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_WIFI_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_WIFI_EXT_VDEV_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_WIFI_EXT_VDEV_ENABLE=n
|
||||
endif
|
||||
ifndef CONFIG_NSS_DRV_WIFI_MESH_ENABLE
|
||||
DRV_MAKE_OPTS += NSS_DRV_WIFI_MESH_ENABLE=n
|
||||
endif
|
||||
|
||||
define Build/Configure
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
# Default Number of connection configuration
|
||||
dev.nss.ipv4cfg.ipv4_conn=4096
|
||||
dev.nss.ipv6cfg.ipv6_conn=4096
|
||||
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
From 3885c752e12f74cad6c97888b797e5903ad1930d Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Thu, 13 May 2021 23:22:38 +0200
|
||||
Subject: [PATCH] core: add 5.10 kernel to version check
|
||||
|
||||
NSS DRV has a kernel version check, so simply add
|
||||
5.10 as supported.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
nss_core.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/nss_core.c
|
||||
+++ b/nss_core.c
|
||||
@@ -52,7 +52,8 @@
|
||||
(((LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0)))) || \
|
||||
(((LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)))) || \
|
||||
(((LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)))) || \
|
||||
-(((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0))))))
|
||||
+(((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0)))) || \
|
||||
+(((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0))))))
|
||||
#error "Check skb recycle code in this file to match Linux version"
|
||||
#endif
|
||||
|
||||
@ -1,147 +1,180 @@
|
||||
From 0cffa7bb366a4e0ff5665d6fc2fa33c1437cb397 Mon Sep 17 00:00:00 2001
|
||||
From dddfe22459a988a5b86d195bc3cc3bd3c2ac7037 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Thu, 13 May 2021 23:33:18 +0200
|
||||
Subject: [PATCH 2/8] nss-drv: replace ioremap_nocache() with ioremap()
|
||||
Date: Sat, 14 Jan 2023 21:52:38 +0100
|
||||
Subject: [PATCH 1/4] nss-drv: replace ioremap_nocache() with ioremap()
|
||||
|
||||
ioremap_nocache() does not exist anymore.
|
||||
Since 5.5 ioremap_nocache is equal to ioremap on all archs and was removed
|
||||
from the kernel, so just use ioremap instead.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
nss_hal/fsm9010/nss_hal_pvt.c | 2 +-
|
||||
nss_hal/ipq50xx/nss_hal_pvt.c | 6 +++---
|
||||
nss_hal/ipq60xx/nss_hal_pvt.c | 8 ++++----
|
||||
nss_hal/ipq806x/nss_hal_pvt.c | 4 ++--
|
||||
nss_hal/ipq807x/nss_hal_pvt.c | 6 +++---
|
||||
nss_hal/ipq95xx/nss_hal_pvt.c | 6 +++---
|
||||
nss_hal/nss_hal.c | 4 ++--
|
||||
nss_meminfo.c | 2 +-
|
||||
nss_ppe.c | 2 +-
|
||||
7 files changed, 16 insertions(+), 16 deletions(-)
|
||||
9 files changed, 20 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/nss_hal/ipq50xx/nss_hal_pvt.c b/nss_hal/ipq50xx/nss_hal_pvt.c
|
||||
index 3d6dfd0..e3e4bd2 100644
|
||||
--- a/nss_hal/fsm9010/nss_hal_pvt.c
|
||||
+++ b/nss_hal/fsm9010/nss_hal_pvt.c
|
||||
@@ -145,7 +145,7 @@ static struct nss_platform_data *__nss_h
|
||||
npd->nphys = res_nphys.start;
|
||||
npd->vphys = res_vphys.start;
|
||||
|
||||
- npd->nmap = ioremap_nocache(npd->nphys, resource_size(&res_nphys));
|
||||
+ npd->nmap = ioremap(npd->nphys, resource_size(&res_nphys));
|
||||
if (!npd->nmap) {
|
||||
nss_info_always("%px: nss%d: ioremap() fail for nphys\n", nss_ctx, nss_ctx->id);
|
||||
goto out;
|
||||
--- a/nss_hal/ipq50xx/nss_hal_pvt.c
|
||||
+++ b/nss_hal/ipq50xx/nss_hal_pvt.c
|
||||
@@ -184,13 +184,13 @@ static struct nss_platform_data *__nss_hal_of_get_pdata(struct platform_device *
|
||||
@@ -184,13 +184,13 @@ static struct nss_platform_data *__nss_h
|
||||
npd->nphys = res_nphys.start;
|
||||
npd->qgic_phys = res_qgic_phys.start;
|
||||
|
||||
|
||||
- npd->nmap = ioremap_nocache(npd->nphys, resource_size(&res_nphys));
|
||||
+ npd->nmap = ioremap(npd->nphys, resource_size(&res_nphys));
|
||||
if (!npd->nmap) {
|
||||
nss_info_always("%px: nss%d: ioremap() fail for nphys\n", nss_ctx, nss_ctx->id);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
- npd->qgic_map = ioremap_nocache(npd->qgic_phys, resource_size(&res_qgic_phys));
|
||||
+ npd->qgic_map = ioremap(npd->qgic_phys, resource_size(&res_qgic_phys));
|
||||
if (!npd->qgic_map) {
|
||||
nss_info_always("%px: nss%d: ioremap() fail for qgic map\n", nss_ctx, nss_ctx->id);
|
||||
goto out;
|
||||
@@ -348,7 +348,7 @@ static int __nss_hal_common_reset(struct platform_device *nss_dev)
|
||||
|
||||
@@ -348,7 +348,7 @@ static int __nss_hal_common_reset(struct
|
||||
|
||||
of_node_put(cmn);
|
||||
|
||||
|
||||
- nss_misc_reset = ioremap_nocache(res_nss_misc_reset.start, resource_size(&res_nss_misc_reset));
|
||||
+ nss_misc_reset = ioremap(res_nss_misc_reset.start, resource_size(&res_nss_misc_reset));
|
||||
if (!nss_misc_reset) {
|
||||
pr_err("%px: ioremap fail for nss_misc_reset\n", nss_dev);
|
||||
return -EFAULT;
|
||||
diff --git a/nss_hal/ipq60xx/nss_hal_pvt.c b/nss_hal/ipq60xx/nss_hal_pvt.c
|
||||
index 4c84cb9..e76ef6d 100644
|
||||
--- a/nss_hal/ipq60xx/nss_hal_pvt.c
|
||||
+++ b/nss_hal/ipq60xx/nss_hal_pvt.c
|
||||
@@ -207,13 +207,13 @@ static struct nss_platform_data *__nss_hal_of_get_pdata(struct platform_device *
|
||||
@@ -207,13 +207,13 @@ static struct nss_platform_data *__nss_h
|
||||
npd->nphys = res_nphys.start;
|
||||
npd->qgic_phys = res_qgic_phys.start;
|
||||
|
||||
|
||||
- npd->nmap = ioremap_nocache(npd->nphys, resource_size(&res_nphys));
|
||||
+ npd->nmap = ioremap(npd->nphys, resource_size(&res_nphys));
|
||||
if (!npd->nmap) {
|
||||
nss_info_always("%px: nss%d: ioremap() fail for nphys\n", nss_ctx, nss_ctx->id);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
- npd->qgic_map = ioremap_nocache(npd->qgic_phys, resource_size(&res_qgic_phys));
|
||||
+ npd->qgic_map = ioremap(npd->qgic_phys, resource_size(&res_qgic_phys));
|
||||
if (!npd->qgic_map) {
|
||||
nss_info_always("%px: nss%d: ioremap() fail for qgic map\n", nss_ctx, nss_ctx->id);
|
||||
goto out;
|
||||
@@ -433,13 +433,13 @@ static int __nss_hal_common_reset(struct platform_device *nss_dev)
|
||||
|
||||
@@ -433,13 +433,13 @@ static int __nss_hal_common_reset(struct
|
||||
|
||||
of_node_put(cmn);
|
||||
|
||||
|
||||
- nss_misc_reset = ioremap_nocache(res_nss_misc_reset.start, resource_size(&res_nss_misc_reset));
|
||||
+ nss_misc_reset = ioremap(res_nss_misc_reset.start, resource_size(&res_nss_misc_reset));
|
||||
if (!nss_misc_reset) {
|
||||
pr_err("%px: ioremap fail for nss_misc_reset\n", nss_dev);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
|
||||
- nss_misc_reset_flag = ioremap_nocache(res_nss_misc_reset_flag.start, resource_size(&res_nss_misc_reset_flag));
|
||||
+ nss_misc_reset_flag = ioremap(res_nss_misc_reset_flag.start, resource_size(&res_nss_misc_reset_flag));
|
||||
if (!nss_misc_reset_flag) {
|
||||
pr_err("%px: ioremap fail for nss_misc_reset_flag\n", nss_dev);
|
||||
return -EFAULT;
|
||||
diff --git a/nss_hal/ipq806x/nss_hal_pvt.c b/nss_hal/ipq806x/nss_hal_pvt.c
|
||||
index b8733e0..52d63b0 100644
|
||||
--- a/nss_hal/ipq806x/nss_hal_pvt.c
|
||||
+++ b/nss_hal/ipq806x/nss_hal_pvt.c
|
||||
@@ -458,7 +458,7 @@ static struct nss_platform_data *__nss_hal_of_get_pdata(struct platform_device *
|
||||
@@ -458,7 +458,7 @@ static struct nss_platform_data *__nss_h
|
||||
npd->nphys = res_nphys.start;
|
||||
npd->vphys = res_vphys.start;
|
||||
|
||||
|
||||
- npd->nmap = ioremap_nocache(npd->nphys, resource_size(&res_nphys));
|
||||
+ npd->nmap = ioremap(npd->nphys, resource_size(&res_nphys));
|
||||
if (!npd->nmap) {
|
||||
nss_info_always("%px: nss%d: ioremap() fail for nphys\n", nss_ctx, nss_ctx->id);
|
||||
goto out;
|
||||
@@ -711,7 +711,7 @@ static int __nss_hal_common_reset(struct platform_device *nss_dev)
|
||||
@@ -711,7 +711,7 @@ static int __nss_hal_common_reset(struct
|
||||
}
|
||||
of_node_put(cmn);
|
||||
|
||||
|
||||
- fpb_base = ioremap_nocache(res_nss_fpb_base.start, resource_size(&res_nss_fpb_base));
|
||||
+ fpb_base = ioremap(res_nss_fpb_base.start, resource_size(&res_nss_fpb_base));
|
||||
if (!fpb_base) {
|
||||
pr_err("%px: ioremap fail for nss_fpb_base\n", nss_dev);
|
||||
return -EFAULT;
|
||||
diff --git a/nss_hal/ipq807x/nss_hal_pvt.c b/nss_hal/ipq807x/nss_hal_pvt.c
|
||||
index b95a23c..bb8f42f 100644
|
||||
--- a/nss_hal/ipq807x/nss_hal_pvt.c
|
||||
+++ b/nss_hal/ipq807x/nss_hal_pvt.c
|
||||
@@ -234,7 +234,7 @@ static struct nss_platform_data *__nss_hal_of_get_pdata(struct platform_device *
|
||||
@@ -234,7 +234,7 @@ static struct nss_platform_data *__nss_h
|
||||
npd->vphys = res_vphys.start;
|
||||
npd->qgic_phys = res_qgic_phys.start;
|
||||
|
||||
|
||||
- npd->nmap = ioremap_nocache(npd->nphys, resource_size(&res_nphys));
|
||||
+ npd->nmap = ioremap(npd->nphys, resource_size(&res_nphys));
|
||||
if (!npd->nmap) {
|
||||
nss_info_always("%px: nss%d: ioremap() fail for nphys\n", nss_ctx, nss_ctx->id);
|
||||
goto out;
|
||||
@@ -247,7 +247,7 @@ static struct nss_platform_data *__nss_hal_of_get_pdata(struct platform_device *
|
||||
@@ -247,7 +247,7 @@ static struct nss_platform_data *__nss_h
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
- npd->qgic_map = ioremap_nocache(npd->qgic_phys, resource_size(&res_qgic_phys));
|
||||
+ npd->qgic_map = ioremap(npd->qgic_phys, resource_size(&res_qgic_phys));
|
||||
if (!npd->qgic_map) {
|
||||
nss_info_always("%px: nss%d: ioremap() fail for qgic map\n", nss_ctx, nss_ctx->id);
|
||||
goto out;
|
||||
@@ -467,7 +467,7 @@ static int __nss_hal_common_reset(struct platform_device *nss_dev)
|
||||
@@ -467,7 +467,7 @@ static int __nss_hal_common_reset(struct
|
||||
}
|
||||
of_node_put(cmn);
|
||||
|
||||
|
||||
- nss_misc_reset = ioremap_nocache(res_nss_misc_reset.start, resource_size(&res_nss_misc_reset));
|
||||
+ nss_misc_reset = ioremap(res_nss_misc_reset.start, resource_size(&res_nss_misc_reset));
|
||||
if (!nss_misc_reset) {
|
||||
pr_err("%px: ioremap fail for nss_misc_reset\n", nss_dev);
|
||||
return -EFAULT;
|
||||
--- a/nss_hal/ipq95xx/nss_hal_pvt.c
|
||||
+++ b/nss_hal/ipq95xx/nss_hal_pvt.c
|
||||
@@ -291,7 +291,7 @@ static struct nss_platform_data *__nss_h
|
||||
npd->vphys = res_vphys.start;
|
||||
npd->qgic_phys = res_qgic_phys.start;
|
||||
|
||||
- npd->nmap = ioremap_nocache(npd->nphys, resource_size(&res_nphys));
|
||||
+ npd->nmap = ioremap(npd->nphys, resource_size(&res_nphys));
|
||||
if (!npd->nmap) {
|
||||
nss_info_always("%px: nss%d: ioremap() fail for nphys\n", nss_ctx, nss_ctx->id);
|
||||
goto out;
|
||||
@@ -303,7 +303,7 @@ static struct nss_platform_data *__nss_h
|
||||
goto out;
|
||||
}
|
||||
|
||||
- npd->qgic_map = ioremap_nocache(npd->qgic_phys, resource_size(&res_qgic_phys));
|
||||
+ npd->qgic_map = ioremap(npd->qgic_phys, resource_size(&res_qgic_phys));
|
||||
if (!npd->qgic_map) {
|
||||
nss_info_always("%px: nss%d: ioremap() fail for qgic map\n", nss_ctx, nss_ctx->id);
|
||||
goto out;
|
||||
@@ -608,7 +608,7 @@ static int __nss_hal_common_reset(struct
|
||||
|
||||
of_node_put(cmn);
|
||||
|
||||
- nss_misc_reset = ioremap_nocache(res_nss_misc_reset.start, resource_size(&res_nss_misc_reset));
|
||||
+ nss_misc_reset = ioremap(res_nss_misc_reset.start, resource_size(&res_nss_misc_reset));
|
||||
if (!nss_misc_reset) {
|
||||
pr_err("%px: ioremap fail for nss_misc_reset\n", nss_dev);
|
||||
return -EFAULT;
|
||||
diff --git a/nss_hal/nss_hal.c b/nss_hal/nss_hal.c
|
||||
index d58bb57..57974c1 100644
|
||||
--- a/nss_hal/nss_hal.c
|
||||
+++ b/nss_hal/nss_hal.c
|
||||
@@ -78,9 +78,9 @@ int nss_hal_firmware_load(struct nss_ctx_instance *nss_ctx, struct platform_devi
|
||||
return rc;
|
||||
@@ -81,9 +81,9 @@ int nss_hal_firmware_load(struct nss_ctx
|
||||
}
|
||||
|
||||
|
||||
|
||||
- load_mem = ioremap_nocache(npd->load_addr, nss_fw->size);
|
||||
+ load_mem = ioremap(npd->load_addr, nss_fw->size);
|
||||
if (!load_mem) {
|
||||
@ -150,11 +183,9 @@ index d58bb57..57974c1 100644
|
||||
release_firmware(nss_fw);
|
||||
return rc;
|
||||
}
|
||||
diff --git a/nss_meminfo.c b/nss_meminfo.c
|
||||
index e24e6be..2255eae 100644
|
||||
--- a/nss_meminfo.c
|
||||
+++ b/nss_meminfo.c
|
||||
@@ -728,7 +728,7 @@ bool nss_meminfo_init(struct nss_ctx_instance *nss_ctx)
|
||||
@@ -735,7 +735,7 @@ bool nss_meminfo_init(struct nss_ctx_ins
|
||||
/*
|
||||
* meminfo_start is the label where the start address of meminfo map is stored.
|
||||
*/
|
||||
@ -163,8 +194,6 @@ index e24e6be..2255eae 100644
|
||||
NSS_MEMINFO_RESERVE_AREA_SIZE);
|
||||
if (!meminfo_start) {
|
||||
nss_info_always("%px: cannot remap meminfo start\n", nss_ctx);
|
||||
diff --git a/nss_ppe.c b/nss_ppe.c
|
||||
index 46ce217..644fc98 100644
|
||||
--- a/nss_ppe.c
|
||||
+++ b/nss_ppe.c
|
||||
@@ -357,7 +357,7 @@ void nss_ppe_init(void)
|
||||
@ -176,6 +205,3 @@ index 46ce217..644fc98 100644
|
||||
if (!ppe_pvt.ppe_base) {
|
||||
nss_warning("DRV can't get PPE base address\n");
|
||||
return;
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 6e65f6daecb09463688eaea0a234018a728196b8 Mon Sep 17 00:00:00 2001
|
||||
From 2a3b9f4659542e529f4e1a535c33dfde7e272707 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Tue, 5 Apr 2022 18:10:57 +0200
|
||||
Subject: [PATCH 5/8] nss-drv: add support for kernel 5.15
|
||||
Subject: [PATCH 2/4] nss-drv: add support for kernel 5.15
|
||||
|
||||
- Fix coredump panic notifier include change.
|
||||
- Fix skb ZEROCOPY flag.
|
||||
@ -14,34 +14,30 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
nss_hal/nss_hal.c | 1 +
|
||||
3 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/nss_core.c b/nss_core.c
|
||||
index f9e6014..8cd1d4b 100644
|
||||
--- a/nss_core.c
|
||||
+++ b/nss_core.c
|
||||
@@ -53,7 +53,8 @@
|
||||
@@ -61,7 +61,8 @@
|
||||
(((LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0)))) || \
|
||||
(((LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)))) || \
|
||||
(((LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)))) || \
|
||||
(((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0)))) || \
|
||||
-(((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0))))))
|
||||
+(((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0)))) || \
|
||||
-(((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0))))))
|
||||
+(((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0)))) || \
|
||||
+(((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0))))))
|
||||
#error "Check skb recycle code in this file to match Linux version"
|
||||
#endif
|
||||
|
||||
@@ -2623,7 +2624,7 @@ static inline bool nss_core_skb_can_reuse(struct nss_ctx_instance *nss_ctx,
|
||||
|
||||
@@ -2658,7 +2659,7 @@ static inline bool nss_core_skb_can_reus
|
||||
if (unlikely(irqs_disabled()))
|
||||
return false;
|
||||
|
||||
|
||||
- if (unlikely(skb_shinfo(nbuf)->tx_flags & SKBTX_DEV_ZEROCOPY))
|
||||
+ if (unlikely(skb_shinfo(nbuf)->flags & SKBFL_ZEROCOPY_ENABLE))
|
||||
return false;
|
||||
|
||||
|
||||
if (unlikely(skb_is_nonlinear(nbuf)))
|
||||
diff --git a/nss_coredump.c b/nss_coredump.c
|
||||
index ecad659..3ecef7e 100644
|
||||
--- a/nss_coredump.c
|
||||
+++ b/nss_coredump.c
|
||||
@@ -23,7 +23,11 @@
|
||||
@@ -25,7 +25,11 @@
|
||||
#include "nss_hal.h"
|
||||
#include "nss_log.h"
|
||||
#include <linux/kernel.h>
|
||||
@ -52,19 +48,14 @@ index ecad659..3ecef7e 100644
|
||||
+#endif
|
||||
#include <linux/jiffies.h> /* for time */
|
||||
#include "nss_tx_rx_common.h"
|
||||
|
||||
diff --git a/nss_hal/nss_hal.c b/nss_hal/nss_hal.c
|
||||
index 57974c1..d8c703b 100644
|
||||
|
||||
--- a/nss_hal/nss_hal.c
|
||||
+++ b/nss_hal/nss_hal.c
|
||||
@@ -24,6 +24,7 @@
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <linux/firmware.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/irq.h>
|
||||
+#include <linux/ethtool.h>
|
||||
|
||||
|
||||
#include "nss_hal.h"
|
||||
#include "nss_arch.h"
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 62e457f262aaa0db7113ad3ccbcb7ae49d4d7ea8 Mon Sep 17 00:00:00 2001
|
||||
From a6e3e81daab4eb9acbdef0ad1fed056e1bfbe320 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Tue, 8 Jun 2021 23:24:43 +0200
|
||||
Subject: [PATCH] DMA: Fix NULL pointer exceptions
|
||||
Subject: [PATCH 3/4] DMA: Fix NULL pointer exceptions
|
||||
|
||||
There are multiple instances that pass NULL instead
|
||||
of device to DMA functions.
|
||||
@ -12,13 +12,12 @@ So, simply pass the device structure pointers.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
nss_core.c | 2 +-
|
||||
nss_coredump.c | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
nss_core.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/nss_core.c
|
||||
+++ b/nss_core.c
|
||||
@@ -1617,7 +1617,7 @@ static int32_t nss_core_handle_cause_que
|
||||
@@ -1659,7 +1659,7 @@ static int32_t nss_core_handle_cause_que
|
||||
*
|
||||
*/
|
||||
if (unlikely((buffer_type == N2H_BUFFER_CRYPTO_RESP))) {
|
||||
@ -26,24 +25,3 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
+ dma_unmap_single(nss_ctx->dev, (desc->buffer + desc->payload_offs), desc->payload_len, DMA_FROM_DEVICE);
|
||||
goto consume;
|
||||
}
|
||||
|
||||
--- a/nss_coredump.c
|
||||
+++ b/nss_coredump.c
|
||||
@@ -154,7 +154,7 @@ void nss_fw_coredump_notify(struct nss_c
|
||||
dma_addr = nss_own->meminfo_ctx.logbuffer_dma;
|
||||
}
|
||||
|
||||
- dma_sync_single_for_cpu(NULL, dma_addr, sizeof(struct nss_log_descriptor), DMA_FROM_DEVICE);
|
||||
+ dma_sync_single_for_cpu(nss_own->dev, dma_addr, sizeof(struct nss_log_descriptor), DMA_FROM_DEVICE);
|
||||
|
||||
/*
|
||||
* If the current entry is smaller than or equal to the number of NSS_LOG_COREDUMP_LINE_NUM,
|
||||
@@ -181,7 +181,7 @@ void nss_fw_coredump_notify(struct nss_c
|
||||
|
||||
offset = (index * sizeof(struct nss_log_entry))
|
||||
+ offsetof(struct nss_log_descriptor, log_ring_buffer);
|
||||
- dma_sync_single_for_cpu(NULL, dma_addr + offset,
|
||||
+ dma_sync_single_for_cpu(nss_own->dev, dma_addr + offset,
|
||||
sizeof(struct nss_log_entry), DMA_FROM_DEVICE);
|
||||
nss_info_always("%px: %s\n", nss_own, nle_print->message);
|
||||
nle_print++;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
From 12cf63f66bfe509da6d845e5c716efd99dadf01e Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
From e6814c47d22ee5133a71016375239f87ea265794 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Tue, 5 Apr 2022 15:38:18 +0200
|
||||
Subject: [PATCH 4/8] nss-drv: rework NSS_CORE_DMA_CACHE_MAINT ops
|
||||
Subject: [PATCH 4/4] nss-drv: rework NSS_CORE_DMA_CACHE_MAINT ops
|
||||
|
||||
Rework NSS_CORE_DMA_CACHE_MAINT ops to use standard dma sync ops instead
|
||||
of using the direct arch function. This permit to skip any hack/patch
|
||||
@ -15,7 +15,7 @@ We hope the nss_profiler is correctly ported.
|
||||
We finally drop the NSS_CORE_DMA_CACHE_MAINT jus in case someone wants
|
||||
to use it.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
---
|
||||
nss_core.c | 136 +++++++++++++++++++++++++---------
|
||||
nss_core.h | 41 +++++-----
|
||||
@ -25,11 +25,9 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
nss_profiler.c | 3 +-
|
||||
6 files changed, 127 insertions(+), 68 deletions(-)
|
||||
|
||||
diff --git a/nss_core.c b/nss_core.c
|
||||
index 23dc155..f9e6014 100644
|
||||
--- a/nss_core.c
|
||||
+++ b/nss_core.c
|
||||
@@ -1429,6 +1429,8 @@ static inline void nss_core_handle_empty_buffers(struct nss_ctx_instance *nss_ct
|
||||
@@ -1471,6 +1471,8 @@ static inline void nss_core_handle_empty
|
||||
uint32_t count, uint32_t hlos_index,
|
||||
uint16_t mask)
|
||||
{
|
||||
@ -38,43 +36,43 @@ index 23dc155..f9e6014 100644
|
||||
while (count) {
|
||||
/*
|
||||
* Since we only return the primary skb, we have no way to unmap
|
||||
@@ -1482,7 +1484,9 @@ next:
|
||||
@@ -1524,7 +1526,9 @@ next:
|
||||
n2h_desc_ring->hlos_index = hlos_index;
|
||||
if_map->n2h_hlos_index[NSS_IF_N2H_EMPTY_BUFFER_RETURN_QUEUE] = hlos_index;
|
||||
|
||||
|
||||
- NSS_CORE_DMA_CACHE_MAINT((void *)&if_map->n2h_hlos_index[NSS_IF_N2H_EMPTY_BUFFER_RETURN_QUEUE], sizeof(uint32_t), DMA_TO_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev,
|
||||
+ n2h_hlos_index_to_dma(mem_ctx->if_map_dma, NSS_IF_N2H_EMPTY_BUFFER_RETURN_QUEUE),
|
||||
+ sizeof(uint32_t), DMA_TO_DEVICE);
|
||||
NSS_CORE_DSB();
|
||||
}
|
||||
|
||||
@@ -1504,6 +1508,7 @@ static int32_t nss_core_handle_cause_queue(struct int_ctx_instance *int_ctx, uin
|
||||
|
||||
@@ -1546,6 +1550,7 @@ static int32_t nss_core_handle_cause_que
|
||||
struct nss_ctx_instance *nss_ctx = int_ctx->nss_ctx;
|
||||
struct nss_meminfo_ctx *mem_ctx = &nss_ctx->meminfo_ctx;
|
||||
struct nss_if_mem_map *if_map = mem_ctx->if_map;
|
||||
+ int dma_size;
|
||||
|
||||
|
||||
qid = nss_core_cause_to_queue(cause);
|
||||
|
||||
@@ -1515,7 +1520,8 @@ static int32_t nss_core_handle_cause_queue(struct int_ctx_instance *int_ctx, uin
|
||||
|
||||
@@ -1557,7 +1562,8 @@ static int32_t nss_core_handle_cause_que
|
||||
n2h_desc_ring = &nss_ctx->n2h_desc_ring[qid];
|
||||
desc_if = &n2h_desc_ring->desc_ring;
|
||||
desc_ring = desc_if->desc;
|
||||
- NSS_CORE_DMA_CACHE_MAINT((void *)&if_map->n2h_nss_index[qid], sizeof(uint32_t), DMA_FROM_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, n2h_nss_index_to_dma(mem_ctx->if_map_dma, qid),
|
||||
+ dma_sync_single_for_cpu(nss_ctx->dev, n2h_nss_index_to_dma(mem_ctx->if_map_dma, qid),
|
||||
+ sizeof(uint32_t), DMA_FROM_DEVICE);
|
||||
NSS_CORE_DSB();
|
||||
nss_index = if_map->n2h_nss_index[qid];
|
||||
|
||||
@@ -1544,13 +1550,23 @@ static int32_t nss_core_handle_cause_queue(struct int_ctx_instance *int_ctx, uin
|
||||
|
||||
@@ -1586,13 +1592,23 @@ static int32_t nss_core_handle_cause_que
|
||||
start = hlos_index;
|
||||
end = (hlos_index + count) & mask;
|
||||
if (end > start) {
|
||||
- dmac_inv_range((void *)&desc_ring[start], (void *)&desc_ring[end] + sizeof(struct n2h_descriptor));
|
||||
+ dma_size = sizeof(struct n2h_descriptor) * (end - start + 1);
|
||||
+
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, n2h_desc_index_to_dma(if_map, qid, start),
|
||||
+ dma_sync_single_for_cpu(nss_ctx->dev, n2h_desc_index_to_dma(if_map, qid, start),
|
||||
+ dma_size, DMA_FROM_DEVICE);
|
||||
} else {
|
||||
/*
|
||||
@ -84,41 +82,41 @@ index 23dc155..f9e6014 100644
|
||||
- dmac_inv_range((void *)&desc_ring[0], (void *)&desc_ring[end] + sizeof(struct n2h_descriptor));
|
||||
+ dma_size = sizeof(struct n2h_descriptor) * (mask - start + 1);
|
||||
+
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, n2h_desc_index_to_dma(if_map, qid, start),
|
||||
+ dma_sync_single_for_cpu(nss_ctx->dev, n2h_desc_index_to_dma(if_map, qid, start),
|
||||
+ dma_size, DMA_FROM_DEVICE);
|
||||
+
|
||||
+ dma_size = sizeof(struct n2h_descriptor) * (end + 1);
|
||||
+
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, n2h_desc_index_to_dma(if_map, qid, 0), dma_size,
|
||||
+ dma_sync_single_for_cpu(nss_ctx->dev, n2h_desc_index_to_dma(if_map, qid, 0), dma_size,
|
||||
+ DMA_FROM_DEVICE);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@@ -1679,7 +1695,8 @@ next:
|
||||
@@ -1721,7 +1737,8 @@ next:
|
||||
n2h_desc_ring->hlos_index = hlos_index;
|
||||
if_map->n2h_hlos_index[qid] = hlos_index;
|
||||
|
||||
|
||||
- NSS_CORE_DMA_CACHE_MAINT((void *)&if_map->n2h_hlos_index[qid], sizeof(uint32_t), DMA_TO_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, n2h_hlos_index_to_dma(mem_ctx->if_map_dma, qid),
|
||||
+ sizeof(uint32_t), DMA_TO_DEVICE);
|
||||
NSS_CORE_DSB();
|
||||
|
||||
|
||||
return count;
|
||||
@@ -1691,11 +1708,12 @@ next:
|
||||
@@ -1733,11 +1750,12 @@ next:
|
||||
*/
|
||||
static void nss_core_init_nss(struct nss_ctx_instance *nss_ctx, struct nss_if_mem_map *if_map)
|
||||
{
|
||||
+ struct nss_meminfo_ctx *mem_ctx = &nss_ctx->meminfo_ctx;
|
||||
struct nss_top_instance *nss_top;
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
int i;
|
||||
|
||||
- NSS_CORE_DMA_CACHE_MAINT((void *)if_map, sizeof(*if_map), DMA_FROM_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, mem_ctx->if_map_dma, sizeof(*if_map), DMA_FROM_DEVICE);
|
||||
+ dma_sync_single_for_cpu(nss_ctx->dev, mem_ctx->if_map_dma, sizeof(*if_map), DMA_FROM_DEVICE);
|
||||
NSS_CORE_DSB();
|
||||
|
||||
|
||||
/*
|
||||
@@ -1762,6 +1780,7 @@ static void nss_core_alloc_paged_buffers(struct nss_ctx_instance *nss_ctx, struc
|
||||
@@ -1834,6 +1852,7 @@ static void nss_core_alloc_paged_buffers
|
||||
uint16_t count, int16_t mask, int32_t hlos_index, uint32_t alloc_fail_count,
|
||||
uint32_t buffer_type, uint32_t buffer_queue, uint32_t stats_index)
|
||||
{
|
||||
@ -126,7 +124,7 @@ index 23dc155..f9e6014 100644
|
||||
struct sk_buff *nbuf;
|
||||
struct page *npage;
|
||||
struct hlos_h2n_desc_rings *h2n_desc_ring = &nss_ctx->h2n_desc_rings[buffer_queue];
|
||||
@@ -1831,7 +1850,9 @@ static void nss_core_alloc_paged_buffers(struct nss_ctx_instance *nss_ctx, struc
|
||||
@@ -1903,7 +1922,9 @@ static void nss_core_alloc_paged_buffers
|
||||
/*
|
||||
* Flush the descriptor
|
||||
*/
|
||||
@ -134,20 +132,20 @@ index 23dc155..f9e6014 100644
|
||||
+ dma_sync_single_for_device(nss_ctx->dev,
|
||||
+ h2n_desc_index_to_dma(if_map, buffer_queue, hlos_index),
|
||||
+ sizeof(*desc), DMA_TO_DEVICE);
|
||||
|
||||
|
||||
hlos_index = (hlos_index + 1) & (mask);
|
||||
count--;
|
||||
@@ -1845,7 +1866,8 @@ static void nss_core_alloc_paged_buffers(struct nss_ctx_instance *nss_ctx, struc
|
||||
@@ -1917,7 +1938,8 @@ static void nss_core_alloc_paged_buffers
|
||||
h2n_desc_ring->hlos_index = hlos_index;
|
||||
if_map->h2n_hlos_index[buffer_queue] = hlos_index;
|
||||
|
||||
|
||||
- NSS_CORE_DMA_CACHE_MAINT(&if_map->h2n_hlos_index[buffer_queue], sizeof(uint32_t), DMA_TO_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, h2n_hlos_index_to_dma(mem_ctx->if_map_dma, buffer_queue),
|
||||
+ sizeof(uint32_t), DMA_TO_DEVICE);
|
||||
NSS_CORE_DSB();
|
||||
|
||||
|
||||
NSS_PKT_STATS_INC(&nss_top->stats_drv[stats_index]);
|
||||
@@ -1858,7 +1880,7 @@ static void nss_core_alloc_paged_buffers(struct nss_ctx_instance *nss_ctx, struc
|
||||
@@ -1930,7 +1952,7 @@ static void nss_core_alloc_paged_buffers
|
||||
static void nss_core_alloc_jumbo_mru_buffers(struct nss_ctx_instance *nss_ctx, struct nss_if_mem_map *if_map,
|
||||
int jumbo_mru, uint16_t count, int16_t mask, int32_t hlos_index)
|
||||
{
|
||||
@ -156,7 +154,7 @@ index 23dc155..f9e6014 100644
|
||||
struct sk_buff *nbuf;
|
||||
struct hlos_h2n_desc_rings *h2n_desc_ring = &nss_ctx->h2n_desc_rings[NSS_IF_H2N_EMPTY_BUFFER_QUEUE];
|
||||
struct h2n_desc_if_instance *desc_if = &h2n_desc_ring->desc_ring;
|
||||
@@ -1905,7 +1927,9 @@ static void nss_core_alloc_jumbo_mru_buffers(struct nss_ctx_instance *nss_ctx, s
|
||||
@@ -1977,7 +1999,9 @@ static void nss_core_alloc_jumbo_mru_buf
|
||||
/*
|
||||
* Flush the descriptor
|
||||
*/
|
||||
@ -164,20 +162,20 @@ index 23dc155..f9e6014 100644
|
||||
+ dma_sync_single_for_device(nss_ctx->dev,
|
||||
+ h2n_desc_index_to_dma(if_map, NSS_IF_H2N_EMPTY_BUFFER_QUEUE, hlos_index),
|
||||
+ sizeof(*desc), DMA_TO_DEVICE);
|
||||
|
||||
|
||||
hlos_index = (hlos_index + 1) & (mask);
|
||||
count--;
|
||||
@@ -1919,7 +1943,8 @@ static void nss_core_alloc_jumbo_mru_buffers(struct nss_ctx_instance *nss_ctx, s
|
||||
@@ -1991,7 +2015,8 @@ static void nss_core_alloc_jumbo_mru_buf
|
||||
h2n_desc_ring->hlos_index = hlos_index;
|
||||
if_map->h2n_hlos_index[NSS_IF_H2N_EMPTY_BUFFER_QUEUE] = hlos_index;
|
||||
|
||||
|
||||
- NSS_CORE_DMA_CACHE_MAINT(&if_map->h2n_hlos_index[NSS_IF_H2N_EMPTY_BUFFER_QUEUE], sizeof(uint32_t), DMA_TO_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, h2n_hlos_index_to_dma(mem_ctx->if_map_dma, NSS_IF_H2N_EMPTY_BUFFER_QUEUE),
|
||||
+ sizeof(uint32_t), DMA_TO_DEVICE);
|
||||
NSS_CORE_DSB();
|
||||
|
||||
|
||||
NSS_PKT_STATS_INC(&nss_top->stats_drv[NSS_DRV_STATS_TX_EMPTY]);
|
||||
@@ -1932,6 +1957,7 @@ static void nss_core_alloc_jumbo_mru_buffers(struct nss_ctx_instance *nss_ctx, s
|
||||
@@ -2004,6 +2029,7 @@ static void nss_core_alloc_jumbo_mru_buf
|
||||
static void nss_core_alloc_max_avail_size_buffers(struct nss_ctx_instance *nss_ctx, struct nss_if_mem_map *if_map,
|
||||
uint16_t max_buf_size, uint16_t count, int16_t mask, int32_t hlos_index)
|
||||
{
|
||||
@ -185,15 +183,15 @@ index 23dc155..f9e6014 100644
|
||||
struct hlos_h2n_desc_rings *h2n_desc_ring = &nss_ctx->h2n_desc_rings[NSS_IF_H2N_EMPTY_BUFFER_QUEUE];
|
||||
struct h2n_desc_if_instance *desc_if = &h2n_desc_ring->desc_ring;
|
||||
struct h2n_descriptor *desc_ring = desc_if->desc;
|
||||
@@ -1939,6 +1965,7 @@ static void nss_core_alloc_max_avail_size_buffers(struct nss_ctx_instance *nss_c
|
||||
@@ -2011,6 +2037,7 @@ static void nss_core_alloc_max_avail_siz
|
||||
uint16_t payload_len = max_buf_size + NET_SKB_PAD;
|
||||
uint16_t start = hlos_index;
|
||||
uint16_t prev_hlos_index;
|
||||
+ int dma_size;
|
||||
|
||||
|
||||
while (count) {
|
||||
dma_addr_t buffer;
|
||||
@@ -1991,13 +2018,26 @@ static void nss_core_alloc_max_avail_size_buffers(struct nss_ctx_instance *nss_c
|
||||
@@ -2063,13 +2090,26 @@ static void nss_core_alloc_max_avail_siz
|
||||
* Flush the descriptors, including the descriptor at prev_hlos_index.
|
||||
*/
|
||||
if (prev_hlos_index > start) {
|
||||
@ -221,19 +219,19 @@ index 23dc155..f9e6014 100644
|
||||
+ h2n_desc_index_to_dma(if_map, NSS_IF_H2N_EMPTY_BUFFER_QUEUE, 0),
|
||||
+ dma_size, DMA_TO_DEVICE);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@@ -2008,7 +2048,8 @@ static void nss_core_alloc_max_avail_size_buffers(struct nss_ctx_instance *nss_c
|
||||
@@ -2080,7 +2120,8 @@ static void nss_core_alloc_max_avail_siz
|
||||
h2n_desc_ring->hlos_index = hlos_index;
|
||||
if_map->h2n_hlos_index[NSS_IF_H2N_EMPTY_BUFFER_QUEUE] = hlos_index;
|
||||
|
||||
|
||||
- NSS_CORE_DMA_CACHE_MAINT(&if_map->h2n_hlos_index[NSS_IF_H2N_EMPTY_BUFFER_QUEUE], sizeof(uint32_t), DMA_TO_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, h2n_hlos_index_to_dma(mem_ctx->if_map_dma, NSS_IF_H2N_EMPTY_BUFFER_QUEUE),
|
||||
+ sizeof(uint32_t), DMA_TO_DEVICE);
|
||||
NSS_CORE_DSB();
|
||||
|
||||
|
||||
NSS_PKT_STATS_INC(&nss_top->stats_drv[NSS_DRV_STATS_TX_EMPTY]);
|
||||
@@ -2021,6 +2062,7 @@ static void nss_core_alloc_max_avail_size_buffers(struct nss_ctx_instance *nss_c
|
||||
@@ -2093,6 +2134,7 @@ static void nss_core_alloc_max_avail_siz
|
||||
static inline void nss_core_handle_empty_buffer_sos(struct nss_ctx_instance *nss_ctx,
|
||||
struct nss_if_mem_map *if_map, uint16_t max_buf_size)
|
||||
{
|
||||
@ -241,17 +239,17 @@ index 23dc155..f9e6014 100644
|
||||
uint16_t count, size, mask;
|
||||
int32_t nss_index, hlos_index;
|
||||
struct hlos_h2n_desc_rings *h2n_desc_ring = &nss_ctx->h2n_desc_rings[NSS_IF_H2N_EMPTY_BUFFER_QUEUE];
|
||||
@@ -2031,7 +2073,8 @@ static inline void nss_core_handle_empty_buffer_sos(struct nss_ctx_instance *nss
|
||||
@@ -2103,7 +2145,8 @@ static inline void nss_core_handle_empty
|
||||
/*
|
||||
* Check how many empty buffers could be filled in queue
|
||||
*/
|
||||
- NSS_CORE_DMA_CACHE_MAINT(&if_map->h2n_nss_index[NSS_IF_H2N_EMPTY_BUFFER_QUEUE], sizeof(uint32_t), DMA_FROM_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, h2n_nss_index_to_dma(mem_ctx->if_map_dma, NSS_IF_H2N_EMPTY_BUFFER_QUEUE),
|
||||
+ dma_sync_single_for_cpu(nss_ctx->dev, h2n_nss_index_to_dma(mem_ctx->if_map_dma, NSS_IF_H2N_EMPTY_BUFFER_QUEUE),
|
||||
+ sizeof(uint32_t), DMA_FROM_DEVICE);
|
||||
NSS_CORE_DSB();
|
||||
nss_index = if_map->h2n_nss_index[NSS_IF_H2N_EMPTY_BUFFER_QUEUE];
|
||||
|
||||
@@ -2076,6 +2119,7 @@ static inline void nss_core_handle_empty_buffer_sos(struct nss_ctx_instance *nss
|
||||
|
||||
@@ -2148,6 +2191,7 @@ static inline void nss_core_handle_empty
|
||||
static inline void nss_core_handle_paged_empty_buffer_sos(struct nss_ctx_instance *nss_ctx,
|
||||
struct nss_if_mem_map *if_map, uint16_t max_buf_size)
|
||||
{
|
||||
@ -259,23 +257,23 @@ index 23dc155..f9e6014 100644
|
||||
uint16_t count, size, mask;
|
||||
int32_t nss_index, hlos_index;
|
||||
struct hlos_h2n_desc_rings *h2n_desc_ring = &nss_ctx->h2n_desc_rings[NSS_IF_H2N_EMPTY_PAGED_BUFFER_QUEUE];
|
||||
@@ -2083,7 +2127,8 @@ static inline void nss_core_handle_paged_empty_buffer_sos(struct nss_ctx_instanc
|
||||
@@ -2155,7 +2199,8 @@ static inline void nss_core_handle_paged
|
||||
/*
|
||||
* Check how many empty buffers could be filled in queue
|
||||
*/
|
||||
- NSS_CORE_DMA_CACHE_MAINT((void *)&if_map->h2n_nss_index[NSS_IF_H2N_EMPTY_PAGED_BUFFER_QUEUE], sizeof(uint32_t), DMA_FROM_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, h2n_nss_index_to_dma(mem_ctx->if_map_dma, NSS_IF_H2N_EMPTY_PAGED_BUFFER_QUEUE),
|
||||
+ dma_sync_single_for_cpu(nss_ctx->dev, h2n_nss_index_to_dma(mem_ctx->if_map_dma, NSS_IF_H2N_EMPTY_PAGED_BUFFER_QUEUE),
|
||||
+ sizeof(uint32_t), DMA_FROM_DEVICE);
|
||||
NSS_CORE_DSB();
|
||||
nss_index = if_map->h2n_nss_index[NSS_IF_H2N_EMPTY_PAGED_BUFFER_QUEUE];
|
||||
|
||||
@@ -2651,9 +2696,11 @@ void nss_skb_reuse(struct sk_buff *nbuf)
|
||||
|
||||
@@ -2732,9 +2777,11 @@ void nss_skb_reuse(struct sk_buff *nbuf)
|
||||
* Sends one skb to NSS FW
|
||||
*/
|
||||
static inline int32_t nss_core_send_buffer_simple_skb(struct nss_ctx_instance *nss_ctx,
|
||||
- struct h2n_desc_if_instance *desc_if, uint32_t if_num,
|
||||
- struct sk_buff *nbuf, uint16_t hlos_index, uint16_t flags, uint8_t buffer_type, uint16_t mss)
|
||||
+ struct h2n_desc_if_instance *desc_if, uint32_t if_num, struct sk_buff *nbuf,
|
||||
+ struct h2n_desc_if_instance *desc_if, uint32_t if_num, struct sk_buff *nbuf,
|
||||
+ uint16_t qid, uint16_t hlos_index, uint16_t flags, uint8_t buffer_type, uint16_t mss)
|
||||
{
|
||||
+ struct nss_meminfo_ctx *mem_ctx = &nss_ctx->meminfo_ctx;
|
||||
@ -283,27 +281,27 @@ index 23dc155..f9e6014 100644
|
||||
struct h2n_descriptor *desc_ring = desc_if->desc;
|
||||
struct h2n_descriptor *desc;
|
||||
uint16_t bit_flags;
|
||||
@@ -2707,7 +2754,8 @@ static inline int32_t nss_core_send_buffer_simple_skb(struct nss_ctx_instance *n
|
||||
@@ -2788,7 +2835,8 @@ static inline int32_t nss_core_send_buff
|
||||
(nss_ptr_t)nbuf, (uint16_t)(nbuf->data - nbuf->head), nbuf->len,
|
||||
sz, (uint32_t)nbuf->priority, mss, bit_flags);
|
||||
|
||||
|
||||
- NSS_CORE_DMA_CACHE_MAINT((void *)desc, sizeof(*desc), DMA_TO_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, h2n_desc_index_to_dma(if_map, qid, hlos_index),
|
||||
+ sizeof(*desc), DMA_TO_DEVICE);
|
||||
|
||||
|
||||
/*
|
||||
* We are done using the skb fields and can reuse it now
|
||||
@@ -2731,7 +2779,8 @@ no_reuse:
|
||||
@@ -2812,7 +2860,8 @@ no_reuse:
|
||||
(nss_ptr_t)nbuf, (uint16_t)(nbuf->data - nbuf->head), nbuf->len,
|
||||
(uint16_t)skb_end_offset(nbuf), (uint32_t)nbuf->priority, mss, bit_flags);
|
||||
|
||||
|
||||
- NSS_CORE_DMA_CACHE_MAINT((void *)desc, sizeof(*desc), DMA_TO_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, h2n_desc_index_to_dma(if_map, qid, hlos_index),
|
||||
+ sizeof(*desc), DMA_TO_DEVICE);
|
||||
|
||||
|
||||
NSS_PKT_STATS_INC(&nss_ctx->nss_top->stats_drv[NSS_DRV_STATS_TX_SIMPLE]);
|
||||
return 1;
|
||||
@@ -2745,9 +2794,11 @@ no_reuse:
|
||||
@@ -2826,9 +2875,11 @@ no_reuse:
|
||||
* Used to differentiate from FRAGLIST
|
||||
*/
|
||||
static inline int32_t nss_core_send_buffer_nr_frags(struct nss_ctx_instance *nss_ctx,
|
||||
@ -317,37 +315,37 @@ index 23dc155..f9e6014 100644
|
||||
struct h2n_descriptor *desc_ring = desc_if->desc;
|
||||
struct h2n_descriptor *desc;
|
||||
const skb_frag_t *frag;
|
||||
@@ -2787,7 +2838,8 @@ static inline int32_t nss_core_send_buffer_nr_frags(struct nss_ctx_instance *nss
|
||||
@@ -2868,7 +2919,8 @@ static inline int32_t nss_core_send_buff
|
||||
(nss_ptr_t)NULL, nbuf->data - nbuf->head, nbuf->len - nbuf->data_len,
|
||||
skb_end_offset(nbuf), (uint32_t)nbuf->priority, mss, bit_flags | H2N_BIT_FLAG_FIRST_SEGMENT);
|
||||
|
||||
|
||||
- NSS_CORE_DMA_CACHE_MAINT((void *)desc, sizeof(*desc), DMA_TO_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, h2n_desc_index_to_dma(if_map, qid, hlos_index),
|
||||
+ sizeof(*desc), DMA_TO_DEVICE);
|
||||
|
||||
|
||||
/*
|
||||
* Now handle rest of the fragments.
|
||||
@@ -2811,7 +2863,8 @@ static inline int32_t nss_core_send_buffer_nr_frags(struct nss_ctx_instance *nss
|
||||
@@ -2892,7 +2944,8 @@ static inline int32_t nss_core_send_buff
|
||||
(nss_ptr_t)NULL, 0, skb_frag_size(frag), skb_frag_size(frag),
|
||||
nbuf->priority, mss, bit_flags);
|
||||
|
||||
|
||||
- NSS_CORE_DMA_CACHE_MAINT((void *)desc, sizeof(*desc), DMA_TO_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, h2n_desc_index_to_dma(if_map, qid, hlos_index),
|
||||
+ sizeof(*desc), DMA_TO_DEVICE);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@@ -2827,7 +2880,8 @@ static inline int32_t nss_core_send_buffer_nr_frags(struct nss_ctx_instance *nss
|
||||
@@ -2908,7 +2961,8 @@ static inline int32_t nss_core_send_buff
|
||||
desc->bit_flags &= ~(H2N_BIT_FLAG_DISCARD);
|
||||
desc->opaque = (nss_ptr_t)nbuf;
|
||||
|
||||
|
||||
- NSS_CORE_DMA_CACHE_MAINT((void *)desc, sizeof(*desc), DMA_TO_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, h2n_desc_index_to_dma(if_map, qid, hlos_index),
|
||||
+ sizeof(*desc), DMA_TO_DEVICE);
|
||||
|
||||
|
||||
NSS_PKT_STATS_INC(&nss_ctx->nss_top->stats_drv[NSS_DRV_STATS_TX_NR_FRAGS]);
|
||||
return i+1;
|
||||
@@ -2841,9 +2895,11 @@ static inline int32_t nss_core_send_buffer_nr_frags(struct nss_ctx_instance *nss
|
||||
@@ -2922,9 +2976,11 @@ static inline int32_t nss_core_send_buff
|
||||
* Used to differentiate from FRAGS
|
||||
*/
|
||||
static inline int32_t nss_core_send_buffer_fraglist(struct nss_ctx_instance *nss_ctx,
|
||||
@ -361,49 +359,49 @@ index 23dc155..f9e6014 100644
|
||||
struct h2n_descriptor *desc_ring = desc_if->desc;
|
||||
struct h2n_descriptor *desc;
|
||||
dma_addr_t buffer;
|
||||
@@ -2882,7 +2938,8 @@ static inline int32_t nss_core_send_buffer_fraglist(struct nss_ctx_instance *nss
|
||||
@@ -2963,7 +3019,8 @@ static inline int32_t nss_core_send_buff
|
||||
(nss_ptr_t)nbuf, nbuf->data - nbuf->head, nbuf->len - nbuf->data_len,
|
||||
skb_end_offset(nbuf), (uint32_t)nbuf->priority, mss, bit_flags | H2N_BIT_FLAG_FIRST_SEGMENT);
|
||||
|
||||
|
||||
- NSS_CORE_DMA_CACHE_MAINT((void *)desc, sizeof(*desc), DMA_TO_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, h2n_desc_index_to_dma(if_map, qid, hlos_index),
|
||||
+ sizeof(*desc), DMA_TO_DEVICE);
|
||||
|
||||
|
||||
/*
|
||||
* Walk the frag_list in nbuf
|
||||
@@ -2935,7 +2992,8 @@ static inline int32_t nss_core_send_buffer_fraglist(struct nss_ctx_instance *nss
|
||||
@@ -3016,7 +3073,8 @@ static inline int32_t nss_core_send_buff
|
||||
(nss_ptr_t)iter, iter->data - iter->head, iter->len - iter->data_len,
|
||||
skb_end_offset(iter), iter->priority, mss, bit_flags);
|
||||
|
||||
|
||||
- NSS_CORE_DMA_CACHE_MAINT((void *)desc, sizeof(*desc), DMA_TO_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, h2n_desc_index_to_dma(if_map, qid, hlos_index),
|
||||
+ sizeof(*desc), DMA_TO_DEVICE);
|
||||
|
||||
|
||||
i++;
|
||||
}
|
||||
@@ -2954,7 +3012,8 @@ static inline int32_t nss_core_send_buffer_fraglist(struct nss_ctx_instance *nss
|
||||
@@ -3035,7 +3093,8 @@ static inline int32_t nss_core_send_buff
|
||||
* Update bit flag for last descriptor.
|
||||
*/
|
||||
desc->bit_flags |= H2N_BIT_FLAG_LAST_SEGMENT;
|
||||
- NSS_CORE_DMA_CACHE_MAINT((void *)desc, sizeof(*desc), DMA_TO_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, h2n_desc_index_to_dma(if_map, qid, hlos_index),
|
||||
+ sizeof(*desc), DMA_TO_DEVICE);
|
||||
|
||||
|
||||
NSS_PKT_STATS_INC(&nss_ctx->nss_top->stats_drv[NSS_DRV_STATS_TX_FRAGLIST]);
|
||||
return i+1;
|
||||
@@ -3025,8 +3084,10 @@ int32_t nss_core_send_buffer(struct nss_ctx_instance *nss_ctx, uint32_t if_num,
|
||||
@@ -3114,8 +3173,10 @@ int32_t nss_core_send_buffer(struct nss_
|
||||
* We need to work out if there's sufficent space in our transmit descriptor
|
||||
* ring to place all the segments of a nbuf.
|
||||
*/
|
||||
- NSS_CORE_DMA_CACHE_MAINT((void *)&if_map->h2n_nss_index[qid], sizeof(uint32_t), DMA_FROM_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, h2n_nss_index_to_dma(mem_ctx->if_map_dma, qid),
|
||||
+ dma_sync_single_for_cpu(nss_ctx->dev, h2n_nss_index_to_dma(mem_ctx->if_map_dma, qid),
|
||||
+ sizeof(uint32_t), DMA_FROM_DEVICE);
|
||||
NSS_CORE_DSB();
|
||||
+
|
||||
nss_index = if_map->h2n_nss_index[qid];
|
||||
h2n_desc_ring->nss_index_local = nss_index;
|
||||
count = ((nss_index - hlos_index - 1) + size) & (mask);
|
||||
@@ -3095,13 +3156,13 @@ int32_t nss_core_send_buffer(struct nss_ctx_instance *nss_ctx, uint32_t if_num,
|
||||
@@ -3180,13 +3241,13 @@ int32_t nss_core_send_buffer(struct nss_
|
||||
count = 0;
|
||||
if (likely((segments == 0) || is_bounce)) {
|
||||
count = nss_core_send_buffer_simple_skb(nss_ctx, desc_if, if_num,
|
||||
@ -418,25 +416,23 @@ index 23dc155..f9e6014 100644
|
||||
- nbuf, hlos_index, flags, buffer_type, mss);
|
||||
+ nbuf, qid, hlos_index, flags, buffer_type, mss);
|
||||
}
|
||||
|
||||
|
||||
if (unlikely(count <= 0)) {
|
||||
@@ -3125,7 +3186,8 @@ int32_t nss_core_send_buffer(struct nss_ctx_instance *nss_ctx, uint32_t if_num,
|
||||
@@ -3210,7 +3271,8 @@ int32_t nss_core_send_buffer(struct nss_
|
||||
h2n_desc_ring->hlos_index = hlos_index;
|
||||
if_map->h2n_hlos_index[qid] = hlos_index;
|
||||
|
||||
|
||||
- NSS_CORE_DMA_CACHE_MAINT(&if_map->h2n_hlos_index[qid], sizeof(uint32_t), DMA_TO_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, h2n_hlos_index_to_dma(mem_ctx->if_map_dma, qid),
|
||||
+ sizeof(uint32_t), DMA_TO_DEVICE);
|
||||
NSS_CORE_DSB();
|
||||
|
||||
|
||||
#ifdef CONFIG_DEBUG_KMEMLEAK
|
||||
diff --git a/nss_core.h b/nss_core.h
|
||||
index d7f62fe..7ddf6ce 100644
|
||||
--- a/nss_core.h
|
||||
+++ b/nss_core.h
|
||||
@@ -100,31 +100,30 @@
|
||||
@@ -105,31 +105,30 @@
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
- * Cache operation
|
||||
+ * DMA Offset helper
|
||||
@ -458,7 +454,7 @@ index d7f62fe..7ddf6ce 100644
|
||||
+#define n2h_nss_index_to_dma(_if_map_addr, _index) (_if_map_addr) + n2h_nss_index_offset + (sizeof(uint32_t) * (_index))
|
||||
+#define h2n_hlos_index_to_dma(_if_map_addr, _index) (_if_map_addr) + h2n_hlos_index_offset + (sizeof(uint32_t) * (_index))
|
||||
+#define n2h_hlos_index_to_dma(_if_map_addr, _index) (_if_map_addr) + n2h_hlos_index_offset + (sizeof(uint32_t) * (_index))
|
||||
|
||||
|
||||
/*
|
||||
- * nss_core_dma_cache_maint()
|
||||
- * Perform the appropriate cache op based on direction
|
||||
@ -483,14 +479,12 @@ index d7f62fe..7ddf6ce 100644
|
||||
+#define NSS_CORE_DSB() dsb(sy)
|
||||
+#define NSS_CORE_DMA_CACHE_MAINT(dev, start, size, dir) BUILD_BUG_ON_MSG(1, \
|
||||
+ "NSS_CORE_DMA_CACHE_MAINT is deprecated. Fix the code to use correct dma_sync_* API")
|
||||
|
||||
|
||||
#define NSS_DEVICE_IF_START NSS_PHYSICAL_IF_START
|
||||
|
||||
diff --git a/nss_hal/ipq806x/nss_hal_pvt.c b/nss_hal/ipq806x/nss_hal_pvt.c
|
||||
index 52d63b0..5375087 100644
|
||||
|
||||
--- a/nss_hal/ipq806x/nss_hal_pvt.c
|
||||
+++ b/nss_hal/ipq806x/nss_hal_pvt.c
|
||||
@@ -474,10 +474,9 @@ static struct nss_platform_data *__nss_hal_of_get_pdata(struct platform_device *
|
||||
@@ -474,10 +474,9 @@ static struct nss_platform_data *__nss_h
|
||||
/*
|
||||
* Clear TCM memory used by this core
|
||||
*/
|
||||
@ -501,13 +495,11 @@ index 52d63b0..5375087 100644
|
||||
- }
|
||||
+
|
||||
NSS_CORE_DSB();
|
||||
|
||||
|
||||
/*
|
||||
diff --git a/nss_hal/ipq807x/nss_hal_pvt.c b/nss_hal/ipq807x/nss_hal_pvt.c
|
||||
index bb8f42f..733d7f1 100644
|
||||
--- a/nss_hal/ipq807x/nss_hal_pvt.c
|
||||
+++ b/nss_hal/ipq807x/nss_hal_pvt.c
|
||||
@@ -256,10 +256,9 @@ static struct nss_platform_data *__nss_hal_of_get_pdata(struct platform_device *
|
||||
@@ -256,10 +256,9 @@ static struct nss_platform_data *__nss_h
|
||||
/*
|
||||
* Clear TCM memory used by this core
|
||||
*/
|
||||
@ -518,43 +510,39 @@ index bb8f42f..733d7f1 100644
|
||||
- }
|
||||
+
|
||||
NSS_CORE_DSB();
|
||||
|
||||
|
||||
/*
|
||||
diff --git a/nss_meminfo.c b/nss_meminfo.c
|
||||
index 2255eae..d804524 100644
|
||||
--- a/nss_meminfo.c
|
||||
+++ b/nss_meminfo.c
|
||||
@@ -414,7 +414,6 @@ static bool nss_meminfo_init_block_lists(struct nss_ctx_instance *nss_ctx)
|
||||
@@ -414,7 +414,6 @@ static bool nss_meminfo_init_block_lists
|
||||
/*
|
||||
* Flush the updated meminfo request.
|
||||
*/
|
||||
- NSS_CORE_DMA_CACHE_MAINT(r, sizeof(struct nss_meminfo_request), DMA_TO_DEVICE);
|
||||
NSS_CORE_DSB();
|
||||
|
||||
|
||||
/*
|
||||
@@ -538,7 +537,7 @@ static bool nss_meminfo_configure_n2h_h2n_rings(struct nss_ctx_instance *nss_ctx
|
||||
@@ -545,7 +544,7 @@ static bool nss_meminfo_configure_n2h_h2
|
||||
* Bring a fresh copy of if_map from memory in order to read it correctly.
|
||||
*/
|
||||
if_map = mem_ctx->if_map;
|
||||
- NSS_CORE_DMA_CACHE_MAINT((void *)if_map, sizeof(struct nss_if_mem_map), DMA_FROM_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, mem_ctx->if_map_dma, sizeof(struct nss_if_mem_map), DMA_FROM_DEVICE);
|
||||
+ dma_sync_single_for_cpu(nss_ctx->dev, mem_ctx->if_map_dma, sizeof(struct nss_if_mem_map), DMA_FROM_DEVICE);
|
||||
NSS_CORE_DSB();
|
||||
|
||||
|
||||
if_map->n2h_rings = NSS_N2H_RING_COUNT;
|
||||
@@ -576,7 +575,7 @@ static bool nss_meminfo_configure_n2h_h2n_rings(struct nss_ctx_instance *nss_ctx
|
||||
@@ -583,7 +582,7 @@ static bool nss_meminfo_configure_n2h_h2
|
||||
/*
|
||||
* Flush the updated nss_if_mem_map.
|
||||
*/
|
||||
- NSS_CORE_DMA_CACHE_MAINT((void *)if_map, sizeof(struct nss_if_mem_map), DMA_TO_DEVICE);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, mem_ctx->if_map_dma, sizeof(struct nss_if_mem_map), DMA_TO_DEVICE);
|
||||
NSS_CORE_DSB();
|
||||
|
||||
|
||||
return true;
|
||||
diff --git a/nss_profiler.c b/nss_profiler.c
|
||||
index 5717ac3..aadc7c9 100755
|
||||
--- a/nss_profiler.c
|
||||
+++ b/nss_profiler.c
|
||||
@@ -199,11 +199,12 @@ EXPORT_SYMBOL(nss_profile_dma_deregister_cb);
|
||||
@@ -199,11 +199,12 @@ EXPORT_SYMBOL(nss_profile_dma_deregister
|
||||
struct nss_profile_sdma_ctrl *nss_profile_dma_get_ctrl(struct nss_ctx_instance *nss_ctx)
|
||||
{
|
||||
struct nss_profile_sdma_ctrl *ctrl = nss_ctx->meminfo_ctx.sdma_ctrl;
|
||||
@ -562,12 +550,9 @@ index 5717ac3..aadc7c9 100755
|
||||
if (!ctrl) {
|
||||
return ctrl;
|
||||
}
|
||||
|
||||
|
||||
- dmac_inv_range(ctrl, &ctrl->cidx);
|
||||
+ dma_sync_single_for_device(nss_ctx->dev, (dma_addr_t) ctrl, size, DMA_FROM_DEVICE);
|
||||
+ dma_sync_single_for_cpu(nss_ctx->dev, (dma_addr_t) ctrl, size, DMA_FROM_DEVICE);
|
||||
dsb(sy);
|
||||
return ctrl;
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
|
||||
|
||||
@ -0,0 +1,114 @@
|
||||
From 1c2b564d7b29644765925a784d468f40555ded8a Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Fri, 10 Feb 2023 12:50:51 +0100
|
||||
Subject: [PATCH] nss-drv: rework getting the reserved-memory size
|
||||
|
||||
Currently, the way NSS DRV gets the reserved memory node strictly depends
|
||||
on the nss@40000000 node being present so it can find it after globaly
|
||||
looking for the reserved-memory node and then going through its children.
|
||||
|
||||
After that its evaluation the address and size cells manually in order to
|
||||
properly calculate the size of reserved-memory.
|
||||
|
||||
We can make this way more reliable and generic, so lets pass the memory
|
||||
region wia the NSS common DTS node, match it via its compatible and then
|
||||
get the memory region phandle and simply convert it to a resource.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
nss_core.c | 70 +++++++++++++++++++++++-------------------------------
|
||||
1 file changed, 30 insertions(+), 40 deletions(-)
|
||||
|
||||
--- a/nss_core.c
|
||||
+++ b/nss_core.c
|
||||
@@ -26,6 +26,8 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/of.h>
|
||||
+#include <linux/of_address.h>
|
||||
+#include <linux/sizes.h>
|
||||
#include <nss_hal.h>
|
||||
#include <net/dst.h>
|
||||
#ifdef CONFIG_BRIDGE_NETFILTER
|
||||
@@ -491,50 +493,38 @@ static void nss_core_handle_crypto_pkt(s
|
||||
*/
|
||||
static uint32_t nss_soc_mem_info(void)
|
||||
{
|
||||
- struct device_node *node;
|
||||
- struct device_node *snode;
|
||||
- int addr_cells;
|
||||
- int size_cells;
|
||||
- int n_items;
|
||||
- uint32_t nss_msize = 8 << 20; /* default: 8MB */
|
||||
- const __be32 *ppp;
|
||||
-
|
||||
- node = of_find_node_by_name(NULL, "reserved-memory");
|
||||
- if (!node) {
|
||||
- nss_info_always("reserved-memory not found\n");
|
||||
- return nss_msize;
|
||||
- }
|
||||
-
|
||||
- ppp = (__be32 *)of_get_property(node, "#address-cells", NULL);
|
||||
- addr_cells = ppp ? be32_to_cpup(ppp) : 2;
|
||||
- nss_info("%px addr cells %d\n", ppp, addr_cells);
|
||||
- ppp = (__be32 *)of_get_property(node, "#size-cells", NULL);
|
||||
- size_cells = ppp ? be32_to_cpup(ppp) : 2;
|
||||
- nss_info("%px size cells %d\n", ppp, size_cells);
|
||||
-
|
||||
- for_each_child_of_node(node, snode) {
|
||||
- /*
|
||||
- * compare (snode->full_name, "/reserved-memory/nss@40000000") may be safer
|
||||
- */
|
||||
- nss_info("%px snode %s fn %s\n", snode, snode->name, snode->full_name);
|
||||
- if (strcmp(snode->name, "nss") == 0)
|
||||
- break;
|
||||
- }
|
||||
- of_node_put(node);
|
||||
- if (!snode) {
|
||||
- nss_info_always("nss@node not found: needed to determine NSS reserved DDR\n");
|
||||
- return nss_msize;
|
||||
- }
|
||||
-
|
||||
- ppp = (__be32 *)of_get_property(snode, "reg", &n_items);
|
||||
- if (ppp) {
|
||||
- n_items /= sizeof(ppp[0]);
|
||||
- nss_msize = be32_to_cpup(ppp + addr_cells + size_cells - 1);
|
||||
- nss_info_always("addr/size storage words %d %d # words %d in DTS, ddr size %x\n",
|
||||
- addr_cells, size_cells, n_items, nss_msize);
|
||||
+ struct device_node *common_node, *memory_node;
|
||||
+ struct resource r;
|
||||
+ int ret;
|
||||
+
|
||||
+ common_node = of_find_compatible_node(NULL, NULL, "qcom,nss-common");
|
||||
+ if (!common_node) {
|
||||
+ nss_info_always("NSS common node not found!\n");
|
||||
+ goto err_use_default_memsize;
|
||||
+ }
|
||||
+
|
||||
+ memory_node = of_parse_phandle(common_node, "memory-region", 0);
|
||||
+ if (!memory_node) {
|
||||
+ nss_info_always("NSS reserved-memory node not found!\n");
|
||||
+ goto err_use_default_memsize;
|
||||
+ }
|
||||
+
|
||||
+ ret = of_address_to_resource(memory_node, 0, &r);
|
||||
+ of_node_put(common_node);
|
||||
+ of_node_put(memory_node);
|
||||
+ if (ret) {
|
||||
+ nss_info_always("NSS reserved-memory resource not found!\n");
|
||||
+ goto err_use_default_memsize;
|
||||
}
|
||||
- of_node_put(snode);
|
||||
- return nss_msize;
|
||||
+
|
||||
+ nss_info_always("NSS DDR size is 0x%x\n", (uint32_t) resource_size(&r));
|
||||
+
|
||||
+ return resource_size(&r);
|
||||
+
|
||||
+err_use_default_memsize:
|
||||
+ nss_info_always("Using default NSS reserved-memory size of 0x%x !\n", SZ_8M);
|
||||
+
|
||||
+ return SZ_8M;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1,30 +0,0 @@
|
||||
From 4dd701916186803172a9f35e7e982a953613ad55 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Mon, 11 Apr 2022 21:32:41 +0200
|
||||
Subject: [PATCH 5/9] nss-drv: use standard skb_skip_tc_classify instead of
|
||||
custom api
|
||||
|
||||
Use skb_skip_tc_classify to skip classify for packet handled by nss
|
||||
instead of custom api.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
---
|
||||
nss_core.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/nss_core.c b/nss_core.c
|
||||
index f9e6014..6ab8038 100644
|
||||
--- a/nss_core.c
|
||||
+++ b/nss_core.c
|
||||
@@ -1075,7 +1075,7 @@ static inline void nss_core_set_skb_classify(struct sk_buff *nbuf)
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0))
|
||||
nbuf->tc_verd = SET_TC_NCLS_NSS(nbuf->tc_verd);
|
||||
#else
|
||||
- skb_set_tc_classify_offload(nbuf);
|
||||
+ skb_skip_tc_classify(nbuf);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@ -1,172 +0,0 @@
|
||||
From 895de8e4119afe3cbad2aa81566b1ebcb2b39dcd Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Tue, 17 May 2022 20:23:19 +0200
|
||||
Subject: [PATCH] Makefile: modularize driver even more
|
||||
|
||||
Permit to disable even more module.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
---
|
||||
Makefile | 56 ++++++++++++++++++++++++++++++++---------------
|
||||
nss_hal/nss_hal.c | 6 +++++
|
||||
nss_init.c | 4 ++++
|
||||
3 files changed, 48 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index f5c4b90..0194dbd 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -39,35 +39,55 @@ qca-nss-drv-objs := \
|
||||
nss_pm.o \
|
||||
nss_profiler.o \
|
||||
nss_project.o \
|
||||
- nss_pppoe.o \
|
||||
- nss_pppoe_log.o \
|
||||
- nss_pppoe_stats.o \
|
||||
- nss_pppoe_strings.o \
|
||||
nss_rps.o \
|
||||
nss_stats.o \
|
||||
nss_strings.o \
|
||||
nss_tx_msg_sync.o \
|
||||
nss_unaligned.o \
|
||||
nss_unaligned_log.o \
|
||||
- nss_unaligned_stats.o \
|
||||
- nss_virt_if.o \
|
||||
- nss_virt_if_stats.o \
|
||||
- nss_vlan.o \
|
||||
- nss_vlan_log.o \
|
||||
- nss_wifi.o \
|
||||
- nss_wifi_log.o \
|
||||
- nss_wifi_stats.o \
|
||||
- nss_wifi_vdev.o \
|
||||
- nss_wifili.o \
|
||||
- nss_wifili_log.o \
|
||||
- nss_wifili_stats.o \
|
||||
- nss_wifili_strings.o \
|
||||
- nss_wifi_mac_db.o
|
||||
+ nss_unaligned_stats.o
|
||||
|
||||
# Base NSS data plane/HAL support
|
||||
qca-nss-drv-objs += nss_data_plane/nss_data_plane_common.o
|
||||
qca-nss-drv-objs += nss_hal/nss_hal.o
|
||||
|
||||
+ifneq "$(NSS_DRV_PPPOE_ENABLE)" "n"
|
||||
+ccflags-y += -DNSS_DRV_PPPOE_ENABLE
|
||||
+qca-nss-drv-objs += \
|
||||
+ nss_pppoe.o \
|
||||
+ nss_pppoe_log.o \
|
||||
+ nss_pppoe_stats.o \
|
||||
+ nss_pppoe_strings.o
|
||||
+endif
|
||||
+
|
||||
+ifneq "$(NSS_DRV_VIRT_IF_ENABLE)" "n"
|
||||
+ccflags-y += -DNSS_DRV_VIRT_IF_ENABLE
|
||||
+qca-nss-drv-objs += \
|
||||
+ nss_virt_if.o \
|
||||
+ nss_virt_if_stats.o
|
||||
+endif
|
||||
+
|
||||
+ifneq "$(NSS_DRV_VLAN_ENABLE)" "n"
|
||||
+ccflags-y += -DNSS_DRV_VLAN_ENABLE
|
||||
+qca-nss-drv-objs += \
|
||||
+ nss_vlan.o \
|
||||
+ nss_vlan_log.o
|
||||
+endif
|
||||
+
|
||||
+ifneq "$(NSS_DRV_WIFI_ENABLE)" "n"
|
||||
+ccflags-y += -DNSS_DRV_WIFI_ENABLE
|
||||
+qca-nss-drv-objs += \
|
||||
+ nss_wifi.o \
|
||||
+ nss_wifi_log.o \
|
||||
+ nss_wifi_stats.o \
|
||||
+ nss_wifi_vdev.o \
|
||||
+ nss_wifili.o \
|
||||
+ nss_wifili_log.o \
|
||||
+ nss_wifili_stats.o \
|
||||
+ nss_wifili_strings.o \
|
||||
+ nss_wifi_mac_db.o
|
||||
+endif
|
||||
+
|
||||
ifneq "$(NSS_DRV_BRIDGE_ENABLE)" "n"
|
||||
ccflags-y += -DNSS_DRV_BRIDGE_ENABLE
|
||||
qca-nss-drv-objs += \
|
||||
diff --git a/nss_hal/nss_hal.c b/nss_hal/nss_hal.c
|
||||
index 7e9a044..c0051e4 100644
|
||||
--- a/nss_hal/nss_hal.c
|
||||
+++ b/nss_hal/nss_hal.c
|
||||
@@ -460,10 +460,12 @@ int nss_hal_probe(struct platform_device *nss_dev)
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifdef NSS_DRV_PPPOE_ENABLE
|
||||
if (npd->pppoe_enabled == NSS_FEATURE_ENABLED) {
|
||||
nss_top->pppoe_handler_id = nss_dev->id;
|
||||
nss_pppoe_register_handler();
|
||||
}
|
||||
+#endif
|
||||
|
||||
#ifdef NSS_DRV_PPE_ENABLE
|
||||
if (npd->ppe_enabled == NSS_FEATURE_ENABLED) {
|
||||
@@ -558,6 +560,7 @@ int nss_hal_probe(struct platform_device *nss_dev)
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifdef NSS_DRV_WIFI_ENABLE
|
||||
if (npd->wifioffload_enabled == NSS_FEATURE_ENABLED) {
|
||||
nss_top->wifi_handler_id = nss_dev->id;
|
||||
nss_top->dynamic_interface_table[NSS_DYNAMIC_INTERFACE_TYPE_VAP] = nss_dev->id;
|
||||
@@ -585,6 +588,7 @@ int nss_hal_probe(struct platform_device *nss_dev)
|
||||
*/
|
||||
nss_wifili_thread_scheme_db_init(nss_dev->id);
|
||||
}
|
||||
+#endif
|
||||
|
||||
#ifdef NSS_DRV_OAM_ENABLE
|
||||
if (npd->oam_enabled == NSS_FEATURE_ENABLED) {
|
||||
@@ -601,11 +605,13 @@ int nss_hal_probe(struct platform_device *nss_dev)
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifdef NSS_DRV_VLAN_ENABLE
|
||||
if (npd->vlan_enabled == NSS_FEATURE_ENABLED) {
|
||||
nss_top->vlan_handler_id = nss_dev->id;
|
||||
nss_top->dynamic_interface_table[NSS_DYNAMIC_INTERFACE_TYPE_VLAN] = nss_dev->id;
|
||||
nss_vlan_register_handler();
|
||||
}
|
||||
+#endif
|
||||
|
||||
#ifdef NSS_DRV_QVPN_ENABLE
|
||||
#if defined(NSS_HAL_IPQ807x_SUPPORT) || defined(NSS_HAL_IPQ60XX_SUPPORT)
|
||||
diff --git a/nss_init.c b/nss_init.c
|
||||
index ebd2a12..40e9351 100644
|
||||
--- a/nss_init.c
|
||||
+++ b/nss_init.c
|
||||
@@ -775,10 +775,12 @@ static int __init nss_init(void)
|
||||
*/
|
||||
nss_project_register_sysctl();
|
||||
|
||||
+#ifdef NSS_DRV_PPPOE_ENABLE
|
||||
/*
|
||||
* Registering sysctl for pppoe specific config.
|
||||
*/
|
||||
nss_pppoe_register_sysctl();
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Setup Runtime Sample values
|
||||
@@ -913,10 +915,12 @@ static void __exit nss_cleanup(void)
|
||||
nss_c2c_tx_unregister_sysctl();
|
||||
#endif
|
||||
|
||||
+#ifdef NSS_DRV_PPPOE_ENABLE
|
||||
/*
|
||||
* Unregister pppoe specific sysctl
|
||||
*/
|
||||
nss_pppoe_unregister_sysctl();
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Unregister ipv4/6 specific sysctl and free allocated to connection tables
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@ -20,18 +20,19 @@ define KernelPackage/qca-nss-ecm
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Support
|
||||
DEPENDS:=@(TARGET_ipq807x||TARGET_ipq60xx) \
|
||||
+iptables-mod-extra \
|
||||
+iptables-mod-physdev \
|
||||
+kmod-qca-nss-drv \
|
||||
+kmod-ipt-conntrack \
|
||||
+kmod-ipt-physdev \
|
||||
+kmod-ppp \
|
||||
+kmod-pppoe \
|
||||
+kmod-pptp \
|
||||
+kmod-pppol2tp \
|
||||
+kmod-bonding \
|
||||
+kmod-qca-mcs \
|
||||
+kmod-nat46
|
||||
+@NSS_DRV_IPV6_ENABLE \
|
||||
+@NSS_DRV_PPE_ENABLE \
|
||||
+@NSS_DRV_TUN6RD_ENABLE \
|
||||
+@NSS_DRV_PPPOE_ENABLE \
|
||||
+@NSS_DRV_PPTP_ENABLE \
|
||||
+@NSS_DRV_VIRT_IF_ENABLE \
|
||||
+@NSS_DRV_WIFI_ENABLE \
|
||||
+kmod-qca-nss-drv \
|
||||
+kmod-nf-conntrack \
|
||||
+kmod-ppp +kmod-pppoe +kmod-pptp +kmod-bonding \
|
||||
+PACKAGE_kmod-pppol2tp:kmod-pppol2tp \
|
||||
+PACKAGE_kmod-qca-mcs:kmod-qca-mcs \
|
||||
+PACKAGE_kmod-nat46:kmod-nat46
|
||||
TITLE:=QCA NSS Enhanced Connection Manager (ECM)
|
||||
FILES:=$(PKG_BUILD_DIR)/ecm.ko
|
||||
KCONFIG:=CONFIG_BRIDGE_NETFILTER=y \
|
||||
@ -65,7 +66,6 @@ ECM_MAKE_OPTS+=ECM_FRONT_END_NSS_ENABLE=y \
|
||||
ECM_FRONT_END_SFE_ENABLE=n \
|
||||
ECM_NON_PORTED_SUPPORT_ENABLE=y \
|
||||
ECM_INTERFACE_BOND_ENABLE=y \
|
||||
ECM_INTERFACE_RAWIP_ENABLE=y \
|
||||
ECM_INTERFACE_VLAN_ENABLE=y \
|
||||
ECM_CLASSIFIER_MARK_ENABLE=y \
|
||||
ECM_CLASSIFIER_DSCP_ENABLE=y \
|
||||
@ -127,10 +127,8 @@ ifneq ($(CONFIG_PACKAGE_kmod-nat46),)
|
||||
ECM_MAKE_OPTS+=ECM_INTERFACE_MAP_T_ENABLE=y
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_kmod-pppoe),)
|
||||
ECM_MAKE_OPTS+=ECM_INTERFACE_PPPOE_ENABLE=y \
|
||||
ECM_INTERFACE_PPTP_ENABLE=y \
|
||||
ECM_INTERFACE_PPP_ENABLE=y
|
||||
ifneq ($(CONFIG_PACKAGE_kmod-ipsec),)
|
||||
ECM_MAKE_OPTS+=ECM_INTERFACE_IPSEC_ENABLE=y
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_kmod-pppoe),)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user