diff --git a/package/network/config/firewall/Makefile b/package/network/config/firewall/Makefile index d7bb91b6a..e8b15ac8a 100644 --- a/package/network/config/firewall/Makefile +++ b/package/network/config/firewall/Makefile @@ -59,4 +59,4 @@ define Package/firewall/install $(INSTALL_CONF) $(PKG_BUILD_DIR)/helpers.conf $(1)/usr/share/fw3 endef -$(eval $(call BuildPackage,firewall)) +$(eval $(call BuildPackage,firewall)) \ No newline at end of file diff --git a/package/network/config/firewall/files/firewall.config b/package/network/config/firewall/files/firewall.config index 8d9462f25..42f6f6aa3 100644 --- a/package/network/config/firewall/files/firewall.config +++ b/package/network/config/firewall/files/firewall.config @@ -3,7 +3,7 @@ config defaults option input ACCEPT option output ACCEPT option forward REJECT - option fullcone 1 + option fullcone 0 # Uncomment this line to disable ipv6 rules # option disable_ipv6 1 diff --git a/package/nss/qca/nss-ifb/Makefile b/package/nss/qca/nss-ifb/Makefile new file mode 100644 index 000000000..6b7f0b480 --- /dev/null +++ b/package/nss/qca/nss-ifb/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2008-2012 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=nss-ifb +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/nss-ifb + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + TITLE:=NSS IFB Interface + DEPENDS:=+kmod-qca-nss-drv @LINUX_5_4 + FILES:=$(PKG_BUILD_DIR)/nss-ifb.ko + KCONFIG:= +endef + +define KernelPackage/nss-ifb/description + Kernel module to register a NSS aware IFB interface. +endef + +EXTRA_KCONFIG:= \ + CONFIG_NET_CLS=y + +EXTRA_CFLAGS:= \ + -I$(STAGING_DIR)/usr/include/qca-nss-drv + +MAKE_OPTS:= \ + $(KERNEL_MAKE_FLAGS) \ + M="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ + $(EXTRA_KCONFIG) + +define Build/Compile + $(MAKE) -C "$(LINUX_DIR)" \ + $(MAKE_OPTS) \ + modules +endef + +$(eval $(call KernelPackage,nss-ifb)) + diff --git a/package/nss/qca/nss-ifb/README.md b/package/nss/qca/nss-ifb/README.md new file mode 100644 index 000000000..a0af7a5eb --- /dev/null +++ b/package/nss/qca/nss-ifb/README.md @@ -0,0 +1,45 @@ +NSS Physical Interface Ingress Driver +===================================== + +This driver redirect NSS physical interface (namely GMACs) ingress traffic to itself +and sends it back to the Linux network stack (as the source GMACs packets) as it's +egress traffic. + +This allows the NSS QDISC drivers to manage the egress traffic of this driver's +NSS virtual interface. + +This driver will create a single network interface named 'nssifb'. The default +source interface is defined as 'eth0'. It can be changed using the following module +parameter path: + +/sys/module/nss-ifb/parameter/nss_src_dev + +To change the source NSS physical interface to 'eth1', use the following command: + +printf eth1 > /sys/module/nss-ifb/parameter/nss_src_dev + +You need to change the source interface first before bringing up the 'nssifb' +interface. Changing it after the interface is up will have no effect. You need +to bring down the interface and bring it back up to have the changes take effect. + +CPU load imposed on the Krait CPUs appears negligible with this driver intercepting +the physical interface's ingress traffic. Full line speed of the GMAC interface +could still be achieved. + +The commands below shows an example to shape ingress traffic to 500 Mbps and egress +to 200 Mbps for the 'eth0' interface. + +# Load the module if it's not loaded +modprobe nss-ifb + +# Bring up the nssifb interface to active ingress redirect +ip link set up nssifb + +# Shape ingress traffic to 500 Mbit with chained NSSFQ_CODEL +tc qdisc add dev nssifb root handle 1: nsstbl rate 500Mbit burst 1Mb +tc qdisc add dev nssifb parent 1: handle 10: nssfq_codel limit 10240 flows 1024 quantum 1514 target 5ms interval 100ms set_default + +# Shape egress traffic to 200 Mbit with chained NSSFQ_CODEL +tc qdisc add dev eth0 root handle 1: nsstbl rate 200Mbit burst 1Mb +tc qdisc add dev eth0 parent 1: handle 10: nssfq_codel limit 10240 flows 1024 quantum 1514 target 5ms interval 100ms set_default + diff --git a/package/nss/qca/nss-ifb/src/Makefile b/package/nss/qca/nss-ifb/src/Makefile new file mode 100644 index 000000000..332b9b4ed --- /dev/null +++ b/package/nss/qca/nss-ifb/src/Makefile @@ -0,0 +1,3 @@ +obj-m += nss-ifb.o + +nss-ifb-objs := nss_ifb.o diff --git a/package/nss/qca/nss-ifb/src/nss_ifb.c b/package/nss/qca/nss-ifb/src/nss_ifb.c new file mode 100644 index 000000000..18c017fe0 --- /dev/null +++ b/package/nss/qca/nss-ifb/src/nss_ifb.c @@ -0,0 +1,304 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +/* + * This driver is adapted from the Linux /drivers/net/ifb.c file. + * + * Redirect QCA NSS physical interface ingress traffic to this driver's + * virtual interface. This will allow ingress traffic shaping using the + * QCA NSS shaper. + */ + +#include + +#define TX_Q_LIMIT 32 + +struct nss_ifb_dev_private { + struct nss_virt_if_handle *nssctx; + struct net_device *nss_src_dev; + uint32_t nss_src_if_num; + char nss_src_dev_name[32]; +}; + +char nss_dev_name_array[32] = "eth0"; +char *nss_dev_name = nss_dev_name_array; +module_param(nss_dev_name, charp, 0644); +MODULE_PARM_DESC(nss_dev_name, "NSS physical interface source device name"); + +/* + * Virtual interface egress packet callback. + * + * We send it back to the Linux network stack. + */ +static void nss_ifb_data_cb(struct net_device *netdev, struct sk_buff *skb, struct napi_struct *napi) +{ + struct nss_ifb_dev_private *dp = netdev_priv(netdev); + + skb->protocol = eth_type_trans(skb, dp->nss_src_dev); + skb->ip_summed = CHECKSUM_UNNECESSARY; + + napi_gro_receive(napi, skb); +} + +/* + * Virtual interface ingress packet callback. + * + * We just send it back to the NSS firmware to let the shaper work on it. + */ +static void nss_ifb_xmit_cb(struct net_device *netdev, struct sk_buff *skb) +{ + struct nss_ifb_dev_private *dp = netdev_priv(netdev); + int ret; + + ret = nss_virt_if_tx_buf(dp->nssctx, skb); + if (unlikely(ret)) { + pr_warn("Failed [%d] to send skb [len: %d, protocol: 0x%X] to NSS!\n", + ret, skb->len, ntohs(skb->protocol)); + } +} + +static void nss_ifb_stats64(struct net_device *dev, + struct rtnl_link_stats64 *stats) +{ + +} + +static int nss_ifb_dev_init(struct net_device *dev) +{ + struct nss_ifb_dev_private *dp = netdev_priv(dev); + + dp->nssctx = nss_virt_if_create_sync_nexthop(dev, NSS_ETH_RX_INTERFACE, NSS_ETH_RX_INTERFACE); + if (!dp->nssctx) { + dp->nssctx = NULL; + pr_warn("Could not create a NSS virtual interface for dev [%s]\n", + dev->name); + + return -ENODEV; + } + pr_info("Created a NSS virtual interface for dev [%s]\n", dev->name); + + nss_virt_if_register(dp->nssctx, nss_ifb_data_cb, dev); + pr_info("NSS IFB data callback registered\n"); + + nss_virt_if_xmit_callback_register(dp->nssctx, nss_ifb_xmit_cb); + pr_info("NSS IFB transmit callback registered\n"); + + return 0; +} + +static void nss_ifb_dev_uninit(struct net_device *dev) +{ + struct nss_ifb_dev_private *dp = netdev_priv(dev); + int ret; + + nss_virt_if_xmit_callback_unregister(dp->nssctx); + pr_info("NSS IFB transmit callback unregistered\n"); + + ret = nss_virt_if_destroy_sync(dp->nssctx); + if (ret == NSS_TX_SUCCESS) { + pr_info("NSS virtual interface destroyed for dev [%s]\n", dev->name); + } + else { + pr_warn("Unable to destroy NSS virtual interface for dev [%s], error[%d]\n", + dev->name, ret); + } + dp->nssctx = NULL; +} + +static netdev_tx_t nss_ifb_xmit(struct sk_buff *skb, struct net_device *dev) +{ + return NETDEV_TX_OK; +} + +static int nss_ifb_close(struct net_device *dev) +{ + struct nss_ifb_dev_private *dp = netdev_priv(dev); + struct nss_ctx_instance *nss_ctx; + struct net_device *src_dev; + uint32_t src_if_num; + int ret; + + nss_ctx = dp->nssctx->nss_ctx; + src_dev = dp->nss_src_dev; + src_if_num = dp->nss_src_if_num; + + ret = nss_phys_if_set_nexthop(nss_ctx, src_if_num, NSS_ETH_RX_INTERFACE); + if (ret != NSS_TX_SUCCESS) { + pr_warn("%p: Failed to reset next hop for net device [%s].\n", + nss_ctx, src_dev->name); + } + else { + pr_info("%p: Reset nexthop successful for net device [%s].\n", + nss_ctx, src_dev->name); + } + + dev_put(src_dev); + dp->nss_src_dev = NULL; + dp->nss_src_if_num = -1; + + return 0; +} + +static int nss_ifb_open(struct net_device *dev) +{ + struct nss_ifb_dev_private *dp = netdev_priv(dev); + struct net_device *src_dev; + uint32_t src_if_num; + uint32_t nh_if_num; + nss_tx_status_t nss_tx_status; + struct nss_ctx_instance *nss_ctx; + + nss_ctx = dp->nssctx->nss_ctx; + nh_if_num = dp->nssctx->if_num_n2h; + + strcpy(dp->nss_src_dev_name, nss_dev_name); + + src_dev = dev_get_by_name(&init_net, dp->nss_src_dev_name); + if (!src_dev) { + pr_warn("%p: Cannot find the net device [%s]\n", + nss_ctx, dp->nss_src_dev_name); + + return -ENODEV; + } + pr_info("%p: Found net device [%s]\n", nss_ctx, dp->nss_src_dev_name); + + src_if_num = nss_cmn_get_interface_number_by_dev(src_dev); + if (src_if_num < 0) { + pr_warn("%p: Invalid interface number:%d\n", nss_ctx, src_if_num); + dev_put(src_dev); + + return -ENODEV; + } + pr_info("%p: Net device [%s] has NSS intf_num [%d]\n", + nss_ctx, dp->nss_src_dev_name, src_if_num); + + nss_tx_status = nss_phys_if_set_nexthop(nss_ctx, src_if_num, nh_if_num); + if (nss_tx_status != NSS_TX_SUCCESS) { + pr_warn("%p: Sending message failed, cannot change nexthop for [%s]\n", + nss_ctx, dp->nss_src_dev_name); + } + else { + pr_info("Nexthop successfully set for [%s] to [%s]\n", + dp->nss_src_dev_name, dev->name); + } + + dp->nss_src_dev = src_dev; + dp->nss_src_if_num = src_if_num; + + return 0; +} + +static const struct net_device_ops nss_ifb_netdev_ops = { + .ndo_open = nss_ifb_open, + .ndo_stop = nss_ifb_close, + .ndo_get_stats64 = nss_ifb_stats64, + .ndo_start_xmit = nss_ifb_xmit, + .ndo_validate_addr = eth_validate_addr, + .ndo_init = nss_ifb_dev_init, + .ndo_uninit = nss_ifb_dev_uninit, +}; + +#define IFB_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | NETIF_F_FRAGLIST | \ + NETIF_F_TSO_ECN | NETIF_F_TSO | NETIF_F_TSO6 | \ + NETIF_F_GSO_ENCAP_ALL | \ + NETIF_F_HIGHDMA | NETIF_F_HW_VLAN_CTAG_TX | \ + NETIF_F_HW_VLAN_STAG_TX) + +static void nss_ifb_dev_free(struct net_device *dev) +{ + +} + +static void nss_ifb_setup(struct net_device *dev) +{ + /* Initialize the device structure. */ + dev->netdev_ops = &nss_ifb_netdev_ops; + + /* Fill in device structure with ethernet-generic values. */ + ether_setup(dev); + dev->tx_queue_len = TX_Q_LIMIT; + + dev->features |= IFB_FEATURES; + dev->hw_features |= dev->features; + dev->hw_enc_features |= dev->features; + dev->vlan_features |= IFB_FEATURES & ~(NETIF_F_HW_VLAN_CTAG_TX | + NETIF_F_HW_VLAN_STAG_TX); + + dev->flags |= IFF_NOARP; + dev->flags &= ~IFF_MULTICAST; + dev->priv_flags &= ~IFF_TX_SKB_SHARING; + netif_keep_dst(dev); + eth_hw_addr_random(dev); + dev->needs_free_netdev = true; + dev->priv_destructor = nss_ifb_dev_free; + + dev->min_mtu = 0; + dev->max_mtu = 0; +} + +static int nss_ifb_validate(struct nlattr *tb[], struct nlattr *data[], + struct netlink_ext_ack *extack) +{ + if (tb[IFLA_ADDRESS]) { + if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN) + return -EINVAL; + if (!is_valid_ether_addr(nla_data(tb[IFLA_ADDRESS]))) + return -EADDRNOTAVAIL; + } + return 0; +} + +static struct rtnl_link_ops nss_ifb_link_ops __read_mostly = { + .kind = "nss_ifb", + .priv_size = sizeof(struct nss_ifb_dev_private), + .setup = nss_ifb_setup, + .validate = nss_ifb_validate, +}; + +static int __init nss_ifb_init_module(void) +{ + struct net_device *dev; + int err; + + down_write(&pernet_ops_rwsem); + rtnl_lock(); + err = __rtnl_link_register(&nss_ifb_link_ops); + if (err < 0) + goto out; + + dev = alloc_netdev(sizeof(struct nss_ifb_dev_private), "nssifb", + NET_NAME_UNKNOWN, nss_ifb_setup); + + if (dev) { + dev->rtnl_link_ops = &nss_ifb_link_ops; + err = register_netdevice(dev); + } + else { + err = -ENOMEM; + } + + if (err) + __rtnl_link_unregister(&nss_ifb_link_ops); + +out: + rtnl_unlock(); + up_write(&pernet_ops_rwsem); + + if (!err) + pr_info("NSS IFB module loaded.\n"); + else + pr_warn("Failed to load NSS IFB module.\n"); + + return err; +} + +static void __exit nss_ifb_cleanup_module(void) +{ + rtnl_link_unregister(&nss_ifb_link_ops); + + pr_info("NSS IFB module unloaded.\n"); +} + +module_init(nss_ifb_init_module); +module_exit(nss_ifb_cleanup_module); +MODULE_LICENSE("GPL"); +MODULE_ALIAS_RTNL_LINK("nss_ifb"); diff --git a/package/nss/qca/qca-nss-cfi/Makefile b/package/nss/qca/qca-nss-cfi/Makefile new file mode 100644 index 000000000..1e27cb820 --- /dev/null +++ b/package/nss/qca/qca-nss-cfi/Makefile @@ -0,0 +1,99 @@ +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=qca-nss-cfi +PKG_RELEASE:=2 + +PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-cfi +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=8035a8ddefdcc8a2f06c96b2a82618ca6ce6406d +PKG_MIRROR_HASH:=23316395d1346994d069eb41ef73a5505853687f8beab14f83545b3a05e52429 + +include $(INCLUDE_DIR)/package.mk + +ifeq ($(CONFIG_TARGET_ipq),y) +subtarget:=$(SUBTARGET) +else +subtarget:=$(CONFIG_TARGET_BOARD) +endif + +# v1.0 is for Akronite +# v2.0 is for Hawkeye/Cypress/Maple +ifneq (, $(findstring $(subtarget), "ipq807x" "ipq807x_64" "ipq60xx" "ipq60xx_64")) + CFI_OCF_DIR:=ocf/v2.0 + CFI_CRYPTOAPI_DIR:=cryptoapi/v2.0 +else + CFI_CRYPTOAPI_DIR:=cryptoapi/v1.1 + CFI_OCF_DIR:=ocf/v1.0 + CFI_IPSEC_DIR:=ipsec/v1.0 +endif + +define KernelPackage/qca-nss-cfi-cryptoapi + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + 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-crypto +kmod-crypto-authenc @!LINUX_3_18 + TITLE:=Kernel driver for NSS cfi + FILES:=$(PKG_BUILD_DIR)/$(CFI_CRYPTOAPI_DIR)/qca-nss-cfi-cryptoapi.ko + AUTOLOAD:=$(call AutoLoad,59,qca-nss-cfi-cryptoapi) +endef + +# OCF should be dropped +# define KernelPackage/qca-nss-cfi-ocf +# SECTION:=kernel +# CATEGORY:=Kernel modules +# SUBMENU:=Network Devices +# 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-crypto +PACKAGE_kmod-crypto-ocf:kmod-crypto-ocf @!LINUX_3_18 +# TITLE:=Kernel driver for NSS cfi +# FILES:=$(PKG_BUILD_DIR)/$(CFI_OCF_DIR)/qca-nss-cfi-ocf.ko + +# ifdef CFI_IPSEC_DIR +# FILES+=$(PKG_BUILD_DIR)/$(CFI_IPSEC_DIR)/qca-nss-ipsec.ko +# AUTOLOAD:=$(call AutoLoad,61,qca-nss-cfi-ocf qca-nss-ipsec) +# else +# AUTOLOAD:=$(call AutoLoad,61,qca-nss-cfi-ocf) +# endif +# endef + +define Build/InstallDev/qca-nss-cfi + $(INSTALL_DIR) $(1)/usr/include/qca-nss-cfi + $(CP) $(PKG_BUILD_DIR)/$(CFI_CRYPTOAPI_DIR)/../exports/* $(1)/usr/include/qca-nss-cfi + $(CP) $(PKG_BUILD_DIR)/include/* $(1)/usr/include/qca-nss-cfi +endef + +define Build/InstallDev + $(call Build/InstallDev/qca-nss-cfi,$(1)) +endef + +define KernelPackage/qca-nss-cfi/Description +This package contains a NSS cfi driver for QCA chipset +endef + +EXTRA_CFLAGS+= \ + -DCONFIG_NSS_DEBUG_LEVEL=4 \ + -I$(LINUX_DIR)/crypto/ocf \ + -I$(STAGING_DIR)/usr/include/qca-nss-crypto \ + -I$(STAGING_DIR)/usr/include/crypto \ + -I$(STAGING_DIR)/usr/include/qca-nss-drv + +ifneq (, $(findstring $(subtarget), "ipq807x" "ipq807x_64" "ipq60xx" "ipq60xx_64")) +EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/qca-nss-clients +endif + +define Build/Compile + $(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \ + $(KERNEL_MAKE_FLAGS) \ + $(PKG_MAKE_FLAGS) \ + M="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ + CFI_CRYPTOAPI_DIR=$(CFI_CRYPTOAPI_DIR) \ + CFI_OCF_DIR=$(CFI_OCF_DIR) \ + CFI_IPSEC_DIR=$(CFI_IPSEC_DIR) \ + SoC=$(subtarget) \ + modules +endef + +$(eval $(call KernelPackage,qca-nss-cfi-cryptoapi)) +#$(eval $(call KernelPackage,qca-nss-cfi-ocf)) diff --git a/package/nss/qca/qca-nss-cfi/patches/0001-compile-only-cryptoapi.patch b/package/nss/qca/qca-nss-cfi/patches/0001-compile-only-cryptoapi.patch new file mode 100644 index 000000000..00968f5fe --- /dev/null +++ b/package/nss/qca/qca-nss-cfi/patches/0001-compile-only-cryptoapi.patch @@ -0,0 +1,30 @@ +From a8a573c5ce83bdddca9a60c62161638a5fd906d4 Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Sat, 13 Jun 2020 12:57:14 +0200 +Subject: [PATCH 1/3] compile only cryptoapi + +--- + Makefile | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index c42adca..36a9d3f 100644 +--- a/Makefile ++++ b/Makefile +@@ -4,9 +4,9 @@ + + export BUILD_ID = \"Build Id: $(shell date +'%m/%d/%y, %H:%M:%S')\" + +-obj-m += $(CFI_OCF_DIR)/ ++# obj-m += $(CFI_OCF_DIR)/ + obj-m += $(CFI_CRYPTOAPI_DIR)/ + +-ifeq ($(SoC),$(filter $(SoC),ipq806x)) +-obj-m += $(CFI_IPSEC_DIR)/ +-endif ++# ifeq ($(SoC),$(filter $(SoC),ipq806x)) ++# obj-m += $(CFI_IPSEC_DIR)/ ++# endif +-- +2.27.0.rc0 + diff --git a/package/nss/qca/qca-nss-cfi/patches/0002-wip-support-5.4.patch b/package/nss/qca/qca-nss-cfi/patches/0002-wip-support-5.4.patch new file mode 100644 index 000000000..d68fc939b --- /dev/null +++ b/package/nss/qca/qca-nss-cfi/patches/0002-wip-support-5.4.patch @@ -0,0 +1,78 @@ +From 202f57bae49947a04301ac8ac9bdc00f28f09355 Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Sat, 13 Jun 2020 12:58:26 +0200 +Subject: [PATCH 2/3] wip: support 5.4 + +--- + cryptoapi/v1.1/nss_cryptoapi.c | 1 - + cryptoapi/v1.1/nss_cryptoapi_ablk.c | 12 ++++++------ + cryptoapi/v1.1/nss_cryptoapi_aead.c | 2 +- + 3 files changed, 7 insertions(+), 8 deletions(-) + +diff --git a/cryptoapi/v1.1/nss_cryptoapi.c b/cryptoapi/v1.1/nss_cryptoapi.c +index d1a7313..a10590e 100644 +--- a/cryptoapi/v1.1/nss_cryptoapi.c ++++ b/cryptoapi/v1.1/nss_cryptoapi.c +@@ -231,7 +231,6 @@ static struct crypto_alg cryptoapi_ablkcipher_algs[] = { + .cra_u = { + .ablkcipher = { + .ivsize = CTR_RFC3686_IV_SIZE, +- .geniv = "seqiv", + .min_keysize = AES_MIN_KEY_SIZE + CTR_RFC3686_NONCE_SIZE, + .max_keysize = AES_MAX_KEY_SIZE + CTR_RFC3686_NONCE_SIZE, + .setkey = nss_cryptoapi_ablk_aes_setkey, +diff --git a/cryptoapi/v1.1/nss_cryptoapi_ablk.c b/cryptoapi/v1.1/nss_cryptoapi_ablk.c +index 223591c..9b6c65e 100644 +--- a/cryptoapi/v1.1/nss_cryptoapi_ablk.c ++++ b/cryptoapi/v1.1/nss_cryptoapi_ablk.c +@@ -108,7 +108,7 @@ EXPORT_SYMBOL(nss_cryptoapi_skcipher_ctx2session); + int nss_cryptoapi_ablkcipher_init(struct crypto_tfm *tfm) + { + struct nss_cryptoapi_ctx *ctx = crypto_tfm_ctx(tfm); +- struct crypto_ablkcipher *sw_tfm; ++ struct crypto_cipher *sw_tfm; + + nss_cfi_assert(ctx); + +@@ -122,20 +122,20 @@ int nss_cryptoapi_ablkcipher_init(struct crypto_tfm *tfm) + + nss_cryptoapi_set_magic(ctx); + +- if (!(crypto_tfm_alg_flags(tfm) & CRYPTO_ALG_NEED_FALLBACK)) ++ if (!(crypto_tfm_alg_type(tfm) & CRYPTO_ALG_NEED_FALLBACK)) + return 0; + + /* Alloc fallback transform for future use */ +- sw_tfm = crypto_alloc_ablkcipher(crypto_tfm_alg_name(tfm), 0, CRYPTO_ALG_ASYNC | +- CRYPTO_ALG_NEED_FALLBACK); ++ sw_tfm = crypto_alloc_cipher(crypto_tfm_alg_name(tfm), 0, CRYPTO_ALG_ASYNC | ++ CRYPTO_ALG_NEED_FALLBACK); + if (IS_ERR(sw_tfm)) { + nss_cfi_err("unable to alloc software crypto for %s\n", crypto_tfm_alg_name(tfm)); + return -EINVAL; + } + + /* set this tfm reqsize same to fallback tfm */ +- tfm->crt_ablkcipher.reqsize = crypto_ablkcipher_reqsize(sw_tfm); +- ctx->sw_tfm = crypto_ablkcipher_tfm(sw_tfm); ++ tfm->crt_ablkcipher.reqsize = sizeof(struct nss_cryptoapi_ctx); ++ ctx->sw_tfm = crypto_cipher_tfm(sw_tfm); + + return 0; + } +diff --git a/cryptoapi/v1.1/nss_cryptoapi_aead.c b/cryptoapi/v1.1/nss_cryptoapi_aead.c +index 527936b..53e4bed 100644 +--- a/cryptoapi/v1.1/nss_cryptoapi_aead.c ++++ b/cryptoapi/v1.1/nss_cryptoapi_aead.c +@@ -103,7 +103,7 @@ int nss_cryptoapi_aead_init(struct crypto_aead *aead) + + nss_cryptoapi_set_magic(ctx); + +- if (!(crypto_tfm_alg_flags(tfm) & CRYPTO_ALG_NEED_FALLBACK)) ++ if (!(crypto_tfm_alg_type(tfm) & CRYPTO_ALG_NEED_FALLBACK)) + return 0; + + /* Alloc fallback transform for future use */ +-- +2.27.0.rc0 + diff --git a/package/nss/qca/qca-nss-cfi/patches/0003-Convert-ablkcipher-to-skcipher.patch b/package/nss/qca/qca-nss-cfi/patches/0003-Convert-ablkcipher-to-skcipher.patch new file mode 100644 index 000000000..b4520a3d6 --- /dev/null +++ b/package/nss/qca/qca-nss-cfi/patches/0003-Convert-ablkcipher-to-skcipher.patch @@ -0,0 +1,707 @@ +From e3a53a6d11b2c1770545a2820a58c117799bcb70 Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Tue, 16 Jun 2020 18:12:34 +0200 +Subject: [PATCH 3/3] Convert ablkcipher to skcipher + +--- + cryptoapi/v1.1/nss_cryptoapi.c | 149 +++++++++++-------------- + cryptoapi/v1.1/nss_cryptoapi_ablk.c | 136 +++++++++++----------- + cryptoapi/v1.1/nss_cryptoapi_debugfs.c | 1 + + cryptoapi/v1.1/nss_cryptoapi_private.h | 16 +-- + 4 files changed, 145 insertions(+), 157 deletions(-) + +diff --git a/cryptoapi/v1.1/nss_cryptoapi.c b/cryptoapi/v1.1/nss_cryptoapi.c +index a10590e..3a835dc 100644 +--- a/cryptoapi/v1.1/nss_cryptoapi.c ++++ b/cryptoapi/v1.1/nss_cryptoapi.c +@@ -66,7 +66,7 @@ struct aead_alg cryptoapi_aead_algs[] = { + .cra_name = "echainiv(authenc(hmac(sha1),cbc(aes)))", + .cra_driver_name = "nss-hmac-sha1-cbc-aes", + .cra_priority = 10000, +- .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_NEED_FALLBACK, ++ .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_NEED_FALLBACK | CRYPTO_ALG_KERN_DRIVER_ONLY, + .cra_blocksize = AES_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), + .cra_alignmask = 0, +@@ -87,7 +87,7 @@ struct aead_alg cryptoapi_aead_algs[] = { + .cra_name = "seqiv(authenc(hmac(sha1),rfc3686(ctr(aes))))", + .cra_driver_name = "nss-hmac-sha1-rfc3686-ctr-aes", + .cra_priority = 10000, +- .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_NEED_FALLBACK, ++ .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_NEED_FALLBACK | CRYPTO_ALG_KERN_DRIVER_ONLY, + .cra_blocksize = AES_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), + .cra_alignmask = 0, +@@ -108,7 +108,7 @@ struct aead_alg cryptoapi_aead_algs[] = { + .cra_name = "echainiv(authenc(hmac(sha1),cbc(des3_ede)))", + .cra_driver_name = "nss-hmac-sha1-cbc-3des", + .cra_priority = 300, +- .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG, ++ .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_KERN_DRIVER_ONLY, + .cra_blocksize = DES3_EDE_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), + .cra_alignmask = 0, +@@ -129,7 +129,7 @@ struct aead_alg cryptoapi_aead_algs[] = { + .cra_name = "echainiv(authenc(hmac(sha256),cbc(aes)))", + .cra_driver_name = "nss-hmac-sha256-cbc-aes", + .cra_priority = 10000, +- .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_NEED_FALLBACK, ++ .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_NEED_FALLBACK | CRYPTO_ALG_KERN_DRIVER_ONLY, + .cra_blocksize = AES_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), + .cra_alignmask = 0, +@@ -150,7 +150,7 @@ struct aead_alg cryptoapi_aead_algs[] = { + .cra_name = "seqiv(authenc(hmac(sha256),rfc3686(ctr(aes))))", + .cra_driver_name = "nss-hmac-sha256-rfc3686-ctr-aes", + .cra_priority = 10000, +- .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_NEED_FALLBACK, ++ .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_NEED_FALLBACK | CRYPTO_ALG_KERN_DRIVER_ONLY, + .cra_blocksize = AES_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), + .cra_alignmask = 0, +@@ -171,7 +171,7 @@ struct aead_alg cryptoapi_aead_algs[] = { + .cra_name = "echainiv(authenc(hmac(sha256),cbc(des3_ede)))", + .cra_driver_name = "nss-hmac-sha256-cbc-3des", + .cra_priority = 300, +- .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG, ++ .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_KERN_DRIVER_ONLY, + .cra_blocksize = DES3_EDE_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), + .cra_alignmask = 0, +@@ -192,75 +192,66 @@ struct aead_alg cryptoapi_aead_algs[] = { + /* + * ABLK cipher algorithms + */ +-static struct crypto_alg cryptoapi_ablkcipher_algs[] = { ++static struct skcipher_alg cryptoapi_skcipher_algs[] = { + { +- .cra_name = "cbc(aes)", +- .cra_driver_name = "nss-cbc-aes", +- .cra_priority = 10000, +- .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK, +- .cra_blocksize = AES_BLOCK_SIZE, +- .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), +- .cra_alignmask = 0, +- .cra_type = &crypto_ablkcipher_type, +- .cra_module = THIS_MODULE, +- .cra_init = nss_cryptoapi_ablkcipher_init, +- .cra_exit = nss_cryptoapi_ablkcipher_exit, +- .cra_u = { +- .ablkcipher = { +- .ivsize = AES_BLOCK_SIZE, +- .min_keysize = AES_MIN_KEY_SIZE, +- .max_keysize = AES_MAX_KEY_SIZE, +- .setkey = nss_cryptoapi_ablk_aes_setkey, +- .encrypt = nss_cryptoapi_ablk_aes_encrypt, +- .decrypt = nss_cryptoapi_ablk_aes_decrypt, +- }, ++ .base = { ++ .cra_name = "cbc(aes)", ++ .cra_driver_name = "nss-cbc-aes", ++ .cra_priority = 10000, ++ .cra_flags = CRYPTO_ALG_TYPE_SKCIPHER | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK | CRYPTO_ALG_KERN_DRIVER_ONLY, ++ .cra_blocksize = AES_BLOCK_SIZE, ++ .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), ++ .cra_alignmask = 0, ++ .cra_module = THIS_MODULE, + }, ++ .init = nss_cryptoapi_skcipher_init, ++ .exit = nss_cryptoapi_skcipher_exit, ++ .ivsize = AES_BLOCK_SIZE, ++ .min_keysize = AES_MIN_KEY_SIZE, ++ .max_keysize = AES_MAX_KEY_SIZE, ++ .setkey = nss_cryptoapi_ablk_aes_setkey, ++ .encrypt = nss_cryptoapi_ablk_aes_encrypt, ++ .decrypt = nss_cryptoapi_ablk_aes_decrypt, + }, + { +- .cra_name = "rfc3686(ctr(aes))", +- .cra_driver_name = "nss-rfc3686-ctr-aes", +- .cra_priority = 30000, +- .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK, +- .cra_blocksize = AES_BLOCK_SIZE, +- .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), +- .cra_alignmask = 0, +- .cra_type = &crypto_ablkcipher_type, +- .cra_module = THIS_MODULE, +- .cra_init = nss_cryptoapi_ablkcipher_init, +- .cra_exit = nss_cryptoapi_ablkcipher_exit, +- .cra_u = { +- .ablkcipher = { +- .ivsize = CTR_RFC3686_IV_SIZE, +- .min_keysize = AES_MIN_KEY_SIZE + CTR_RFC3686_NONCE_SIZE, +- .max_keysize = AES_MAX_KEY_SIZE + CTR_RFC3686_NONCE_SIZE, +- .setkey = nss_cryptoapi_ablk_aes_setkey, +- .encrypt = nss_cryptoapi_ablk_aes_encrypt, +- .decrypt = nss_cryptoapi_ablk_aes_decrypt, +- }, ++ .base = { ++ .cra_name = "rfc3686(ctr(aes))", ++ .cra_driver_name = "nss-rfc3686-ctr-aes", ++ .cra_priority = 30000, ++ .cra_flags = CRYPTO_ALG_TYPE_SKCIPHER | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK | CRYPTO_ALG_KERN_DRIVER_ONLY, ++ .cra_blocksize = AES_BLOCK_SIZE, ++ .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), ++ .cra_alignmask = 0, ++ .cra_module = THIS_MODULE, + }, ++ .init = nss_cryptoapi_skcipher_init, ++ .exit = nss_cryptoapi_skcipher_exit, ++ .ivsize = CTR_RFC3686_IV_SIZE, ++ .min_keysize = AES_MIN_KEY_SIZE + CTR_RFC3686_NONCE_SIZE, ++ .max_keysize = AES_MAX_KEY_SIZE + CTR_RFC3686_NONCE_SIZE, ++ .setkey = nss_cryptoapi_ablk_aes_setkey, ++ .encrypt = nss_cryptoapi_ablk_aes_encrypt, ++ .decrypt = nss_cryptoapi_ablk_aes_decrypt, + }, + { +- .cra_name = "cbc(des3_ede)", +- .cra_driver_name = "nss-cbc-3des", +- .cra_priority = 1000, +- .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_ASYNC, +- .cra_blocksize = DES3_EDE_BLOCK_SIZE, +- .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), +- .cra_alignmask = 0, +- .cra_type = &crypto_ablkcipher_type, +- .cra_module = THIS_MODULE, +- .cra_init = nss_cryptoapi_ablkcipher_init, +- .cra_exit = nss_cryptoapi_ablkcipher_exit, +- .cra_u = { +- .ablkcipher = { +- .ivsize = DES3_EDE_BLOCK_SIZE, +- .min_keysize = DES3_EDE_KEY_SIZE, +- .max_keysize = DES3_EDE_KEY_SIZE, +- .setkey = nss_cryptoapi_3des_cbc_setkey, +- .encrypt = nss_cryptoapi_3des_cbc_encrypt, +- .decrypt = nss_cryptoapi_3des_cbc_decrypt, +- }, ++ .base = { ++ .cra_name = "cbc(des3_ede)", ++ .cra_driver_name = "nss-cbc-3des", ++ .cra_priority = 1000, ++ .cra_flags = CRYPTO_ALG_TYPE_SKCIPHER | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_ASYNC | CRYPTO_ALG_KERN_DRIVER_ONLY, ++ .cra_blocksize = DES3_EDE_BLOCK_SIZE, ++ .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), ++ .cra_alignmask = 0, ++ .cra_module = THIS_MODULE, + }, ++ .init = nss_cryptoapi_skcipher_init, ++ .exit = nss_cryptoapi_skcipher_exit, ++ .ivsize = DES3_EDE_BLOCK_SIZE, ++ .min_keysize = DES3_EDE_KEY_SIZE, ++ .max_keysize = DES3_EDE_KEY_SIZE, ++ .setkey = nss_cryptoapi_3des_cbc_setkey, ++ .encrypt = nss_cryptoapi_3des_cbc_encrypt, ++ .decrypt = nss_cryptoapi_3des_cbc_decrypt, + }, + }; + +@@ -277,14 +268,14 @@ static nss_crypto_user_ctx_t nss_cryptoapi_register(nss_crypto_handle_t crypto) + + sc->crypto = crypto; + +- for (i = 0; i < ARRAY_SIZE(cryptoapi_ablkcipher_algs); i++) { +- rc = crypto_register_alg(&cryptoapi_ablkcipher_algs[i]); ++ for (i = 0; i < ARRAY_SIZE(cryptoapi_skcipher_algs); i++) { ++ rc = crypto_register_skcipher(&cryptoapi_skcipher_algs[i]); + if (rc) { +- nss_cfi_trace("Ablk registration failed, algo: %s\n", cryptoapi_ablkcipher_algs[i].cra_name); +- cryptoapi_ablkcipher_algs[i].cra_flags = 0; ++ nss_cfi_trace("Ablk registration failed, algo: %s\n", cryptoapi_skcipher_algs[i].base.cra_name); ++ cryptoapi_skcipher_algs[i].base.cra_flags = 0; + continue; + } +- nss_cfi_info("Ablk registration succeeded, algo: %s\n", cryptoapi_ablkcipher_algs[i].cra_name); ++ nss_cfi_info("Ablk registration succeeded, algo: %s\n", cryptoapi_skcipher_algs[i].base.cra_name); + } + + for (i = 0; i < ARRAY_SIZE(cryptoapi_aead_algs); i++) { +@@ -317,7 +308,7 @@ static nss_crypto_user_ctx_t nss_cryptoapi_register(nss_crypto_handle_t crypto) + static void nss_cryptoapi_unregister(nss_crypto_user_ctx_t cfi) + { + struct nss_cryptoapi *sc = &gbl_ctx; +- int i, ret = 0; ++ int i; + + nss_cfi_info("unregister nss_cryptoapi\n"); + +@@ -326,16 +317,12 @@ static void nss_cryptoapi_unregister(nss_crypto_user_ctx_t cfi) + */ + atomic_set(&gbl_ctx.registered, 0); + +- for (i = 0; i < ARRAY_SIZE(cryptoapi_ablkcipher_algs); i++) { +- if (!cryptoapi_ablkcipher_algs[i].cra_flags) { +- continue; +- } +- ret = crypto_unregister_alg(&cryptoapi_ablkcipher_algs[i]); +- if (ret) { +- nss_cfi_err("Ablk unregister failed, algo: %s\n", cryptoapi_ablkcipher_algs[i].cra_name); ++ for (i = 0; i < ARRAY_SIZE(cryptoapi_skcipher_algs); i++) { ++ if (!cryptoapi_skcipher_algs[i].base.cra_flags) { + continue; + } +- nss_cfi_info("Ablk unregister succeeded, algo: %s\n", cryptoapi_ablkcipher_algs[i].cra_name); ++ crypto_unregister_skcipher(&cryptoapi_skcipher_algs[i]); ++ nss_cfi_info("Ablk unregister succeeded, algo: %s\n", cryptoapi_skcipher_algs[i].base.cra_name); + } + + for (i = 0; i < ARRAY_SIZE(cryptoapi_aead_algs); i++) { +diff --git a/cryptoapi/v1.1/nss_cryptoapi_ablk.c b/cryptoapi/v1.1/nss_cryptoapi_ablk.c +index 9b6c65e..913e9cc 100644 +--- a/cryptoapi/v1.1/nss_cryptoapi_ablk.c ++++ b/cryptoapi/v1.1/nss_cryptoapi_ablk.c +@@ -102,12 +102,12 @@ int nss_cryptoapi_skcipher_ctx2session(struct crypto_skcipher *sk, uint32_t *sid + EXPORT_SYMBOL(nss_cryptoapi_skcipher_ctx2session); + + /* +- * nss_cryptoapi_ablkcipher_init() +- * Cryptoapi ablkcipher init function. ++ * nss_cryptoapi_skcipher_init() ++ * Cryptoapi skcipher init function. + */ +-int nss_cryptoapi_ablkcipher_init(struct crypto_tfm *tfm) ++int nss_cryptoapi_skcipher_init(struct crypto_skcipher *tfm) + { +- struct nss_cryptoapi_ctx *ctx = crypto_tfm_ctx(tfm); ++ struct nss_cryptoapi_ctx *ctx = crypto_skcipher_ctx(tfm); + struct crypto_cipher *sw_tfm; + + nss_cfi_assert(ctx); +@@ -122,31 +122,31 @@ int nss_cryptoapi_ablkcipher_init(struct crypto_tfm *tfm) + + nss_cryptoapi_set_magic(ctx); + +- if (!(crypto_tfm_alg_type(tfm) & CRYPTO_ALG_NEED_FALLBACK)) ++ if (!(crypto_tfm_alg_type(&tfm->base) & CRYPTO_ALG_NEED_FALLBACK)) + return 0; + + /* Alloc fallback transform for future use */ +- sw_tfm = crypto_alloc_cipher(crypto_tfm_alg_name(tfm), 0, CRYPTO_ALG_ASYNC | ++ sw_tfm = crypto_alloc_cipher(crypto_tfm_alg_name(&tfm->base), 0, CRYPTO_ALG_ASYNC | + CRYPTO_ALG_NEED_FALLBACK); + if (IS_ERR(sw_tfm)) { +- nss_cfi_err("unable to alloc software crypto for %s\n", crypto_tfm_alg_name(tfm)); ++ nss_cfi_err("unable to alloc software crypto for %s\n", crypto_tfm_alg_name(&tfm->base)); + return -EINVAL; + } + + /* set this tfm reqsize same to fallback tfm */ +- tfm->crt_ablkcipher.reqsize = sizeof(struct nss_cryptoapi_ctx); ++ crypto_skcipher_set_reqsize(tfm, sizeof(struct nss_cryptoapi_ctx)); + ctx->sw_tfm = crypto_cipher_tfm(sw_tfm); + + return 0; + } + + /* +- * nss_cryptoapi_ablkcipher_exit() +- * Cryptoapi ablkcipher exit function. ++ * nss_cryptoapi_skcipher_exit() ++ * Cryptoapi skcipher exit function. + */ +-void nss_cryptoapi_ablkcipher_exit(struct crypto_tfm *tfm) ++void nss_cryptoapi_skcipher_exit(struct crypto_skcipher *tfm) + { +- struct nss_cryptoapi_ctx *ctx = crypto_tfm_ctx(tfm); ++ struct nss_cryptoapi_ctx *ctx = crypto_skcipher_ctx(tfm); + struct nss_cryptoapi *sc = &gbl_ctx; + nss_crypto_status_t status; + +@@ -158,7 +158,7 @@ void nss_cryptoapi_ablkcipher_exit(struct crypto_tfm *tfm) + } + + if (ctx->sw_tfm) { +- crypto_free_ablkcipher(__crypto_ablkcipher_cast(ctx->sw_tfm)); ++ crypto_free_skcipher(__crypto_skcipher_cast(ctx->sw_tfm)); + ctx->sw_tfm = NULL; + } + +@@ -183,9 +183,9 @@ void nss_cryptoapi_ablkcipher_exit(struct crypto_tfm *tfm) + * nss_cryptoapi_ablk_aes_setkey() + * Cryptoapi setkey routine for aes. + */ +-int nss_cryptoapi_ablk_aes_setkey(struct crypto_ablkcipher *cipher, const u8 *key, unsigned int keylen) ++int nss_cryptoapi_ablk_aes_setkey(struct crypto_skcipher *cipher, const u8 *key, unsigned int keylen) + { +- struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); ++ struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); + struct nss_cryptoapi_ctx *ctx = crypto_tfm_ctx(tfm); + struct nss_cryptoapi *sc = &gbl_ctx; + struct nss_crypto_key cip; +@@ -255,10 +255,10 @@ int nss_cryptoapi_ablk_aes_setkey(struct crypto_ablkcipher *cipher, const u8 *ke + + /* set flag to fallback tfm */ + crypto_tfm_clear_flags(ctx->sw_tfm, CRYPTO_TFM_REQ_MASK); +- crypto_tfm_set_flags(ctx->sw_tfm, crypto_ablkcipher_get_flags(cipher) & CRYPTO_TFM_REQ_MASK); ++ crypto_tfm_set_flags(ctx->sw_tfm, crypto_skcipher_get_flags(cipher) & CRYPTO_TFM_REQ_MASK); + + /* Set key to the fallback tfm */ +- ret = crypto_ablkcipher_setkey(__crypto_ablkcipher_cast(ctx->sw_tfm), key, keylen); ++ ret = crypto_skcipher_setkey(__crypto_skcipher_cast(ctx->sw_tfm), key, keylen); + if (ret) { + nss_cfi_err("Failed to set key to the sw crypto"); + +@@ -266,7 +266,7 @@ int nss_cryptoapi_ablk_aes_setkey(struct crypto_ablkcipher *cipher, const u8 *ke + * Set back the fallback tfm flag to the original flag one after + * doing setkey + */ +- crypto_ablkcipher_set_flags(cipher, crypto_tfm_get_flags(ctx->sw_tfm)); ++ crypto_skcipher_set_flags(cipher, crypto_tfm_get_flags(ctx->sw_tfm)); + } + return ret; + default: +@@ -289,23 +289,23 @@ int nss_cryptoapi_ablk_aes_setkey(struct crypto_ablkcipher *cipher, const u8 *ke + return 0; + + fail: +- crypto_ablkcipher_set_flags(cipher, flag); ++ crypto_skcipher_set_flags(cipher, flag); + return -EINVAL; + } + + /* +- * nss_cryptoapi_ablkcipher_done() ++ * nss_cryptoapi_skcipher_done() + * Cipher operation completion callback function + */ +-void nss_cryptoapi_ablkcipher_done(struct nss_crypto_buf *buf) ++void nss_cryptoapi_skcipher_done(struct nss_crypto_buf *buf) + { + struct nss_cryptoapi_ctx *ctx; +- struct ablkcipher_request *req; ++ struct skcipher_request *req; + int err = 0; + + nss_cfi_assert(buf); + +- req = (struct ablkcipher_request *)nss_crypto_get_cb_ctx(buf); ++ req = (struct skcipher_request *)nss_crypto_get_cb_ctx(buf); + + /* + * check cryptoapi context magic number. +@@ -319,7 +319,7 @@ void nss_cryptoapi_ablkcipher_done(struct nss_crypto_buf *buf) + nss_crypto_buf_free(gbl_ctx.crypto, buf); + + nss_cfi_dbg("after transformation\n"); +- nss_cfi_dbg_data(sg_virt(req->dst), req->nbytes, ' '); ++ nss_cfi_dbg_data(sg_virt(req->dst), req->cryptlen, ' '); + + /* + * Passing always pass in case of encrypt. +@@ -337,7 +337,7 @@ void nss_cryptoapi_ablkcipher_done(struct nss_crypto_buf *buf) + * Cryptoapi: obtain sg to virtual address mapping. + * Check for multiple sg in src and dst + */ +-int nss_cryptoapi_ablk_checkaddr(struct ablkcipher_request *req) ++int nss_cryptoapi_ablk_checkaddr(struct skcipher_request *req) + { + /* + * Currently only single sg is supported +@@ -356,7 +356,7 @@ int nss_cryptoapi_ablk_checkaddr(struct ablkcipher_request *req) + /* + * If the size of data is more than 65K reject transformation + */ +- if (req->nbytes > NSS_CRYPTOAPI_MAX_DATA_LEN) { ++ if (req->cryptlen > NSS_CRYPTOAPI_MAX_DATA_LEN) { + nss_cfi_err("Buffer length exceeded limit\n"); + return -EINVAL; + } +@@ -368,10 +368,10 @@ int nss_cryptoapi_ablk_checkaddr(struct ablkcipher_request *req) + * nss_cryptoapi_ablk_transform() + * Crytoapi common routine for encryption and decryption operations. + */ +-struct nss_crypto_buf *nss_cryptoapi_ablk_transform(struct ablkcipher_request *req, struct nss_cryptoapi_ablk_info *info) ++struct nss_crypto_buf *nss_cryptoapi_ablk_transform(struct skcipher_request *req, struct nss_cryptoapi_ablk_info *info) + { +- struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(req); +- struct nss_cryptoapi_ctx *ctx = crypto_ablkcipher_ctx(cipher); ++ struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); ++ struct nss_cryptoapi_ctx *ctx = crypto_skcipher_ctx(cipher); + struct nss_crypto_buf *buf; + struct nss_cryptoapi *sc = &gbl_ctx; + nss_crypto_status_t status; +@@ -382,7 +382,7 @@ struct nss_crypto_buf *nss_cryptoapi_ablk_transform(struct ablkcipher_request *r + nss_cfi_assert(ctx); + + nss_cfi_dbg("src_vaddr: 0x%p, dst_vaddr: 0x%p, iv: 0x%p\n", +- sg_virt(req->src), sg_virt(req->dst), req->info); ++ sg_virt(req->src), sg_virt(req->dst), req->iv); + + info->params->cipher_skip = 0; + info->params->auth_skip = 0; +@@ -419,19 +419,19 @@ struct nss_crypto_buf *nss_cryptoapi_ablk_transform(struct ablkcipher_request *r + /* + * Get IV location and memcpy the IV + */ +- iv_size = crypto_ablkcipher_ivsize(cipher); ++ iv_size = crypto_skcipher_ivsize(cipher); + iv_addr = nss_crypto_get_ivaddr(buf); + + switch (ctx->cip_alg) { + case NSS_CRYPTO_CIPHER_AES_CBC: + case NSS_CRYPTO_CIPHER_DES: +- memcpy(iv_addr, req->info, iv_size); ++ memcpy(iv_addr, req->iv, iv_size); + break; + + case NSS_CRYPTO_CIPHER_AES_CTR: + ((uint32_t *)iv_addr)[0] = ctx->ctx_iv[0]; +- ((uint32_t *)iv_addr)[1] = ((uint32_t *)req->info)[0]; +- ((uint32_t *)iv_addr)[2] = ((uint32_t *)req->info)[1]; ++ ((uint32_t *)iv_addr)[1] = ((uint32_t *)req->iv)[0]; ++ ((uint32_t *)iv_addr)[2] = ((uint32_t *)req->iv)[1]; + ((uint32_t *)iv_addr)[3] = ctx->ctx_iv[3]; + break; + +@@ -446,7 +446,7 @@ struct nss_crypto_buf *nss_cryptoapi_ablk_transform(struct ablkcipher_request *r + /* + * Fill Cipher and Auth len + */ +- cipher_len = req->nbytes; ++ cipher_len = req->cryptlen; + auth_len = 0; + + nss_crypto_set_data(buf, sg_virt(req->src), sg_virt(req->dst), cipher_len); +@@ -463,12 +463,12 @@ struct nss_crypto_buf *nss_cryptoapi_ablk_transform(struct ablkcipher_request *r + } + + /* +- * nss_cryptoapi_ablkcipher_fallback() +- * Cryptoapi fallback for ablkcipher algorithm. ++ * nss_cryptoapi_skcipher_fallback() ++ * Cryptoapi fallback for skcipher algorithm. + */ +-int nss_cryptoapi_ablkcipher_fallback(struct nss_cryptoapi_ctx *ctx, struct ablkcipher_request *req, int type) ++int nss_cryptoapi_skcipher_fallback(struct nss_cryptoapi_ctx *ctx, struct skcipher_request *req, int type) + { +- struct crypto_ablkcipher *orig_tfm = crypto_ablkcipher_reqtfm(req); ++ struct crypto_skcipher *orig_tfm = crypto_skcipher_reqtfm(req); + int err; + + if (!ctx->sw_tfm) { +@@ -476,16 +476,16 @@ int nss_cryptoapi_ablkcipher_fallback(struct nss_cryptoapi_ctx *ctx, struct ablk + } + + /* Set new fallback tfm to the request */ +- ablkcipher_request_set_tfm(req, __crypto_ablkcipher_cast(ctx->sw_tfm)); ++ skcipher_request_set_tfm(req, __crypto_skcipher_cast(ctx->sw_tfm)); + + ctx->queued++; + + switch (type) { + case NSS_CRYPTOAPI_ENCRYPT: +- err = crypto_ablkcipher_encrypt(req); ++ err = crypto_skcipher_encrypt(req); + break; + case NSS_CRYPTOAPI_DECRYPT: +- err = crypto_ablkcipher_decrypt(req); ++ err = crypto_skcipher_decrypt(req); + break; + default: + err = -EINVAL; +@@ -495,7 +495,7 @@ int nss_cryptoapi_ablkcipher_fallback(struct nss_cryptoapi_ctx *ctx, struct ablk + ctx->completed++; + + /* Set original tfm to the request */ +- ablkcipher_request_set_tfm(req, orig_tfm); ++ skcipher_request_set_tfm(req, orig_tfm); + + return err; + } +@@ -504,13 +504,13 @@ int nss_cryptoapi_ablkcipher_fallback(struct nss_cryptoapi_ctx *ctx, struct ablk + * nss_cryptoapi_ablk_aes_encrypt() + * Crytoapi encrypt for aes(aes-cbc/rfc3686-aes-ctr) algorithms. + */ +-int nss_cryptoapi_ablk_aes_encrypt(struct ablkcipher_request *req) ++int nss_cryptoapi_ablk_aes_encrypt(struct skcipher_request *req) + { + struct nss_crypto_params params = { .req_type = NSS_CRYPTO_REQ_TYPE_ENCRYPT }; +- struct nss_cryptoapi_ablk_info info = {.cb_fn = nss_cryptoapi_ablkcipher_done, ++ struct nss_cryptoapi_ablk_info info = {.cb_fn = nss_cryptoapi_skcipher_done, + .params = ¶ms}; +- struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(req); +- struct nss_cryptoapi_ctx *ctx = crypto_ablkcipher_ctx(cipher); ++ struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); ++ struct nss_cryptoapi_ctx *ctx = crypto_skcipher_ctx(cipher); + struct nss_cryptoapi *sc = &gbl_ctx; + struct nss_crypto_buf *buf; + +@@ -520,7 +520,7 @@ int nss_cryptoapi_ablk_aes_encrypt(struct ablkcipher_request *req) + nss_cryptoapi_verify_magic(ctx); + + if (ctx->fallback_req) +- return nss_cryptoapi_ablkcipher_fallback(ctx, req, NSS_CRYPTOAPI_ENCRYPT); ++ return nss_cryptoapi_skcipher_fallback(ctx, req, NSS_CRYPTOAPI_ENCRYPT); + + /* + * Check if previous call to setkey couldn't allocate session with core crypto. +@@ -539,9 +539,9 @@ int nss_cryptoapi_ablk_aes_encrypt(struct ablkcipher_request *req) + * According to RFC3686, AES-CTR algo need not be padded if the + * plaintext or ciphertext is unaligned to block size boundary. + */ +- if (nss_cryptoapi_check_unalign(req->nbytes, AES_BLOCK_SIZE) && (ctx->cip_alg != NSS_CRYPTO_CIPHER_AES_CTR)) { ++ if (nss_cryptoapi_check_unalign(req->cryptlen, AES_BLOCK_SIZE) && (ctx->cip_alg != NSS_CRYPTO_CIPHER_AES_CTR)) { + nss_cfi_err("Invalid cipher len - Not aligned to algo blocksize\n"); +- crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_BLOCK_LEN); ++ crypto_skcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_BLOCK_LEN); + return -EINVAL; + } + +@@ -571,13 +571,13 @@ int nss_cryptoapi_ablk_aes_encrypt(struct ablkcipher_request *req) + * nss_cryptoapi_ablk_aes_decrypt() + * Crytoapi decrypt for aes(aes-cbc/rfc3686-aes-ctr) algorithms. + */ +-int nss_cryptoapi_ablk_aes_decrypt(struct ablkcipher_request *req) ++int nss_cryptoapi_ablk_aes_decrypt(struct skcipher_request *req) + { + struct nss_crypto_params params = { .req_type = NSS_CRYPTO_REQ_TYPE_DECRYPT }; +- struct nss_cryptoapi_ablk_info info = {.cb_fn = nss_cryptoapi_ablkcipher_done, ++ struct nss_cryptoapi_ablk_info info = {.cb_fn = nss_cryptoapi_skcipher_done, + .params = ¶ms}; +- struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(req); +- struct nss_cryptoapi_ctx *ctx = crypto_ablkcipher_ctx(cipher); ++ struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); ++ struct nss_cryptoapi_ctx *ctx = crypto_skcipher_ctx(cipher); + struct nss_cryptoapi *sc = &gbl_ctx; + struct nss_crypto_buf *buf; + +@@ -587,7 +587,7 @@ int nss_cryptoapi_ablk_aes_decrypt(struct ablkcipher_request *req) + nss_cryptoapi_verify_magic(ctx); + + if (ctx->fallback_req) +- return nss_cryptoapi_ablkcipher_fallback(ctx, req, NSS_CRYPTOAPI_DECRYPT); ++ return nss_cryptoapi_skcipher_fallback(ctx, req, NSS_CRYPTOAPI_DECRYPT); + + /* + * Check if previous call to setkey couldn't allocate session with core crypto. +@@ -606,9 +606,9 @@ int nss_cryptoapi_ablk_aes_decrypt(struct ablkcipher_request *req) + * According to RFC3686, AES-CTR algo need not be padded if the + * plaintext or ciphertext is unaligned to block size boundary. + */ +- if (nss_cryptoapi_check_unalign(req->nbytes, AES_BLOCK_SIZE) && (ctx->cip_alg != NSS_CRYPTO_CIPHER_AES_CTR)) { ++ if (nss_cryptoapi_check_unalign(req->cryptlen, AES_BLOCK_SIZE) && (ctx->cip_alg != NSS_CRYPTO_CIPHER_AES_CTR)) { + nss_cfi_err("Invalid cipher len - Not aligned to algo blocksize\n"); +- crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_BLOCK_LEN); ++ crypto_skcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_BLOCK_LEN); + return -EINVAL; + } + +@@ -638,9 +638,9 @@ int nss_cryptoapi_ablk_aes_decrypt(struct ablkcipher_request *req) + * nss_cryptoapi_3des_cbc_setkey() + * Cryptoapi DES3 CBC setkey function. + */ +-int nss_cryptoapi_3des_cbc_setkey(struct crypto_ablkcipher *cipher, const u8 *key, unsigned int keylen) ++int nss_cryptoapi_3des_cbc_setkey(struct crypto_skcipher *cipher, const u8 *key, unsigned int keylen) + { +- struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); ++ struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); + struct nss_cryptoapi_ctx *ctx = crypto_tfm_ctx(tfm); + struct nss_cryptoapi *sc = &gbl_ctx; + struct nss_crypto_key cip = { .algo = NSS_CRYPTO_CIPHER_DES }; +@@ -693,7 +693,7 @@ int nss_cryptoapi_3des_cbc_setkey(struct crypto_ablkcipher *cipher, const u8 *ke + return 0; + + fail: +- crypto_ablkcipher_set_flags(cipher, flag); ++ crypto_skcipher_set_flags(cipher, flag); + return -EINVAL; + } + +@@ -701,7 +701,7 @@ fail: + * nss_cryptoapi_3des_cbc_encrypt() + * Cryptoapi DES3 CBC encrypt function. + */ +-int nss_cryptoapi_3des_cbc_encrypt(struct ablkcipher_request *req) ++int nss_cryptoapi_3des_cbc_encrypt(struct skcipher_request *req) + { + struct nss_cryptoapi *sc = &gbl_ctx; + struct nss_cryptoapi_ctx *ctx = crypto_tfm_ctx(req->base.tfm); +@@ -727,14 +727,14 @@ int nss_cryptoapi_3des_cbc_encrypt(struct ablkcipher_request *req) + return -EINVAL; + } + +- if (nss_cryptoapi_check_unalign(req->nbytes, DES3_EDE_BLOCK_SIZE)) { ++ if (nss_cryptoapi_check_unalign(req->cryptlen, DES3_EDE_BLOCK_SIZE)) { + nss_cfi_err("Invalid cipher len - Not aligned to algo blocksize\n"); +- crypto_ablkcipher_set_flags(crypto_ablkcipher_reqtfm(req), CRYPTO_TFM_RES_BAD_BLOCK_LEN); ++ crypto_skcipher_set_flags(crypto_skcipher_reqtfm(req), CRYPTO_TFM_RES_BAD_BLOCK_LEN); + return -EINVAL; + } + + info.params = ¶ms; +- info.cb_fn = nss_cryptoapi_ablkcipher_done; ++ info.cb_fn = nss_cryptoapi_skcipher_done; + + buf = nss_cryptoapi_ablk_transform(req, &info); + if (!buf) { +@@ -762,7 +762,7 @@ int nss_cryptoapi_3des_cbc_encrypt(struct ablkcipher_request *req) + * nss_cryptoapi_3des_cbc_decrypt() + * Cryptoapi DES3 CBC decrypt function. + */ +-int nss_cryptoapi_3des_cbc_decrypt(struct ablkcipher_request *req) ++int nss_cryptoapi_3des_cbc_decrypt(struct skcipher_request *req) + { + struct nss_cryptoapi *sc = &gbl_ctx; + struct nss_cryptoapi_ctx *ctx = crypto_tfm_ctx(req->base.tfm); +@@ -788,14 +788,14 @@ int nss_cryptoapi_3des_cbc_decrypt(struct ablkcipher_request *req) + return -EINVAL; + } + +- if (nss_cryptoapi_check_unalign(req->nbytes, DES3_EDE_BLOCK_SIZE)) { ++ if (nss_cryptoapi_check_unalign(req->cryptlen, DES3_EDE_BLOCK_SIZE)) { + nss_cfi_err("Invalid cipher len - Not aligned to algo blocksize\n"); +- crypto_ablkcipher_set_flags(crypto_ablkcipher_reqtfm(req), CRYPTO_TFM_RES_BAD_BLOCK_LEN); ++ crypto_skcipher_set_flags(crypto_skcipher_reqtfm(req), CRYPTO_TFM_RES_BAD_BLOCK_LEN); + return -EINVAL; + } + + info.params = ¶ms; +- info.cb_fn = nss_cryptoapi_ablkcipher_done; ++ info.cb_fn = nss_cryptoapi_skcipher_done; + + buf = nss_cryptoapi_ablk_transform(req, &info); + if (!buf) { +diff --git a/cryptoapi/v1.1/nss_cryptoapi_debugfs.c b/cryptoapi/v1.1/nss_cryptoapi_debugfs.c +index dff774c..cf4bc70 100644 +--- a/cryptoapi/v1.1/nss_cryptoapi_debugfs.c ++++ b/cryptoapi/v1.1/nss_cryptoapi_debugfs.c +@@ -55,6 +55,7 @@ + */ + void nss_cryptoapi_debugfs_add_stats(struct dentry *parent, struct nss_cryptoapi_ctx *session_ctx) + { ++ pr_info("add stats"); + debugfs_create_u64("queued", S_IRUGO, parent, &session_ctx->queued); + debugfs_create_u64("completed", S_IRUGO, parent, &session_ctx->completed); + debugfs_create_u64("queue_failed", S_IRUGO, parent, &session_ctx->queue_failed); +diff --git a/cryptoapi/v1.1/nss_cryptoapi_private.h b/cryptoapi/v1.1/nss_cryptoapi_private.h +index 5feb9e3..70c6714 100644 +--- a/cryptoapi/v1.1/nss_cryptoapi_private.h ++++ b/cryptoapi/v1.1/nss_cryptoapi_private.h +@@ -141,16 +141,16 @@ int nss_cryptoapi_sha256_3des_encrypt(struct aead_request *req); + int nss_cryptoapi_sha256_3des_decrypt(struct aead_request *req); + + /* ABLKCIPHER */ +-int nss_cryptoapi_ablkcipher_init(struct crypto_tfm *tfm); +-void nss_cryptoapi_ablkcipher_exit(struct crypto_tfm *tfm); +-int nss_cryptoapi_ablk_aes_setkey(struct crypto_ablkcipher *cipher, const u8 *key, unsigned int len); +-int nss_cryptoapi_3des_cbc_setkey(struct crypto_ablkcipher *cipher, const u8 *key, unsigned int len); ++int nss_cryptoapi_skcipher_init(struct crypto_skcipher *tfm); ++void nss_cryptoapi_skcipher_exit(struct crypto_skcipher *tfm); ++int nss_cryptoapi_ablk_aes_setkey(struct crypto_skcipher *cipher, const u8 *key, unsigned int len); ++int nss_cryptoapi_3des_cbc_setkey(struct crypto_skcipher *cipher, const u8 *key, unsigned int len); + +-int nss_cryptoapi_ablk_aes_encrypt(struct ablkcipher_request *req); +-int nss_cryptoapi_ablk_aes_decrypt(struct ablkcipher_request *req); ++int nss_cryptoapi_ablk_aes_encrypt(struct skcipher_request *req); ++int nss_cryptoapi_ablk_aes_decrypt(struct skcipher_request *req); + +-int nss_cryptoapi_3des_cbc_encrypt(struct ablkcipher_request *req); +-int nss_cryptoapi_3des_cbc_decrypt(struct ablkcipher_request *req); ++int nss_cryptoapi_3des_cbc_encrypt(struct skcipher_request *req); ++int nss_cryptoapi_3des_cbc_decrypt(struct skcipher_request *req); + + #endif /* __NSS_CRYPTOAPI_PRIVATE_H */ + +-- +2.27.0.rc0 + diff --git a/package/nss/qca/qca-nss-clients/Makefile b/package/nss/qca/qca-nss-clients/Makefile index 10cad4d50..c77ceca85 100644 --- a/package/nss/qca/qca-nss-clients/Makefile +++ b/package/nss/qca/qca-nss-clients/Makefile @@ -1,23 +1,102 @@ include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=qca-nss-clients -PKG_RELEASE:=$(AUTORELEASE) +PKG_RELEASE:=2 -PKG_SOURCE_URL:=https://source.codeaurora.org/quic/cc-qrdk/oss/lklm/nss-clients +PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-clients PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2021-04-29 -PKG_SOURCE_VERSION:=b93c72c1b72c591c2ddc2f0b24f0e2b457720118 -PKG_MIRROR_HASH:=9fab23da994bfbac9a3cef32cdfec31a87a03ed415f36bc926da32b7b0934259 +PKG_SOURCE_VERSION:=740d0102c518cd49f30c5580982b218b480006b1 +PKG_MIRROR_HASH:=2f427d01dba69b1b89d3a081daf08b36fb345d55b9c9462eb358e5b071e2a171 -include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/package.mk +# Keep default as ipq806x for branches that does not have subtarget framework +ifeq ($(CONFIG_TARGET_ipq),y) +subtarget:=$(SUBTARGET) +else +subtarget:=$(CONFIG_TARGET_BOARD) +endif + +ifneq (, $(findstring $(subtarget), "ipq807x" "ipq807x_64" "ipq60xx" "ipq60xx_64")) +# DTLS Manager v2.0 for Hawkeye/Cypress + DTLSMGR_DIR:=v2.0 +# IPsec Manager v2.0 for Hawkeye/Cypress + IPSECMGR_DIR:=v2.0 +# KLIPS plugin + IPSECMGR_KLIPS:= $(PKG_BUILD_DIR)/ipsecmgr/$(IPSECMGR_DIR)/plugins/klips/qca-nss-ipsec-klips.ko +else +# DTLS Manager v1.0 for Akronite. + DTLSMGR_DIR:=v1.0 +# IPsec Manager v1.0 for Akronite. + IPSECMGR_DIR:=v1.0 +# KLIPS plugin not needed + IPSECMGR_KLIPS:= +endif + +define KernelPackage/qca-nss-drv-tun6rd + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + TITLE:=Kernel driver for NSS (connection manager) - tun6rd + DEPENDS:=+kmod-qca-nss-drv +kmod-sit +6rd @!LINUX_3_18 + FILES:=$(PKG_BUILD_DIR)/qca-nss-tun6rd.ko + AUTOLOAD:=$(call AutoLoad,60,qca-nss-tun6rd) +endef + +define KernelPackage/qca-nss-drv-tun6rd/Description +Kernel modules for NSS connection manager - Support for 6rd tunnel +endef + +define KernelPackage/qca-nss-drv-dtlsmgr + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + TITLE:=Kernel driver for NSS (connection manager) - dtlsmgr + DEPENDS:=+kmod-qca-nss-drv +kmod-qca-nss-cfi-cryptoapi @!LINUX_3_18 + FILES:=$(PKG_BUILD_DIR)/dtls/$(DTLSMGR_DIR)/qca-nss-dtlsmgr.ko +endef + +define KernelPackage/qca-nss-drv-dtls/Description +Kernel modules for NSS connection manager - Support for DTLS sessions +endef + +define KernelPackage/qca-nss-drv-l2tpv2 + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + TITLE:=Kernel driver for NSS (connection manager) - l2tp + DEPENDS:=+kmod-qca-nss-drv +kmod-ppp +kmod-l2tp @!LINUX_3_18 + FILES:=$(PKG_BUILD_DIR)/l2tp/l2tpv2/qca-nss-l2tpv2.ko + KCONFIG:=CONFIG_L2TP=y + AUTOLOAD:=$(call AutoLoad,51,qca-nss-l2tpv2) +endef + +define KernelPackage/qca-nss-drv-l2tp/Description +Kernel modules for NSS connection manager - Support for l2tp tunnel +endef + +define KernelPackage/qca-nss-drv-pptp + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + TITLE:=Kernel driver for NSS (connection manager) - PPTP + DEPENDS:=+kmod-qca-nss-drv +kmod-pptp @!LINUX_3_18 + FILES:=$(PKG_BUILD_DIR)/pptp/qca-nss-pptp.ko + AUTOLOAD:=$(call AutoLoad,51,qca-nss-pptp) +endef + +define KernelPackage/qca-nss-drv-pptp/Description +Kernel modules for NSS connection manager - Support for PPTP tunnel +endef + define KernelPackage/qca-nss-drv-pppoe SECTION:=kernel 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 + DEPENDS:=+kmod-qca-nss-drv +kmod-pppoe @!LINUX_3_18 \ + +!(TARGET_ipq_ipq807x_QSDK_256||TARGET_ipq_ipq60xx_QSDK_256):kmod-bonding FILES:=$(PKG_BUILD_DIR)/pppoe/qca-nss-pppoe.ko AUTOLOAD:=$(call AutoLoad,51,qca-nss-pppoe) endef @@ -26,34 +105,365 @@ define KernelPackage/qca-nss-drv-pppoe/Description Kernel modules for NSS connection manager - Support for PPPoE endef +define KernelPackage/qca-nss-drv-map-t + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + TITLE:=Kernel driver for NSS (connection manager) - MAP-T + DEPENDS:=+kmod-qca-nss-drv +kmod-nat46 @!LINUX_3_18 + FILES:=$(PKG_BUILD_DIR)/map/map-t/qca-nss-map-t.ko + AUTOLOAD:=$(call AutoLoad,51,qca-nss-map-t) +endef + +define KernelPackage/qca-nss-drv-map-t/Description +Kernel modules for NSS connection manager - Support for MAP-T +endef + +define KernelPackage/qca-nss-drv-gre + SECTION:=kernel + 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 @!LINUX_3_18 +kmod-gre6 + 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 + +define KernelPackage/qca-nss-drv-gre/Description +Kernel modules for NSS connection manager - Support for GRE +endef + +define KernelPackage/qca-nss-drv-tunipip6 + SECTION:=kernel + 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 @!LINUX_3_18 + FILES:=$(PKG_BUILD_DIR)/qca-nss-tunipip6.ko + AUTOLOAD:=$(call AutoLoad,60,qca-nss-tunipip6) +endef + +define KernelPackage/qca-nss-drv-tunipip6/Description +Kernel modules for NSS connection manager +Add support for DS-lite and ipip6 tunnel +endef + +define KernelPackage/qca-nss-drv-profile + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + DEPENDS:=+kmod-qca-nss-drv @!LINUX_3_18 + TITLE:=Profiler for QCA NSS driver (IPQ806x) + FILES:=$(PKG_BUILD_DIR)/profiler/qca-nss-profile-drv.ko +endef + +define KernelPackage/qca-nss-drv-profile/Description +This package contains a NSS driver profiler for QCA chipset +endef + +define KernelPackage/qca-nss-drv-ipsecmgr + SECTION:=kernel + 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-standard +kmod-qca-nss-cfi-cryptoapi @!LINUX_3_18 +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-l2tpv2),) + DEPENDS+=+kmod-qca-nss-drv-l2tpv2 +endif + FILES:=$(PKG_BUILD_DIR)/ipsecmgr/$(IPSECMGR_DIR)/qca-nss-ipsecmgr.ko $(IPSECMGR_KLIPS) + AUTOLOAD:=$(call AutoLoad,60,qca-nss-ipsecmgr) +endef + +define KernelPackage/qca-nss-drv-ipsecmgr/Description +Kernel module for NSS IPsec offload manager +endef + +define KernelPackage/qca-nss-drv-capwapmgr + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + DEPENDS:=+kmod-qca-nss-drv +kmod-qca-nss-drv-dtlsmgr @!LINUX_3_18 + TITLE:=NSS CAPWAP Manager for QCA NSS driver (IPQ806x) + FILES:=$(PKG_BUILD_DIR)/capwapmgr/qca-nss-capwapmgr.ko +endef + +define KernelPackage/qca-nss-drv-capwapmgr/Description +This package contains a NSS CAPWAP Manager +endef + +define KernelPackage/qca-nss-drv-bridge-mgr + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + TITLE:=Kernel driver for NSS bridge manager + DEPENDS:=@TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq807x||TARGET_ipq807x_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64 \ + +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_ipq807x_64: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 @!LINUX_3_18 \ + +!(TARGET_ipq_ipq807x_QSDK_256||TARGET_ipq_ipq60xx_QSDK_256):kmod-bonding + FILES:=$(PKG_BUILD_DIR)/bridge/qca-nss-bridge-mgr.ko + AUTOLOAD:=$(call AutoLoad,51,qca-nss-bridge-mgr) +endef + +define KernelPackage/qca-nss-drv-bridge-mgr/Description +Kernel modules for NSS bridge manager +endef + +define KernelPackage/qca-nss-drv-vlan-mgr + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + TITLE:=Kernel driver for NSS vlan manager + DEPENDS:=@TARGET_ipq806x||TARGET_ipq807x +kmod-qca-nss-drv @!LINUX_3_18 \ + +!(TARGET_ipq_ipq807x_QSDK_256||TARGET_ipq_ipq60xx_QSDK_256):kmod-bonding + FILES:=$(PKG_BUILD_DIR)/vlan/qca-nss-vlan.ko + AUTOLOAD:=$(call AutoLoad,51,qca-nss-vlan) +endef + +define KernelPackage/qca-nss-drv-vlan-mgr/Description +Kernel modules for NSS vlan manager +endef + +define KernelPackage/qca-nss-drv-qdisc + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Support + TITLE:=Qdisc for configuring shapers in NSS + DEPENDS:=+kmod-qca-nss-drv @!LINUX_3_18 + FILES:=$(PKG_BUILD_DIR)/nss_qdisc/qca-nss-qdisc.ko + KCONFIG:=CONFIG_NET_CLS_ACT=y + AUTOLOAD:=$(call AutoLoad,58,qca-nss-qdisc) +endef + +define KernelPackage/qca-nss-drv-qdisc/Description +Linux qdisc that aids in configuring shapers in the NSS +endef + +define KernelPackage/qca-nss-drv-lag-mgr + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + TITLE:=Kernel driver for NSS LAG manager + DEPENDS:=+kmod-qca-nss-drv @!LINUX_3_18 \ + +TARGET_ipq_ipq807x:kmod-qca-nss-drv-vlan-mgr \ + +TARGET_ipq_ipq807x_64:kmod-qca-nss-drv-vlan-mgr @!LINUX_3_18 \ + +TARGET_ipq807x:kmod-qca-nss-drv-vlan-mgr \ + +TARGET_ipq807x_64:kmod-qca-nss-drv-vlan-mgr @!LINUX_3_18 \ + +TARGET_ipq_ipq60xx:kmod-qca-nss-drv-vlan-mgr @!LINUX_3_18 \ + +TARGET_ipq_ipq60xx_64:kmod-qca-nss-drv-vlan-mgr @!LINUX_3_18 \ + +kmod-bonding + FILES:=$(PKG_BUILD_DIR)/lag/qca-nss-lag-mgr.ko + AUTOLOAD:=$(call AutoLoad,51,qca-nss-lag-mgr) +endef + +define KernelPackage/qca-nss-drv-lag-mgr/Description +Kernel modules for NSS LAG manager +endef + +define KernelPackage/qca-nss-drv-netlink + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + DEPENDS:=@TARGET_ipq807x||TARGET_ipq_ipq807x||TARGET_ipq807x_64||TARGET_ipq_ipq807x_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64||TARGET_ipq_ipq50xx||TARGET_ipq_ipq50xx_64 \ + +kmod-qca-nss-drv @!LINUX_3_18 \ + +PACKAGE_kmod-qca-nss-drv-ipsecmgr:kmod-qca-nss-drv-ipsecmgr \ + +PACKAGE_kmod-qca-nss-drv-dtlsmgr:kmod-qca-nss-drv-dtlsmgr \ + +PACKAGE_kmod-qca-nss-drv-capwapmgr:kmod-qca-nss-drv-capwapmgr @!LINUX_3_18 + TITLE:=NSS NETLINK Manager for QCA NSS driver + FILES:=$(PKG_BUILD_DIR)/netlink/qca-nss-netlink.ko +endef + +define KernelPackage/qca-nss-drv-netlink/Description +Kernel module for NSS netlink manager +endef + +define KernelPackage/qca-nss-drv-ovpn-mgr + SECTION:=kernel + 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 @!LINUX_3_18 \ + @TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64 + FILES:=$(PKG_BUILD_DIR)/openvpn/src/qca-nss-ovpn-mgr.ko +endef + +define KernelPackage/qca-nss-drv-ovpn-mgr/Description +Kernel module for NSS OpenVPN manager +endef + +define KernelPackage/qca-nss-drv-ovpn-link + SECTION:=kernel + 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-premium @!LINUX_3_18 \ + @TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64 + FILES:=$(PKG_BUILD_DIR)/openvpn/plugins/qca-nss-ovpn-link.ko +endef + +define KernelPackage/qca-nss-drv-ovpn-link/Description +This module registers with ECM and communicates with NSS OpenVPN manager for supporting OpenVPN offload. +endef + +define KernelPackage/qca-nss-drv-pvxlanmgr + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + DEPENDS:=+kmod-qca-nss-drv @!LINUX_3_18 + TITLE:=NSS PVXLAN Manager for QCA NSS driver + FILES:=$(PKG_BUILD_DIR)/pvxlanmgr/qca-nss-pvxlanmgr.ko +endef + +define KernelPackage/qca-nss-drv-pvxlanmgr/Description +Kernel module for managing NSS PVxLAN +endef + +define Build/InstallDev/qca-nss-clients + $(INSTALL_DIR) $(1)/usr/include/qca-nss-clients + $(CP) $(PKG_BUILD_DIR)/netlink/include/* $(1)/usr/include/qca-nss-clients/ + $(CP) $(PKG_BUILD_DIR)/exports/* $(1)/usr/include/qca-nss-clients/ +endef + +define Build/InstallDev + $(call Build/InstallDev/qca-nss-clients,$(1)) +endef + +define KernelPackage/qca-nss-drv-ovpn-mgr/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/qca-nss-ovpn.init $(1)/etc/init.d/qca-nss-ovpn +endef + +define KernelPackage/qca-nss-drv-ipsecmgr/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/qca-nss-ipsec $(1)/etc/init.d/qca-nss-ipsec +endef + + 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-gmac \ + -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 -ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-pppoe),) -NSS_CLIENTS_MAKE_OPTS+=pppoe=y +# Build individual packages if selected +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-profile),) +MAKE_OPTS+=profile=y endif -ifeq ($(CONFIG_TARGET_BOARD), "ipq807x") - SOC="ipq807x_64" -else ifeq ($(CONFIG_TARGET_BOARD), "ipq60xx") - SOC="ipq60xx_64" +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-capwapmgr),) +MAKE_OPTS+=capwapmgr=y +EXTRA_CFLAGS += -DNSS_CAPWAPMGR_ONE_NETDEV +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-tun6rd),) +MAKE_OPTS+=tun6rd=m +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-dtlsmgr),) +MAKE_OPTS+=dtlsmgr=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-l2tpv2),) +MAKE_OPTS+=l2tpv2=y +EXTRA_CFLAGS += -DNSS_L2TPV2_ENABLED +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-pptp),) +MAKE_OPTS+=pptp=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-map-t),) +MAKE_OPTS+=map-t=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-tunipip6),) +MAKE_OPTS+=tunipip6=m +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-qdisc),) +MAKE_OPTS+=qdisc=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-ipsecmgr),) +EXTRA_CFLAGS+= -I$(PKG_BUILD_DIR)/exports \ + -I$(STAGING_DIR)/usr/include/qca-nss-ecm +MAKE_OPTS+=ipsecmgr=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-bridge-mgr),) +MAKE_OPTS+=bridge-mgr=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-vlan-mgr),) +MAKE_OPTS+=vlan-mgr=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-lag-mgr),) +MAKE_OPTS+=lag-mgr=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-gre),) +EXTRA_CFLAGS+= -I$(PKG_BUILD_DIR)/exports +MAKE_OPTS+=gre=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-pppoe),) +MAKE_OPTS+=pppoe=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-netlink),) +MAKE_OPTS+=netlink=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-ovpn-mgr),) +MAKE_OPTS+=ovpn-mgr=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-ovpn-link),) +MAKE_OPTS+=ovpn-link=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-pvxlanmgr),) +MAKE_OPTS+=pvxlanmgr=y endif define Build/Compile - $(MAKE) -C "$(LINUX_DIR)" $(strip $(NSS_CLIENTS_MAKE_OPTS)) \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - ARCH="$(LINUX_KARCH)" \ + $(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" $(strip $(MAKE_OPTS)) \ + $(KERNEL_MAKE_FLAGS) \ + $(PKG_MAKE_FLAGS) \ M="$(PKG_BUILD_DIR)" \ EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ - SoC=$(SOC) \ - $(KERNEL_MAKE_FLAGS) \ + SoC="$(subtarget)" \ + DTLSMGR_DIR="$(DTLSMGR_DIR)" \ + IPSECMGR_DIR="$(IPSECMGR_DIR)" \ modules endef +$(eval $(call KernelPackage,qca-nss-drv-profile)) +$(eval $(call KernelPackage,qca-nss-drv-capwapmgr)) +$(eval $(call KernelPackage,qca-nss-drv-tun6rd)) +$(eval $(call KernelPackage,qca-nss-drv-dtlsmgr)) +$(eval $(call KernelPackage,qca-nss-drv-l2tpv2)) +$(eval $(call KernelPackage,qca-nss-drv-pptp)) $(eval $(call KernelPackage,qca-nss-drv-pppoe)) +$(eval $(call KernelPackage,qca-nss-drv-map-t)) +$(eval $(call KernelPackage,qca-nss-drv-tunipip6)) +$(eval $(call KernelPackage,qca-nss-drv-qdisc)) +$(eval $(call KernelPackage,qca-nss-drv-netlink)) +$(eval $(call KernelPackage,qca-nss-drv-ipsecmgr)) +$(eval $(call KernelPackage,qca-nss-drv-bridge-mgr)) +$(eval $(call KernelPackage,qca-nss-drv-vlan-mgr)) +$(eval $(call KernelPackage,qca-nss-drv-lag-mgr)) +$(eval $(call KernelPackage,qca-nss-drv-gre)) +$(eval $(call KernelPackage,qca-nss-drv-ovpn-mgr)) +$(eval $(call KernelPackage,qca-nss-drv-ovpn-link)) +$(eval $(call KernelPackage,qca-nss-drv-pvxlanmgr)) diff --git a/package/nss/qca/qca-nss-clients/files/qca-nss-ipsec b/package/nss/qca/qca-nss-clients/files/qca-nss-ipsec old mode 100755 new mode 100644 index 5f682c8e9..bb202e8e7 --- a/package/nss/qca/qca-nss-clients/files/qca-nss-ipsec +++ b/package/nss/qca/qca-nss-clients/files/qca-nss-ipsec @@ -1,6 +1,6 @@ #!/bin/sh /etc/rc.common # -# Copyright (c) 2018-2019, 2021 The Linux Foundation. All rights reserved. +# Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -16,7 +16,6 @@ NSS_IPSEC_LOG_FILE=/tmp/.nss_ipsec_log NSS_IPSEC_LOG_STR_ECM="ECM_Loaded" -NSS_IPSEC_OL_FILE=/tmp/qca_nss_ipsec_ol ecm_load () { if [ ! -d /sys/module/ecm ]; then @@ -59,24 +58,7 @@ ecm_enable() { echo 0 > /sys/kernel/debug/ecm/front_end_ipv6_stop } -kernel_version_check_5_4() { - major_ver=$(uname -r | awk -F '.' '{print $1}') - minor_ver=$(uname -r | awk -F '.' '{print $2}') - if [ $major_ver -lt 5 ] || ([ $major_ver -eq 5 ] && [ $minor_ver -lt 4 ] ) ; then - return 1 - else - return 0 - fi -} - -start_klips() { - if kernel_version_check_5_4 - then - echo "Kernel 5.4 doesn't support klips stack." - return $? - fi - - touch $NSS_IPSEC_OL_FILE +start() { ecm_load local kernel_version=$(uname -r) @@ -85,7 +67,6 @@ start_klips() { if [ "$?" -gt 0 ]; then echo "Failed to load plugin. Please start ecm if not done already" ecm_enable - rm $NSS_IPSEC_OL_FILE return fi @@ -96,118 +77,15 @@ start_klips() { ecm_enable } -stop_klips() { - if kernel_version_check_5_4 - then - echo "Kernel 5.4 doesn't support klips stack." - return $? - fi - +stop() { ecm_disable /etc/init.d/ipsec stop rmmod qca-nss-ipsec-klips - rm $NSS_IPSEC_OL_FILE ecm_unload } -start_xfrm() { - touch $NSS_IPSEC_OL_FILE - ecm_load - - local kernel_version=$(uname -r) - - # load all NETKEY modules first. - for mod in xfrm_ipcomp ipcomp xfrm6_tunnel ipcomp6 xfrm6_mode_tunnel xfrm6_mode_beet xfrm6_mode_ro \ - xfrm6_mode_transport xfrm4_mode_transport xfrm4_mode_tunnel \ - xfrm4_tunnel xfrm4_mode_beet esp4 esp6 ah4 ah6 af_key - do - insmod $mod 2> /dev/null - done - - # Now load the xfrm plugin - insmod /lib/modules/${kernel_version}/qca-nss-ipsec-xfrm.ko - if [ "$?" -gt 0 ]; then - echo "Failed to load plugin. Please start ecm if not done already" - ecm_enable - rm $NSS_IPSEC_OL_FILE - return - fi - - /etc/init.d/ipsec start - sleep 2 - - ecm_enable -} - -stop_xfrm() { - ecm_disable - - #Shutdown Pluto first. Then only plugin can be removed. - plutopid=/var/run/pluto/pluto.pid - if [ -f $plutopid ]; then - pid=`cat $plutopid` - if [ ! -z "$pid" ]; then - ipsec whack --shutdown | grep -v "002"; - if [ -s $plutopid ]; then - echo "Attempt to shut Pluto down failed! Trying kill:" - kill $pid; - sleep 5; - fi - fi - rm -rf $plutopid - fi - ip xfrm state flush; - ip xfrm policy flush; - sleep 2 - - #Now we can remove the plugin - retries=5 - while [ -d /sys/module/qca_nss_ipsec_xfrm ] - do - rmmod qca-nss-ipsec-xfrm - if [ "$?" -eq 0 ]; then - rm $NSS_IPSEC_OL_FILE - break - fi - - if [ ${retries} -eq 0 ]; then - echo "Failed to unload qca-nss-ipsec-xfrm plugin!" - exit - fi - - echo "XFRM plugin unload failed; retrying ${retries} times" - sleep 1 - retries=`expr ${retries} - 1` - done - - /etc/init.d/ipsec stop - ecm_unload -} - -start() { - local protostack=`uci -q get ipsec.setup.protostack` - if [ "$protostack" = "klips" ]; then - start_klips - return $? - fi - - start_xfrm - return $? -} - -stop() { - local protostack=`uci -q get ipsec.setup.protostack` - if [ "$protostack" = "klips" ]; then - stop_klips - return $? - fi - - stop_xfrm - return $? -} - restart() { stop start diff --git a/package/nss/qca/qca-nss-clients/patches/100-kernel-5.4-support-qdisc.patch b/package/nss/qca/qca-nss-clients/patches/100-kernel-5.4-support-qdisc.patch new file mode 100644 index 000000000..0ec8d766e --- /dev/null +++ b/package/nss/qca/qca-nss-clients/patches/100-kernel-5.4-support-qdisc.patch @@ -0,0 +1,1145 @@ +--- a/nss_qdisc/nss_qdisc.h ++++ b/nss_qdisc/nss_qdisc.h +@@ -338,7 +340,7 @@ extern void nss_qdisc_destroy(struct nss + * Initializes a shaper in NSS, based on the position of this qdisc (child or root) + * and if its a normal interface or a bridge interface. + */ +-extern int nss_qdisc_init(struct Qdisc *sch, struct nss_qdisc *nq, nss_shaper_node_type_t type, uint32_t classid, uint32_t accel_mode); ++extern int nss_qdisc_init(struct Qdisc *sch, struct netlink_ext_ack *extack, struct nss_qdisc *nq, nss_shaper_node_type_t type, uint32_t classid, uint32_t accel_mode); + + /* + * nss_qdisc_start_basic_stats_polling() +--- a/nss_qdisc/nss_bf.c ++++ b/nss_qdisc/nss_bf.c +@@ -69,7 +69,7 @@ static inline struct nss_bf_class_data * + * Configures a new class. + */ + static int nss_bf_change_class(struct Qdisc *sch, u32 classid, u32 parentid, +- struct nlattr **tca, unsigned long *arg) ++ struct nlattr **tca, unsigned long *arg, struct netlink_ext_ack *extack) + { + struct nss_bf_sched_data *q = qdisc_priv(sch); + struct nss_bf_class_data *cl = (struct nss_bf_class_data *)*arg; +@@ -121,7 +121,7 @@ static int nss_bf_change_class(struct Qd + * that is registered to Linux. Therefore we initialize the NSSBF_GROUP shaper + * here. + */ +- if (nss_qdisc_init(sch, &cl->nq, NSS_SHAPER_NODE_TYPE_BF_GROUP, classid, accel_mode) < 0) { ++ if (nss_qdisc_init(sch, extack, &cl->nq, NSS_SHAPER_NODE_TYPE_BF_GROUP, classid, accel_mode) < 0) { + nss_qdisc_error("Nss init for class %u failed\n", classid); + kfree(cl); + return -EINVAL; +@@ -260,7 +260,7 @@ static void nss_bf_destroy_class(struct + /* + * And now we destroy the child. + */ +- qdisc_destroy(cl->qdisc); ++ qdisc_put(cl->qdisc); + + /* + * Stop the stats polling timer and free class +@@ -325,7 +325,7 @@ static int nss_bf_delete_class(struct Qd + * Replaces the qdisc attached to the provided class. + */ + static int nss_bf_graft_class(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, +- struct Qdisc **old) ++ struct Qdisc **old, struct netlink_ext_ack *extack) + { + struct nss_bf_sched_data *q = qdisc_priv(sch); + struct nss_bf_class_data *cl = (struct nss_bf_class_data *)arg; +@@ -432,24 +432,6 @@ static unsigned long nss_bf_get_class(st + } + + /* +- * nss_bf_put_class() +- * Reduces reference count for this class. +- */ +-static void nss_bf_put_class(struct Qdisc *sch, unsigned long arg) +-{ +- struct nss_bf_class_data *cl = (struct nss_bf_class_data *)arg; +- nss_qdisc_info("bf put class for %p\n", cl); +- +- /* +- * We are safe to destroy the qdisc if the reference count +- * goes down to 0. +- */ +- if (atomic_sub_return(1, &cl->nq.refcnt) == 0) { +- nss_bf_destroy_class(sch, cl); +- } +-} +- +-/* + * nss_bf_dump_class() + * Dumps all configurable parameters pertaining to this class. + */ +@@ -538,7 +520,7 @@ static void nss_bf_walk(struct Qdisc *sc + * nss_bf_change_qdisc() + * Can be used to configure a nssbf qdisc. + */ +-static int nss_bf_change_qdisc(struct Qdisc *sch, struct nlattr *opt) ++static int nss_bf_change_qdisc(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_bf_sched_data *q = qdisc_priv(sch); + struct tc_nssbf_qopt *qopt; +@@ -684,7 +666,7 @@ static void nss_bf_destroy_qdisc(struct + * nss_bf_init_qdisc() + * Initializes the nssbf qdisc. + */ +-static int nss_bf_init_qdisc(struct Qdisc *sch, struct nlattr *opt) ++static int nss_bf_init_qdisc(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_bf_sched_data *q = qdisc_priv(sch); + struct tc_nssbf_qopt *qopt; +@@ -720,7 +702,7 @@ static int nss_bf_init_qdisc(struct Qdis + /* + * Initialize the NSSBF shaper in NSS + */ +- if (nss_qdisc_init(sch, &q->nq, NSS_SHAPER_NODE_TYPE_BF, 0, accel_mode) < 0) { ++ if (nss_qdisc_init(sch, extack, &q->nq, NSS_SHAPER_NODE_TYPE_BF, 0, accel_mode) < 0) { + return -EINVAL; + } + +@@ -729,7 +711,7 @@ static int nss_bf_init_qdisc(struct Qdis + /* + * Tune nss_bf parameters. + */ +- if (nss_bf_change_qdisc(sch, opt) < 0) { ++ if (nss_bf_change_qdisc(sch, opt, NULL) < 0) { + nss_qdisc_destroy(&q->nq); + return -EINVAL; + } +@@ -772,7 +754,7 @@ nla_put_failure: + * nss_bf_enqueue() + * Enqueues a skb to nssbf qdisc. + */ +-static int nss_bf_enqueue(struct sk_buff *skb, struct Qdisc *sch) ++static int nss_bf_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) + { + return nss_qdisc_enqueue(skb, sch); + } +@@ -787,18 +769,6 @@ static struct sk_buff *nss_bf_dequeue(st + } + + /* +- * nss_bf_drop() +- * Drops a single skb from linux queue, if not empty. +- * +- * Does not drop packets that are queued in the NSS. +- */ +-static unsigned int nss_bf_drop(struct Qdisc *sch) +-{ +- printk("In bf drop\n"); +- return nss_qdisc_drop(sch); +-} +- +-/* + * Registration structure for nssbf class + */ + const struct Qdisc_class_ops nss_bf_class_ops = { +@@ -807,9 +777,8 @@ const struct Qdisc_class_ops nss_bf_clas + .graft = nss_bf_graft_class, + .leaf = nss_bf_leaf_class, + .qlen_notify = nss_bf_qlen_notify, +- .get = nss_bf_get_class, +- .put = nss_bf_put_class, ++ .find = nss_bf_get_class, + .dump = nss_bf_dump_class, + .dump_stats = nss_bf_dump_class_stats, + .walk = nss_bf_walk + }; +@@ -830,7 +798,6 @@ struct Qdisc_ops nss_bf_qdisc_ops __read + .enqueue = nss_bf_enqueue, + .dequeue = nss_bf_dequeue, + .peek = qdisc_peek_dequeued, +- .drop = nss_bf_drop, + .cl_ops = &nss_bf_class_ops, + .priv_size = sizeof(struct nss_bf_sched_data), + .owner = THIS_MODULE +--- a/nss_qdisc/nss_blackhole.c ++++ b/nss_qdisc/nss_blackhole.c +@@ -35,7 +35,7 @@ static struct nla_policy nss_blackhole_p + * nss_blackhole_enqueue() + * Enqueue API for nss blackhole qdisc. + */ +-static int nss_blackhole_enqueue(struct sk_buff *skb, struct Qdisc *sch) ++static int nss_blackhole_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) + { + return nss_qdisc_enqueue(skb, sch); + } +@@ -50,18 +50,6 @@ static struct sk_buff *nss_blackhole_deq + } + + /* +- * nss_blackhole_drop() +- * The following function drops a packet from HLOS queue. +- * +- * Note, this does not drop packets from queues in the NSS. We do not support that. +- */ +-static unsigned int nss_blackhole_drop(struct Qdisc *sch) +-{ +- nss_qdisc_info("qdisc %x dropping\n", sch->handle); +- return nss_qdisc_drop(sch); +-} +- +-/* + * nss_blackhole_reset() + * Resets the nss blackhole qdisc. + */ +@@ -92,7 +80,7 @@ static void nss_blackhole_destroy(struct + * nss_blackhole_change() + * Function call used to configure the parameters of the nss blackhole qdisc. + */ +-static int nss_blackhole_change(struct Qdisc *sch, struct nlattr *opt) ++static int nss_blackhole_change(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_blackhole_sched_data *q; + struct tc_nssblackhole_qopt *qopt; +@@ -154,7 +142,7 @@ static int nss_blackhole_change(struct Q + * nss_blackhole_init() + * Initializes a nss blackhole qdisc. + */ +-static int nss_blackhole_init(struct Qdisc *sch, struct nlattr *opt) ++static int nss_blackhole_init(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_qdisc *nq = qdisc_priv(sch); + struct tc_nssblackhole_qopt *qopt; +@@ -176,12 +164,12 @@ static int nss_blackhole_init(struct Qdi + nss_qdisc_info("qdisc %x initializing\n", sch->handle); + nss_blackhole_reset(sch); + +- if (nss_qdisc_init(sch, nq, NSS_SHAPER_NODE_TYPE_FIFO, 0, accel_mode) < 0) { ++ if (nss_qdisc_init(sch, extack, nq, NSS_SHAPER_NODE_TYPE_FIFO, 0, accel_mode) < 0) { + return -EINVAL; + } + + nss_qdisc_info("qdisc %x initialized with parent %x\n", sch->handle, sch->parent); +- if (nss_blackhole_change(sch, opt) < 0) { ++ if (nss_blackhole_change(sch, opt, NULL) < 0) { + nss_qdisc_destroy(nq); + return -EINVAL; + } +@@ -251,7 +239,6 @@ struct Qdisc_ops nss_blackhole_qdisc_ops + .enqueue = nss_blackhole_enqueue, + .dequeue = nss_blackhole_dequeue, + .peek = nss_blackhole_peek, +- .drop = nss_blackhole_drop, + .init = nss_blackhole_init, + .reset = nss_blackhole_reset, + .destroy = nss_blackhole_destroy, +--- a/nss_qdisc/nss_codel.c ++++ b/nss_qdisc/nss_codel.c +@@ -76,7 +76,7 @@ static struct nla_policy nss_codel_polic + * nss_codel_enqueue() + * Enqueue a packet into nss_codel queue in NSS firmware (bounce). + */ +-static int nss_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch) ++static int nss_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) + { + return nss_qdisc_enqueue(skb, sch); + } +@@ -91,17 +91,6 @@ static struct sk_buff *nss_codel_dequeue + } + + /* +- * nss_codel_drop() +- * Drops a packet from the bounce complete queue. +- * +- * Note: this does not drop packets from the NSS queues. +- */ +-static unsigned int nss_codel_drop(struct Qdisc *sch) +-{ +- return nss_qdisc_drop(sch); +-} +- +-/* + * nss_codel_reset() + * Resets nss_codel qdisc. + */ +@@ -234,7 +223,7 @@ static int nss_codel_mem_sz_get(struct Q + * nss_codel_change() + * Used to configure the nss_codel queue in NSS firmware. + */ +-static int nss_codel_change(struct Qdisc *sch, struct nlattr *opt) ++static int nss_codel_change(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_codel_sched_data *q = qdisc_priv(sch); + struct tc_nsscodel_qopt *qopt; +@@ -381,7 +370,7 @@ fail: + * nss_codel_init() + * Initializes the nss_codel qdisc. + */ +-static int nss_codel_init(struct Qdisc *sch, struct nlattr *opt) ++static int nss_codel_init(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_qdisc *nq = qdisc_priv(sch); + struct tc_nsscodel_qopt *qopt; +@@ -404,7 +393,7 @@ static int nss_codel_init(struct Qdisc * + nss_qdisc_register_configure_callback(nq, nss_codel_configure_callback); + nss_qdisc_register_stats_callback(nq, nss_codel_stats_callback); + +- if (nss_qdisc_init(sch, nq, NSS_SHAPER_NODE_TYPE_CODEL, 0, qopt->accel_mode) < 0) { ++ if (nss_qdisc_init(sch, extack, nq, NSS_SHAPER_NODE_TYPE_CODEL, 0, qopt->accel_mode) < 0) { + return -EINVAL; + } + +@@ -412,7 +401,7 @@ static int nss_codel_init(struct Qdisc * + return -EINVAL; + } + +- if (nss_codel_change(sch, opt) < 0) { ++ if (nss_codel_change(sch, opt, NULL) < 0) { + nss_qdisc_destroy(nq); + return -EINVAL; + } +@@ -511,7 +500,6 @@ struct Qdisc_ops nss_codel_qdisc_ops __r + .enqueue = nss_codel_enqueue, + .dequeue = nss_codel_dequeue, + .peek = nss_codel_peek, +- .drop = nss_codel_drop, + .init = nss_codel_init, + .reset = nss_codel_reset, + .destroy = nss_codel_destroy, +@@ -530,7 +518,6 @@ struct Qdisc_ops nss_fq_codel_qdisc_ops + .enqueue = nss_codel_enqueue, + .dequeue = nss_codel_dequeue, + .peek = nss_codel_peek, +- .drop = nss_codel_drop, + .init = nss_codel_init, + .reset = nss_codel_reset, + .destroy = nss_codel_destroy, +--- a/nss_qdisc/nss_fifo.c ++++ b/nss_qdisc/nss_fifo.c +@@ -29,7 +29,7 @@ static struct nla_policy nss_fifo_policy + [TCA_NSSFIFO_PARMS] = { .len = sizeof(struct tc_nssfifo_qopt) }, + }; + +-static int nss_fifo_enqueue(struct sk_buff *skb, struct Qdisc *sch) ++static int nss_fifo_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) + { + return nss_qdisc_enqueue(skb, sch); + } +@@ -39,12 +39,6 @@ static struct sk_buff *nss_fifo_dequeue( + return nss_qdisc_dequeue(sch); + } + +-static unsigned int nss_fifo_drop(struct Qdisc *sch) +-{ +- nss_qdisc_info("nss_fifo dropping"); +- return nss_qdisc_drop(sch); +-} +- + static void nss_fifo_reset(struct Qdisc *sch) + { + nss_qdisc_info("nss_fifo resetting!"); +@@ -158,7 +152,7 @@ fail: + } + #endif + +-static int nss_fifo_change(struct Qdisc *sch, struct nlattr *opt) ++static int nss_fifo_change(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_fifo_sched_data *q = qdisc_priv(sch); + struct nss_qdisc *nq = &q->nq; +@@ -208,7 +202,7 @@ static int nss_fifo_change(struct Qdisc + return 0; + } + +-static int nss_fifo_init(struct Qdisc *sch, struct nlattr *opt) ++static int nss_fifo_init(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_qdisc *nq = qdisc_priv(sch); + struct tc_nssfifo_qopt *qopt; +@@ -226,13 +220,13 @@ static int nss_fifo_init(struct Qdisc *s + return -EINVAL; + } + +- if (nss_qdisc_init(sch, nq, NSS_SHAPER_NODE_TYPE_FIFO, 0, qopt->accel_mode) < 0) { ++ if (nss_qdisc_init(sch, extack, nq, NSS_SHAPER_NODE_TYPE_FIFO, 0, qopt->accel_mode) < 0) { + nss_qdisc_warning("Fifo %x init failed", sch->handle); + return -EINVAL; + } + + nss_qdisc_info("NSS fifo initialized - handle %x parent %x\n", sch->handle, sch->parent); +- if (nss_fifo_change(sch, opt) < 0) { ++ if (nss_fifo_change(sch, opt, NULL) < 0) { + nss_qdisc_destroy(nq); + return -EINVAL; + } +@@ -290,7 +284,6 @@ struct Qdisc_ops nss_pfifo_qdisc_ops __r + .enqueue = nss_fifo_enqueue, + .dequeue = nss_fifo_dequeue, + .peek = nss_fifo_peek, +- .drop = nss_fifo_drop, + .init = nss_fifo_init, + .reset = nss_fifo_reset, + .destroy = nss_fifo_destroy, +@@ -305,7 +298,6 @@ struct Qdisc_ops nss_bfifo_qdisc_ops __r + .enqueue = nss_fifo_enqueue, + .dequeue = nss_fifo_dequeue, + .peek = nss_fifo_peek, +- .drop = nss_fifo_drop, + .init = nss_fifo_init, + .reset = nss_fifo_reset, + .destroy = nss_fifo_destroy, +--- a/nss_qdisc/nss_htb.c ++++ b/nss_qdisc/nss_htb.c +@@ -267,7 +267,7 @@ static int nss_htb_ppe_change_class(stru + * Configures a new class. + */ + static int nss_htb_change_class(struct Qdisc *sch, u32 classid, u32 parentid, +- struct nlattr **tca, unsigned long *arg) ++ struct nlattr **tca, unsigned long *arg, struct netlink_ext_ack *extack) + { + struct nss_htb_sched_data *q = qdisc_priv(sch); + struct nss_htb_class_data *cl = (struct nss_htb_class_data *)*arg; +@@ -332,7 +332,7 @@ static int nss_htb_change_class(struct Q + * here. + */ + cl->nq.parent = nq_parent; +- if (nss_qdisc_init(sch, &cl->nq, NSS_SHAPER_NODE_TYPE_HTB_GROUP, classid, accel_mode) < 0) { ++ if (nss_qdisc_init(sch, extack, &cl->nq, NSS_SHAPER_NODE_TYPE_HTB_GROUP, classid, accel_mode) < 0) { + nss_qdisc_error("nss_init for htb class %x failed\n", classid); + goto failure; + } +@@ -478,7 +478,7 @@ static void nss_htb_destroy_class(struct + /* + * And now we destroy the child. + */ +- qdisc_destroy(cl->qdisc); ++ qdisc_put(cl->qdisc); + + /* + * Stop the stats polling timer and free class +@@ -577,7 +577,8 @@ static int nss_htb_delete_class(struct Q + * nss_htb_graft_class() + * Replaces the qdisc attached to the provided class. + */ +-static int nss_htb_graft_class(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, struct Qdisc **old) ++static int nss_htb_graft_class(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, struct Qdisc **old, ++ struct netlink_ext_ack *extack) + { + struct nss_htb_class_data *cl = (struct nss_htb_class_data *)arg; + struct nss_if_msg nim_detach; +@@ -682,25 +683,6 @@ static unsigned long nss_htb_get_class(s + } + + /* +- * nss_htb_put_class() +- * Reduces reference count for this class. +- */ +-static void nss_htb_put_class(struct Qdisc *sch, unsigned long arg) +-{ +- struct nss_htb_class_data *cl = (struct nss_htb_class_data *)arg; +- nss_qdisc_trace("executing put on htb class %x in qdisc %x\n", +- cl->nq.qos_tag, sch->handle); +- +- /* +- * We are safe to destroy the qdisc if the reference count +- * goes down to 0. +- */ +- if (atomic_sub_return(1, &cl->nq.refcnt) == 0) { +- nss_htb_destroy_class(sch, cl); +- } +-} +- +-/* + * nss_htb_dump_class() + * Dumps all configurable parameters pertaining to this class. + */ +@@ -795,7 +777,7 @@ static void nss_htb_walk(struct Qdisc *s + * nss_htb_change_qdisc() + * Can be used to configure a htb qdisc. + */ +-static int nss_htb_change_qdisc(struct Qdisc *sch, struct nlattr *opt) ++static int nss_htb_change_qdisc(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_htb_sched_data *q = qdisc_priv(sch); + struct tc_nsshtb_qopt *qopt; +@@ -945,7 +927,7 @@ static void nss_htb_destroy_qdisc(struct + * nss_htb_init_qdisc() + * Initializes the htb qdisc. + */ +-static int nss_htb_init_qdisc(struct Qdisc *sch, struct nlattr *opt) ++static int nss_htb_init_qdisc(struct Qdisc *sch, struct nlattr *opt,struct netlink_ext_ack *extack) + { + struct nss_htb_sched_data *q = qdisc_priv(sch); + struct tc_nsshtb_qopt *qopt; +@@ -977,7 +959,7 @@ static int nss_htb_init_qdisc(struct Qdi + /* + * Initialize the NSSHTB shaper in NSS + */ +- if (nss_qdisc_init(sch, &q->nq, NSS_SHAPER_NODE_TYPE_HTB, 0, accel_mode) < 0) { ++ if (nss_qdisc_init(sch, extack, &q->nq, NSS_SHAPER_NODE_TYPE_HTB, 0, accel_mode) < 0) { + nss_qdisc_error("failed to initialize htb qdisc %x in nss", sch->handle); + return -EINVAL; + } +@@ -987,7 +969,7 @@ static int nss_htb_init_qdisc(struct Qdi + /* + * Tune HTB parameters + */ +- if (nss_htb_change_qdisc(sch, opt) < 0) { ++ if (nss_htb_change_qdisc(sch, opt, NULL) < 0) { + nss_qdisc_destroy(&q->nq); + return -EINVAL; + } +@@ -1032,7 +1014,7 @@ static int nss_htb_dump_qdisc(struct Qdi + * nss_htb_enqueue() + * Enqueues a skb to htb qdisc. + */ +-static int nss_htb_enqueue(struct sk_buff *skb, struct Qdisc *sch) ++static int nss_htb_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) + { + return nss_qdisc_enqueue(skb, sch); + } +@@ -1047,18 +1029,6 @@ static struct sk_buff *nss_htb_dequeue(s + } + + /* +- * nss_htb_drop() +- * Drops a single skb from linux queue, if not empty. +- * +- * Does not drop packets that are queued in the NSS. +- */ +-static unsigned int nss_htb_drop(struct Qdisc *sch) +-{ +- nss_qdisc_trace("drop called on htb qdisc %x\n", sch->handle); +- return nss_qdisc_drop(sch); +-} +- +-/* + * Registration structure for htb class + */ + const struct Qdisc_class_ops nss_htb_class_ops = { +@@ -1067,9 +1037,8 @@ const struct Qdisc_class_ops nss_htb_cla + .graft = nss_htb_graft_class, + .leaf = nss_htb_leaf_class, + .qlen_notify = nss_htb_qlen_notify, +- .get = nss_htb_get_class, +- .put = nss_htb_put_class, ++ .find = nss_htb_get_class, + .dump = nss_htb_dump_class, + .dump_stats = nss_htb_dump_class_stats, + .walk = nss_htb_walk + }; +@@ -1090,7 +1058,6 @@ struct Qdisc_ops nss_htb_qdisc_ops __rea + .enqueue = nss_htb_enqueue, + .dequeue = nss_htb_dequeue, + .peek = qdisc_peek_dequeued, +- .drop = nss_htb_drop, + .cl_ops = &nss_htb_class_ops, + .priv_size = sizeof(struct nss_htb_sched_data), + .owner = THIS_MODULE +--- a/nss_qdisc/nss_prio.c ++++ b/nss_qdisc/nss_prio.c +@@ -37,7 +37,7 @@ static struct nla_policy nss_prio_policy + * nss_prio_enqueue() + * Enqueues a skb to nssprio qdisc. + */ +-static int nss_prio_enqueue(struct sk_buff *skb, struct Qdisc *sch) ++static int nss_prio_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) + { + return nss_qdisc_enqueue(skb, sch); + } +@@ -52,17 +52,6 @@ static struct sk_buff *nss_prio_dequeue( + } + + /* +- * nss_prio_drop() +- * Drops a single skb from linux queue, if not empty. +- * +- * Does not drop packets that are queued in the NSS. +- */ +-static unsigned int nss_prio_drop(struct Qdisc *sch) +-{ +- return nss_qdisc_drop(sch); +-} +- +-/* + * nss_prio_peek() + * Peeks the first packet in queue for this qdisc. + */ +@@ -117,7 +106,7 @@ static void nss_prio_destroy(struct Qdis + /* + * We can now destroy it + */ +- qdisc_destroy(q->queues[i]); ++ qdisc_put(q->queues[i]); + } + + /* +@@ -157,7 +146,7 @@ static int nss_prio_get_max_bands(struct + * nss_prio_change() + * Function call to configure the nssprio parameters + */ +-static int nss_prio_change(struct Qdisc *sch, struct nlattr *opt) ++static int nss_prio_change(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_prio_sched_data *q; + struct tc_nssprio_qopt *qopt; +@@ -209,7 +198,7 @@ static int nss_prio_change(struct Qdisc + * nss_prio_init() + * Initializes the nssprio qdisc + */ +-static int nss_prio_init(struct Qdisc *sch, struct nlattr *opt) ++static int nss_prio_init(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_prio_sched_data *q = qdisc_priv(sch); + struct tc_nssprio_qopt *qopt; +@@ -230,14 +219,14 @@ static int nss_prio_init(struct Qdisc *s + accel_mode = qopt->accel_mode; + } + +- if (nss_qdisc_init(sch, &q->nq, NSS_SHAPER_NODE_TYPE_PRIO, 0, accel_mode) < 0) { ++ if (nss_qdisc_init(sch, extack, &q->nq, NSS_SHAPER_NODE_TYPE_PRIO, 0, accel_mode) < 0) { + return -EINVAL; + } + + nss_qdisc_info("Nssprio initialized - handle %x parent %x\n", + sch->handle, sch->parent); + +- if (nss_prio_change(sch, opt) < 0) { ++ if (nss_prio_change(sch, opt, NULL) < 0) { + nss_qdisc_destroy(&q->nq); + return -EINVAL; + } +@@ -280,7 +269,7 @@ nla_put_failure: + * Replaces existing child qdisc with the new qdisc that is passed. + */ + static int nss_prio_graft(struct Qdisc *sch, unsigned long arg, +- struct Qdisc *new, struct Qdisc **old) ++ struct Qdisc *new, struct Qdisc **old, struct netlink_ext_ack *extack) + { + struct nss_prio_sched_data *q = qdisc_priv(sch); + struct nss_qdisc *nq_new = qdisc_priv(new); +@@ -383,15 +372,6 @@ static unsigned long nss_prio_get(struct + } + + /* +- * nss_prio_put() +- * Unused API. +- */ +-static void nss_prio_put(struct Qdisc *sch, unsigned long arg) +-{ +- nss_qdisc_info("Inside prio put\n"); +-} +- +-/* + * nss_prio_walk() + * Walks the priority band. + */ +@@ -460,9 +440,8 @@ static int nss_prio_dump_class_stats(str + const struct Qdisc_class_ops nss_prio_class_ops = { + .graft = nss_prio_graft, + .leaf = nss_prio_leaf, +- .get = nss_prio_get, +- .put = nss_prio_put, ++ .find = nss_prio_get, + .walk = nss_prio_walk, + .dump = nss_prio_dump_class, + .dump_stats = nss_prio_dump_class_stats, + }; +@@ -481,7 +459,6 @@ struct Qdisc_ops nss_prio_qdisc_ops __re + .enqueue = nss_prio_enqueue, + .dequeue = nss_prio_dequeue, + .peek = nss_prio_peek, +- .drop = nss_prio_drop, + .init = nss_prio_init, + .reset = nss_prio_reset, + .destroy = nss_prio_destroy, +--- a/nss_qdisc/nss_qdisc.c ++++ b/nss_qdisc/nss_qdisc.c +@@ -929,7 +929,7 @@ static inline void nss_qdisc_add_to_tail + * We do not use the qdisc_enqueue_tail() API here in order + * to prevent stats from getting updated by the API. + */ +- __skb_queue_tail(&sch->q, skb); ++ __qdisc_enqueue_tail(skb, &sch->q); + + spin_unlock_bh(&nq->bounce_protection_lock); + }; +@@ -944,7 +944,7 @@ static inline void nss_qdisc_add_to_tail + * We do not use the qdisc_enqueue_tail() API here in order + * to prevent stats from getting updated by the API. + */ +- __skb_queue_tail(&sch->q, skb); ++ __qdisc_enqueue_tail(skb, &sch->q); + }; + + /* +@@ -966,7 +966,7 @@ static inline struct sk_buff *nss_qdisc_ + * We use __skb_dequeue() to ensure that + * stats don't get updated twice. + */ +- skb = __skb_dequeue(&sch->q); ++ skb = __qdisc_dequeue_head(&sch->q); + + spin_unlock_bh(&nq->bounce_protection_lock); + +@@ -983,7 +983,7 @@ static inline struct sk_buff *nss_qdisc_ + * We use __skb_dequeue() to ensure that + * stats don't get updated twice. + */ +- return __skb_dequeue(&sch->q); ++ return __qdisc_dequeue_head(&sch->q); + }; + + /* +@@ -1064,14 +1064,19 @@ struct Qdisc *nss_qdisc_replace(struct Q + void *nss_qdisc_qopt_get(struct nlattr *opt, struct nla_policy *policy, + uint32_t tca_max, uint32_t tca_params) + { +- struct nlattr *na[tca_max + 1]; ++ struct nlattr *na[8]; + int err; + ++ if (tca_max > 8) { ++ pr_warn("nss_qdisc_qopt_get(): Too many options!\n"); ++ return NULL; ++ } ++ + if (!opt) { + return NULL; + } + +- err = nla_parse_nested(na, tca_max, opt, policy); ++ err = nla_parse_nested_deprecated(na, tca_max, opt, policy, NULL); + if (err < 0) + return NULL; + +@@ -1104,10 +1109,10 @@ struct sk_buff *nss_qdisc_peek(struct Qd + struct sk_buff *skb; + + if (!nq->is_virtual) { +- skb = skb_peek(&sch->q); ++ skb = qdisc_peek_head(sch); + } else { + spin_lock_bh(&nq->bounce_protection_lock); +- skb = skb_peek(&sch->q); ++ skb = qdisc_peek_head(sch); + spin_unlock_bh(&nq->bounce_protection_lock); + } + +@@ -1122,15 +1127,16 @@ unsigned int nss_qdisc_drop(struct Qdisc + { + struct nss_qdisc *nq = qdisc_priv(sch); + unsigned int ret; ++ struct sk_buff *to_free = qdisc_peek_head(sch); + + if (!nq->is_virtual) { +- ret = __qdisc_queue_drop_head(sch, &sch->q); ++ ret = __qdisc_queue_drop_head(sch, &sch->q, &to_free); + } else { + spin_lock_bh(&nq->bounce_protection_lock); + /* + * This function is safe to call within locks + */ +- ret = __qdisc_queue_drop_head(sch, &sch->q); ++ ret = __qdisc_queue_drop_head(sch, &sch->q, &to_free); + spin_unlock_bh(&nq->bounce_protection_lock); + } + +@@ -1958,7 +1964,7 @@ void nss_qdisc_destroy(struct nss_qdisc + * Initializes a shaper in NSS, based on the position of this qdisc (child or root) + * and if its a normal interface or a bridge interface. + */ +-int nss_qdisc_init(struct Qdisc *sch, struct nss_qdisc *nq, nss_shaper_node_type_t type, uint32_t classid, uint32_t accel_mode) ++int nss_qdisc_init(struct Qdisc *sch, struct netlink_ext_ack *extack, struct nss_qdisc *nq, nss_shaper_node_type_t type, uint32_t classid, uint32_t accel_mode) + { + struct Qdisc *root; + u32 parent; +@@ -2471,6 +2481,8 @@ static void nss_qdisc_basic_stats_callba + struct gnet_stats_queue *qstats; + struct nss_shaper_node_stats_response *response; + atomic_t *refcnt; ++ refcount_t *refcnt_new; ++ bool is_refcnt_zero = false; + + if (nim->cm.response != NSS_CMN_RESPONSE_ACK) { + nss_qdisc_warning("Qdisc %p (type %d): Receive stats FAILED - " +@@ -2494,7 +2506,7 @@ static void nss_qdisc_basic_stats_callba + } else { + bstats = &qdisc->bstats; + qstats = &qdisc->qstats; +- refcnt = &qdisc->refcnt; ++ refcnt_new = &qdisc->refcnt; + qdisc->q.qlen = response->sn_stats.qlen_packets; + } + +@@ -2533,11 +2545,20 @@ static void nss_qdisc_basic_stats_callba + * All access to nq fields below do not need lock protection. They + * do not get manipulated on different thread contexts. + */ +- if (atomic_read(refcnt) == 0) { ++ if (nq->is_class) { ++ if (atomic_read(refcnt) == 0) ++ is_refcnt_zero = true; ++ } ++ else { ++ if (refcount_read(refcnt_new) == 0) ++ is_refcnt_zero = true; ++ } ++ if (is_refcnt_zero) { + atomic_sub(1, &nq->pending_stat_requests); + wake_up(&nq->wait_queue); + return; + } ++ + + /* + * Requests for stats again, after 1 sec. +@@ -2555,9 +2576,9 @@ static void nss_qdisc_basic_stats_callba + * nss_qdisc_get_stats_timer_callback() + * Invoked periodically to get updated stats + */ +-static void nss_qdisc_get_stats_timer_callback(unsigned long int data) ++static void nss_qdisc_get_stats_timer_callback(struct timer_list *arg) + { +- struct nss_qdisc *nq = (struct nss_qdisc *)data; ++ struct nss_qdisc *nq = (struct nss_qdisc *)arg->cust_data; + nss_tx_status_t rc; + struct nss_if_msg nim; + int msg_type; +@@ -2604,9 +2625,8 @@ void nss_qdisc_start_basic_stats_polling + return; + } + +- init_timer(&nq->stats_get_timer); +- nq->stats_get_timer.function = nss_qdisc_get_stats_timer_callback; +- nq->stats_get_timer.data = (unsigned long)nq; ++ timer_setup(&nq->stats_get_timer, nss_qdisc_get_stats_timer_callback, 0); ++ nq->stats_get_timer.cust_data = (unsigned long)nq; + nq->stats_get_timer.expires = jiffies + HZ; + atomic_set(&nq->pending_stat_requests, 1); + add_timer(&nq->stats_get_timer); +@@ -2650,7 +2670,7 @@ int nss_qdisc_gnet_stats_copy_basic(stru + #if (LINUX_VERSION_CODE <= KERNEL_VERSION(3, 18, 0)) + return gnet_stats_copy_basic(d, b); + #else +- return gnet_stats_copy_basic(d, NULL, b); ++ return gnet_stats_copy_basic(NULL, d, NULL, b); + #endif + } + +--- a/nss_qdisc/nss_tbl.c ++++ b/nss_qdisc/nss_tbl.c +@@ -29,7 +29,7 @@ static struct nla_policy nss_tbl_policy[ + [TCA_NSSTBL_PARMS] = { .len = sizeof(struct tc_nsstbl_qopt) }, + }; + +-static int nss_tbl_enqueue(struct sk_buff *skb, struct Qdisc *sch) ++static int nss_tbl_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) + { + return nss_qdisc_enqueue(skb, sch); + } +@@ -39,11 +39,6 @@ static struct sk_buff *nss_tbl_dequeue(s + return nss_qdisc_dequeue(sch); + } + +-static unsigned int nss_tbl_drop(struct Qdisc *sch) +-{ +- return nss_qdisc_drop(sch); +-} +- + static struct sk_buff *nss_tbl_peek(struct Qdisc *sch) + { + return nss_qdisc_peek(sch); +@@ -77,7 +72,7 @@ static void nss_tbl_destroy(struct Qdisc + /* + * Now we can destroy our child qdisc + */ +- qdisc_destroy(q->qdisc); ++ qdisc_put(q->qdisc); + + /* + * Stop the polling of basic stats and destroy qdisc. +@@ -132,7 +127,7 @@ fail: + } + #endif + +-static int nss_tbl_change(struct Qdisc *sch, struct nlattr *opt) ++static int nss_tbl_change(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_tbl_sched_data *q = qdisc_priv(sch); + struct tc_nsstbl_qopt *qopt; +@@ -216,7 +211,7 @@ static int nss_tbl_change(struct Qdisc * + return 0; + } + +-static int nss_tbl_init(struct Qdisc *sch, struct nlattr *opt) ++static int nss_tbl_init(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_tbl_sched_data *q = qdisc_priv(sch); + struct tc_nsstbl_qopt *qopt; +@@ -232,10 +227,10 @@ static int nss_tbl_init(struct Qdisc *sc + return -EINVAL; + } + +- if (nss_qdisc_init(sch, &q->nq, NSS_SHAPER_NODE_TYPE_TBL, 0, qopt->accel_mode) < 0) ++ if (nss_qdisc_init(sch, extack, &q->nq, NSS_SHAPER_NODE_TYPE_TBL, 0, qopt->accel_mode) < 0) + return -EINVAL; + +- if (nss_tbl_change(sch, opt) < 0) { ++ if (nss_tbl_change(sch, opt, NULL) < 0) { + nss_qdisc_info("Failed to configure tbl\n"); + nss_qdisc_destroy(&q->nq); + return -EINVAL; +@@ -287,7 +282,7 @@ static int nss_tbl_dump_class(struct Qdi + } + + static int nss_tbl_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, +- struct Qdisc **old) ++ struct Qdisc **old, struct netlink_ext_ack *extack) + { + struct nss_tbl_sched_data *q = qdisc_priv(sch); + struct nss_qdisc *nq_new = (struct nss_qdisc *)qdisc_priv(new); +@@ -344,10 +339,6 @@ static unsigned long nss_tbl_get(struct + return 1; + } + +-static void nss_tbl_put(struct Qdisc *sch, unsigned long arg) +-{ +-} +- + static void nss_tbl_walk(struct Qdisc *sch, struct qdisc_walker *walker) + { + nss_qdisc_info("Nsstbl walk called"); +@@ -364,9 +355,8 @@ static void nss_tbl_walk(struct Qdisc *s + const struct Qdisc_class_ops nss_tbl_class_ops = { + .graft = nss_tbl_graft, + .leaf = nss_tbl_leaf, +- .get = nss_tbl_get, +- .put = nss_tbl_put, ++ .find = nss_tbl_get, + .walk = nss_tbl_walk, + .dump = nss_tbl_dump_class, + }; + +@@ -381,7 +370,6 @@ struct Qdisc_ops nss_tbl_qdisc_ops __rea + .enqueue = nss_tbl_enqueue, + .dequeue = nss_tbl_dequeue, + .peek = nss_tbl_peek, +- .drop = nss_tbl_drop, + .init = nss_tbl_init, + .reset = nss_tbl_reset, + .destroy = nss_tbl_destroy, +--- a/nss_qdisc/nss_wred.c ++++ b/nss_qdisc/nss_wred.c +@@ -55,7 +55,7 @@ static struct nla_policy nss_wred_policy + * nss_wred_enqueue() + * Enqueue API for nsswred qdisc + */ +-static int nss_wred_enqueue(struct sk_buff *skb, struct Qdisc *sch) ++static int nss_wred_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) + { + return nss_qdisc_enqueue(skb, sch); + } +@@ -70,16 +70,6 @@ static struct sk_buff *nss_wred_dequeue( + } + + /* +- * nss_wred_drop() +- * Drops a packet from HLOS queue. +- */ +-static unsigned int nss_wred_drop(struct Qdisc *sch) +-{ +- nss_qdisc_info("nsswred dropping"); +- return nss_qdisc_drop(sch); +-} +- +-/* + * nss_wred_reset() + * Reset the nsswred qdisc + */ +@@ -171,7 +161,7 @@ fail: + * nss_wred_change() + * Function call to configure the nsswred parameters + */ +-static int nss_wred_change(struct Qdisc *sch, struct nlattr *opt) ++static int nss_wred_change(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_wred_sched_data *q = qdisc_priv(sch); + struct tc_nsswred_qopt *qopt; +@@ -298,7 +288,7 @@ static int nss_wred_change(struct Qdisc + * nss_wred_init() + * Init the nsswred qdisc + */ +-static int nss_wred_init(struct Qdisc *sch, struct nlattr *opt) ++static int nss_wred_init(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_qdisc *nq = qdisc_priv(sch); + struct tc_nsswred_qopt *qopt; +@@ -315,11 +305,11 @@ static int nss_wred_init(struct Qdisc *s + nss_qdisc_info("Initializing Wred - type %d\n", NSS_SHAPER_NODE_TYPE_WRED); + nss_wred_reset(sch); + +- if (nss_qdisc_init(sch, nq, NSS_SHAPER_NODE_TYPE_WRED, 0, qopt->accel_mode) < 0) ++ if (nss_qdisc_init(sch, extack, nq, NSS_SHAPER_NODE_TYPE_WRED, 0, qopt->accel_mode) < 0) + return -EINVAL; + + nss_qdisc_info("NSS wred initialized - handle %x parent %x\n", sch->handle, sch->parent); +- if (nss_wred_change(sch, opt) < 0) { ++ if (nss_wred_change(sch, opt, NULL) < 0) { + nss_qdisc_destroy(nq); + return -EINVAL; + } +@@ -405,7 +395,6 @@ struct Qdisc_ops nss_red_qdisc_ops __rea + .enqueue = nss_wred_enqueue, + .dequeue = nss_wred_dequeue, + .peek = nss_wred_peek, +- .drop = nss_wred_drop, + .init = nss_wred_init, + .reset = nss_wred_reset, + .destroy = nss_wred_destroy, +@@ -423,7 +412,6 @@ struct Qdisc_ops nss_wred_qdisc_ops __re + .enqueue = nss_wred_enqueue, + .dequeue = nss_wred_dequeue, + .peek = nss_wred_peek, +- .drop = nss_wred_drop, + .init = nss_wred_init, + .reset = nss_wred_reset, + .destroy = nss_wred_destroy, +--- a/nss_qdisc/nss_wrr.c ++++ b/nss_qdisc/nss_wrr.c +@@ -84,7 +84,7 @@ static void nss_wrr_destroy_class(struct + /* + * And now we destroy the child. + */ +- qdisc_destroy(cl->qdisc); ++ qdisc_put(cl->qdisc); + + /* + * Stop the stats polling timer and free class +@@ -219,7 +219,7 @@ static int nss_wrr_ppe_change_class(stru + #endif + + static int nss_wrr_change_class(struct Qdisc *sch, u32 classid, u32 parentid, +- struct nlattr **tca, unsigned long *arg) ++ struct nlattr **tca, unsigned long *arg, struct netlink_ext_ack *extack) + { + struct nss_wrr_sched_data *q = qdisc_priv(sch); + struct nss_wrr_class_data *cl = (struct nss_wrr_class_data *)*arg; +@@ -286,7 +286,7 @@ static int nss_wrr_change_class(struct Q + * here. + */ + cl->nq.parent = &q->nq; +- if (nss_qdisc_init(sch, &cl->nq, NSS_SHAPER_NODE_TYPE_WRR_GROUP, classid, accel_mode) < 0) { ++ if (nss_qdisc_init(sch, extack, &cl->nq, NSS_SHAPER_NODE_TYPE_WRR_GROUP, classid, accel_mode) < 0) { + nss_qdisc_error("Nss init for class %u failed\n", classid); + return -EINVAL; + } +@@ -422,7 +422,7 @@ static int nss_wrr_delete_class(struct Q + } + + static int nss_wrr_graft_class(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, +- struct Qdisc **old) ++ struct Qdisc **old, struct netlink_ext_ack *extack) + { + struct nss_wrr_sched_data *q = qdisc_priv(sch); + struct nss_wrr_class_data *cl = (struct nss_wrr_class_data *)arg; +@@ -517,20 +517,6 @@ static unsigned long nss_wrr_get_class(s + return (unsigned long)cl; + } + +-static void nss_wrr_put_class(struct Qdisc *sch, unsigned long arg) +-{ +- struct nss_wrr_class_data *cl = (struct nss_wrr_class_data *)arg; +- nss_qdisc_info("nss_wrr put class for %p\n", cl); +- +- /* +- * We are safe to destroy the qdisc if the reference count +- * goes down to 0. +- */ +- if (atomic_sub_return(1, &cl->nq.refcnt) == 0) { +- nss_wrr_destroy_class(sch, cl); +- } +-} +- + static int nss_wrr_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb, + struct tcmsg *tcm) + { +@@ -600,7 +586,7 @@ static void nss_wrr_walk(struct Qdisc *s + } + } + +-static int nss_wrr_init_qdisc(struct Qdisc *sch, struct nlattr *opt) ++static int nss_wrr_init_qdisc(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_wrr_sched_data *q = qdisc_priv(sch); + int err; +@@ -629,7 +615,7 @@ static int nss_wrr_init_qdisc(struct Qdi + /* + * Initialize the NSSWRR shaper in NSS + */ +- if (nss_qdisc_init(sch, &q->nq, NSS_SHAPER_NODE_TYPE_WRR, 0, qopt->accel_mode) < 0) { ++ if (nss_qdisc_init(sch, extack, &q->nq, NSS_SHAPER_NODE_TYPE_WRR, 0, qopt->accel_mode) < 0) { + nss_qdisc_warning("Failed init nss_wrr qdisc"); + return -EINVAL; + } +@@ -669,7 +655,7 @@ static int nss_wrr_init_qdisc(struct Qdi + return 0; + } + +-static int nss_wrr_change_qdisc(struct Qdisc *sch, struct nlattr *opt) ++static int nss_wrr_change_qdisc(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_wrr_sched_data *q; + struct tc_nsswrr_qopt *qopt; +@@ -809,7 +795,7 @@ nla_put_failure: + return -EMSGSIZE; + } + +-static int nss_wrr_enqueue(struct sk_buff *skb, struct Qdisc *sch) ++static int nss_wrr_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) + { + return nss_qdisc_enqueue(skb, sch); + } +@@ -819,21 +805,14 @@ static struct sk_buff *nss_wrr_dequeue(s + return nss_qdisc_dequeue(sch); + } + +-static unsigned int nss_wrr_drop(struct Qdisc *sch) +-{ +- nss_qdisc_info("Nsswrr drop\n"); +- return nss_qdisc_drop(sch); +-} +- + const struct Qdisc_class_ops nss_wrr_class_ops = { + .change = nss_wrr_change_class, + .delete = nss_wrr_delete_class, + .graft = nss_wrr_graft_class, + .leaf = nss_wrr_leaf_class, + .qlen_notify = nss_wrr_qlen_notify, +- .get = nss_wrr_get_class, +- .put = nss_wrr_put_class, ++ .find = nss_wrr_get_class, + .dump = nss_wrr_dump_class, + .dump_stats = nss_wrr_dump_class_stats, + .walk = nss_bf_walk + }; +@@ -851,7 +829,6 @@ struct Qdisc_ops nss_wrr_qdisc_ops __rea + .enqueue = nss_wrr_enqueue, + .dequeue = nss_wrr_dequeue, + .peek = qdisc_peek_dequeued, +- .drop = nss_wrr_drop, + .cl_ops = &nss_wrr_class_ops, + .priv_size = sizeof(struct nss_wrr_sched_data), + .owner = THIS_MODULE +@@ -863,9 +840,8 @@ const struct Qdisc_class_ops nss_wfq_cla + .graft = nss_wrr_graft_class, + .leaf = nss_wrr_leaf_class, + .qlen_notify = nss_wrr_qlen_notify, +- .get = nss_wrr_get_class, +- .put = nss_wrr_put_class, ++ .find = nss_wrr_get_class, + .dump = nss_wrr_dump_class, + .dump_stats = nss_wrr_dump_class_stats, + .walk = nss_wrr_walk + }; +@@ -883,7 +858,6 @@ struct Qdisc_ops nss_wfq_qdisc_ops __rea + .enqueue = nss_wrr_enqueue, + .dequeue = nss_wrr_dequeue, + .peek = qdisc_peek_dequeued, +- .drop = nss_wrr_drop, + .cl_ops = &nss_wrr_class_ops, + .priv_size = sizeof(struct nss_wrr_sched_data), + .owner = THIS_MODULE diff --git a/package/nss/qca/qca-nss-clients/patches/101-kernel-5.4-support-gre.patch b/package/nss/qca/qca-nss-clients/patches/101-kernel-5.4-support-gre.patch new file mode 100644 index 000000000..705ceabe6 --- /dev/null +++ b/package/nss/qca/qca-nss-clients/patches/101-kernel-5.4-support-gre.patch @@ -0,0 +1,106 @@ +From 7c89187ab2d165ccffed627742e7cb72cce375ef Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Sun, 12 Jul 2020 22:49:30 +0200 +Subject: [PATCH] kernel-5.4-support-gre + +--- + gre/nss_connmgr_gre.c | 16 +++++++--------- + gre/nss_connmgr_gre_v6.c | 4 ++-- + 2 files changed, 9 insertions(+), 11 deletions(-) + +diff --git a/gre/nss_connmgr_gre.c b/gre/nss_connmgr_gre.c +index 52203b1..6de8f6e 100644 +--- a/gre/nss_connmgr_gre.c ++++ b/gre/nss_connmgr_gre.c +@@ -88,7 +88,7 @@ static int nss_connmgr_gre_dev_init(struct net_device *dev) + u64_stats_init(&stats->syncp); + } + +- if ((dev->priv_flags & IFF_GRE_V4_TAP) || (dev->type == ARPHRD_IPGRE)) { ++ if ((dev->priv_flags_qca_ecm & IFF_QCA_ECM_GRE_V4_TAP) || (dev->type == ARPHRD_IPGRE)) { + dev->needed_headroom = sizeof(struct iphdr) + sizeof(struct ethhdr) + MAX_WIFI_HEADROOM + append; + dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr) - append; + dev->features |= NETIF_F_NETNS_LOCAL | NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA; +@@ -169,7 +169,7 @@ fail: + * nss_connmgr_gre_dev_stats64() + * Netdev ops function to retrieve stats. + */ +-struct rtnl_link_stats64 *nss_connmgr_gre_dev_stats64(struct net_device *dev, ++void nss_connmgr_gre_dev_stats64(struct net_device *dev, + struct rtnl_link_stats64 *tot) + { + uint64_t rx_packets, rx_bytes, tx_packets, tx_bytes; +@@ -202,8 +202,6 @@ struct rtnl_link_stats64 *nss_connmgr_gre_dev_stats64(struct net_device *dev, + tot->rx_dropped = dev->stats.rx_dropped; + tot->tx_dropped = dev->stats.tx_dropped; + } +- +- return tot; + } + + /* +@@ -390,7 +388,7 @@ static int32_t nss_connmgr_gre_prepare_config_cmd(struct net_device *dev, + { + struct nss_gre_config_msg *cmsg = &req->msg.cmsg; + +- if ((dev->type == ARPHRD_ETHER) && (dev->priv_flags & IFF_GRE_V4_TAP)) { ++ if ((dev->type == ARPHRD_ETHER) && (dev->priv_flags_qca_ecm & IFF_QCA_ECM_GRE_V4_TAP)) { + cmsg->mode = NSS_GRE_MODE_TAP; + cmsg->ip_type = NSS_GRE_IP_IPV4; + if (enable_unalign) { +@@ -399,7 +397,7 @@ static int32_t nss_connmgr_gre_prepare_config_cmd(struct net_device *dev, + return nss_connmgr_gre_v4_get_config(dev, req, next_dev, hold); + } + +- if ((dev->type == ARPHRD_ETHER) && (dev->priv_flags & IFF_GRE_V6_TAP)) { ++ if ((dev->type == ARPHRD_ETHER) && (dev->priv_flags_qca_ecm & IFF_QCA_ECM_GRE_V6_TAP)) { + cmsg->mode = NSS_GRE_MODE_TAP; + cmsg->ip_type = NSS_GRE_IP_IPV6; + if (enable_unalign) { +@@ -605,7 +603,7 @@ static bool nss_connmgr_gre_is_gre(struct net_device *dev) + { + if ((dev->type == ARPHRD_IPGRE) || + (dev->type == ARPHRD_IP6GRE) || ((dev->type == ARPHRD_ETHER) && +- (dev->priv_flags & (IFF_GRE_V4_TAP | IFF_GRE_V6_TAP)))) { ++ (dev->priv_flags_qca_ecm & (IFF_QCA_ECM_GRE_V4_TAP | IFF_QCA_ECM_GRE_V6_TAP)))) { + return true; + } + +@@ -692,10 +690,10 @@ static struct net_device *__nss_connmgr_gre_create_interface(struct nss_connmgr_ + nss_connmgr_gre_tap_setup(dev); + + if (cfg->is_ipv6) { +- dev->priv_flags |= IFF_GRE_V6_TAP; ++ dev->priv_flags_qca_ecm |= IFF_QCA_ECM_GRE_V6_TAP; + ret = nss_connmgr_gre_v6_set_config(dev, cfg); + } else { +- dev->priv_flags |= IFF_GRE_V4_TAP; ++ dev->priv_flags_qca_ecm |= IFF_QCA_ECM_GRE_V4_TAP; + ret = nss_connmgr_gre_v4_set_config(dev, cfg); + } + break; +diff --git a/gre/nss_connmgr_gre_v6.c b/gre/nss_connmgr_gre_v6.c +index f9a8e58..e93c7e4 100644 +--- a/gre/nss_connmgr_gre_v6.c ++++ b/gre/nss_connmgr_gre_v6.c +@@ -46,7 +46,7 @@ static struct net_device *nss_connmgr_gre_v6_get_tx_dev(uint8_t *dest_ip) + struct net_device *dev; + + memcpy(ipv6_addr.s6_addr, dest_ip, 16); +- rt = rt6_lookup(&init_net, &ipv6_addr, NULL, 0, 0); ++ rt = rt6_lookup(&init_net, &ipv6_addr, NULL, 0, NULL, 0); + if (!rt) { + return NULL; + } +@@ -92,7 +92,7 @@ static int nss_connmgr_gre_v6_get_mac_address(uint8_t *src_ip, uint8_t *dest_ip, + * Find dest MAC address + */ + memcpy(ipv6_addr.s6_addr, dest_ip, 16); +- rt = rt6_lookup(&init_net, &ipv6_addr, NULL, 0, 0); ++ rt = rt6_lookup(&init_net, &ipv6_addr, NULL, 0, NULL, 0); + if (!rt) { + return GRE_ERR_NEIGH_LOOKUP; + } +-- +2.27.0 + diff --git a/package/nss/qca/qca-nss-clients/patches/102-kernel-5.4-support-ipsec.patch b/package/nss/qca/qca-nss-clients/patches/102-kernel-5.4-support-ipsec.patch new file mode 100644 index 000000000..de43b4d01 --- /dev/null +++ b/package/nss/qca/qca-nss-clients/patches/102-kernel-5.4-support-ipsec.patch @@ -0,0 +1,29 @@ +--- a/ipsecmgr/v1.0/nss_ipsecmgr.c ++++ b/ipsecmgr/v1.0/nss_ipsecmgr.c +@@ -377,7 +377,7 @@ free: + * nss_ipsecmgr_tunnel_stats() + * get tunnel statistics + */ +-static struct rtnl_link_stats64 *nss_ipsecmgr_tunnel_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) ++void nss_ipsecmgr_tunnel_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) + { + struct nss_ipsecmgr_priv *priv = netdev_priv(dev); + +@@ -389,8 +389,6 @@ static struct rtnl_link_stats64 *nss_ips + read_lock_bh(&ipsecmgr_ctx->lock); + memcpy(stats, &priv->stats, sizeof(struct rtnl_link_stats64)); + read_unlock_bh(&ipsecmgr_ctx->lock); +- +- return stats; + } + + /* +@@ -442,7 +440,7 @@ static void nss_ipsecmgr_tunnel_setup(st + dev->header_ops = NULL; + dev->netdev_ops = &nss_ipsecmgr_tunnel_ops; + +- dev->destructor = nss_ipsecmgr_tunnel_free; ++ dev->priv_destructor = nss_ipsecmgr_tunnel_free; + + /* + * get the MAC address from the ethernet device diff --git a/package/nss/qca/qca-nss-clients/patches/103-kernel-5.4-support-dtls.patch b/package/nss/qca/qca-nss-clients/patches/103-kernel-5.4-support-dtls.patch new file mode 100644 index 000000000..ae9c91470 --- /dev/null +++ b/package/nss/qca/qca-nss-clients/patches/103-kernel-5.4-support-dtls.patch @@ -0,0 +1,11 @@ +--- a/dtls/v1.0/nss_connmgr_dtls_netdev.c ++++ b/dtls/v1.0/nss_connmgr_dtls_netdev.c +@@ -160,7 +160,7 @@ static void nss_dtlsmgr_dev_setup(struct + dev->ethtool_ops = NULL; + dev->header_ops = NULL; + dev->netdev_ops = &nss_dtlsmgr_session_ops; +- dev->destructor = NULL; ++ dev->priv_destructor = NULL; + + memcpy(dev->dev_addr, "\xaa\xbb\xcc\xdd\xee\xff", dev->addr_len); + memset(dev->broadcast, 0xff, dev->addr_len); diff --git a/package/nss/qca/qca-nss-clients/patches/104-kernel-5.4-support-l2tp.patch b/package/nss/qca/qca-nss-clients/patches/104-kernel-5.4-support-l2tp.patch new file mode 100644 index 000000000..c637235cc --- /dev/null +++ b/package/nss/qca/qca-nss-clients/patches/104-kernel-5.4-support-l2tp.patch @@ -0,0 +1,64 @@ +--- a/l2tp/l2tpv2/nss_connmgr_l2tpv2.h ++++ b/l2tp/l2tpv2/nss_connmgr_l2tpv2.h +@@ -30,10 +30,10 @@ + + #define L2TP_V_2 2 + +-#define tunnel_hold(tunnel) atomic_inc(&tunnel->ref_count) +-#define tunnel_put(tunnel) atomic_dec(&tunnel->ref_count) +-#define session_hold(session) atomic_inc(&session->ref_count) +-#define session_put(session) atomic_dec(&session->ref_count) ++#define tunnel_hold(tunnel) refcount_inc(&tunnel->ref_count) ++#define tunnel_put(tunnel) refcount_dec(&tunnel->ref_count) ++#define session_hold(session) refcount_inc(&session->ref_count) ++#define session_put(session) refcount_dec(&session->ref_count) + + /* + * ---------------------------------------------------------------------------------- +--- a/l2tp/l2tpv2/nss_connmgr_l2tpv2.c ++++ b/l2tp/l2tpv2/nss_connmgr_l2tpv2.c +@@ -244,7 +244,7 @@ static struct nss_connmgr_l2tpv2_session + */ + data->l2tpv2.session.session_id = session->session_id; + data->l2tpv2.session.peer_session_id = session->peer_session_id; +- data->l2tpv2.session.offset = session->offset; ++ data->l2tpv2.session.offset = 0; + data->l2tpv2.session.hdr_len = session->hdr_len; + data->l2tpv2.session.reorder_timeout = session->reorder_timeout; + data->l2tpv2.session.recv_seq = session->recv_seq; +@@ -253,7 +253,7 @@ static struct nss_connmgr_l2tpv2_session + nss_connmgr_l2tpv2_info("sess %u, peer=%u nr=%u ns=%u off=%u hdr_len=%u timeout=%x" + " recv_seq=%x send_seq=%x\n", + session->session_id, session->peer_session_id, session->nr, +- session->ns, session->offset, session->hdr_len, ++ session->ns, 0, session->hdr_len, + session->reorder_timeout, session->recv_seq, + session->send_seq); + +--- a/l2tp/l2tpv2/nss_l2tpv2_stats.c ++++ b/l2tp/l2tpv2/nss_l2tpv2_stats.c +@@ -21,6 +21,7 @@ + */ + + #include ++#include + #include + #include + #include +@@ -103,14 +104,14 @@ void nss_l2tpv2_update_dev_stats(struct + /* + * Update tunnel & session stats + */ +- tunnel = l2tp_tunnel_find(dev_net(dev), data.l2tpv2.tunnel.tunnel_id); ++ tunnel = l2tp_tunnel_get(dev_net(dev), data.l2tpv2.tunnel.tunnel_id); + if (!tunnel) { + dev_put(dev); + return; + } + tunnel_hold(tunnel); + +- session = l2tp_session_find(dev_net(dev), tunnel, data.l2tpv2.session.session_id); ++ session = l2tp_session_get(dev_net(dev), data.l2tpv2.session.session_id); + if (!session) { + tunnel_put(tunnel); + dev_put(dev); diff --git a/package/nss/qca/qca-nss-clients/patches/200-qdisc-fix-compile-error.patch b/package/nss/qca/qca-nss-clients/patches/200-qdisc-fix-compile-error.patch new file mode 100644 index 000000000..4e147489b --- /dev/null +++ b/package/nss/qca/qca-nss-clients/patches/200-qdisc-fix-compile-error.patch @@ -0,0 +1,14 @@ +--- a/nss_qdisc/nss_qdisc.c ++++ b/nss_qdisc/nss_qdisc.c +@@ -2708,9 +2708,11 @@ static int nss_qdisc_if_event_cb(struct + case NETDEV_BR_JOIN: + nss_qdisc_info("Reveived NETDEV_BR_JOIN on interface %s\n", + dev->name); ++ goto fall_through; + case NETDEV_BR_LEAVE: + nss_qdisc_info("Reveived NETDEV_BR_LEAVE on interface %s\n", + dev->name); ++fall_through: + br = nss_qdisc_get_dev_master(dev); + if_num = nss_cmn_get_interface_number(nss_qdisc_ctx, dev); + diff --git a/package/nss/qca/qca-nss-clients/patches/202-vlanmgr-fix-compile-error.patch b/package/nss/qca/qca-nss-clients/patches/202-vlanmgr-fix-compile-error.patch new file mode 100644 index 000000000..53af31924 --- /dev/null +++ b/package/nss/qca/qca-nss-clients/patches/202-vlanmgr-fix-compile-error.patch @@ -0,0 +1,48 @@ +--- a/vlan/nss_vlan_mgr.c ++++ b/vlan/nss_vlan_mgr.c +@@ -820,8 +820,10 @@ static struct nss_vlan_pvt *nss_vlan_mgr + */ + static void nss_vlan_mgr_instance_free(struct nss_vlan_pvt *v) + { ++#ifdef NSS_VLAN_MGR_PPE_SUPPORT + int32_t i; + int ret = 0; ++#endif + + spin_lock(&vlan_mgr_ctx.lock); + BUG_ON(--v->refs); +@@ -979,8 +981,11 @@ static int nss_vlan_mgr_register_event(s + int ret; + #endif + uint32_t vlan_tag; ++#ifdef NSS_VLAN_MGR_PPE_SUPPORT + struct net_device *slave; +- int32_t port, port_if; ++ int32_t port; ++#endif ++ int32_t port_if; + struct vlan_dev_priv *vlan; + struct net_device *real_dev; + bool is_bond_master = false; +@@ -1354,8 +1359,10 @@ return_with_error: + int nss_vlan_mgr_join_bridge(struct net_device *dev, uint32_t bridge_vsi) + { + struct nss_vlan_pvt *v = nss_vlan_mgr_instance_find_and_ref(dev); ++#ifdef NSS_VLAN_MGR_PPE_SUPPORT + struct net_device *real_dev; + int ret; ++#endif + + if (!v) + return 0; +@@ -1415,8 +1422,10 @@ EXPORT_SYMBOL(nss_vlan_mgr_join_bridge); + int nss_vlan_mgr_leave_bridge(struct net_device *dev, uint32_t bridge_vsi) + { + struct nss_vlan_pvt *v = nss_vlan_mgr_instance_find_and_ref(dev); ++#ifdef NSS_VLAN_MGR_PPE_SUPPORT + struct net_device *real_dev; + int ret; ++#endif + + if (!v) + return 0; diff --git a/package/nss/qca/qca-nss-crypto/Makefile b/package/nss/qca/qca-nss-crypto/Makefile new file mode 100644 index 000000000..09a16232b --- /dev/null +++ b/package/nss/qca/qca-nss-crypto/Makefile @@ -0,0 +1,74 @@ +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=qca-nss-crypto +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-crypto +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=e7651c2986d30b5e8ca5ad6b9a72c47febdf3cca + +include $(INCLUDE_DIR)/package.mk + +ifeq ($(CONFIG_TARGET_ipq),y) +subtarget:=$(SUBTARGET) +else +subtarget:=$(CONFIG_TARGET_BOARD) +endif + +# v1.0 is for Akronite +# v2.0 is for Hawkeye/Cypress/Maple +ifneq (, $(findstring $(subtarget), "ipq807x" "ipq807x_64" "ipq60xx" "ipq60xx_64" "ipq50xx" "ipq50xx_64")) +NSS_CRYPTO_DIR:=v2.0 +else +NSS_CRYPTO_DIR:=v1.0 +endif + +define KernelPackage/qca-nss-crypto/Default + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + DEPENDS:=@TARGET_ipq806x||TARGET_ipq_ipq806x||TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq807x||TARGET_ipq807x_64||TARGET_ipq_ipq50xx||TARGET_ipq_ipq50xx_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64 \ + +kmod-qca-nss-drv @!LINUX_3_18 +endef + +define KernelPackage/qca-nss-crypto + $(call KernelPackage/qca-nss-crypto/Default) + 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 + AUTOLOAD:=$(call AutoLoad,52,qca-nss-crypto) +endef + +define KernelPackage/qca-nss-crypto/Description +This package contains a NSS crypto driver for QCA chipset +endef + +define Build/InstallDev/qca-nss-crypto + $(INSTALL_DIR) $(1)/usr/include/qca-nss-crypto + $(CP) $(PKG_BUILD_DIR)/$(NSS_CRYPTO_DIR)/include/* $(1)/usr/include/qca-nss-crypto +endef + +define Build/InstallDev + $(call Build/InstallDev/qca-nss-crypto,$(1)) +endef + +EXTRA_CFLAGS+= \ + -DCONFIG_NSS_DEBUG_LEVEL=4 \ + -I$(STAGING_DIR)/usr/include/qca-nss-crypto \ + -I$(STAGING_DIR)/usr/include/qca-nss-drv \ + -I$(PKG_BUILD_DIR)/$(NSS_CRYPTO_DIR)/include \ + -I$(PKG_BUILD_DIR)/$(NSS_CRYPTO_DIR)/src + +define Build/Compile + $(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \ + $(KERNEL_MAKE_FLAGS) \ + $(PKG_MAKE_FLAGS) \ + M="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ + NSS_CRYPTO_DIR=$(NSS_CRYPTO_DIR) \ + SoC="$(subtarget)" \ + modules +endef + +$(eval $(call KernelPackage,qca-nss-crypto)) diff --git a/package/nss/qca/qca-nss-crypto/patches/100-kernel-5.4-support.patch b/package/nss/qca/qca-nss-crypto/patches/100-kernel-5.4-support.patch new file mode 100644 index 000000000..b9ef6191e --- /dev/null +++ b/package/nss/qca/qca-nss-crypto/patches/100-kernel-5.4-support.patch @@ -0,0 +1,42 @@ +--- a/v1.0/tool/nss_crypto_bench.c ++++ b/v1.0/tool/nss_crypto_bench.c +@@ -75,8 +75,8 @@ static DECLARE_WAIT_QUEUE_HEAD(tx_comp); + static DECLARE_WAIT_QUEUE_HEAD(tx_start); + static struct task_struct *tx_thread = NULL; + +-static struct timeval init_time; +-static struct timeval comp_time; ++static struct timespec64 init_time; ++static struct timespec64 comp_time; + static spinlock_t op_lock; + static nss_crypto_handle_t crypto_hdl; + +@@ -782,7 +782,7 @@ static int crypto_bench_tx(void *arg) + crypto_bench_debug("#"); + + /* get start time */ +- do_gettimeofday(&init_time); ++ ktime_get_real_ts64(&init_time); + + /** + * Request submission +@@ -812,8 +812,8 @@ static int crypto_bench_tx(void *arg) + * Calculate time and output the Mbps + */ + +- init_usecs = (init_time.tv_sec * 1000 * 1000) + init_time.tv_usec; +- comp_usecs = (comp_time.tv_sec * 1000 * 1000) + comp_time.tv_usec; ++ init_usecs = (init_time.tv_sec * 1000 * 1000) + (init_time.tv_nsec / NSEC_PER_USEC); ++ comp_usecs = (comp_time.tv_sec * 1000 * 1000) + (comp_time.tv_nsec / NSEC_PER_USEC); + delta_usecs = comp_usecs - init_usecs; + + reqs_completed = param.num_reqs - atomic_read(&tx_reqs); +@@ -870,7 +870,7 @@ static void crypto_bench_done(struct nss + nss_crypto_buf_free(crypto_hdl, buf); + + if (atomic_dec_and_test(&tx_reqs)) { +- do_gettimeofday(&comp_time); ++ ktime_get_real_ts64(&comp_time); + + wake_up_interruptible(&tx_comp); + param.num_loops--; diff --git a/package/nss/qca/qca-nss-crypto/patches/200-fix-NULL-pointer-exception.patch b/package/nss/qca/qca-nss-crypto/patches/200-fix-NULL-pointer-exception.patch new file mode 100644 index 000000000..6bd95109a --- /dev/null +++ b/package/nss/qca/qca-nss-crypto/patches/200-fix-NULL-pointer-exception.patch @@ -0,0 +1,57 @@ +--- a/v1.0/src/nss_crypto_if.c ++++ b/v1.0/src/nss_crypto_if.c +@@ -370,15 +370,16 @@ void nss_crypto_transform_done(struct ne + struct nss_crypto_buf *buf = (struct nss_crypto_buf *)skb->data; + struct nss_crypto_buf_node *entry; + void *addr; ++ struct device *cdev = gbl_crypto_ctrl.eng[0].dev; + + if (likely(buf->data_in == buf->data_out)) { +- dma_unmap_single(NULL, buf->data_in, buf->data_len, DMA_BIDIRECTIONAL); ++ dma_unmap_single(cdev, buf->data_in, buf->data_len, DMA_BIDIRECTIONAL); + } else { +- dma_unmap_single(NULL, buf->data_in, buf->data_len, DMA_TO_DEVICE); +- dma_unmap_single(NULL, buf->data_out, buf->data_len, DMA_FROM_DEVICE); ++ dma_unmap_single(cdev, buf->data_in, buf->data_len, DMA_TO_DEVICE); ++ dma_unmap_single(cdev, buf->data_out, buf->data_len, DMA_FROM_DEVICE); + } + +- dma_unmap_single(NULL, buf->iv_addr, L1_CACHE_BYTES, DMA_BIDIRECTIONAL); ++ dma_unmap_single(cdev, buf->iv_addr, L1_CACHE_BYTES, DMA_BIDIRECTIONAL); + + addr = phys_to_virt(buf->iv_addr); + entry = container_of(addr, struct nss_crypto_buf_node, results); +@@ -531,6 +532,7 @@ nss_crypto_status_t nss_crypto_transform + uint32_t paddr; + void *vaddr; + size_t len; ++ struct device *cdev = gbl_crypto_ctrl.eng[0].dev; + + if (!buf->cb_fn) { + nss_crypto_warn("%p:no buffer(%p) callback present\n", crypto, buf); +@@ -544,7 +546,7 @@ nss_crypto_status_t nss_crypto_transform + */ + vaddr = (void *)buf->data_in; + len = buf->data_len; +- paddr = dma_map_single(NULL, vaddr, len, DMA_TO_DEVICE); ++ paddr = dma_map_single(cdev, vaddr, len, DMA_TO_DEVICE); + buf->data_in = paddr; + + if (vaddr == (void *)buf->data_out) { +@@ -555,14 +557,14 @@ nss_crypto_status_t nss_crypto_transform + */ + vaddr = (void *)buf->data_out; + len = buf->data_len; +- paddr = dma_map_single(NULL, vaddr, len, DMA_FROM_DEVICE); ++ paddr = dma_map_single(cdev, vaddr, len, DMA_FROM_DEVICE); + buf->data_out = paddr; + } + + /* + * We need to map the results into IV + */ +- paddr = dma_map_single(NULL, entry->results, L1_CACHE_BYTES, DMA_BIDIRECTIONAL); ++ paddr = dma_map_single(cdev, entry->results, L1_CACHE_BYTES, DMA_BIDIRECTIONAL); + buf->hash_addr = paddr; + buf->iv_addr = paddr; + diff --git a/package/nss/qca/qca-nss-drv/Makefile b/package/nss/qca/qca-nss-drv/Makefile index 458f8d07a..aeb037e83 100644 --- a/package/nss/qca/qca-nss-drv/Makefile +++ b/package/nss/qca/qca-nss-drv/Makefile @@ -1,26 +1,24 @@ include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=qca-nss-drv -PKG_RELEASE:=$(AUTORELEASE) +PKG_RELEASE:=2 PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-drv PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2021-04-26 -PKG_SOURCE_VERSION:=1cf4bf81fd395f61648efeae78cdf1df60e954ff -PKG_MIRROR_HASH:=86b7455565d28a72da981099c67a89ea9e0ae3874a34be30959dcf48f5e2196c - -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/kernel.mk -include $(INCLUDE_DIR)/package.mk +PKG_SOURCE_VERSION:=809a00deffe9f3d4ecd15965790a152757073437 +PKG_MIRROR_HASH:=9c4340561fe9d6ccaa094bbfc5c7f98c27867d2d9a3f1a3f9a7483bca9bbedf8 NSS_CLIENTS_DIR:=$(TOPDIR)/qca/src/qca-nss-clients +include $(INCLUDE_DIR)/package.mk + define KernelPackage/qca-nss-drv SECTION:=kernel CATEGORY:=Kernel modules SUBMENU:=Network Devices - DEPENDS:=@(TARGET_ipq807x||TARGET_ipq60xx) +kmod-qca-nss-dp + 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||TARGET_ipq_ipq50xx||TARGET_ipq_ipq50xx_64 \ + +PACKAGE_kmod-qca-nss-gmac:kmod-qca-nss-gmac @!LINUX_3_18 TITLE:=Kernel driver for NSS (core driver) FILES:=$(PKG_BUILD_DIR)/qca-nss-drv.ko AUTOLOAD:=$(call AutoLoad,32,qca-nss-drv) @@ -32,12 +30,15 @@ define KernelPackage/qca-nss-drv/install $(INSTALL_DIR) $(1)/etc/sysctl.d $(INSTALL_DIR) $(1)/etc/hotplug.d/firmware $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DIR) $(1)/lib/firmware $(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/nss-firmware/qca-nss0-retail.bin $(1)/lib/firmware/qca-nss0.bin + $(INSTALL_BIN) ./files/nss-firmware/qca-nss1-retail.bin $(1)/lib/firmware/qca-nss1.bin endef @@ -48,13 +49,28 @@ endef 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 -I$(STAGING_DIR)/usr/include/qca-nss-dp -I$(STAGING_DIR)/usr/include/qca-ssdk +EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/qca-nss-gmac -ifneq (, $(findstring $(CONFIG_TARGET_BOARD), "ipq807x" "ipq60xx")) +# Keeping default as ipq806x for branches that does not have subtarget framework +ifeq ($(CONFIG_TARGET_ipq),y) +subtarget:=$(SUBTARGET) +else +subtarget:=$(CONFIG_TARGET_BOARD) +endif + +ifeq ($(CONFIG_KERNEL_IPQ_MEM_PROFILE),256) +EXTRA_CFLAGS+= -DNSS_MEM_PROFILE_LOW +endif + +ifeq ($(CONFIG_KERNEL_IPQ_MEM_PROFILE),512) EXTRA_CFLAGS+= -DNSS_MEM_PROFILE_MEDIUM -LOW_MEM_PROFILE_MAKE_OPTS=y endif ifeq ($(CONFIG_KERNEL_SKB_FIXED_SIZE_2K),y) @@ -62,59 +78,47 @@ EXTRA_CFLAGS+= -DNSS_SKB_FIXED_SIZE_2K endif DRV_MAKE_OPTS:= -ifeq ($(LOW_MEM_PROFILE_MAKE_OPTS),y) +ifeq ($(CONFIG_KERNEL_IPQ_MEM_PROFILE),256) DRV_MAKE_OPTS+=NSS_DRV_C2C_ENABLE=n \ - NSS_DRV_CAPWAP_ENABLE=n \ - NSS_DRV_CLMAP_ENABLE=n \ - NSS_DRV_CRYPTO_ENABLE=n \ - 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 -endif - -ifeq ($(CONFIG_TARGET_BOARD), "ipq807x") - SOC="ipq807x_64" -else ifeq ($(CONFIG_TARGET_BOARD), "ipq60xx") - SOC="ipq60xx_64" + NSS_DRV_CAPWAP_ENABLE=n \ + NSS_DRV_CLMAP_ENABLE=n \ + NSS_DRV_CRYPTO_ENABLE=n \ + 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 endif define Build/Configure - $(LN) arch/nss_$(SOC).h $(PKG_BUILD_DIR)/exports/nss_arch.h - sed -i "s/define NSS_FW_VERSION_MAJOR.*/define NSS_FW_VERSION_MAJOR 11/" $(PKG_BUILD_DIR)/exports/nss_fw_version.h - sed -i "s/define NSS_FW_VERSION_MINOR.*/define NSS_FW_VERSION_MINOR 3/" $(PKG_BUILD_DIR)/exports/nss_fw_version.h + $(LN) arch/nss_$(subtarget).h $(PKG_BUILD_DIR)/exports/nss_arch.h endef define Build/Compile - +$(MAKE) -C "$(LINUX_DIR)" $(strip $(DRV_MAKE_OPTS)) \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - ARCH="$(LINUX_KARCH)" \ - M="$(PKG_BUILD_DIR)" \ - EXTRA_CFLAGS="$(EXTRA_CFLAGS)" SoC=$(SOC) \ + $(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" $(strip $(DRV_MAKE_OPTS)) \ $(KERNEL_MAKE_FLAGS) \ - $(PKG_JOBS) \ + $(PKG_MAKE_FLAGS) \ + M="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS)" SoC="$(subtarget)" \ modules endef diff --git a/package/nss/qca/qca-nss-drv/files/nss-firmware/LICENSE.TXT b/package/nss/qca/qca-nss-drv/files/nss-firmware/LICENSE.TXT new file mode 100644 index 000000000..41631989a --- /dev/null +++ b/package/nss/qca/qca-nss-drv/files/nss-firmware/LICENSE.TXT @@ -0,0 +1,45 @@ +Copyright (c) 2014 Qualcomm Atheros, Inc. + +All rights reserved. + +Redistribution and use in binary forms, without +modification, are permitted (subject to the limitations in the +disclaimer below) provided that the following conditions are met: + +*Redistributions must reproduce the above copyright + notice, this list of conditions, and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +*Neither the name of Qualcomm Atheros, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +*No Reverse engineering, decompiling, decrypting, or disassembling of this + software is permitted. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. NO LICENSES OR OTHER RIGHTS, +WHETHER EXPRESS, IMPLIED, BASED ON ESTOPPEL OR OTHERWISE, ARE GRANTED +TO ANY PARTY'S PATENTS, PATENT APPLICATIONS, OR PATENTABLE INVENTIONS +BY VIRTUE OF THIS LICENSE OR THE DELIVERY OR PROVISION BY QUALCOMM +ATHEROS, INC. OF THE SOFTWARE. + +IN NO EVENT SHALL THE COPYRIGHT OWNER OR ANY CONTRIBUTOR BE LIABLE FOR +ANY INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND REGARDLESS OF ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF OR RESULTING FROM THE USE OF THE +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN ANY +EVENT, THE TOTAL AGGREGATE LIABILITY THAT MAY BE IMPOSED ON QUALCOMM +ATHEROS, INC. FOR ANY DIRECT DAMAGES ARISING UNDER OR RESULTING FROM +THIS AGREEMENT OR IN CONNECTION WITH ANY USE OF THE SOFTWARE SHALL NOT +EXCEED A TOTAL AMOUNT OF US$5.00. + +IF ANY OF THE ABOVE PROVISIONS ARE HELD TO BE VOID, INVALID, +UNENFORCEABLE, OR ILLEGAL, THE OTHER PROVISIONS SHALL CONTINUE IN FULL +FORCE AND EFFECT. + diff --git a/package/nss/qca/qca-nss-drv/files/nss-firmware/NOTICE.TXT b/package/nss/qca/qca-nss-drv/files/nss-firmware/NOTICE.TXT new file mode 100644 index 000000000..ab54aa019 --- /dev/null +++ b/package/nss/qca/qca-nss-drv/files/nss-firmware/NOTICE.TXT @@ -0,0 +1,217 @@ +============================================================================= + +This Notice.txt file contains certain notices of software components included +with the software that Qualcomm Atheros, Inc. ("Qualcomm Atheros") is required +to provide you. Except where prohibited by the open source license, the content +of this notices file is only provided to satisfy Qualcomm Atheros's attribution +and notice requirement; your use of these software components together with the +Qualcomm Atheros software (Qualcomm Atheros software hereinafter referred to as +"Software") is subject to the terms of your license from Qualcomm Atheros. +Compliance with all copyright laws and software license agreements included in +the notice section of this file are the responsibility of the user. Except as +may be granted by separate express written agreement, this file provides no +license to any Qualcomm Atheros patents, trademarks, copyrights, or other +intellectual property. + +Copyright (c) 2014 Qualcomm Atheros, Inc. All rights reserved. + +Qualcomm is a trademark of Qualcomm Incorporated, registered in the United +States and other countries. All Qualcomm Incorporated trademarks are used with +permission. Atheros is a trademark of Qualcomm Atheros, Inc., registered in the +United States and other countries. Other products and brand names may be +trademarks or registered trademarks of their respective owners. + +NOTICES: + +============================================================================= + +/* + * doprint.c + * Formatted string print support. + * + * Copyright 2001-2012 Qualcomm Atheros, Inc. All Rights Reserved. + * + * Qualcomm Atheros Confidential and Proprietary. + * + * This code originates with BSD Unix however it has been extensively + * modified. The original copyright is reproduced below: + * + * Copyright (c) 1988 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted provided + * that: (1) source distributions retain this entire copyright notice and + * comment, and (2) distributions including binaries display the following + * acknowledgement: ``This product includes software developed by the + * University of California, Berkeley and its contributors'' in the + * documentation or other materials provided with the distribution and in + * all advertising materials mentioning features or use of this software. + * Neither the name of the University nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + + +/* + * math.c + * Support for the standard C library. + * + * Copyright 2006-2012 Qualcomm Atheros, Inc. All Rights Reserved. + * + * Qualcomm Atheros Confidential and Proprietary. + * + * Software contained within this file was originally released with the + * following + * copyright and license statement: + * + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + + +/* + * stdlib.c + * Routines from stdlib.h. + * + * Copyright 2004-2012 Qualcomm Atheros, Inc. All Rights Reserved. + * + * Qualcomm Atheros Confidential and Proprietary. + * + * The code for strtol() and strtoul() are also subject to the following: + * + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +drr_alg_utils.h: +/****************************************************************************/ +/*- + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + + +shaper_list_utils.h: +/****************************************************************************/ +/*- + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + + +codel_alg_inv_sqrt.h +/****************************************************************************/ +/*- + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ diff --git a/package/nss/qca/qca-nss-drv/files/nss-firmware/README.md b/package/nss/qca/qca-nss-drv/files/nss-firmware/README.md new file mode 100644 index 000000000..2d0b47508 --- /dev/null +++ b/package/nss/qca/qca-nss-drv/files/nss-firmware/README.md @@ -0,0 +1,10 @@ +NSS FIRMWARE +============ + +This repo contains firmware files to enable the NSS MAC on QCA IPQ806x SoC. + +This product includes software developed by the University of California, +Berkeley and its contributors. + +NSS firmware extracted from Synology RT2600ac SRM 1.2 - Version: 1.2-7742-4 + diff --git a/package/nss/qca/qca-nss-drv/files/nss-firmware/qca-nss0-retail.bin b/package/nss/qca/qca-nss-drv/files/nss-firmware/qca-nss0-retail.bin new file mode 100644 index 000000000..08f6efe6c Binary files /dev/null and b/package/nss/qca/qca-nss-drv/files/nss-firmware/qca-nss0-retail.bin differ diff --git a/package/nss/qca/qca-nss-drv/files/nss-firmware/qca-nss1-retail.bin b/package/nss/qca/qca-nss-drv/files/nss-firmware/qca-nss1-retail.bin new file mode 100644 index 000000000..e79510f34 Binary files /dev/null and b/package/nss/qca/qca-nss-drv/files/nss-firmware/qca-nss1-retail.bin differ diff --git a/package/nss/qca/qca-nss-drv/patches/0001-core-add-5.10-kernel-to-version-check.patch b/package/nss/qca/qca-nss-drv/patches/0001-core-add-5.10-kernel-to-version-check.patch deleted file mode 100644 index 3fea9b5ce..000000000 --- a/package/nss/qca/qca-nss-drv/patches/0001-core-add-5.10-kernel-to-version-check.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 3885c752e12f74cad6c97888b797e5903ad1930d Mon Sep 17 00:00:00 2001 -From: Robert Marko -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 ---- - 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 - diff --git a/package/nss/qca/qca-nss-drv/patches/0002-nss-drv-replace-ioremap_nocache-with-ioremap.patch b/package/nss/qca/qca-nss-drv/patches/0002-nss-drv-replace-ioremap_nocache-with-ioremap.patch deleted file mode 100644 index 77155750c..000000000 --- a/package/nss/qca/qca-nss-drv/patches/0002-nss-drv-replace-ioremap_nocache-with-ioremap.patch +++ /dev/null @@ -1,164 +0,0 @@ -From b5e2a7167ca3df9fce34f0d7c05468d4f5597275 Mon Sep 17 00:00:00 2001 -From: Robert Marko -Date: Thu, 13 May 2021 23:33:18 +0200 -Subject: [PATCH] nss-drv: replace ioremap_nocache() with ioremap() - -ioremap_nocache() does not exist anymore. - -Signed-off-by: Robert Marko ---- - 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/nss_hal.c | 4 ++-- - nss_meminfo.c | 2 +- - nss_ppe.c | 2 +- - 7 files changed, 16 insertions(+), 16 deletions(-) - ---- 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_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 - - 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/ipq60xx/nss_hal_pvt.c -+++ b/nss_hal/ipq60xx/nss_hal_pvt.c -@@ -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 - - 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; ---- 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_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 - } - 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; ---- 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_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_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 - } - 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/nss_hal.c -+++ b/nss_hal/nss_hal.c -@@ -78,9 +78,9 @@ int nss_hal_firmware_load(struct nss_ctx - return rc; - } - -- load_mem = ioremap_nocache(npd->load_addr, nss_fw->size); -+ load_mem = ioremap(npd->load_addr, nss_fw->size); - if (!load_mem) { -- nss_info_always("%px: ioremap_nocache failed: %x", nss_ctx, npd->load_addr); -+ nss_info_always("%px: ioremap failed: %x", nss_ctx, npd->load_addr); - release_firmware(nss_fw); - return rc; - } ---- a/nss_meminfo.c -+++ b/nss_meminfo.c -@@ -728,7 +728,7 @@ bool nss_meminfo_init(struct nss_ctx_ins - /* - * meminfo_start is the label where the start address of meminfo map is stored. - */ -- meminfo_start = (uint32_t *)ioremap_nocache(nss_ctx->load + NSS_MEMINFO_MAP_START_OFFSET, -+ meminfo_start = (uint32_t *)ioremap(nss_ctx->load + NSS_MEMINFO_MAP_START_OFFSET, - NSS_MEMINFO_RESERVE_AREA_SIZE); - if (!meminfo_start) { - nss_info_always("%px: cannot remap meminfo start\n", nss_ctx); ---- a/nss_ppe.c -+++ b/nss_ppe.c -@@ -357,7 +357,7 @@ void nss_ppe_init(void) - /* - * Get the PPE base address - */ -- ppe_pvt.ppe_base = ioremap_nocache(PPE_BASE_ADDR, PPE_REG_SIZE); -+ ppe_pvt.ppe_base = ioremap(PPE_BASE_ADDR, PPE_REG_SIZE); - if (!ppe_pvt.ppe_base) { - nss_warning("DRV can't get PPE base address\n"); - return; diff --git a/package/nss/qca/qca-nss-drv/patches/0003-DMA-Fix-NULL-pointer-exceptions.patch b/package/nss/qca/qca-nss-drv/patches/0003-DMA-Fix-NULL-pointer-exceptions.patch deleted file mode 100644 index 0c13a7887..000000000 --- a/package/nss/qca/qca-nss-drv/patches/0003-DMA-Fix-NULL-pointer-exceptions.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 62e457f262aaa0db7113ad3ccbcb7ae49d4d7ea8 Mon Sep 17 00:00:00 2001 -From: Robert Marko -Date: Tue, 8 Jun 2021 23:24:43 +0200 -Subject: [PATCH] DMA: Fix NULL pointer exceptions - -There are multiple instances that pass NULL instead -of device to DMA functions. -That is incorrect and will cause kernel NULL pointer -exceptions. - -So, simply pass the device structure pointers. - -Signed-off-by: Robert Marko ---- - nss_core.c | 2 +- - nss_coredump.c | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - ---- a/nss_core.c -+++ b/nss_core.c -@@ -1617,7 +1617,7 @@ static int32_t nss_core_handle_cause_que - * - */ - if (unlikely((buffer_type == N2H_BUFFER_CRYPTO_RESP))) { -- dma_unmap_single(NULL, (desc->buffer + desc->payload_offs), desc->payload_len, DMA_FROM_DEVICE); -+ 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++; diff --git a/package/nss/qca/qca-nss-drv/patches/100-kernel-5.4-support.patch b/package/nss/qca/qca-nss-drv/patches/100-kernel-5.4-support.patch new file mode 100644 index 000000000..4268225c3 --- /dev/null +++ b/package/nss/qca/qca-nss-drv/patches/100-kernel-5.4-support.patch @@ -0,0 +1,107 @@ +diff --git a/Makefile b/Makefile +index d998548..b1a4a83 100644 +--- a/Makefile ++++ b/Makefile +@@ -161,7 +161,7 @@ endif + ccflags-y += -I$(obj)/nss_hal/include -I$(obj)/nss_data_plane/include -I$(obj)/exports -DNSS_DEBUG_LEVEL=0 -DNSS_PKT_STATS_ENABLED=1 + + ccflags-y += -DNSS_PM_DEBUG_LEVEL=0 -DNSS_SKB_REUSE_SUPPORT=1 +-ccflags-y += -Werror ++# ccflags-y += -Werror + + ifneq ($(findstring 3.4, $(KERNELVERSION)),) + NSS_CCFLAGS = -DNSS_DT_SUPPORT=0 -DNSS_FW_DBG_SUPPORT=1 -DNSS_PM_SUPPORT=1 -DNSS_EMPTY_BUFFER_SIZE=1984 +diff --git a/nss_core.c b/nss_core.c +index 6c9716a..8956eb5 100644 +--- a/nss_core.c ++++ b/nss_core.c +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + #include "nss_tx_rx_common.h" + #include "nss_data_plane.h" + +@@ -45,7 +46,8 @@ + (((LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0)))) || \ + (((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(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)))))) + #error "Check skb recycle code in this file to match Linux version" + #endif + +@@ -395,7 +397,11 @@ static void nss_get_ddr_info(struct nss_mmu_ddr_info *mmu, char *name) + struct device_node *node; + + si_meminfo(&vals); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)) ++ cached = global_zone_page_state(NR_FILE_PAGES); ++#else + cached = global_page_state(NR_FILE_PAGES); ++#endif /*KERNEL_VERSION(4, 14, 0)*/ + avail_ddr = (vals.totalram + cached + vals.sharedram) * vals.mem_unit; + + /* +@@ -679,7 +685,11 @@ static inline void nss_core_handle_virt_if_pkt(struct nss_ctx_instance *nss_ctx, + * Mimic Linux behavior to allow multi-queue netdev choose which queue to use + */ + if (ndev->netdev_ops->ndo_select_queue) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)) ++ queue_offset = ndev->netdev_ops->ndo_select_queue(ndev, nbuf, NULL); ++#else + queue_offset = ndev->netdev_ops->ndo_select_queue(ndev, nbuf, NULL, NULL); ++#endif /*KERNEL_VERSION(5, 3, 0)*/ + } + + skb_set_queue_mapping(nbuf, queue_offset); +@@ -2269,7 +2279,11 @@ static inline bool nss_skb_can_reuse(struct nss_ctx_instance *nss_ctx, + * This check is added to avoid deadlock from nf_conntrack + * when ecm is trying to flush a rule. + */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) ++ if (unlikely(skb_nfct(nbuf))) { ++#else + if (unlikely(nbuf->nfct)) { ++#endif /*KERNEL_VERSION(4, 11, 0)*/ + return false; + } + #endif +@@ -2279,7 +2285,11 @@ static inline bool nss_skb_can_reuse(struct nss_ctx_instance *nss_ctx, + * This check is added to avoid deadlock from nf_bridge + * when ecm is trying to flush a rule. + */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) ++ if (unlikely(skb_ext_exist(nbuf, SKB_EXT_BRIDGE_NF))) { ++#else + if (unlikely(nbuf->nf_bridge)) { ++#endif /*KERNEL_VERSION(4, 11, 0)*/ + return false; + } + #endif +diff --git a/nss_n2h.c b/nss_n2h.c +index 781ce2b..695ac13 100644 +--- a/nss_n2h.c ++++ b/nss_n2h.c +@@ -19,6 +19,7 @@ + * NSS N2H node APIs + */ + ++#include + #include "nss_tx_rx_common.h" + #include "nss_n2h_stats.h" + + +--- a/nss_data_plane/nss_data_plane_gmac.c ++++ b/nss_data_plane/nss_data_plane_gmac.c +@@ -20,7 +20,7 @@ + #include "nss_tx_rx_common.h" + #include + +-#define NSS_DP_GMAC_SUPPORTED_FEATURES (NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_RXCSUM | NETIF_F_SG | NETIF_F_FRAGLIST | (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_UFO)) ++#define NSS_DP_GMAC_SUPPORTED_FEATURES (NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_RXCSUM | NETIF_F_SG | NETIF_F_FRAGLIST | (NETIF_F_TSO | NETIF_F_TSO6)) + #define NSS_DATA_PLANE_GMAC_MAX_INTERFACES 4 + + static DEFINE_SPINLOCK(nss_data_plane_gmac_stats_lock); diff --git a/package/nss/qca/qca-nss-drv/patches/101-nss-drv-Control-fab-scaling-from-package-Makefile.patch b/package/nss/qca/qca-nss-drv/patches/101-nss-drv-Control-fab-scaling-from-package-Makefile.patch new file mode 100644 index 000000000..b0facc856 --- /dev/null +++ b/package/nss/qca/qca-nss-drv/patches/101-nss-drv-Control-fab-scaling-from-package-Makefile.patch @@ -0,0 +1,38 @@ +From 40d4b080f17883ac6b39c74a5feb1af384ab6a51 Mon Sep 17 00:00:00 2001 +From: Robert Marko +Date: Thu, 11 Jun 2020 16:57:39 +0200 +Subject: [PATCH] nss-drv: Control fab scaling from package Makefile + +Lets control the fab scaling from the package Makefile +instead of using kernel checks that dont work. +Fab scaling in OpenWrt is done in a external way. + +Signed-off-by: Robert Marko +--- + Makefile | 9 --------- + 1 file changed, 9 deletions(-) + +diff --git a/Makefile b/Makefile +index 20729ab..2567dd4 100644 +--- a/Makefile ++++ b/Makefile +@@ -405,15 +405,8 @@ NSS_CCFLAGS = -DNSS_DT_SUPPORT=1 -DNSS_FW_DBG_SUPPORT=0 -DNSS_PM_SUPPORT=0 + ccflags-y += -I$(obj) + endif + +-# Fabric scaling is supported in 3.14 and 4.4 only +-ifneq ($(findstring 3.14, $(KERNELVERSION)),) +-NSS_CCFLAGS += -DNSS_FABRIC_SCALING_SUPPORT=1 +-else ifneq ($(findstring 4.4, $(KERNELVERSION)),) +-NSS_CCFLAGS += -DNSS_FABRIC_SCALING_SUPPORT=1 +-else +-NSS_CCFLAGS += -DNSS_FABRIC_SCALING_SUPPORT=0 +-endif ++NSS_CCFLAGS += -DNSS_FABRIC_SCALING_SUPPORT=0 + + # Disable Frequency scaling + ifeq "$(NSS_FREQ_SCALE_DISABLE)" "y" + ccflags-y += -DNSS_FREQ_SCALE_SUPPORT=0 +-- +2.26.2 + diff --git a/package/nss/qca/qca-nss-drv/patches/200-fix-NULL-pointer-exception.patch b/package/nss/qca/qca-nss-drv/patches/200-fix-NULL-pointer-exception.patch new file mode 100644 index 000000000..3d8bba950 --- /dev/null +++ b/package/nss/qca/qca-nss-drv/patches/200-fix-NULL-pointer-exception.patch @@ -0,0 +1,11 @@ +--- a/nss_core.c ++++ b/nss_core.c +@@ -1599,7 +1599,7 @@ static int32_t nss_core_handle_cause_que + * + */ + if (unlikely((buffer_type == N2H_BUFFER_CRYPTO_RESP))) { +- dma_unmap_single(NULL, (desc->buffer + desc->payload_offs), desc->payload_len, DMA_FROM_DEVICE); ++ dma_unmap_single(nss_ctx->dev, (desc->buffer + desc->payload_offs), desc->payload_len, DMA_FROM_DEVICE); + goto consume; + } + diff --git a/package/nss/qca/qca-nss-drv/patches/201-Fix-Kernel-Panic-dma-with-NULL-dev.patch b/package/nss/qca/qca-nss-drv/patches/201-Fix-Kernel-Panic-dma-with-NULL-dev.patch new file mode 100644 index 000000000..addfef1bb --- /dev/null +++ b/package/nss/qca/qca-nss-drv/patches/201-Fix-Kernel-Panic-dma-with-NULL-dev.patch @@ -0,0 +1,82 @@ +From 89949decfd9a0f86427b502aae4fbc3a3ef399f0 Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Tue, 23 Jun 2020 19:50:28 +0200 +Subject: [PATCH] Fix Kernel Panic dma with NULL dev + +--- + nss_coredump.c | 4 ++-- + nss_log.c | 8 +++++--- + 2 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/nss_coredump.c b/nss_coredump.c +index aa4ba82..957eca0 100644 +--- a/nss_coredump.c ++++ b/nss_coredump.c +@@ -154,7 +154,7 @@ void nss_fw_coredump_notify(struct nss_ctx_instance *nss_own, + 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_ctx_instance *nss_own, + + 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("%p: %s\n", nss_own, nle_print->message); + nle_print++; +diff --git a/nss_log.c b/nss_log.c +index 06ebba4..f9bd6c8 100644 +--- a/nss_log.c ++++ b/nss_log.c +@@ -44,6 +44,7 @@ struct nss_log_data { + uint32_t last_entry; /* Last known sampled entry (or index) */ + uint32_t nentries; /* Caches the total number of entries of log buffer */ + int nss_id; /* NSS Core id being used */ ++ struct device *nss_dev; + }; + + struct nss_log_ring_buffer_addr nss_rbe[NSS_MAX_CORES]; +@@ -125,6 +126,7 @@ static int nss_log_open(struct inode *inode, struct file *filp) + data->last_entry = 0; + data->nentries = nss_rbe[nss_id].nentries; + data->dma_addr = nss_rbe[nss_id].dma_addr; ++ data->nss_dev = nss_ctx->dev; + + /* + * Increment the reference count so that we don't free +@@ -207,7 +209,7 @@ static ssize_t nss_log_read(struct file *filp, char __user *buf, size_t size, lo + /* + * Get the current index + */ +- dma_sync_single_for_cpu(NULL, data->dma_addr, sizeof(struct nss_log_descriptor), DMA_FROM_DEVICE); ++ dma_sync_single_for_cpu(data->nss_dev, data->dma_addr, sizeof(struct nss_log_descriptor), DMA_FROM_DEVICE); + entry = nss_log_current_entry(desc); + + /* +@@ -251,7 +253,7 @@ static ssize_t nss_log_read(struct file *filp, char __user *buf, size_t size, lo + offset = (offset * sizeof(struct nss_log_entry)) + + offsetof(struct nss_log_descriptor, log_ring_buffer); + +- dma_sync_single_for_cpu(NULL, data->dma_addr + offset, ++ dma_sync_single_for_cpu(data->nss_dev, data->dma_addr + offset, + sizeof(struct nss_log_entry), DMA_FROM_DEVICE); + rb = &desc->log_ring_buffer[index]; + +@@ -510,7 +512,7 @@ bool nss_debug_log_buffer_alloc(uint8_t nss_id, uint32_t nentry) + return true; + + fail: +- dma_unmap_single(NULL, dma_addr, size, DMA_FROM_DEVICE); ++ dma_unmap_single(nss_ctx->dev, dma_addr, size, DMA_FROM_DEVICE); + kfree(addr); + wake_up(&nss_log_wq); + return false; +-- +2.27.0 + diff --git a/package/nss/qca/qca-nss-drv/patches/400-Exported-set-nexthop-function.patch b/package/nss/qca/qca-nss-drv/patches/400-Exported-set-nexthop-function.patch new file mode 100644 index 000000000..8c0ffe774 --- /dev/null +++ b/package/nss/qca/qca-nss-drv/patches/400-Exported-set-nexthop-function.patch @@ -0,0 +1,47 @@ +From f8cf061454a3707c0c84d0fca685e84455f91362 Mon Sep 17 00:00:00 2001 +From: Suruchi Suman +Date: Tue, 3 Dec 2019 12:57:38 +0530 +Subject: [qca-nss-drv] Exported set nexhop function from drv. + +Change-Id: I3df6658bef72fe574ac9acfb7aac61785769766f +Signed-off-by: Suruchi Suman +--- + nss_phys_if.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/nss_phys_if.c b/nss_phys_if.c +index 4f9b20f..0c58d95 100644 +--- a/nss_phys_if.c ++++ b/nss_phys_if.c +@@ -1,6 +1,6 @@ + /* + ************************************************************************** +- * Copyright (c) 2014-2019, The Linux Foundation. All rights reserved. ++ * Copyright (c) 2014-2020, The Linux Foundation. All rights reserved. + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all copies. +@@ -583,6 +583,12 @@ nss_tx_status_t nss_phys_if_set_nexthop(struct nss_ctx_instance *nss_ctx, uint32 + struct nss_phys_if_msg nim; + + NSS_VERIFY_CTX_MAGIC(nss_ctx); ++ ++ if (nexthop >= NSS_MAX_NET_INTERFACES) { ++ nss_warning("%p: Invalid nexthop interface number: %d", nss_ctx, nexthop); ++ return NSS_TX_FAILURE_BAD_PARAM; ++ } ++ + nss_info("%p: Phys If nexthop will be set to %d, id:%d\n", nss_ctx, nexthop, if_num); + + nss_cmn_msg_init(&nim.cm, if_num, NSS_PHYS_IF_SET_NEXTHOP, +@@ -591,6 +597,7 @@ nss_tx_status_t nss_phys_if_set_nexthop(struct nss_ctx_instance *nss_ctx, uint32 + + return nss_phys_if_msg_sync(nss_ctx, &nim); + } ++EXPORT_SYMBOL(nss_phys_if_set_nexthop); + + /* + * nss_get_state() +-- +cgit v1.1 + diff --git a/package/nss/qca/qca-nss-drv/patches/999-treewide-hack-support-for-mismatched-firmware.patch b/package/nss/qca/qca-nss-drv/patches/999-treewide-hack-support-for-mismatched-firmware.patch deleted file mode 100644 index 46025b823..000000000 --- a/package/nss/qca/qca-nss-drv/patches/999-treewide-hack-support-for-mismatched-firmware.patch +++ /dev/null @@ -1,344 +0,0 @@ -From d0bffc800a50305315a0d7cf37140291ef5b1b61 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Thu, 27 May 2021 03:52:47 +0200 -Subject: [PATCH] treewide: hack support for mismatched firmware - -Make new qsdk feature configurable to support old half compatible -firmware. - -Signed-off-by: Ansuel Smith ---- - exports/nss_fw_version.h | 11 +++++++++++ - exports/nss_ipv4.h | 8 ++++++++ - exports/nss_ipv6.h | 7 +++++++ - exports/nss_wifi_vdev.h | 14 ++++++++++++++ - exports/nss_wifili_if.h | 8 ++++++++ - nss_ipv4_stats.c | 2 ++ - nss_ipv4_strings.c | 2 ++ - nss_ipv6_stats.c | 2 ++ - nss_ipv6_strings.c | 2 ++ - 9 files changed, 56 insertions(+) - create mode 100644 exports/nss_fw_version.h - -diff --git a/exports/nss_fw_version.h b/exports/nss_fw_version.h -new file mode 100644 -index 0000000..895d523 ---- /dev/null -+++ b/exports/nss_fw_version.h -@@ -0,0 +1,11 @@ -+#ifndef __NSS_FW_VERSION_H -+#define __NSS_FW_VERSION_H -+ -+#define NSS_FW_VERSION_MAJOR 11 -+#define NSS_FW_VERSION_MINOR 4 -+ -+#define NSS_FW_VERSION(a,b) (((a) << 8) + (b)) -+ -+#define NSS_FW_VERSION_CODE NSS_FW_VERSION(NSS_FW_VERSION_MAJOR, NSS_FW_VERSION_MINOR) -+ -+#endif /* __NSS_FW_VERSION_H */ -\ No newline at end of file -diff --git a/exports/nss_ipv4.h b/exports/nss_ipv4.h -index ee3a552..25c4d82 100644 ---- a/exports/nss_ipv4.h -+++ b/exports/nss_ipv4.h -@@ -26,6 +26,8 @@ - #include "nss_stats_public.h" - #endif - -+#include "nss_fw_version.h" -+ - /** - * @addtogroup nss_ipv4_subsystem - * @{ -@@ -216,12 +218,14 @@ enum nss_ipv4_stats_types { - /**< Number of IPv4 multicast connection destroy requests that missed the cache. */ - NSS_IPV4_STATS_MC_CONNECTION_FLUSHES, - /**< Number of IPv4 multicast connection flushes. */ -+#if (NSS_FW_VERSION_CODE > NSS_FW_VERSION(11,3)) - NSS_IPV4_STATS_CONNECTION_CREATE_INVALID_MIRROR_IFNUM, - /**< Number of IPv4 mirror connection requests with an invalid interface number. */ - NSS_IPV4_STATS_CONNECTION_CREATE_INVALID_MIRROR_IFTYPE, - /**< Number of IPv4 mirror connection requests with an invalid interface type. */ - NSS_IPV4_STATS_MIRROR_FAILURES, - /**< Number of IPv4 mirror failures. */ -+#endif - NSS_IPV4_STATS_MAX, - /**< Maximum message type. */ - }; -@@ -609,8 +613,10 @@ struct nss_ipv4_rule_create_msg { - /**< Ingress shaping related accleration parameters. */ - struct nss_ipv4_identifier_rule identifier; - /**< Rule for adding identifier. */ -+#if (NSS_FW_VERSION_CODE > NSS_FW_VERSION(11,3)) - struct nss_ipv4_mirror_rule mirror_rule; - /**< Mirror rule parameter. */ -+#endif - }; - - /** -@@ -955,6 +961,7 @@ struct nss_ipv4_node_sync { - uint32_t ipv4_mc_connection_flushes; - /**< Number of multicast connection flushes. */ - -+#if (NSS_FW_VERSION_CODE > NSS_FW_VERSION(11,3)) - uint32_t ipv4_connection_create_invalid_mirror_ifnum; - /**< Number of create request failed with an invalid mirror interface number. */ - -@@ -963,6 +970,7 @@ struct nss_ipv4_node_sync { - - uint32_t ipv4_mirror_failures; - /**< Mirror packet failed. */ -+#endif - - uint32_t exception_events[NSS_IPV4_EXCEPTION_EVENT_MAX]; - /**< Number of exception events. */ -diff --git a/exports/nss_ipv6.h b/exports/nss_ipv6.h -index 930e74c..a21f939 100644 ---- a/exports/nss_ipv6.h -+++ b/exports/nss_ipv6.h -@@ -195,6 +195,8 @@ enum nss_ipv6_stats_types { - /**< Number of IPv6 multicast connection destroy requests that missed the cache. */ - NSS_IPV6_STATS_MC_CONNECTION_FLUSHES, - /**< Number of IPv6 multicast connection flushes. */ -+ -+#if (NSS_FW_VERSION_CODE > NSS_FW_VERSION(11,3)) - NSS_IPV6_STATS_CONNECTION_CREATE_INVALID_MIRROR_IFNUM, - /**< Number of IPv6 mirror connection requests with an invalid interface number. */ - NSS_IPV6_STATS_CONNECTION_CREATE_INVALID_MIRROR_IFTYPE, -@@ -202,6 +204,7 @@ enum nss_ipv6_stats_types { - - NSS_IPV6_STATS_MIRROR_FAILURES, - /**< Number of IPv6 mirror failures. */ -+#endif - - NSS_IPV6_STATS_MAX, - /**< Maximum message type. */ -@@ -702,8 +705,10 @@ struct nss_ipv6_rule_create_msg { - /**< Ingress shaping related accleration parameters. */ - struct nss_ipv6_identifier_rule identifier; - /**< Rule for adding identifier. */ -+#if (NSS_FW_VERSION_CODE > NSS_FW_VERSION(11,3)) - struct nss_ipv6_mirror_rule mirror_rule; - /**< Mirror rule parameter. */ -+#endif - }; - - /** -@@ -950,6 +955,7 @@ struct nss_ipv6_node_sync { - uint32_t ipv6_mc_connection_flushes; - /**< Number of multicast connection flushes. */ - -+#if (NSS_FW_VERSION_CODE > NSS_FW_VERSION(11,3)) - uint32_t ipv6_connection_create_invalid_mirror_ifnum; - /**< Number of create request failed with an invalid mirror interface number. */ - -@@ -958,6 +964,7 @@ struct nss_ipv6_node_sync { - - uint32_t ipv6_mirror_failures; - /**< Mirror packet failed. */ -+#endif - - uint32_t exception_events[NSS_IPV6_EXCEPTION_EVENT_MAX]; - /**< Number of exception events. */ -diff --git a/exports/nss_wifi_vdev.h b/exports/nss_wifi_vdev.h -index 1b52f66..da91b56 100644 ---- a/exports/nss_wifi_vdev.h -+++ b/exports/nss_wifi_vdev.h -@@ -74,8 +74,10 @@ enum nss_wifi_vdev_msg_types { - NSS_WIFI_VDEV_INTERFACE_RECOVERY_RESET_MSG, - NSS_WIFI_VDEV_INTERFACE_RECOVERY_RECONF_MSG, - NSS_WIFI_VDEV_SET_GROUP_KEY, -+#if (NSS_FW_VERSION_CODE > NSS_FW_VERSION(11,3)) - NSS_WIFI_VDEV_HMMC_MEMBER_ADD_MSG, - NSS_WIFI_VDEV_HMMC_MEMBER_DEL_MSG, -+#endif - NSS_WIFI_VDEV_MAX_MSG - }; - -@@ -130,6 +132,7 @@ enum nss_wifi_vdev_err_types { - NSS_WIFI_VDEV_VLAN_MODE_CONFIG_FAIL, - NSS_WIFI_VDEV_RECOVERY_RESET_FAIL, - NSS_WIFI_VDEV_RECOVERY_RECONF_FAIL, -+#if (NSS_FW_VERSION_CODE > NSS_FW_VERSION(11,3)) - NSS_WIFI_VDEV_CONFIG_GROUP_KEY_FAIL, - NSS_WIFI_VDEV_MULTIPASS_NOT_ENABLED, - NSS_WIFI_VDEV_ALLOC_VLAN_MAP_FAILED, -@@ -139,6 +142,7 @@ enum nss_wifi_vdev_err_types { - NSS_WIFI_VDEV_PPE_PORT_DESTROY_FAIL, - NSS_WIFI_VDEV_PPE_VSI_ASSIGN_FAIL, - NSS_WIFI_VDEV_PPE_VSI_UNASSIGN_FAIL, -+#endif - NSS_WIFI_VDEV_EINV_MAX_CFG - }; - -@@ -161,11 +165,13 @@ enum nss_wifi_vdev_ext_data_pkt_type { - NSS_WIFI_VDEV_EXT_TX_COMPL_PKT_TYPE = 11, /**< Tx completion. */ - NSS_WIFI_VDEV_EXT_DATA_PKT_TYPE_WDS_LEARN = 12, /**< WDS source port learning command. */ - NSS_WIFI_VDEV_EXT_DATA_PPDU_INFO = 13, /**< PPDU metadata information. */ -+#if (NSS_FW_VERSION_CODE > NSS_FW_VERSION(11,3)) - NSS_WIFI_VDEV_EXT_DATA_PKT_TYPE_MCBC_RX = 14, /**< Multicast/broadcast packet received. */ - NSS_WIFI_VDEV_MESH_EXT_DATA_PKT_TYPE_RX_SPL_PACKET = 15, - /**< Mesh link VAP special packet. */ - NSS_WIFI_VDEV_MESH_EXT_DATA_PKT_TYPE_RX_MCAST_EXC = 16, - /**< Mesh link VAP multicast packet. */ -+#endif - NSS_WIFI_VDEV_EXT_DATA_PKT_TYPE_MAX - }; - -@@ -201,9 +207,11 @@ enum nss_wifi_vdev_cmd { - NSS_WIFI_VDEV_ENABLE_IGMP_ME_CMD, /**< Configuration to set IGMP multicast enhancement on VAP. */ - NSS_WIFI_VDEV_CFG_WDS_BACKHAUL_CMD, - /**< Configuration to set WDS backhaul extension on VAP. */ -+#if (NSS_FW_VERSION_CODE > NSS_FW_VERSION(11,3)) - NSS_WIFI_VDEV_CFG_MCBC_EXC_TO_HOST_CMD, /**< Configuration to set multicast/broadcast exception to host on VAP. */ - NSS_WIFI_VDEV_CFG_PEER_AUTHORIZE_CMD, - /**< Configuration to enable peer authorization on VAP. */ -+#endif - NSS_WIFI_VDEV_MAX_CMD - }; - -@@ -271,7 +279,9 @@ struct nss_wifi_vdev_config_msg { - uint8_t is_nss_qwrap_en; /**< VAP is configured for NSS firmware QWRAP logic. */ - uint8_t tx_per_pkt_vdev_id_check; /**< Transmit per-packet virtual device ID check. */ - uint8_t align_pad; /**< Reserved field. */ -+#if (NSS_FW_VERSION_CODE > NSS_FW_VERSION(11,3)) - uint32_t vap_ext_mode; /**< Different VAP extended modes. */ -+#endif - }; - - /** -@@ -1037,8 +1047,10 @@ struct nss_wifi_vdev_stats_sync_msg { - uint32_t rx_mcast_bytes; /**< Receive multicast bytes count. */ - uint32_t rx_decrypt_err; /**< Receive decryption error */ - uint32_t rx_mic_err; /**< Receive MIC error */ -+#if (NSS_FW_VERSION_CODE > NSS_FW_VERSION(11,3)) - uint32_t mcbc_exc_host_fail_cnt; - /**< Number of multicast/broadcast packets failed to send to host through exception path. */ -+#endif - }; - - /** -@@ -1070,6 +1082,7 @@ struct nss_wifi_vdev_msg { - /**< Updates a snooplist group member. */ - struct nss_wifi_vdev_me_snptbl_deny_grp_add_msg vdev_deny_member_add; - /**< Add a snooplist member to the deny list. */ -+#if (NSS_FW_VERSION_CODE > NSS_FW_VERSION(11,3)) - struct nss_wifi_vdev_me_hmmc_add_msg vdev_hmmc_member_add; - /**< Adds a new member into the HMMC list. */ - struct nss_wifi_vdev_me_hmmc_del_msg vdev_hmmc_member_del; -@@ -1078,6 +1091,7 @@ struct nss_wifi_vdev_msg { - /**< Adds a new member into the deny list. */ - struct nss_wifi_vdev_me_deny_ip_del_msg vdev_deny_list_member_del; - /**< Delete a member from the deny list. */ -+#endif - struct nss_wifi_vdev_txmsg vdev_txmsgext; - /**< Transmits special data. */ - struct nss_wifi_vdev_vow_dbg_cfg_msg vdev_vow_dbg_cfg; -diff --git a/exports/nss_wifili_if.h b/exports/nss_wifili_if.h -index fce20fd..1f26d67 100644 ---- a/exports/nss_wifili_if.h -+++ b/exports/nss_wifili_if.h -@@ -62,8 +62,12 @@ - /**< Maximum number of bandwidth supported. */ - #define NSS_WIFILI_REPT_MU_MIMO 1 - #define NSS_WIFILI_REPT_MU_OFDMA_MIMO 3 -+#if (NSS_FW_VERSION_CODE > NSS_FW_VERSION(11,3)) -+#define NSS_WIFILI_MAX_RESERVED_TYPE 3 -+#else - #define NSS_WIFILI_MAX_RESERVED_TYPE 2 - /**< Maximum reserved type. */ -+#endif - #define NSS_WIFILI_SOC_PER_PACKET_METADATA_SIZE 60 - /**< Metadata area total size. */ - #define NSS_WIFILI_MEC_PEER_ID 0xDEAD -@@ -1333,7 +1337,9 @@ struct nss_wifili_rx_err { - struct nss_wifili_rx_ctrl_stats { - struct nss_wifili_rx_err err; /**< Rx peer errors. */ - uint32_t multipass_rx_pkt_drop; /**< Total number of multipass packets without a VLAN header. */ -+#if (NSS_FW_VERSION_CODE > NSS_FW_VERSION(11,3)) - uint32_t peer_unauth_rx_pkt_drop; /**< Number of receive packets dropped due to an authorized peer. */ -+#endif - uint32_t reserved_type[NSS_WIFILI_MAX_RESERVED_TYPE]; /**< Reserved type for future use. */ - uint32_t non_amsdu_cnt; /**< Number of MSDUs with no MSDU level aggregation. */ - uint32_t amsdu_cnt; /**< Number of MSDUs part of AMSDU. */ -@@ -1810,10 +1816,12 @@ struct nss_wifili_msg { - /**< Peer four-address event message. */ - struct nss_wifili_dbdc_repeater_loop_detection_msg wdrldm; - /**< Wifili DBDC repeater loop detection message. */ -+#if (NSS_FW_VERSION_CODE > NSS_FW_VERSION(11,3)) - struct nss_wifili_peer_update_auth_flag peer_auth; - /**< Peer authentication flag message. */ - struct nss_wifili_mesh_capability_info cap_info; - /**< Mesh capability flag. */ -+#endif - } msg; /**< Message payload. */ - }; - -diff --git a/nss_ipv4_stats.c b/nss_ipv4_stats.c -index 39b162c..c875a63 100644 ---- a/nss_ipv4_stats.c -+++ b/nss_ipv4_stats.c -@@ -177,9 +177,11 @@ void nss_ipv4_stats_node_sync(struct nss_ctx_instance *nss_ctx, struct nss_ipv4_ - nss_ipv4_stats[NSS_IPV4_STATS_MC_CONNECTION_DESTROY_REQUESTS] += nins->ipv4_mc_connection_destroy_requests; - nss_ipv4_stats[NSS_IPV4_STATS_MC_CONNECTION_DESTROY_MISSES] += nins->ipv4_mc_connection_destroy_misses; - nss_ipv4_stats[NSS_IPV4_STATS_MC_CONNECTION_FLUSHES] += nins->ipv4_mc_connection_flushes; -+#if (NSS_FW_VERSION_CODE > NSS_FW_VERSION(11,3)) - nss_ipv4_stats[NSS_IPV4_STATS_CONNECTION_CREATE_INVALID_MIRROR_IFNUM] += nins->ipv4_connection_create_invalid_mirror_ifnum; - nss_ipv4_stats[NSS_IPV4_STATS_CONNECTION_CREATE_INVALID_MIRROR_IFTYPE] += nins->ipv4_connection_create_invalid_mirror_iftype; - nss_ipv4_stats[NSS_IPV4_STATS_MIRROR_FAILURES] += nins->ipv4_mirror_failures; -+#endif - - for (i = 0; i < NSS_IPV4_EXCEPTION_EVENT_MAX; i++) { - nss_ipv4_exception_stats[i] += nins->exception_events[i]; -diff --git a/nss_ipv4_strings.c b/nss_ipv4_strings.c -index 77ff352..ce4c249 100644 ---- a/nss_ipv4_strings.c -+++ b/nss_ipv4_strings.c -@@ -137,9 +137,11 @@ struct nss_stats_info nss_ipv4_strings_stats[NSS_IPV4_STATS_MAX] = { - {"mc_destroy_requests" , NSS_STATS_TYPE_SPECIAL}, - {"mc_destroy_misses" , NSS_STATS_TYPE_SPECIAL}, - {"mc_flushes" , NSS_STATS_TYPE_SPECIAL}, -+#if (NSS_FW_VERSION_CODE > NSS_FW_VERSION(11,3)) - {"mirror_invalid_ifnum_conn_create_req" , NSS_STATS_TYPE_SPECIAL}, - {"mirror_invalid_iftype_conn_create_req" , NSS_STATS_TYPE_SPECIAL}, - {"mirror_failures" , NSS_STATS_TYPE_SPECIAL}, -+#endif - }; - - /* -diff --git a/nss_ipv6_stats.c b/nss_ipv6_stats.c -index 617f55b..a492a6c 100644 ---- a/nss_ipv6_stats.c -+++ b/nss_ipv6_stats.c -@@ -180,9 +180,11 @@ void nss_ipv6_stats_node_sync(struct nss_ctx_instance *nss_ctx, struct nss_ipv6_ - nss_ipv6_stats[NSS_IPV6_STATS_MC_CONNECTION_DESTROY_REQUESTS] += nins->ipv6_mc_connection_destroy_requests; - nss_ipv6_stats[NSS_IPV6_STATS_MC_CONNECTION_DESTROY_MISSES] += nins->ipv6_mc_connection_destroy_misses; - nss_ipv6_stats[NSS_IPV6_STATS_MC_CONNECTION_FLUSHES] += nins->ipv6_mc_connection_flushes; -+#if (NSS_FW_VERSION_CODE > NSS_FW_VERSION(11,3)) - nss_ipv6_stats[NSS_IPV6_STATS_CONNECTION_CREATE_INVALID_MIRROR_IFNUM] += nins->ipv6_connection_create_invalid_mirror_ifnum; - nss_ipv6_stats[NSS_IPV6_STATS_CONNECTION_CREATE_INVALID_MIRROR_IFTYPE] += nins->ipv6_connection_create_invalid_mirror_iftype; - nss_ipv6_stats[NSS_IPV6_STATS_MIRROR_FAILURES] += nins->ipv6_mirror_failures; -+#endif - - for (i = 0; i < NSS_IPV6_EXCEPTION_EVENT_MAX; i++) { - nss_ipv6_exception_stats[i] += nins->exception_events[i]; -diff --git a/nss_ipv6_strings.c b/nss_ipv6_strings.c -index 57b100f..29df9c9 100644 ---- a/nss_ipv6_strings.c -+++ b/nss_ipv6_strings.c -@@ -115,9 +115,11 @@ struct nss_stats_info nss_ipv6_strings_stats[NSS_IPV6_STATS_MAX] = { - {"mc_destroy_requests" ,NSS_STATS_TYPE_SPECIAL}, - {"mc_destroy_misses" ,NSS_STATS_TYPE_SPECIAL}, - {"mc_flushes" ,NSS_STATS_TYPE_SPECIAL}, -+#if (NSS_FW_VERSION_CODE > NSS_FW_VERSION(11,3)) - {"mirror_invalid_ifnum_conn_create_req" ,NSS_STATS_TYPE_SPECIAL}, - {"mirror_invalid_iftype_conn_create_req" ,NSS_STATS_TYPE_SPECIAL}, - {"mirror_failures" ,NSS_STATS_TYPE_SPECIAL}, -+#endif - }; - - /* --- -2.31.1 - diff --git a/package/nss/qca/qca-nss-ecm/Makefile b/package/nss/qca/qca-nss-ecm/Makefile index 79d771853..48df30a5b 100644 --- a/package/nss/qca/qca-nss-ecm/Makefile +++ b/package/nss/qca/qca-nss-ecm/Makefile @@ -1,44 +1,66 @@ include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=qca-nss-ecm -PKG_RELEASE:=$(AUTORELEASE) +PKG_RELEASE:=1 -PKG_SOURCE_URL:=https://source.codeaurora.org/quic/cc-qrdk/oss/lklm/qca-nss-ecm +PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/qca-nss-ecm PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2021-04-29 -PKG_SOURCE_VERSION:=c115aec34867b582e2e5ea79fc5315971e0e953c -PKG_MIRROR_HASH:=a772996af7bbae7031eebc2f789431d29be67f11eb0a1e874c08b74eec6f4585 +PKG_SOURCE_VERSION:=9228212b4238c0d8c296f795948ede8f2ca0242e +PKG_MIRROR_HASH:=02fe4c86c8c88fb15704b1b253ab756a2658f24ce5db64a7909cb60bf9c1cdff -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/kernel.mk +LOCAL_VARIANT=$(patsubst qca-nss-ecm-%,%,$(patsubst qca-nss-ecm-%,%,$(BUILD_VARIANT))) include $(INCLUDE_DIR)/package.mk -define KernelPackage/qca-nss-ecm +ifeq ($(CONFIG_QCA_NSS_ECM_EXAMPLES_PCC),y) + FILES_EXAMPLES=$(PKG_BUILD_DIR)/examples/ecm_pcc_test.ko +endif + +ifeq ($(CONFIG_QCA_NSS_ECM_EXAMPLES_MARK),y) + FILES_EXAMPLES+=$(PKG_BUILD_DIR)/examples/ecm_mark_test.ko +endif + +#Explicitly enable OVS external module, if ovsmgr is enabled. +ifneq ($(CONFIG_PACKAGE_kmod-qca-ovsmgr),) +CONFIG_QCA_NSS_ECM_OVS=y +endif + +ifeq ($(CONFIG_QCA_NSS_ECM_OVS),y) + FILES_EXAMPLES+=$(PKG_BUILD_DIR)/examples/ecm_ovs.ko +endif + +define KernelPackage/qca-nss-ecm/Default SECTION:=kernel CATEGORY:=Kernel modules SUBMENU:=Network Support - DEPENDS:=@(TARGET_ipq807x||TARGET_ipq60xx) \ - +kmod-qca-nss-drv \ - +iptables-mod-extra \ - +kmod-ipt-conntrack \ - +kmod-ipt-physdev \ - +iptables-mod-physdev \ - +kmod-ppp \ - +kmod-pppoe + DEPENDS:=+TARGET_ipq806x:kmod-qca-nss-drv \ + +TARGET_ipq_ipq806x:kmod-qca-nss-drv \ + +TARGET_ipq_ipq807x:kmod-qca-nss-drv \ + +TARGET_ipq_ipq807x_64:kmod-qca-nss-drv \ + +TARGET_ipq807x:kmod-qca-nss-drv \ + +TARGET_ipq807x_64:kmod-qca-nss-drv \ + +TARGET_ipq_ipq60xx:kmod-qca-nss-drv \ + +TARGET_ipq_ipq60xx_64:kmod-qca-nss-drv \ + +TARGET_ipq_ipq50xx:kmod-qca-nss-drv \ + +TARGET_ipq_ipq50xx_64:kmod-qca-nss-drv \ + +iptables-mod-extra +kmod-ipt-conntrack \ + +kmod-pppoe @!LINUX_3_18 \ + +kmod-ipsec TITLE:=QCA NSS Enhanced Connection Manager (ECM) - FILES:=$(PKG_BUILD_DIR)/*.ko + FILES:=$(PKG_BUILD_DIR)/*.ko $(FILES_EXAMPLES) KCONFIG:=CONFIG_BRIDGE_NETFILTER=y \ CONFIG_NF_CONNTRACK_EVENTS=y \ CONFIG_NF_CONNTRACK_CHAIN_EVENTS=y \ - CONFIG_NF_CONNTRACK_DSCPREMARK_EXT=n + CONFIG_NF_CONNTRACK_DSCPREMARK_EXT=y + MENU:=1 + PROVIDES:=kmod-qca-nss-ecm endef -define KernelPackage/qca-nss-ecm/Description +define KernelPackage/qca-nss-ecm/Description/Default This package contains the QCA NSS Enhanced Connection Manager endef -define KernelPackage/qca-nss-ecm/install +define KernelPackage/qca-nss-ecm/Default/install $(INSTALL_DIR) $(1)/etc/firewall.d $(1)/etc/init.d $(1)/usr/bin $(1)/lib/netifd/offload $(1)/etc/config $(1)/etc/uci-defaults $(1)/etc/sysctl.d $(INSTALL_DATA) ./files/qca-nss-ecm.firewall $(1)/etc/firewall.d/qca-nss-ecm $(INSTALL_BIN) ./files/qca-nss-ecm.init $(1)/etc/init.d/qca-nss-ecm @@ -47,51 +69,203 @@ define KernelPackage/qca-nss-ecm/install $(INSTALL_DATA) ./files/qca-nss-ecm.uci $(1)/etc/config/ecm $(INSTALL_DATA) ./files/qca-nss-ecm.defaults $(1)/etc/uci-defaults/99-qca-nss-ecm $(INSTALL_BIN) ./files/qca-nss-ecm.sysctl $(1)/etc/sysctl.d/qca-nss-ecm.conf +ifeq ($(CONFIG_KERNEL_IPQ_MEM_PROFILE),256) + echo 'net.netfilter.nf_conntrack_max=2048' >> $(1)/etc/sysctl.d/qca-nss-ecm.conf +endif +ifeq ($(CONFIG_KERNEL_IPQ_MEM_PROFILE),512) echo 'net.netfilter.nf_conntrack_max=8192' >> $(1)/etc/sysctl.d/qca-nss-ecm.conf +endif endef -EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include/qca-nss-drv +define KernelPackage/qca-nss-ecm-standard + $(call KernelPackage/qca-nss-ecm/Default) + VARIANT:=standard +endef -ifneq (, $(findstring $(CONFIG_TARGET_BOARD), "ipq807x" "ipq60xx")) -ECM_MAKE_OPTS+= ECM_FRONT_END_NSS_ENABLE=y \ - ECM_CLASSIFIER_HYFI_ENABLE=n \ - ECM_MULTICAST_ENABLE=n \ - ECM_INTERFACE_IPSEC_ENABLE=n \ - ECM_INTERFACE_PPTP_ENABLE=n \ - ECM_INTERFACE_L2TPV2_ENABLE=n \ - ECM_INTERFACE_GRE_TAP_ENABLE=n \ - ECM_INTERFACE_GRE_TUN_ENABLE=n \ - ECM_INTERFACE_SIT_ENABLE=n \ - ECM_INTERFACE_TUNIPIP6_ENABLE=n \ - ECM_INTERFACE_RAWIP_ENABLE=n \ - ECM_INTERFACE_VLAN_ENABLE=n \ - ECM_CLASSIFIER_MARK_ENABLE=n \ - ECM_CLASSIFIER_DSCP_ENABLE=n \ - ECM_CLASSIFIER_PCC_ENABLE=n \ - ECM_BAND_STEERING_ENABLE=n \ - ECM_INTERFACE_PPPOE_ENABLE=y +define KernelPackage/qca-nss-ecm-standard/Description + $(call KernelPackage/qca-nss-ecm/Description/Default) +endef + +define KernelPackage/qca-nss-ecm-standard/install +$(call KernelPackage/qca-nss-ecm/Default/install, $(1)) +endef + +# Variant with additional features enabled for premium profile +define KernelPackage/qca-nss-ecm-premium/Default +$(call KernelPackage/qca-nss-ecm/Default) + TITLE+= (with premium features) + VARIANT:=premium + DEPENDS+=+kmod-nat46 \ + +kmod-l2tp +kmod-pppol2tp +kmod-pptp \ + +kmod-bonding +endef + +define KernelPackage/qca-nss-ecm-premium/Description/Default +$(call KernelPackage/qca-nss-ecm/Description/Default) +with the premium features enabled +endef + +define KernelPackage/qca-nss-ecm-premium/Default/install +$(call KernelPackage/qca-nss-ecm/install) +endef + +define KernelPackage/qca-nss-ecm-premium +$(call KernelPackage/qca-nss-ecm-premium/Default) +endef + +define KernelPackage/qca-nss-ecm-premium/Description +$(call KernelPackage/qca-nss-ecm-premium/Description/Default) +endef + +define KernelPackage/qca-nss-ecm-premium/install +$(call KernelPackage/qca-nss-ecm-standard/install, $(1)) +endef + +# Variant with additional features enabled for noload profile +define KernelPackage/qca-nss-ecm-noload + $(call KernelPackage/qca-nss-ecm/Default) + TITLE+= (with noload features) + PROVIDES:=kmod-qca-nss-ecm + VARIANT:=noload + DEPENDS+=+kmod-l2tp +kmod-pppol2tp +kmod-pptp \ + +kmod-bonding +endef + +define KernelPackage/qca-nss-ecm-noload/Description + $(call KernelPackage/qca-nss-ecm/Description/Default) + When selected, this package installs the driver but does not load it at init. +endef + +define KernelPackage/qca-nss-ecm-noload/install +$(call KernelPackage/qca-nss-ecm/Default/install, $(1)) + # + # Remove the START line from the init script, so that the symlink + # in the /etc/rc.d directory is not created. + # + sed -i '/START=/d' $(1)/etc/init.d/qca-nss-ecm +endef + +define KernelPackage/qca-nss-ecm-premium-noload + $(call KernelPackage/qca-nss-ecm-premium/Default) + PROVIDES:=kmod-qca-nss-ecm-premium +endef + +define KernelPackage/qca-nss-ecm-premium-noload/Description + $(call KernelPackage/qca-nss-ecm-premium/Description/Default) + When selected, this package installs the driver but does not load it at init. +endef + +define KernelPackage/qca-nss-ecm-premium-noload/install +$(call KernelPackage/qca-nss-ecm-premium/Default/install, $(1)) +endef + +define Build/InstallDev/qca-nss-ecm + $(INSTALL_DIR) $(1)/usr/include/qca-nss-ecm + $(CP) $(PKG_BUILD_DIR)/exports/* $(1)/usr/include/qca-nss-ecm/ +endef + +define Build/InstallDev + $(call Build/InstallDev/qca-nss-ecm,$(1)) +endef + +EXTRA_CFLAGS+= \ + -I$(STAGING_DIR)/usr/include/hyfibr \ + -I$(STAGING_DIR)/usr/include/qca-mcs \ + -I$(STAGING_DIR)/usr/include/qca-nss-drv \ + -I$(STAGING_DIR)/usr/include/shortcut-fe \ + -I$(STAGING_DIR)/usr/include/nat46 + +ECM_MAKE_OPTS:=ECM_CLASSIFIER_HYFI_ENABLE=y +ifneq ($(LOCAL_VARIANT),standard) +ECM_MAKE_OPTS+=ECM_MULTICAST_ENABLE=y \ + ECM_INTERFACE_IPSEC_ENABLE=y \ + # ECM_INTERFACE_PPTP_ENABLE=y \ + ECM_INTERFACE_L2TPV2_ENABLE=y \ + ECM_INTERFACE_GRE_TAP_ENABLE=y \ + ECM_INTERFACE_GRE_TUN_ENABLE=y \ + ECM_INTERFACE_SIT_ENABLE=y \ + ECM_INTERFACE_TUNIPIP6_ENABLE=y \ + ECM_INTERFACE_RAWIP_ENABLE=y + +ifeq ($(CONFIG_TARGET_ipq_ipq40xx)$(CONFIG_TARGET_ipq40xx),) +ECM_MAKE_OPTS+=ECM_INTERFACE_BOND_ENABLE=y +endif endif -ifeq ($(CONFIG_TARGET_BOARD), "ipq807x") - SOC="ipq807x_64" -else ifeq ($(CONFIG_TARGET_BOARD), "ipq60xx") - SOC="ipq60xx_64" +ifeq ($(filter $(CONFIG_KERNEL_IPQ_MEM_PROFILE), 256),) +ECM_MAKE_OPTS+=ECM_XFRM_ENABLE=y +endif + +# ifneq ($(CONFIG_PACKAGE_kmod-nat46),) +# ECM_MAKE_OPTS+=ECM_INTERFACE_MAP_T_ENABLE=y +# endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-ovpn-link),) +ECM_MAKE_OPTS+=ECM_INTERFACE_OVPN_ENABLE=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-vxlanmgr),) +ECM_MAKE_OPTS+=ECM_INTERFACE_VXLAN_ENABLE=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-ovsmgr),) +ECM_MAKE_OPTS+=ECM_INTERFACE_OVS_BRIDGE_ENABLE=y \ + ECM_CLASSIFIER_OVS_ENABLE=y +EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/qca-ovsmgr +endif + +# Keeping default as ipq806x for branches that does not have subtarget framework +ifeq ($(CONFIG_TARGET_ipq),y) +subtarget:=$(SUBTARGET) +else +subtarget:=$(CONFIG_TARGET_BOARD) endif define Build/InstallDev - mkdir -p $(1)/usr/include/qca-nss-ecm + $(INSTALL_DIR) $(1)/usr/include/qca-nss-ecm $(CP) $(PKG_BUILD_DIR)/exports/* $(1)/usr/include/qca-nss-ecm endef define Build/Compile - +$(MAKE) -C "$(LINUX_DIR)" $(strip $(ECM_MAKE_OPTS)) \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - ARCH="$(LINUX_KARCH)" \ - M="$(PKG_BUILD_DIR)" \ - EXTRA_CFLAGS="$(EXTRA_CFLAGS)" SoC=$(SOC) \ + $(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" $(strip $(ECM_MAKE_OPTS)) \ $(KERNEL_MAKE_FLAGS) \ - $(PKG_JOBS) \ + $(PKG_MAKE_FLAGS) \ + M="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS)" SoC="$(subtarget)" \ + EXAMPLES_BUILD_PCC="$(CONFIG_QCA_NSS_ECM_EXAMPLES_PCC)" \ + EXAMPLES_BUILD_MARK="$(CONFIG_QCA_NSS_ECM_EXAMPLES_MARK)" \ + EXAMPLES_BUILD_OVS="$(CONFIG_QCA_NSS_ECM_OVS)" \ + ECM_FRONT_END_SFE_ENABLE="$(CONFIG_QCA_ECM_SFE_SUPPORT)" \ modules endef -$(eval $(call KernelPackage,qca-nss-ecm)) +define KernelPackage/qca-nss-ecm-premium/config +menu "ECM Configuration" + config QCA_NSS_ECM_EXAMPLES_PCC + bool "Build PCC usage example" + help + Selecting this will build the PCC classifier usage example module. + default n + + config QCA_NSS_ECM_EXAMPLES_MARK + bool "Build Mark classifier usage example" + help + Selecting this will build the Mark classifier usage example module. + default n + + config QCA_NSS_ECM_OVS + bool "Build OVS classifier external module" + help + Selecting this will build the OVS classifier external module. + default n + + config QCA_ECM_SFE_SUPPORT + bool "Add SFE support to ECM driver" + default n +endmenu +endef + +$(eval $(call KernelPackage,qca-nss-ecm-noload)) +$(eval $(call KernelPackage,qca-nss-ecm-standard)) +$(eval $(call KernelPackage,qca-nss-ecm-premium-noload)) +$(eval $(call KernelPackage,qca-nss-ecm-premium)) diff --git a/package/nss/qca/qca-nss-ecm/files/ecm_dump.sh b/package/nss/qca/qca-nss-ecm/files/ecm_dump.sh old mode 100755 new mode 100644 diff --git a/package/nss/qca/qca-nss-ecm/files/qca-nss-ecm.init b/package/nss/qca/qca-nss-ecm/files/qca-nss-ecm.init index 7afb679f1..9b43fdb09 100644 --- a/package/nss/qca/qca-nss-ecm/files/qca-nss-ecm.init +++ b/package/nss/qca/qca-nss-ecm/files/qca-nss-ecm.init @@ -1,6 +1,6 @@ #!/bin/sh /etc/rc.common # -# Copyright (c) 2014, 2019-2020 The Linux Foundation. All rights reserved. +# Copyright (c) 2014, 2019 The Linux Foundation. All rights reserved. # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -47,19 +47,9 @@ support_bridge() { } load_sfe() { - local kernel_version=$(uname -r) - - [ -e "/lib/modules/$kernel_version/shortcut-fe.ko" ] && { - [ -d /sys/module/shortcut_fe ] || insmod shortcut-fe - } - - [ -e "/lib/modules/$kernel_version/shortcut-fe-ipv6.ko" ] && { - [ -d /sys/module/shortcut_fe_ipv6 ] || insmod shortcut-fe-ipv6 - } - - [ -e "/lib/modules/$kernel_version/shortcut-fe-drv.ko" ] && { - [ -d /sys/module/shortcut_fe_drv ] || insmod shortcut-fe-drv - } + [ -d /sys/module/shortcut_fe ] || insmod shortcut-fe + [ -d /sys/module/shortcut_fe_ipv6 ] || insmod shortcut-fe-ipv6 + [ -d /sys/module/shortcut_fe_drv ] || insmod shortcut-fe-drv } load_ecm() { @@ -97,13 +87,6 @@ unload_ecm() { } start() { - # If SFE CM is loaded, return. - if [ -d /sys/module/shortcut_fe_cm ]; then - echo "shortcut_fe CM is loaded, unload it first" - echo "cmd: /etc/init.d/shortcut_fe stop" - return - fi - load_ecm # If the acceleration engine is NSS, enable wifi redirect. @@ -121,11 +104,6 @@ start() { } stop() { - # If ECM is already not loaded, just return. - if [ ! -d /sys/module/ecm ]; then - return - fi - # If the acceleration engine is NSS, disable wifi redirect. [ -d /sys/kernel/debug/ecm/ecm_nss_ipv4 ] && sysctl -w dev.nss.general.redirect=0 diff --git a/package/nss/qca/qca-nss-ecm/patches/001-Drop_SFE_from_ecm.patch b/package/nss/qca/qca-nss-ecm/patches/001-Drop_SFE_from_ecm.patch new file mode 100644 index 000000000..b1cd2b7b1 --- /dev/null +++ b/package/nss/qca/qca-nss-ecm/patches/001-Drop_SFE_from_ecm.patch @@ -0,0 +1,12 @@ +--- a/Makefile ++++ b/Makefile +@@ -66,8 +66,7 @@ endif + # Define ECM_FRONT_END_SFE_ENABLE=y in order to select + # sfe as ECM's front end. + # ############################################################################# +-ifeq ($(SoC),$(filter $(SoC),ipq806x ipq40xx)) +-ECM_FRONT_END_SFE_ENABLE=y ++ifeq ($(ECM_FRONT_END_SFE_ENABLE), y) + ecm-$(ECM_FRONT_END_SFE_ENABLE) += frontends/sfe/ecm_sfe_ipv4.o + ecm-$(ECM_FRONT_END_SFE_ENABLE) += frontends/sfe/ecm_sfe_ported_ipv4.o + ccflags-$(ECM_FRONT_END_SFE_ENABLE) += -DECM_FRONT_END_SFE_ENABLE diff --git a/package/nss/qca/qca-nss-ecm/patches/001-treewide-componentize-the-module-even-more.patch b/package/nss/qca/qca-nss-ecm/patches/001-treewide-componentize-the-module-even-more.patch deleted file mode 100644 index 4e7932c9d..000000000 --- a/package/nss/qca/qca-nss-ecm/patches/001-treewide-componentize-the-module-even-more.patch +++ /dev/null @@ -1,335 +0,0 @@ -From 73345c87b28a473b35b57e673f8de963c3d73da1 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Wed, 19 May 2021 02:38:53 +0200 -Subject: [PATCH] treewide: componentize the module even more - -Signed-off-by: Ansuel Smith ---- - Makefile | 56 +++++++++++++++++++++++++------- - ecm_db/ecm_db_connection.c | 8 +++++ - ecm_db/ecm_db_node.c | 4 +++ - ecm_interface.c | 8 +++++ - frontends/ecm_front_end_common.c | 7 ++++ - 5 files changed, 72 insertions(+), 11 deletions(-) - ---- a/Makefile -+++ b/Makefile -@@ -82,10 +82,18 @@ ccflags-$(ECM_INTERFACE_BOND_ENABLE) += - # Define ECM_INTERFACE_PPPOE_ENABLE=y in order - # to enable support for PPPoE acceleration. - # ############################################################################# --ECM_INTERFACE_PPPOE_ENABLE=y -+ifndef $(ECM_INTERFACE_PPPOE_ENABLE) -+ ECM_INTERFACE_PPPOE_ENABLE=y -+endif - ccflags-$(ECM_INTERFACE_PPPOE_ENABLE) += -DECM_INTERFACE_PPPOE_ENABLE - - # ############################################################################# -+# Define ECM_INTERFACE_L2TPV2_PPTP_ENABLE=y in order -+# to enable support for l2tpv2 or PPTP detection. -+# ############################################################################# -+ccflags-$(ECM_INTERFACE_L2TPV2_PPTP_ENABLE) += -DECM_INTERFACE_L2TPV2_PPTP_ENABLE -+ -+# ############################################################################# - # Define ECM_INTERFACE_L2TPV2_ENABLE=y in order - # to enable support for l2tpv2 acceleration. - # ############################################################################# -@@ -118,6 +126,12 @@ ccflags-$(ECM_INTERFACE_PPP_ENABLE) += - - ccflags-$(ECM_INTERFACE_MAP_T_ENABLE) += -DECM_INTERFACE_MAP_T_ENABLE - - # ############################################################################# -+# Define ECM_INTERFACE_GRE_ENABLE=y in order -+# to enable support for GRE detection. -+# ############################################################################# -+ccflags-$(ECM_INTERFACE_GRE_ENABLE) += -DECM_INTERFACE_GRE_ENABLE -+ -+# ############################################################################# - # Define ECM_INTERFACE_GRE_TAP_ENABLE=y in order - # to enable support for GRE TAP interface. - # ############################################################################# -@@ -186,7 +200,9 @@ ccflags-$(ECM_INTERFACE_OVS_BRIDGE_ENABL - # ############################################################################# - # Define ECM_INTERFACE_VLAN_ENABLE=y in order to enable support for VLAN - # ############################################################################# --ECM_INTERFACE_VLAN_ENABLE=y -+ifndef $(ECM_INTERFACE_VLAN_ENABLE) -+ ECM_INTERFACE_VLAN_ENABLE=y -+endif - ccflags-$(ECM_INTERFACE_VLAN_ENABLE) += -DECM_INTERFACE_VLAN_ENABLE - - # ############################################################################# -@@ -228,7 +244,9 @@ ccflags-$(ECM_CLASSIFIER_OVS_ENABLE) += - # ############################################################################# - # Define ECM_CLASSIFIER_MARK_ENABLE=y in order to enable mark classifier. - # ############################################################################# --ECM_CLASSIFIER_MARK_ENABLE=y -+ifndef $(ECM_CLASSIFIER_MARK_ENABLE) -+ ECM_CLASSIFIER_MARK_ENABLE=y -+endif - ecm-$(ECM_CLASSIFIER_MARK_ENABLE) += ecm_classifier_mark.o - ccflags-$(ECM_CLASSIFIER_MARK_ENABLE) += -DECM_CLASSIFIER_MARK_ENABLE - -@@ -247,7 +265,9 @@ ccflags-$(ECM_CLASSIFIER_NL_ENABLE) += - - # ############################################################################# - # Define ECM_CLASSIFIER_DSCP_ENABLE=y in order to enable DSCP classifier. - # ############################################################################# --ECM_CLASSIFIER_DSCP_ENABLE=y -+ifndef $(ECM_CLASSIFIER_DSCP_ENABLE) -+ ECM_CLASSIFIER_DSCP_ENABLE=y -+endif - ecm-$(ECM_CLASSIFIER_DSCP_ENABLE) += ecm_classifier_dscp.o - ccflags-$(ECM_CLASSIFIER_DSCP_ENABLE) += -DECM_CLASSIFIER_DSCP_ENABLE - ccflags-$(ECM_CLASSIFIER_DSCP_IGS) += -DECM_CLASSIFIER_DSCP_IGS -@@ -274,7 +294,9 @@ endif - # the Parental Controls subsystem classifier in ECM. Currently disabled until - # customers require it / if they need to integrate their Parental Controls with it. - # ############################################################################# --ECM_CLASSIFIER_PCC_ENABLE=y -+ifndef $(ECM_CLASSIFIER_PCC_ENABLE) -+ ECM_CLASSIFIER_PCC_ENABLE=y -+endif - ecm-$(ECM_CLASSIFIER_PCC_ENABLE) += ecm_classifier_pcc.o - ccflags-$(ECM_CLASSIFIER_PCC_ENABLE) += -DECM_CLASSIFIER_PCC_ENABLE - -@@ -301,28 +323,36 @@ ccflags-$(ECM_NON_PORTED_SUPPORT_ENABLE) - # ############################################################################# - # Define ECM_STATE_OUTPUT_ENABLE=y to support XML state output - # ############################################################################# --ECM_STATE_OUTPUT_ENABLE=y -+ifndef $(ECM_STATE_OUTPUT_ENABLE) -+ ECM_STATE_OUTPUT_ENABLE=y -+endif - ecm-$(ECM_STATE_OUTPUT_ENABLE) += ecm_state.o - ccflags-$(ECM_STATE_OUTPUT_ENABLE) += -DECM_STATE_OUTPUT_ENABLE - - # ############################################################################# - # Define ECM_DB_ADVANCED_STATS_ENABLE to support XML state output - # ############################################################################# --ECM_DB_ADVANCED_STATS_ENABLE=y -+ifndef $(ECM_DB_ADVANCED_STATS_ENABLE) -+ ECM_DB_ADVANCED_STATS_ENABLE=y -+endif - ccflags-$(ECM_DB_ADVANCED_STATS_ENABLE) += -DECM_DB_ADVANCED_STATS_ENABLE - - # ############################################################################# - # Define ECM_DB_CONNECTION_CROSS_REFERENCING_ENABLE=y in order to enable - # the database to track relationships between objects. - # ############################################################################# --ECM_DB_CONNECTION_CROSS_REFERENCING_ENABLE=y -+ifndef $(ECM_DB_CONNECTION_CROSS_REFERENCING_ENABLE) -+ ECM_DB_CONNECTION_CROSS_REFERENCING_ENABLE=y -+endif - ccflags-$(ECM_DB_CONNECTION_CROSS_REFERENCING_ENABLE) += -DECM_DB_XREF_ENABLE - - # ############################################################################# - # Define ECM_TRACKER_DPI_SUPPORT_ENABLE=y in order to enable support for - # deep packet inspection and tracking of data with the trackers. - # ############################################################################# --ECM_TRACKER_DPI_SUPPORT_ENABLE=y -+ifndef $(ECM_TRACKER_DPI_SUPPORT_ENABLE) -+ ECM_TRACKER_DPI_SUPPORT_ENABLE=y -+endif - ccflags-$(ECM_TRACKER_DPI_SUPPORT_ENABLE) += -DECM_TRACKER_DPI_SUPPORT_ENABLE - - # ############################################################################# -@@ -330,14 +360,18 @@ ccflags-$(ECM_TRACKER_DPI_SUPPORT_ENABLE - # support for the database keeping lists of connections that are assigned - # on a per TYPE of classifier basis. - # ############################################################################# --ECM_DB_CLASSIFIER_TYPE_ASSIGNMENTS_TRACK_ENABLE=y -+ifndef $(ECM_DB_CLASSIFIER_TYPE_ASSIGNMENTS_TRACK_ENABLE) -+ ECM_DB_CLASSIFIER_TYPE_ASSIGNMENTS_TRACK_ENABLE=y -+endif - ccflags-$(ECM_DB_CLASSIFIER_TYPE_ASSIGNMENTS_TRACK_ENABLE) += -DECM_DB_CTA_TRACK_ENABLE - - # ############################################################################# - # Define ECM_BAND_STEERING_ENABLE=y in order to enable - # band steering feature. - # ############################################################################# --ECM_BAND_STEERING_ENABLE=y -+ifndef $(ECM_BAND_STEERING_ENABLE) -+ ECM_BAND_STEERING_ENABLE=y -+endif - ccflags-$(ECM_BAND_STEERING_ENABLE) += -DECM_BAND_STEERING_ENABLE - - # ############################################################################# ---- a/ecm_db/ecm_db_connection.c -+++ b/ecm_db/ecm_db_connection.c -@@ -430,7 +430,9 @@ EXPORT_SYMBOL(ecm_db_connection_make_def - */ - void ecm_db_connection_data_totals_update(struct ecm_db_connection_instance *ci, bool is_from, uint64_t size, uint64_t packets) - { -+#ifdef ECM_DB_ADVANCED_STATS_ENABLE - int32_t i; -+#endif - - DEBUG_CHECK_MAGIC(ci, ECM_DB_CONNECTION_INSTANCE_MAGIC, "%px: magic failed\n", ci); - -@@ -529,7 +531,9 @@ EXPORT_SYMBOL(ecm_db_connection_data_tot - */ - void ecm_db_connection_data_totals_update_dropped(struct ecm_db_connection_instance *ci, bool is_from, uint64_t size, uint64_t packets) - { -+#ifdef ECM_DB_ADVANCED_STATS_ENABLE - int32_t i; -+#endif - - DEBUG_CHECK_MAGIC(ci, ECM_DB_CONNECTION_INSTANCE_MAGIC, "%px: magic failed\n", ci); - -@@ -1508,6 +1512,7 @@ void ecm_db_connection_defunct_all(void) - } - EXPORT_SYMBOL(ecm_db_connection_defunct_all); - -+#ifdef ECM_INTERFACE_OVS_BRIDGE_ENABLE - /* - * ecm_db_connection_defunct_by_classifier() - * Make defunct based on masked fields -@@ -1667,6 +1672,7 @@ next_ci: - ECM_IP_ADDR_TO_OCTAL(dest_addr_mask), dest_port_mask, proto_mask, cnt); - } - } -+#endif - - /* - * ecm_db_connection_defunct_by_port() -@@ -1956,6 +1962,7 @@ struct ecm_db_node_instance *ecm_db_conn - } - EXPORT_SYMBOL(ecm_db_connection_node_get_and_ref); - -+#ifdef ECM_DB_XREF_ENABLE - /* - * ecm_db_connection_mapping_get_and_ref_next() - * Return reference to next connection in the mapping chain in the specified direction. -@@ -1997,6 +2004,7 @@ struct ecm_db_connection_instance *ecm_d - return nci; - } - EXPORT_SYMBOL(ecm_db_connection_iface_get_and_ref_next); -+#endif - - /* - * ecm_db_connection_mapping_get_and_ref() ---- a/ecm_db/ecm_db_node.c -+++ b/ecm_db/ecm_db_node.c -@@ -224,9 +224,11 @@ EXPORT_SYMBOL(ecm_db_node_get_and_ref_ne - */ - int ecm_db_node_deref(struct ecm_db_node_instance *ni) - { -+#ifdef ECM_DB_XREF_ENABLE - #if (DEBUG_LEVEL >= 1) - int dir; - #endif -+#endif - DEBUG_CHECK_MAGIC(ni, ECM_DB_NODE_INSTANCE_MAGIC, "%px: magic failed\n", ni); - - spin_lock_bh(&ecm_db_lock); -@@ -486,9 +488,11 @@ EXPORT_SYMBOL(ecm_db_node_iface_get_and_ - void ecm_db_node_add(struct ecm_db_node_instance *ni, struct ecm_db_iface_instance *ii, uint8_t *address, - ecm_db_node_final_callback_t final, void *arg) - { -+#ifdef ECM_DB_XREF_ENABLE - #if (DEBUG_LEVEL >= 1) - int dir; - #endif -+#endif - ecm_db_node_hash_t hash_index; - struct ecm_db_listener_instance *li; - ---- a/ecm_interface.c -+++ b/ecm_interface.c -@@ -1343,6 +1343,7 @@ struct neighbour *ecm_interface_ipv6_nei - */ - bool ecm_interface_is_pptp(struct sk_buff *skb, const struct net_device *out) - { -+#ifdef ECM_INTERFACE_PPTP_ENABLE - struct net_device *in; - - /* -@@ -1367,6 +1368,7 @@ bool ecm_interface_is_pptp(struct sk_buf - } - - dev_put(in); -+#endif - return false; - } - -@@ -1379,6 +1381,7 @@ bool ecm_interface_is_pptp(struct sk_buf - */ - bool ecm_interface_is_l2tp_packet_by_version(struct sk_buff *skb, const struct net_device *out, int ver) - { -+#ifdef ECM_INTERFACE_L2TPV2_PPTP_ENABLE - uint32_t flag = 0; - struct net_device *in; - -@@ -1411,6 +1414,7 @@ bool ecm_interface_is_l2tp_packet_by_ver - } - - dev_put(in); -+#endif - return false; - } - -@@ -1423,6 +1427,7 @@ bool ecm_interface_is_l2tp_packet_by_ver - */ - bool ecm_interface_is_l2tp_pptp(struct sk_buff *skb, const struct net_device *out) - { -+#ifdef ECM_INTERFACE_L2TPV2_PPTP_ENABLE - struct net_device *in; - - /* -@@ -1445,6 +1450,7 @@ bool ecm_interface_is_l2tp_pptp(struct s - } - - dev_put(in); -+#endif - return false; - } - -@@ -6630,6 +6636,7 @@ static void ecm_interface_regenerate_con - return; - } - -+#ifdef ECM_DB_XREF_ENABLE - for (dir = 0; dir < ECM_DB_OBJ_DIR_MAX; dir++) { - /* - * Re-generate all connections associated with this interface -@@ -6645,6 +6652,7 @@ static void ecm_interface_regenerate_con - ci[dir] = cin; - } - } -+#endif - - #ifdef ECM_MULTICAST_ENABLE - /* ---- a/frontends/ecm_front_end_common.c -+++ b/frontends/ecm_front_end_common.c -@@ -106,6 +106,7 @@ bool ecm_front_end_gre_proto_is_accel_al - struct nf_conntrack_tuple *tuple, - int ip_version) - { -+#ifdef ECM_INTERFACE_GRE_ENABLE - struct net_device *dev; - struct gre_base_hdr *greh; - -@@ -117,10 +118,12 @@ bool ecm_front_end_gre_proto_is_accel_al - /* - * Case 1: PPTP locally terminated - */ -+#ifdef ECM_INTERFACE_PPTP_ENABLE - if (ecm_interface_is_pptp(skb, outdev)) { - DEBUG_TRACE("%px: PPTP GRE locally terminated - allow acceleration\n", skb); - return true; - } -+#endif - - /* - * Case 2: PPTP pass through -@@ -223,6 +226,10 @@ bool ecm_front_end_gre_proto_is_accel_al - */ - DEBUG_TRACE("%px: GRE IPv%d pass through - allow acceleration\n", skb, ip_version); - return true; -+#else -+ DEBUG_TRACE("%px: GRE%d feature is disabled - do not allow acceleration\n", skb, ip_version); -+ return false; -+#endif - } - - #ifdef ECM_CLASSIFIER_DSCP_ENABLE diff --git a/package/nss/qca/qca-nss-ecm/patches/100-kernel-5.10-support.patch b/package/nss/qca/qca-nss-ecm/patches/100-kernel-5.10-support.patch deleted file mode 100644 index 107b9571b..000000000 --- a/package/nss/qca/qca-nss-ecm/patches/100-kernel-5.10-support.patch +++ /dev/null @@ -1,831 +0,0 @@ -From e8b642c23af9146c973e828a7f4e0fb56cfc8d0b Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Sat, 15 May 2021 03:51:14 +0200 -Subject: [PATCH] add support for kernel 5.10 - -Signed-off-by: Ansuel Smith ---- - ecm_classifier_default.c | 24 +++--------- - ecm_classifier_dscp.c | 8 +--- - ecm_classifier_emesh.c | 16 ++------ - ecm_classifier_hyfi.c | 7 +--- - ecm_classifier_mark.c | 8 +--- - ecm_classifier_ovs.c | 8 +--- - ecm_classifier_pcc.c | 8 +--- - ecm_conntrack_notifier.c | 8 +--- - ecm_db/ecm_db_connection.c | 7 +--- - ecm_db/ecm_db_host.c | 7 +--- - ecm_db/ecm_db_iface.c | 7 +--- - ecm_db/ecm_db_mapping.c | 7 +--- - ecm_db/ecm_db_node.c | 7 +--- - ecm_interface.c | 4 +- - ecm_state.c | 14 ++----- - frontends/ecm_front_end_common.c | 4 +- - frontends/ecm_front_end_ipv4.c | 7 +--- - frontends/ecm_front_end_ipv6.c | 7 +--- - frontends/nss/ecm_nss_bond_notifier.c | 8 +--- - frontends/nss/ecm_nss_ipv4.c | 49 +++++++------------------ - frontends/nss/ecm_nss_ipv6.c | 49 +++++++------------------ - frontends/nss/ecm_nss_multicast_ipv4.c | 7 +--- - frontends/nss/ecm_nss_multicast_ipv6.c | 7 +--- - frontends/nss/ecm_nss_non_ported_ipv4.c | 7 +--- - frontends/nss/ecm_nss_non_ported_ipv6.c | 7 +--- - frontends/nss/ecm_nss_ported_ipv4.c | 8 +--- - frontends/nss/ecm_nss_ported_ipv6.c | 8 +--- - frontends/sfe/ecm_sfe_ipv4.c | 49 +++++++------------------ - frontends/sfe/ecm_sfe_ipv6.c | 49 +++++++------------------ - frontends/sfe/ecm_sfe_non_ported_ipv4.c | 7 +--- - frontends/sfe/ecm_sfe_non_ported_ipv6.c | 7 +--- - frontends/sfe/ecm_sfe_ported_ipv4.c | 8 +--- - frontends/sfe/ecm_sfe_ported_ipv6.c | 8 +--- - 33 files changed, 122 insertions(+), 314 deletions(-) - ---- a/ecm_classifier_default.c -+++ b/ecm_classifier_default.c -@@ -776,26 +776,14 @@ int ecm_classifier_default_init(struct d - return -1; - } - -- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry, -- (u32 *)&ecm_classifier_default_enabled)) { -- DEBUG_ERROR("Failed to create ecm deafult classifier enabled file in debugfs\n"); -- debugfs_remove_recursive(ecm_classifier_default_dentry); -- return -1; -- } -+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry, -+ (u32 *)&ecm_classifier_default_enabled); - -- if (!debugfs_create_u32("accel_mode", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry, -- (u32 *)&ecm_classifier_default_accel_mode)) { -- DEBUG_ERROR("Failed to create ecm deafult classifier accel_mode file in debugfs\n"); -- debugfs_remove_recursive(ecm_classifier_default_dentry); -- return -1; -- } -+ debugfs_create_u32("accel_mode", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry, -+ (u32 *)&ecm_classifier_default_accel_mode); - -- if (!debugfs_create_u32("accel_delay_pkts", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry, -- (u32 *)&ecm_classifier_accel_delay_pkts)) { -- DEBUG_ERROR("Failed to create accel delay packet counts in debugfs\n"); -- debugfs_remove_recursive(ecm_classifier_default_dentry); -- return -1; -- } -+ debugfs_create_u32("accel_delay_pkts", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry, -+ (u32 *)&ecm_classifier_accel_delay_pkts); - - return 0; - } ---- a/ecm_classifier_dscp.c -+++ b/ecm_classifier_dscp.c -@@ -747,12 +747,8 @@ int ecm_classifier_dscp_init(struct dent - return -1; - } - -- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_dscp_dentry, -- (u32 *)&ecm_classifier_dscp_enabled)) { -- DEBUG_ERROR("Failed to create dscp enabled file in debugfs\n"); -- debugfs_remove_recursive(ecm_classifier_dscp_dentry); -- return -1; -- } -+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_dscp_dentry, -+ (u32 *)&ecm_classifier_dscp_enabled); - - return 0; - } ---- a/ecm_classifier_emesh.c -+++ b/ecm_classifier_emesh.c -@@ -977,19 +977,11 @@ int ecm_classifier_emesh_init(struct den - return -1; - } - -- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_dentry, -- (u32 *)&ecm_classifier_emesh_enabled)) { -- DEBUG_ERROR("Failed to create ecm emesh classifier enabled file in debugfs\n"); -- debugfs_remove_recursive(ecm_classifier_emesh_dentry); -- return -1; -- } -+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_dentry, -+ (u32 *)&ecm_classifier_emesh_enabled); - -- if (!debugfs_create_u32("latency_config_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_dentry, -- (u32 *)&ecm_classifier_emesh_latency_config_enabled)) { -- DEBUG_ERROR("Failed to create ecm emesh classifier latency config enabled file in debugfs\n"); -- debugfs_remove_recursive(ecm_classifier_emesh_dentry); -- return -1; -- } -+ debugfs_create_u32("latency_config_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_dentry, -+ (u32 *)&ecm_classifier_emesh_latency_config_enabled); - - /* - * Register for service prioritization notification update. ---- a/ecm_classifier_hyfi.c -+++ b/ecm_classifier_hyfi.c -@@ -1099,11 +1099,8 @@ int ecm_classifier_hyfi_rules_init(struc - goto classifier_task_cleanup; - } - -- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_hyfi_dentry, -- (u32 *)&ecm_classifier_hyfi_enabled)) { -- DEBUG_ERROR("Failed to create ecm hyfi classifier enabled file in debugfs\n"); -- goto classifier_task_cleanup; -- } -+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_hyfi_dentry, -+ (u32 *)&ecm_classifier_hyfi_enabled); - - if (!debugfs_create_file("cmd", S_IWUSR, ecm_classifier_hyfi_dentry, - NULL, &ecm_classifier_hyfi_cmd_fops)) { ---- a/ecm_classifier_mark.c -+++ b/ecm_classifier_mark.c -@@ -753,12 +753,8 @@ int ecm_classifier_mark_init(struct dent - return -1; - } - -- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_mark_dentry, -- (u32 *)&ecm_classifier_mark_enabled)) { -- DEBUG_ERROR("Failed to create mark enabled file in debugfs\n"); -- debugfs_remove_recursive(ecm_classifier_mark_dentry); -- return -1; -- } -+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_mark_dentry, -+ (u32 *)&ecm_classifier_mark_enabled); - - return 0; - } ---- a/ecm_classifier_ovs.c -+++ b/ecm_classifier_ovs.c -@@ -2200,12 +2200,8 @@ int ecm_classifier_ovs_init(struct dentr - return -1; - } - -- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_ovs_dentry, -- (u32 *)&ecm_classifier_ovs_enabled)) { -- DEBUG_ERROR("Failed to create ovs enabled file in debugfs\n"); -- debugfs_remove_recursive(ecm_classifier_ovs_dentry); -- return -1; -- } -+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_ovs_dentry, -+ (u32 *)&ecm_classifier_ovs_enabled); - - return 0; - } ---- a/ecm_classifier_pcc.c -+++ b/ecm_classifier_pcc.c -@@ -1308,12 +1308,8 @@ int ecm_classifier_pcc_init(struct dentr - return -1; - } - -- if (!debugfs_create_u32("enabled", S_IRUGO, ecm_classifier_pcc_dentry, -- (u32 *)&ecm_classifier_pcc_enabled)) { -- DEBUG_ERROR("Failed to create pcc enabled file in debugfs\n"); -- debugfs_remove_recursive(ecm_classifier_pcc_dentry); -- return -1; -- } -+ debugfs_create_u32("enabled", S_IRUGO, ecm_classifier_pcc_dentry, -+ (u32 *)&ecm_classifier_pcc_enabled); - - return 0; - } ---- a/ecm_conntrack_notifier.c -+++ b/ecm_conntrack_notifier.c -@@ -414,12 +414,8 @@ int ecm_conntrack_notifier_init(struct d - return -1; - } - -- if (!debugfs_create_u32("stop", S_IRUGO | S_IWUSR, ecm_conntrack_notifier_dentry, -- (u32 *)&ecm_conntrack_notifier_stopped)) { -- DEBUG_ERROR("Failed to create ecm conntrack notifier stopped file in debugfs\n"); -- debugfs_remove_recursive(ecm_conntrack_notifier_dentry); -- return -1; -- } -+ debugfs_create_u32("stop", S_IRUGO | S_IWUSR, ecm_conntrack_notifier_dentry, -+ (u32 *)&ecm_conntrack_notifier_stopped); - - #ifdef CONFIG_NF_CONNTRACK_EVENTS - /* ---- a/ecm_db/ecm_db_connection.c -+++ b/ecm_db/ecm_db_connection.c -@@ -3642,11 +3642,8 @@ static struct file_operations ecm_db_con - */ - bool ecm_db_connection_init(struct dentry *dentry) - { -- if (!debugfs_create_u32("connection_count", S_IRUGO, dentry, -- (u32 *)&ecm_db_connection_count)) { -- DEBUG_ERROR("Failed to create ecm db connection count file in debugfs\n"); -- return false; -- } -+ debugfs_create_u32("connection_count", S_IRUGO, dentry, -+ (u32 *)&ecm_db_connection_count); - - if (!debugfs_create_file("connection_count_simple", S_IRUGO, dentry, - NULL, &ecm_db_connection_count_simple_fops)) { ---- a/ecm_db/ecm_db_host.c -+++ b/ecm_db/ecm_db_host.c -@@ -770,11 +770,8 @@ EXPORT_SYMBOL(ecm_db_host_alloc); - bool ecm_db_host_init(struct dentry *dentry) - { - -- if (!debugfs_create_u32("host_count", S_IRUGO, dentry, -- (u32 *)&ecm_db_host_count)) { -- DEBUG_ERROR("Failed to create ecm db host count file in debugfs\n"); -- return false;; -- } -+ debugfs_create_u32("host_count", S_IRUGO, dentry, -+ (u32 *)&ecm_db_host_count); - - ecm_db_host_table = vzalloc(sizeof(struct ecm_db_host_instance *) * ECM_DB_HOST_HASH_SLOTS); - if (!ecm_db_host_table) { ---- a/ecm_db/ecm_db_iface.c -+++ b/ecm_db/ecm_db_iface.c -@@ -3670,11 +3670,8 @@ EXPORT_SYMBOL(ecm_db_iface_alloc); - */ - bool ecm_db_iface_init(struct dentry *dentry) - { -- if (!debugfs_create_u32("iface_count", S_IRUGO, dentry, -- (u32 *)&ecm_db_iface_count)) { -- DEBUG_ERROR("Failed to create ecm db iface count file in debugfs\n"); -- return false; -- } -+ debugfs_create_u32("iface_count", S_IRUGO, dentry, -+ (u32 *)&ecm_db_iface_count); - - return true; - } ---- a/ecm_db/ecm_db_mapping.c -+++ b/ecm_db/ecm_db_mapping.c -@@ -806,11 +806,8 @@ EXPORT_SYMBOL(ecm_db_mapping_alloc); - */ - bool ecm_db_mapping_init(struct dentry *dentry) - { -- if (!debugfs_create_u32("mapping_count", S_IRUGO, dentry, -- (u32 *)&ecm_db_mapping_count)) { -- DEBUG_ERROR("Failed to create ecm db mapping count file in debugfs\n"); -- return false; -- } -+ debugfs_create_u32("mapping_count", S_IRUGO, dentry, -+ (u32 *)&ecm_db_mapping_count); - - ecm_db_mapping_table = vzalloc(sizeof(struct ecm_db_mapping_instance *) * ECM_DB_MAPPING_HASH_SLOTS); - if (!ecm_db_mapping_table) { ---- a/ecm_db/ecm_db_node.c -+++ b/ecm_db/ecm_db_node.c -@@ -1187,11 +1187,8 @@ keep_sni_conn: - */ - bool ecm_db_node_init(struct dentry *dentry) - { -- if (!debugfs_create_u32("node_count", S_IRUGO, dentry, -- (u32 *)&ecm_db_node_count)) { -- DEBUG_ERROR("Failed to create ecm db node count file in debugfs\n"); -- return false; -- } -+ debugfs_create_u32("node_count", S_IRUGO, dentry, -+ (u32 *)&ecm_db_node_count); - - ecm_db_node_table = vzalloc(sizeof(struct ecm_db_node_instance *) * ECM_DB_NODE_HASH_SLOTS); - if (!ecm_db_node_table) { ---- a/ecm_interface.c -+++ b/ecm_interface.c -@@ -332,7 +332,7 @@ static struct net_device *ecm_interface_ - struct net_device *dev; - - ECM_IP_ADDR_TO_NIN6_ADDR(addr6, addr); -- dev = (struct net_device *)ipv6_dev_find(&init_net, &addr6, 1); -+ dev = (struct net_device *)ipv6_dev_find_and_hold(&init_net, &addr6, 1); - return dev; - } - #endif -@@ -734,7 +734,7 @@ static bool ecm_interface_mac_addr_get_i - * Get the MAC address that corresponds to IP address given. - */ - ECM_IP_ADDR_TO_NIN6_ADDR(daddr, addr); -- local_dev = ipv6_dev_find(&init_net, &daddr, 1); -+ local_dev = ipv6_dev_find_and_hold(&init_net, &daddr, 1); - if (local_dev) { - DEBUG_TRACE("%pi6 is a local address\n", &daddr); - memcpy(mac_addr, dev->dev_addr, ETH_ALEN); ---- a/ecm_state.c -+++ b/ecm_state.c -@@ -899,17 +899,11 @@ int ecm_state_init(struct dentry *dentry - return -1; - } - -- if (!debugfs_create_u32("state_dev_major", S_IRUGO, ecm_state_dentry, -- (u32 *)&ecm_state_dev_major_id)) { -- DEBUG_ERROR("Failed to create ecm state dev major file in debugfs\n"); -- goto init_cleanup; -- } -+ debugfs_create_u32("state_dev_major", S_IRUGO, ecm_state_dentry, -+ (u32 *)&ecm_state_dev_major_id); - -- if (!debugfs_create_u32("state_file_output_mask", S_IRUGO | S_IWUSR, ecm_state_dentry, -- (u32 *)&ecm_state_file_output_mask)) { -- DEBUG_ERROR("Failed to create ecm state output mask file in debugfs\n"); -- goto init_cleanup; -- } -+ debugfs_create_u32("state_file_output_mask", S_IRUGO | S_IWUSR, ecm_state_dentry, -+ (u32 *)&ecm_state_file_output_mask); - - /* - * Register a char device that we will use to provide a dump of our state ---- a/frontends/ecm_front_end_common.c -+++ b/frontends/ecm_front_end_common.c -@@ -192,7 +192,7 @@ bool ecm_front_end_gre_proto_is_accel_al - return false; - } - } else { -- dev = ipv6_dev_find(&init_net, &(tuple->src.u3.in6), 1); -+ dev = ipv6_dev_find_and_hold(&init_net, &(tuple->src.u3.in6), 1); - if (dev) { - /* - * Source IP address is local -@@ -202,7 +202,7 @@ bool ecm_front_end_gre_proto_is_accel_al - return false; - } - -- dev = ipv6_dev_find(&init_net, &(tuple->dst.u3.in6), 1); -+ dev = ipv6_dev_find_and_hold(&init_net, &(tuple->dst.u3.in6), 1); - if (dev) { - /* - * Destination IP address is local ---- a/frontends/ecm_front_end_ipv4.c -+++ b/frontends/ecm_front_end_ipv4.c -@@ -376,11 +376,8 @@ void ecm_front_end_ipv4_stop(int num) - */ - int ecm_front_end_ipv4_init(struct dentry *dentry) - { -- if (!debugfs_create_u32("front_end_ipv4_stop", S_IRUGO | S_IWUSR, dentry, -- (u32 *)&ecm_front_end_ipv4_stopped)) { -- DEBUG_ERROR("Failed to create ecm front end ipv4 stop file in debugfs\n"); -- return -1; -- } -+ debugfs_create_u32("front_end_ipv4_stop", S_IRUGO | S_IWUSR, dentry, -+ (u32 *)&ecm_front_end_ipv4_stopped); - - switch (ecm_front_end_type_get()) { - case ECM_FRONT_END_TYPE_NSS: ---- a/frontends/ecm_front_end_ipv6.c -+++ b/frontends/ecm_front_end_ipv6.c -@@ -255,11 +255,8 @@ void ecm_front_end_ipv6_stop(int num) - */ - int ecm_front_end_ipv6_init(struct dentry *dentry) - { -- if (!debugfs_create_u32("front_end_ipv6_stop", S_IRUGO | S_IWUSR, dentry, -- (u32 *)&ecm_front_end_ipv6_stopped)) { -- DEBUG_ERROR("Failed to create ecm front end ipv6 stop file in debugfs\n"); -- return -1; -- } -+ debugfs_create_u32("front_end_ipv6_stop", S_IRUGO | S_IWUSR, dentry, -+ (u32 *)&ecm_front_end_ipv6_stopped); - - switch (ecm_front_end_type_get()) { - case ECM_FRONT_END_TYPE_NSS: ---- a/frontends/nss/ecm_nss_bond_notifier.c -+++ b/frontends/nss/ecm_nss_bond_notifier.c -@@ -240,12 +240,8 @@ int ecm_nss_bond_notifier_init(struct de - return -1; - } - -- if (!debugfs_create_u32("stop", S_IRUGO | S_IWUSR, ecm_nss_bond_notifier_dentry, -- (u32 *)&ecm_nss_bond_notifier_stopped)) { -- DEBUG_ERROR("Failed to create ecm bond notifier stopped file in debugfs\n"); -- debugfs_remove_recursive(ecm_nss_bond_notifier_dentry); -- return -1; -- } -+ debugfs_create_u32("stop", S_IRUGO | S_IWUSR, ecm_nss_bond_notifier_dentry, -+ (u32 *)&ecm_nss_bond_notifier_stopped); - - /* - * Register Link Aggregation callbacks with the bonding driver ---- a/frontends/nss/ecm_nss_ipv4.c -+++ b/frontends/nss/ecm_nss_ipv4.c -@@ -2802,41 +2802,23 @@ int ecm_nss_ipv4_init(struct dentry *den - return result; - } - -- if (!debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry, -- (u32 *)&ecm_nss_ipv4_no_action_limit_default)) { -- DEBUG_ERROR("Failed to create ecm nss ipv4 no_action_limit_default file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry, -+ (u32 *)&ecm_nss_ipv4_no_action_limit_default); - -- if (!debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry, -- (u32 *)&ecm_nss_ipv4_driver_fail_limit_default)) { -- DEBUG_ERROR("Failed to create ecm nss ipv4 driver_fail_limit_default file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry, -+ (u32 *)&ecm_nss_ipv4_driver_fail_limit_default); - -- if (!debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry, -- (u32 *)&ecm_nss_ipv4_nack_limit_default)) { -- DEBUG_ERROR("Failed to create ecm nss ipv4 nack_limit_default file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry, -+ (u32 *)&ecm_nss_ipv4_nack_limit_default); - -- if (!debugfs_create_u32("accelerated_count", S_IRUGO, ecm_nss_ipv4_dentry, -- (u32 *)&ecm_nss_ipv4_accelerated_count)) { -- DEBUG_ERROR("Failed to create ecm nss ipv4 accelerated_count file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("accelerated_count", S_IRUGO, ecm_nss_ipv4_dentry, -+ (u32 *)&ecm_nss_ipv4_accelerated_count); - -- if (!debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_nss_ipv4_dentry, -- (u32 *)&ecm_nss_ipv4_pending_accel_count)) { -- DEBUG_ERROR("Failed to create ecm nss ipv4 pending_accel_count file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_nss_ipv4_dentry, -+ (u32 *)&ecm_nss_ipv4_pending_accel_count); - -- if (!debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_nss_ipv4_dentry, -- (u32 *)&ecm_nss_ipv4_pending_decel_count)) { -- DEBUG_ERROR("Failed to create ecm nss ipv4 pending_decel_count file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_nss_ipv4_dentry, -+ (u32 *)&ecm_nss_ipv4_pending_decel_count); - - if (!debugfs_create_file("accel_limit_mode", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry, - NULL, &ecm_nss_ipv4_accel_limit_mode_fops)) { -@@ -2867,11 +2849,8 @@ int ecm_nss_ipv4_init(struct dentry *den - goto task_cleanup; - } - -- if (!debugfs_create_u32("vlan_passthrough_set", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry, -- (u32 *)&ecm_nss_ipv4_vlan_passthrough_enable)) { -- DEBUG_ERROR("Failed to create ecm nss ipv4 vlan passthrough file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("vlan_passthrough_set", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry, -+ (u32 *)&ecm_nss_ipv4_vlan_passthrough_enable); - - #ifdef ECM_NON_PORTED_SUPPORT_ENABLE - if (!ecm_nss_non_ported_ipv4_debugfs_init(ecm_nss_ipv4_dentry)) { ---- a/frontends/nss/ecm_nss_ipv6.c -+++ b/frontends/nss/ecm_nss_ipv6.c -@@ -2542,41 +2542,23 @@ int ecm_nss_ipv6_init(struct dentry *den - return result; - } - -- if (!debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry, -- (u32 *)&ecm_nss_ipv6_no_action_limit_default)) { -- DEBUG_ERROR("Failed to create ecm nss ipv6 no_action_limit_default file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry, -+ (u32 *)&ecm_nss_ipv6_no_action_limit_default); - -- if (!debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry, -- (u32 *)&ecm_nss_ipv6_driver_fail_limit_default)) { -- DEBUG_ERROR("Failed to create ecm nss ipv6 driver_fail_limit_default file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry, -+ (u32 *)&ecm_nss_ipv6_driver_fail_limit_default); - -- if (!debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry, -- (u32 *)&ecm_nss_ipv6_nack_limit_default)) { -- DEBUG_ERROR("Failed to create ecm nss ipv6 nack_limit_default file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry, -+ (u32 *)&ecm_nss_ipv6_nack_limit_default); - -- if (!debugfs_create_u32("accelerated_count", S_IRUGO, ecm_nss_ipv6_dentry, -- (u32 *)&ecm_nss_ipv6_accelerated_count)) { -- DEBUG_ERROR("Failed to create ecm nss ipv6 accelerated_count file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("accelerated_count", S_IRUGO, ecm_nss_ipv6_dentry, -+ (u32 *)&ecm_nss_ipv6_accelerated_count); - -- if (!debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_nss_ipv6_dentry, -- (u32 *)&ecm_nss_ipv6_pending_accel_count)) { -- DEBUG_ERROR("Failed to create ecm nss ipv6 pending_accel_count file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_nss_ipv6_dentry, -+ (u32 *)&ecm_nss_ipv6_pending_accel_count); - -- if (!debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_nss_ipv6_dentry, -- (u32 *)&ecm_nss_ipv6_pending_decel_count)) { -- DEBUG_ERROR("Failed to create ecm nss ipv6 pending_decel_count file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_nss_ipv6_dentry, -+ (u32 *)&ecm_nss_ipv6_pending_decel_count); - - if (!debugfs_create_file("accel_limit_mode", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry, - NULL, &ecm_nss_ipv6_accel_limit_mode_fops)) { -@@ -2607,11 +2589,8 @@ int ecm_nss_ipv6_init(struct dentry *den - goto task_cleanup; - } - -- if (!debugfs_create_u32("vlan_passthrough_set", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry, -- (u32 *)&ecm_nss_ipv6_vlan_passthrough_enable)) { -- DEBUG_ERROR("Failed to create ecm nss ipv6 vlan passthrough file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("vlan_passthrough_set", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry, -+ (u32 *)&ecm_nss_ipv6_vlan_passthrough_enable); - - #ifdef ECM_NON_PORTED_SUPPORT_ENABLE - if (!ecm_nss_non_ported_ipv6_debugfs_init(ecm_nss_ipv6_dentry)) { ---- a/frontends/nss/ecm_nss_multicast_ipv4.c -+++ b/frontends/nss/ecm_nss_multicast_ipv4.c -@@ -4139,11 +4139,8 @@ void ecm_nss_multicast_ipv4_stop(int num - */ - int ecm_nss_multicast_ipv4_init(struct dentry *dentry) - { -- if (!debugfs_create_u32("ecm_nss_multicast_ipv4_stop", S_IRUGO | S_IWUSR, dentry, -- (u32 *)&ecm_front_end_ipv4_mc_stopped)) { -- DEBUG_ERROR("Failed to create ecm front end ipv4 mc stop file in debugfs\n"); -- return -1; -- } -+ debugfs_create_u32("ecm_nss_multicast_ipv4_stop", S_IRUGO | S_IWUSR, dentry, -+ (u32 *)&ecm_front_end_ipv4_mc_stopped); - - /* - * Register multicast update callback to MCS snooper ---- a/frontends/nss/ecm_nss_multicast_ipv6.c -+++ b/frontends/nss/ecm_nss_multicast_ipv6.c -@@ -3939,11 +3939,8 @@ void ecm_nss_multicast_ipv6_stop(int num - */ - int ecm_nss_multicast_ipv6_init(struct dentry *dentry) - { -- if (!debugfs_create_u32("ecm_nss_multicast_ipv6_stop", S_IRUGO | S_IWUSR, dentry, -- (u32 *)&ecm_front_end_ipv6_mc_stopped)) { -- DEBUG_ERROR("Failed to create ecm front end ipv6 mc stop file in debugfs\n"); -- return -1; -- } -+ debugfs_create_u32("ecm_nss_multicast_ipv6_stop", S_IRUGO | S_IWUSR, dentry, -+ (u32 *)&ecm_front_end_ipv6_mc_stopped); - - /* - * Register multicast update callback to MCS snooper ---- a/frontends/nss/ecm_nss_non_ported_ipv4.c -+++ b/frontends/nss/ecm_nss_non_ported_ipv4.c -@@ -2615,11 +2615,8 @@ done: - */ - bool ecm_nss_non_ported_ipv4_debugfs_init(struct dentry *dentry) - { -- if (!debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry, -- (u32 *)&ecm_nss_non_ported_ipv4_accelerated_count)) { -- DEBUG_ERROR("Failed to create ecm nss ipv4 non_ported_accelerated_count file in debugfs\n"); -- return false; -- } -+ debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry, -+ (u32 *)&ecm_nss_non_ported_ipv4_accelerated_count); - - return true; - } ---- a/frontends/nss/ecm_nss_non_ported_ipv6.c -+++ b/frontends/nss/ecm_nss_non_ported_ipv6.c -@@ -2329,11 +2329,8 @@ done: - */ - bool ecm_nss_non_ported_ipv6_debugfs_init(struct dentry *dentry) - { -- if (!debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry, -- (u32 *)&ecm_nss_non_ported_ipv6_accelerated_count)) { -- DEBUG_ERROR("Failed to create ecm nss ipv6 non_ported_accelerated_count file in debugfs\n"); -- return false; -- } -+ debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry, -+ (u32 *)&ecm_nss_non_ported_ipv6_accelerated_count); - - return true; - } ---- a/frontends/nss/ecm_nss_ported_ipv4.c -+++ b/frontends/nss/ecm_nss_ported_ipv4.c -@@ -2944,12 +2944,8 @@ bool ecm_nss_ported_ipv4_debugfs_init(st - return false; - } - -- if (!debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry, -- &ecm_nss_ported_ipv4_accelerated_count[ECM_NSS_PORTED_IPV4_PROTO_TCP])) { -- DEBUG_ERROR("Failed to create ecm nss ipv4 tcp_accelerated_count file in debugfs\n"); -- debugfs_remove(udp_dentry); -- return false; -- } -+ debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry, -+ &ecm_nss_ported_ipv4_accelerated_count[ECM_NSS_PORTED_IPV4_PROTO_TCP]); - - return true; - } ---- a/frontends/nss/ecm_nss_ported_ipv6.c -+++ b/frontends/nss/ecm_nss_ported_ipv6.c -@@ -2732,12 +2732,8 @@ bool ecm_nss_ported_ipv6_debugfs_init(st - return false; - } - -- if (!debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry, -- &ecm_nss_ported_ipv6_accelerated_count[ECM_NSS_PORTED_IPV6_PROTO_TCP])) { -- DEBUG_ERROR("Failed to create ecm nss ipv6 tcp_accelerated_count file in debugfs\n"); -- debugfs_remove(udp_dentry); -- return false; -- } -+ debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry, -+ &ecm_nss_ported_ipv6_accelerated_count[ECM_NSS_PORTED_IPV6_PROTO_TCP]); - - return true; - } ---- a/frontends/sfe/ecm_sfe_ipv4.c -+++ b/frontends/sfe/ecm_sfe_ipv4.c -@@ -1808,48 +1808,27 @@ int ecm_sfe_ipv4_init(struct dentry *den - } - - #ifdef CONFIG_XFRM -- if (!debugfs_create_u32("reject_acceleration_for_ipsec", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry, -- (u32 *)&ecm_sfe_ipv4_reject_acceleration_for_ipsec)) { -- DEBUG_ERROR("Failed to create ecm sfe ipv4 reject_acceleration_for_ipsec file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("reject_acceleration_for_ipsec", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry, -+ (u32 *)&ecm_sfe_ipv4_reject_acceleration_for_ipsec); - #endif - -- if (!debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry, -- (u32 *)&ecm_sfe_ipv4_no_action_limit_default)) { -- DEBUG_ERROR("Failed to create ecm sfe ipv4 no_action_limit_default file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry, -+ (u32 *)&ecm_sfe_ipv4_no_action_limit_default); - -- if (!debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry, -- (u32 *)&ecm_sfe_ipv4_driver_fail_limit_default)) { -- DEBUG_ERROR("Failed to create ecm sfe ipv4 driver_fail_limit_default file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry, -+ (u32 *)&ecm_sfe_ipv4_driver_fail_limit_default); - -- if (!debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry, -- (u32 *)&ecm_sfe_ipv4_nack_limit_default)) { -- DEBUG_ERROR("Failed to create ecm sfe ipv4 nack_limit_default file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry, -+ (u32 *)&ecm_sfe_ipv4_nack_limit_default); - -- if (!debugfs_create_u32("accelerated_count", S_IRUGO, ecm_sfe_ipv4_dentry, -- (u32 *)&ecm_sfe_ipv4_accelerated_count)) { -- DEBUG_ERROR("Failed to create ecm sfe ipv4 accelerated_count file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("accelerated_count", S_IRUGO, ecm_sfe_ipv4_dentry, -+ (u32 *)&ecm_sfe_ipv4_accelerated_count); - -- if (!debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_sfe_ipv4_dentry, -- (u32 *)&ecm_sfe_ipv4_pending_accel_count)) { -- DEBUG_ERROR("Failed to create ecm sfe ipv4 pending_accel_count file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_sfe_ipv4_dentry, -+ (u32 *)&ecm_sfe_ipv4_pending_accel_count); - -- if (!debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_sfe_ipv4_dentry, -- (u32 *)&ecm_sfe_ipv4_pending_decel_count)) { -- DEBUG_ERROR("Failed to create ecm sfe ipv4 pending_decel_count file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_sfe_ipv4_dentry, -+ (u32 *)&ecm_sfe_ipv4_pending_decel_count); - - if (!debugfs_create_file("accel_limit_mode", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry, - NULL, &ecm_sfe_ipv4_accel_limit_mode_fops)) { ---- a/frontends/sfe/ecm_sfe_ipv6.c -+++ b/frontends/sfe/ecm_sfe_ipv6.c -@@ -1532,48 +1532,27 @@ int ecm_sfe_ipv6_init(struct dentry *den - } - - #ifdef CONFIG_XFRM -- if (!debugfs_create_u32("reject_acceleration_for_ipsec", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry, -- (u32 *)&ecm_sfe_ipv6_reject_acceleration_for_ipsec)) { -- DEBUG_ERROR("Failed to create ecm sfe ipv6 reject_acceleration_for_ipsec file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("reject_acceleration_for_ipsec", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry, -+ (u32 *)&ecm_sfe_ipv6_reject_acceleration_for_ipsec); - #endif - -- if (!debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry, -- (u32 *)&ecm_sfe_ipv6_no_action_limit_default)) { -- DEBUG_ERROR("Failed to create ecm sfe ipv6 no_action_limit_default file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry, -+ (u32 *)&ecm_sfe_ipv6_no_action_limit_default); - -- if (!debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry, -- (u32 *)&ecm_sfe_ipv6_driver_fail_limit_default)) { -- DEBUG_ERROR("Failed to create ecm sfe ipv6 driver_fail_limit_default file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry, -+ (u32 *)&ecm_sfe_ipv6_driver_fail_limit_default); - -- if (!debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry, -- (u32 *)&ecm_sfe_ipv6_nack_limit_default)) { -- DEBUG_ERROR("Failed to create ecm sfe ipv6 nack_limit_default file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry, -+ (u32 *)&ecm_sfe_ipv6_nack_limit_default); - -- if (!debugfs_create_u32("accelerated_count", S_IRUGO, ecm_sfe_ipv6_dentry, -- (u32 *)&ecm_sfe_ipv6_accelerated_count)) { -- DEBUG_ERROR("Failed to create ecm sfe ipv6 accelerated_count file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("accelerated_count", S_IRUGO, ecm_sfe_ipv6_dentry, -+ (u32 *)&ecm_sfe_ipv6_accelerated_count); - -- if (!debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_sfe_ipv6_dentry, -- (u32 *)&ecm_sfe_ipv6_pending_accel_count)) { -- DEBUG_ERROR("Failed to create ecm sfe ipv6 pending_accel_count file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_sfe_ipv6_dentry, -+ (u32 *)&ecm_sfe_ipv6_pending_accel_count); - -- if (!debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_sfe_ipv6_dentry, -- (u32 *)&ecm_sfe_ipv6_pending_decel_count)) { -- DEBUG_ERROR("Failed to create ecm sfe ipv6 pending_decel_count file in debugfs\n"); -- goto task_cleanup; -- } -+ debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_sfe_ipv6_dentry, -+ (u32 *)&ecm_sfe_ipv6_pending_decel_count); - - if (!debugfs_create_file("accel_limit_mode", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry, - NULL, &ecm_sfe_ipv6_accel_limit_mode_fops)) { ---- a/frontends/sfe/ecm_sfe_non_ported_ipv4.c -+++ b/frontends/sfe/ecm_sfe_non_ported_ipv4.c -@@ -2284,11 +2284,8 @@ done: - */ - bool ecm_sfe_non_ported_ipv4_debugfs_init(struct dentry *dentry) - { -- if (!debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry, -- (u32 *)&ecm_sfe_non_ported_ipv4_accelerated_count)) { -- DEBUG_ERROR("Failed to create ecm sfe ipv4 non_ported_accelerated_count file in debugfs\n"); -- return false; -- } -+ debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry, -+ (u32 *)&ecm_sfe_non_ported_ipv4_accelerated_count); - - return true; - } ---- a/frontends/sfe/ecm_sfe_non_ported_ipv6.c -+++ b/frontends/sfe/ecm_sfe_non_ported_ipv6.c -@@ -2083,11 +2083,8 @@ done: - */ - bool ecm_sfe_non_ported_ipv6_debugfs_init(struct dentry *dentry) - { -- if (!debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry, -- (u32 *)&ecm_sfe_non_ported_ipv6_accelerated_count)) { -- DEBUG_ERROR("Failed to create ecm sfe ipv6 non_ported_accelerated_count file in debugfs\n"); -- return false; -- } -+ debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry, -+ (u32 *)&ecm_sfe_non_ported_ipv6_accelerated_count); - - return true; - } ---- a/frontends/sfe/ecm_sfe_ported_ipv4.c -+++ b/frontends/sfe/ecm_sfe_ported_ipv4.c -@@ -2528,12 +2528,8 @@ bool ecm_sfe_ported_ipv4_debugfs_init(st - return false; - } - -- if (!debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry, -- &ecm_sfe_ported_ipv4_accelerated_count[ECM_SFE_PORTED_IPV4_PROTO_TCP])) { -- DEBUG_ERROR("Failed to create ecm sfe ipv4 tcp_accelerated_count file in debugfs\n"); -- debugfs_remove(udp_dentry); -- return false; -- } -+ debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry, -+ &ecm_sfe_ported_ipv4_accelerated_count[ECM_SFE_PORTED_IPV4_PROTO_TCP]); - - return true; - } ---- a/frontends/sfe/ecm_sfe_ported_ipv6.c -+++ b/frontends/sfe/ecm_sfe_ported_ipv6.c -@@ -2374,12 +2374,8 @@ bool ecm_sfe_ported_ipv6_debugfs_init(st - return false; - } - -- if (!debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry, -- &ecm_sfe_ported_ipv6_accelerated_count[ECM_SFE_PORTED_IPV6_PROTO_TCP])) { -- DEBUG_ERROR("Failed to create ecm sfe ipv6 tcp_accelerated_count file in debugfs\n"); -- debugfs_remove(udp_dentry); -- return false; -- } -+ debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry, -+ &ecm_sfe_ported_ipv6_accelerated_count[ECM_SFE_PORTED_IPV6_PROTO_TCP]); - - return true; - } diff --git a/package/nss/qca/qca-nss-ecm/patches/100-kernel-5.4-support.patch b/package/nss/qca/qca-nss-ecm/patches/100-kernel-5.4-support.patch new file mode 100644 index 000000000..b863ad7e0 --- /dev/null +++ b/package/nss/qca/qca-nss-ecm/patches/100-kernel-5.4-support.patch @@ -0,0 +1,1276 @@ +--- a/ecm_classifier_default.c ++++ b/ecm_classifier_default.c +@@ -42,7 +42,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_classifier_dscp.c ++++ b/ecm_classifier_dscp.c +@@ -41,7 +41,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_classifier_hyfi.c ++++ b/ecm_classifier_hyfi.c +@@ -41,7 +41,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_classifier_nl.c ++++ b/ecm_classifier_nl.c +@@ -41,7 +41,6 @@ + #include + #include + #include +-#include + #if (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 2, 0)) + #include + #else +@@ -146,12 +145,42 @@ static struct genl_multicast_group ecm_c + }, + }; + ++static int ecm_classifier_nl_genl_msg_ACCEL(struct sk_buff *skb, struct genl_info *info); ++static int ecm_classifier_nl_genl_msg_DUMP(struct sk_buff *skb, struct netlink_callback *cb); ++ ++/* ++ * Generic Netlink message-to-handler mapping ++ */ ++static struct genl_ops ecm_cl_nl_genl_ops[] = { ++ { ++ .cmd = ECM_CL_NL_GENL_CMD_ACCEL, ++ .flags = 0, ++ .doit = ecm_classifier_nl_genl_msg_ACCEL, ++ .dumpit = NULL, ++ }, ++ { ++ .cmd = ECM_CL_NL_GENL_CMD_ACCEL_OK, ++ .flags = 0, ++ .doit = NULL, ++ .dumpit = ecm_classifier_nl_genl_msg_DUMP, ++ }, ++ { ++ .cmd = ECM_CL_NL_GENL_CMD_CONNECTION_CLOSED, ++ .flags = 0, ++ .doit = NULL, ++ .dumpit = ecm_classifier_nl_genl_msg_DUMP, ++ }, ++}; ++ + static struct genl_family ecm_cl_nl_genl_family = { +- .id = GENL_ID_GENERATE, + .hdrsize = 0, + .name = ECM_CL_NL_GENL_NAME, + .version = ECM_CL_NL_GENL_VERSION, + .maxattr = ECM_CL_NL_GENL_ATTR_MAX, ++ .ops = ecm_cl_nl_genl_ops, ++ .n_ops = ARRAY_SIZE(ecm_cl_nl_genl_ops), ++ .mcgrps = ecm_cl_nl_genl_mcgrp, ++ .n_mcgrps = ARRAY_SIZE(ecm_cl_nl_genl_mcgrp), + }; + + /* +@@ -215,12 +244,7 @@ ecm_classifier_nl_send_genl_msg(enum ECM + return ret; + } + +- ret = genlmsg_end(skb, msg_head); +- if (ret < 0) { +- DEBUG_WARN("failed to finalize genl msg: %d\n", ret); +- nlmsg_free(skb); +- return ret; +- } ++ genlmsg_end(skb, msg_head); + + /* genlmsg_multicast frees the skb in both success and error cases */ + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0) +@@ -1377,85 +1401,14 @@ static struct file_operations ecm_classi + .write = ecm_classifier_nl_set_command, + }; + +-/* +- * Generic Netlink attr checking policies +- */ +-static struct nla_policy +-ecm_cl_nl_genl_policy[ECM_CL_NL_GENL_ATTR_COUNT] = { +- [ECM_CL_NL_GENL_ATTR_TUPLE] = { +- .type = NLA_UNSPEC, +- .len = sizeof(struct ecm_cl_nl_genl_attr_tuple), }, +-}; +- +-/* +- * Generic Netlink message-to-handler mapping +- */ +-static struct genl_ops ecm_cl_nl_genl_ops[] = { +- { +- .cmd = ECM_CL_NL_GENL_CMD_ACCEL, +- .flags = 0, +- .policy = ecm_cl_nl_genl_policy, +- .doit = ecm_classifier_nl_genl_msg_ACCEL, +- .dumpit = NULL, +- }, +- { +- .cmd = ECM_CL_NL_GENL_CMD_ACCEL_OK, +- .flags = 0, +- .policy = ecm_cl_nl_genl_policy, +- .doit = NULL, +- .dumpit = ecm_classifier_nl_genl_msg_DUMP, +- }, +- { +- .cmd = ECM_CL_NL_GENL_CMD_CONNECTION_CLOSED, +- .flags = 0, +- .policy = ecm_cl_nl_genl_policy, +- .doit = NULL, +- .dumpit = ecm_classifier_nl_genl_msg_DUMP, +- }, +-}; +- + static int ecm_classifier_nl_register_genl(void) + { + int result; + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0) +- result = genl_register_family_with_ops_groups(&ecm_cl_nl_genl_family, +- ecm_cl_nl_genl_ops, +- ecm_cl_nl_genl_mcgrp); +- if (result != 0) { +- DEBUG_ERROR("failed to register genl ops: %d\n", result); +- return result; +- } +-#else + result = genl_register_family(&ecm_cl_nl_genl_family); +- if (result != 0) { ++ if (result != 0) + DEBUG_ERROR("failed to register genl family: %d\n", result); +- goto err1; +- } +- +- result = genl_register_ops(&ecm_cl_nl_genl_family, +- ecm_cl_nl_genl_ops); +- if (result != 0) { +- DEBUG_ERROR("failed to register genl ops: %d\n", result); +- goto err2; +- } +- +- result = genl_register_mc_group(&ecm_cl_nl_genl_family, +- ecm_cl_nl_genl_mcgrp); +- if (result != 0) { +- DEBUG_ERROR("failed to register genl multicast group: %d\n", +- result); +- goto err3; +- } +- +- return 0; + +-err3: +- genl_unregister_ops(&ecm_cl_nl_genl_family, ecm_cl_nl_genl_ops); +-err2: +- genl_unregister_family(&ecm_cl_nl_genl_family); +-err1: +-#endif + return result; + } + +--- a/ecm_classifier_pcc.c ++++ b/ecm_classifier_pcc.c +@@ -49,7 +49,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_conntrack_notifier.c ++++ b/ecm_conntrack_notifier.c +@@ -51,7 +51,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -345,14 +344,6 @@ static int ecm_conntrack_event(unsigned + return NOTIFY_DONE; + } + +- /* +- * Special untracked connection is not monitored +- */ +- if (ct == &nf_conntrack_untracked) { +- DEBUG_TRACE("Fake connection event - ignoring\n"); +- return NOTIFY_DONE; +- } +- + /* + * Only interested if this is IPv4 or IPv6. + */ +--- a/ecm_db/ecm_db.c ++++ b/ecm_db/ecm_db.c +@@ -42,7 +42,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_db/ecm_db_connection.c ++++ b/ecm_db/ecm_db_connection.c +@@ -41,7 +41,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_db/ecm_db_host.c ++++ b/ecm_db/ecm_db_host.c +@@ -41,7 +41,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_db/ecm_db_iface.c ++++ b/ecm_db/ecm_db_iface.c +@@ -41,7 +41,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_db/ecm_db_listener.c ++++ b/ecm_db/ecm_db_listener.c +@@ -41,7 +41,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_db/ecm_db_mapping.c ++++ b/ecm_db/ecm_db_mapping.c +@@ -41,7 +41,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_db/ecm_db_multicast.c ++++ b/ecm_db/ecm_db_multicast.c +@@ -42,7 +42,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_db/ecm_db_node.c ++++ b/ecm_db/ecm_db_node.c +@@ -41,7 +41,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_db/ecm_db_timer.c ++++ b/ecm_db/ecm_db_timer.c +@@ -42,7 +42,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -387,7 +386,7 @@ EXPORT_SYMBOL(ecm_db_time_get); + * Manage expiration of connections + * NOTE: This is softirq context + */ +-static void ecm_db_timer_callback(unsigned long data) ++static void ecm_db_timer_callback(struct timer_list *arg) + { + uint32_t timer; + +@@ -425,9 +424,7 @@ void ecm_db_timer_init(void) + /* + * Set a timer to manage cleanup of expired connections + */ +- init_timer(&ecm_db_timer); +- ecm_db_timer.function = ecm_db_timer_callback; +- ecm_db_timer.data = 0; ++ timer_setup(&ecm_db_timer, ecm_db_timer_callback, 0); + ecm_db_timer.expires = jiffies + HZ; + add_timer(&ecm_db_timer); + +--- a/ecm_interface.c ++++ b/ecm_interface.c +@@ -66,7 +66,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -537,7 +536,7 @@ static bool ecm_interface_find_gateway_ipv4(ip_addr_t addr, ip_addr_t gw_addr) + return false; + } + +- ECM_NIN4_ADDR_TO_IP_ADDR(gw_addr, rt->rt_gateway) ++ ECM_NIN4_ADDR_TO_IP_ADDR(gw_addr, rt->rt_gw4) + ecm_interface_route_release(&ecm_rt); + return true; + } +@@ -596,7 +595,7 @@ static bool ecm_interface_mac_addr_get_ipv4(ip_addr_t addr, uint8_t *mac_addr, b + if (rt->rt_uses_gateway || (rt->rt_flags & RTF_GATEWAY)) { + #endif + *on_link = false; +- ECM_NIN4_ADDR_TO_IP_ADDR(gw_addr, rt->rt_gateway) ++ ECM_NIN4_ADDR_TO_IP_ADDR(gw_addr, rt->rt_gw4) + } else { + *on_link = true; + } +@@ -1003,7 +1002,7 @@ static bool ecm_interface_find_route_by_addr_ipv6(ip_addr_t addr, struct ecm_int + * Get a route to the given IP address, this will allow us to also find the interface + * it is using to communicate with that IP address. + */ +- ecm_rt->rt.rtv6 = rt6_lookup(&init_net, &naddr, NULL, 0, 0); ++ ecm_rt->rt.rtv6 = rt6_lookup(&init_net, &naddr, NULL, 0, NULL, 0); + if (!ecm_rt->rt.rtv6) { + DEBUG_TRACE("No output route to: " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(addr)); + return NULL; +@@ -1077,7 +1076,7 @@ void ecm_interface_send_neighbour_solicitation(struct net_device *dev, ip_addr_t + /* + * Find the route entry + */ +- rt6i = rt6_lookup(netf, &dst_addr, NULL, 0, 0); ++ rt6i = rt6_lookup(netf, &dst_addr, NULL, 0, NULL, 0); + if (!rt6i) { + DEBUG_TRACE("IPv6 Route lookup failure for destination IPv6 address " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(addr)); + return; +@@ -1104,7 +1103,7 @@ void ecm_interface_send_neighbour_solicitation(struct net_device *dev, ip_addr_t + #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0)) + ndisc_send_ns(dev, neigh, &dst_addr, &mc_dst_addr, &src_addr); + #else +- ndisc_send_ns(dev, &dst_addr, &mc_dst_addr, &src_addr); ++ ndisc_send_ns(dev, &dst_addr, &mc_dst_addr, &src_addr, 0); + #endif + neigh_release(neigh); + dst_release(&rt6i->dst); +@@ -1194,7 +1193,7 @@ struct neighbour *ecm_interface_ipv6_neigh_get(ip_addr_t addr) + struct in6_addr ipv6_addr; + + ECM_IP_ADDR_TO_NIN6_ADDR(ipv6_addr, addr); +- rt = rt6_lookup(&init_net, &ipv6_addr, NULL, 0, 0); ++ rt = rt6_lookup(&init_net, &ipv6_addr, NULL, 0, NULL, 0); + if (!rt) { + return NULL; + } +@@ -1220,7 +1219,7 @@ bool ecm_interface_is_pptp(struct sk_buff *skb, const struct net_device *out) + * skip first pass of l2tp/pptp tunnel encapsulated traffic + */ + if (out->type == ARPHRD_PPP) { +- if (out->priv_flags & IFF_PPP_PPTP) { ++ if (out->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_PPTP) { + return true; + } + } +@@ -1231,7 +1230,7 @@ bool ecm_interface_is_pptp(struct sk_buff *skb, const struct net_device *out) + } + + if (in->type == ARPHRD_PPP) { +- if (in->priv_flags & IFF_PPP_PPTP) { ++ if (in->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_PPTP) { + dev_put(in); + return true; + } +@@ -1256,10 +1255,10 @@ bool ecm_interface_is_l2tp_packet_by_version(struct sk_buff *skb, const struct n + + switch (ver) { + case 2: +- flag = IFF_PPP_L2TPV2; ++ flag = IFF_QCA_ECM_PPP_L2TPV2; + break; + case 3: +- flag = IFF_PPP_L2TPV3; ++ flag = IFF_QCA_ECM_PPP_L2TPV3; + break; + default: + break; +@@ -1268,10 +1267,8 @@ bool ecm_interface_is_l2tp_packet_by_version(struct sk_buff *skb, const struct n + /* + * skip first pass of l2tp/pptp tunnel encapsulated traffic + */ +- if (out->type == ARPHRD_PPP) { +- if (out->priv_flags & flag) { +- return true; +- } ++ if (out->priv_flags_qca_ecm & flag) { ++ return true; + } + + in = dev_get_by_index(&init_net, skb->skb_iif); +@@ -1279,11 +1276,9 @@ bool ecm_interface_is_l2tp_packet_by_version(struct sk_buff *skb, const struct n + return true; + } + +- if (in->type == ARPHRD_PPP) { +- if (in->priv_flags & flag) { +- dev_put(in); +- return true; +- } ++ if (out->priv_flags_qca_ecm & flag) { ++ dev_put(in); ++ return true; + } + + dev_put(in); +@@ -1304,11 +1299,9 @@ bool ecm_interface_is_l2tp_pptp(struct sk_buff *skb, const struct net_device *ou + /* + * skip first pass of l2tp/pptp tunnel encapsulated traffic + */ +- if (out->type == ARPHRD_PPP) { +- if (out->priv_flags & (IFF_PPP_L2TPV2 | IFF_PPP_L2TPV3 | +- IFF_PPP_PPTP)) { +- return true; +- } ++ if (out->priv_flags_qca_ecm & (IFF_QCA_ECM_PPP_L2TPV2 | IFF_QCA_ECM_PPP_L2TPV3 | ++ IFF_QCA_ECM_PPP_PPTP)) { ++ return true; + } + + in = dev_get_by_index(&init_net, skb->skb_iif); +@@ -1316,12 +1309,10 @@ bool ecm_interface_is_l2tp_pptp(struct sk_buff *skb, const struct net_device *ou + return true; + } + +- if (in->type == ARPHRD_PPP) { +- if (in->priv_flags & (IFF_PPP_L2TPV2 | IFF_PPP_L2TPV3 | +- IFF_PPP_PPTP)) { +- dev_put(in); +- return true; +- } ++ if (out->priv_flags_qca_ecm & (IFF_QCA_ECM_PPP_L2TPV2 | IFF_QCA_ECM_PPP_L2TPV3 | ++ IFF_QCA_ECM_PPP_PPTP)) { ++ dev_put(in); ++ return true; + } + + dev_put(in); +@@ -2416,7 +2407,7 @@ struct ecm_db_iface_instance *ecm_interface_establish_and_ref(struct ecm_front_e + /* + * GRE TAP? + */ +- if (dev->priv_flags & (IFF_GRE_V4_TAP | IFF_GRE_V6_TAP)) { ++ if (dev->priv_flags_qca_ecm & (IFF_QCA_ECM_GRE_V4_TAP | IFF_QCA_ECM_GRE_V6_TAP)) { + interface_type = feci->ae_interface_type_get(feci, dev); + ae_interface_num = feci->ae_interface_number_by_dev_type_get(dev, interface_type); + +@@ -2680,7 +2671,7 @@ identifier_update: + /* + * OVPN Tunnel? + */ +- if ((dev_type == ARPHRD_NONE) && (dev->priv_flags & IFF_TUN_TAP)) { ++ if ((dev_type == ARPHRD_NONE) && (dev->priv_flags_qca_ecm & IFF_QCA_ECM_TUN_TAP)) { + struct net_device *tun_dev = NULL; + ip_addr_t saddr, daddr; + +@@ -2746,7 +2737,7 @@ identifier_update: + * ppp_is_multilink() and ppp_hold_channels() which acquire same lock + */ + +- if ((dev->priv_flags & IFF_PPP_L2TPV2) && ppp_is_xmit_locked(dev)) { ++ if ((dev->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_L2TPV2) && ppp_is_xmit_locked(dev)) { + if (skb && (skb->skb_iif == dev->ifindex)) { + struct pppol2tp_common_addr info; + +@@ -2804,7 +2795,7 @@ identifier_update: + #endif + + #ifdef ECM_INTERFACE_PPTP_ENABLE +- if ((protocol == IPPROTO_GRE) && skb && v4_hdr && (dev->priv_flags & IFF_PPP_PPTP)) { ++ if ((protocol == IPPROTO_GRE) && skb && v4_hdr && (dev->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_PPTP)) { + struct gre_hdr_pptp *gre_hdr; + uint16_t proto; + int ret; +@@ -3972,7 +3963,7 @@ int32_t ecm_interface_heirarchy_construct(struct ecm_front_end_connection_instan + if (((ip_version == 4) && (protocol == IPPROTO_IPV6)) || + ((ip_version == 6) && (protocol == IPPROTO_IPIP)) || + (protocol == IPPROTO_GRE) || +- ((given_dest_dev->type == ARPHRD_NONE) && (given_dest_dev->priv_flags & IFF_TUN_TAP))) { ++ ((given_dest_dev->type == ARPHRD_NONE) && (given_dest_dev->priv_flags_qca_ecm & IFF_QCA_ECM_TUN_TAP))) { + dev_put(dest_dev); + dest_dev = given_dest_dev; + if (dest_dev) { +@@ -3991,7 +3982,7 @@ int32_t ecm_interface_heirarchy_construct(struct ecm_front_end_connection_instan + /* + * if the address is a local address and indev=l2tp. + */ +- if ((given_src_dev->type == ARPHRD_PPP) && (given_src_dev->priv_flags & IFF_PPP_L2TPV2) && ppp_is_xmit_locked(given_src_dev)) { ++ if ((given_src_dev->type == ARPHRD_PPP) && (given_src_dev->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_L2TPV2) && ppp_is_xmit_locked(given_src_dev)) { + dev_put(dest_dev); + dest_dev = given_dest_dev; + if (dest_dev) { +@@ -4005,7 +3996,7 @@ int32_t ecm_interface_heirarchy_construct(struct ecm_front_end_connection_instan + /* + * if the address is a local address and indev=PPTP. + */ +- if (protocol == IPPROTO_GRE && given_dest_dev && (given_dest_dev->priv_flags & IFF_PPP_PPTP)){ ++ if (protocol == IPPROTO_GRE && given_dest_dev && (given_dest_dev->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_PPTP)){ + dev_put(dest_dev); + dest_dev = given_dest_dev; + if (dest_dev) { +@@ -4054,7 +4045,7 @@ int32_t ecm_interface_heirarchy_construct(struct ecm_front_end_connection_instan + if (((ip_version == 4) && (protocol == IPPROTO_IPV6)) || + ((ip_version == 6) && (protocol == IPPROTO_IPIP)) || + (protocol == IPPROTO_GRE) || +- ((given_src_dev->type == ARPHRD_NONE) && (given_src_dev->priv_flags & IFF_TUN_TAP))) { ++ ((given_src_dev->type == ARPHRD_NONE) && (given_src_dev->priv_flags_qca_ecm & IFF_QCA_ECM_TUN_TAP))) { + dev_put(src_dev); + src_dev = given_src_dev; + if (src_dev) { +@@ -4504,7 +4495,7 @@ lag_success: + /* + * OVPN ? + */ +- if ((dest_dev_type == ARPHRD_NONE) && (dest_dev->priv_flags & IFF_TUN_TAP)) { ++ if ((dest_dev_type == ARPHRD_NONE) && (dest_dev->priv_flags_qca_ecm & IFF_QCA_ECM_TUN_TAP)) { + DEBUG_TRACE("Net device: %p is OVPN, device name: %s\n", dest_dev, dest_dev->name); + break; + } +@@ -4523,7 +4514,7 @@ lag_success: + DEBUG_TRACE("%p: Net device: %p is PPP\n", feci, dest_dev); + + #ifdef ECM_INTERFACE_L2TPV2_ENABLE +- if ((given_src_dev->priv_flags & IFF_PPP_L2TPV2) && ppp_is_xmit_locked(given_src_dev)) { ++ if ((given_src_dev->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_L2TPV2) && ppp_is_xmit_locked(given_src_dev)) { + if (skb->skb_iif == dest_dev->ifindex) { + DEBUG_TRACE("%p: Net device: %p PPP channel is PPPoL2TPV2\n", feci, dest_dev); + break; +@@ -4532,7 +4523,7 @@ lag_success: + #endif + + #ifdef ECM_INTERFACE_PPTP_ENABLE +- if (protocol == IPPROTO_GRE && dest_dev && (dest_dev->priv_flags & IFF_PPP_PPTP)) { ++ if (protocol == IPPROTO_GRE && dest_dev && (dest_dev->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_PPTP)) { + DEBUG_TRACE("%p: Net device: %p PPP channel is PPTP\n", feci, dest_dev); + break; + } +@@ -4798,7 +4789,7 @@ int32_t ecm_interface_multicast_from_heirarchy_construct(struct ecm_front_end_co + /* + * if the address is a local address and indev=l2tp. + */ +- if ((given_src_dev->type == ARPHRD_PPP) && (given_src_dev->priv_flags & IFF_PPP_L2TPV2) && ppp_is_xmit_locked(given_src_dev)) { ++ if ((given_src_dev->type == ARPHRD_PPP) && (given_src_dev->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_L2TPV2) && ppp_is_xmit_locked(given_src_dev)) { + dev_put(dest_dev); + dest_dev = given_dest_dev; + if (dest_dev) { +@@ -5265,7 +5256,7 @@ int32_t ecm_interface_multicast_from_heirarchy_construct(struct ecm_front_end_co + DEBUG_TRACE("Net device: %p is PPP\n", dest_dev); + + #ifdef ECM_INTERFACE_L2TPV2_ENABLE +- if ((given_src_dev->priv_flags & IFF_PPP_L2TPV2) && ppp_is_xmit_locked(given_src_dev)) { ++ if ((given_src_dev->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_L2TPV2) && ppp_is_xmit_locked(given_src_dev)) { + if (skb->skb_iif == dest_dev->ifindex) { + DEBUG_TRACE("Net device: %p PPP channel is PPPoL2TPV2\n", dest_dev); + break; +@@ -6520,7 +6511,7 @@ static int ecm_interface_wifi_event_rx(struct socket *sock, struct sockaddr_nl * + #endif + oldfs = get_fs(); + set_fs(KERNEL_DS); +- size = sock_recvmsg(sock, &msg, len, msg.msg_flags); ++ size = sock_recvmsg(sock, &msg, msg.msg_flags); + set_fs(oldfs); + + return size; +@@ -6609,7 +6600,7 @@ int ecm_interface_wifi_event_stop(void) + } + + DEBUG_INFO("kill ecm_interface_wifi_event thread\n"); +- force_sig(SIGKILL, __ewn.thread); ++ send_sig(SIGKILL, __ewn.thread, 1); + err = kthread_stop(__ewn.thread); + __ewn.thread = NULL; + +--- a/ecm_tracker.c ++++ b/ecm_tracker.c +@@ -43,7 +43,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_tracker_datagram.c ++++ b/ecm_tracker_datagram.c +@@ -43,7 +43,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_tracker_tcp.c ++++ b/ecm_tracker_tcp.c +@@ -43,7 +43,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -1143,7 +1142,7 @@ static bool ecm_tracker_tcp_extract_mss( + const u8 *hash_location; + tcp_parse_options(skb, &opt_rx, &hash_location, 0); + #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)) +- tcp_parse_options(skb, &opt_rx, 0, NULL); ++ tcp_parse_options(&init_net, skb, &opt_rx, 0, NULL); + #else + #error "Unsupported kernel version for tcp_parse_options()" + #endif +--- a/ecm_tracker_udp.c ++++ b/ecm_tracker_udp.c +@@ -43,7 +43,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/frontends/ecm_front_end_ipv4.c ++++ b/frontends/ecm_front_end_ipv4.c +@@ -215,7 +215,7 @@ bool ecm_front_end_ipv4_interface_constr + * behind a gateway. + */ + DEBUG_TRACE("Gateway address will be looked up overwrite the rt_dst_addr\n"); +- ECM_NIN4_ADDR_TO_IP_ADDR(rt_dst_addr, rt->rt_gateway) ++ ECM_NIN4_ADDR_TO_IP_ADDR(rt_dst_addr, rt->rt_gw4) + gateway = true; + } + +--- a/frontends/include/ecm_front_end_common.h ++++ b/frontends/include/ecm_front_end_common.h +@@ -98,13 +98,6 @@ static inline bool ecm_front_end_acceler + return false; + } + +- if (unlikely(nf_ct_is_untracked(ct))) { +- /* +- * Untracked traffic certainly can't be accelerated. +- */ +- return true; +- } +- + #if (LINUX_VERSION_CODE <= KERNEL_VERSION(3, 6, 0)) + acct = nf_conn_acct_find(ct); + #else +--- a/frontends/nss/ecm_nss_bond_notifier.c ++++ b/frontends/nss/ecm_nss_bond_notifier.c +@@ -52,7 +52,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/frontends/nss/ecm_nss_common.h ++++ b/frontends/nss/ecm_nss_common.h +@@ -144,7 +144,7 @@ static inline int32_t ecm_nss_common_get_interface_type(struct ecm_front_end_con + /* + * If device is not GRETAP then return NONE. + */ +- if (!(dev->priv_flags & (IFF_GRE_V4_TAP | IFF_GRE_V6_TAP))) { ++ if (!(dev->priv_flags_qca_ecm & (IFF_QCA_ECM_GRE_V4_TAP | IFF_QCA_ECM_GRE_V6_TAP))) { + break; + } + #endif +--- a/frontends/nss/ecm_nss_ipv4.c ++++ b/frontends/nss/ecm_nss_ipv4.c +@@ -48,7 +48,6 @@ + #include + #include + #include +-#include + #if (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 2, 0)) + #include + #else +@@ -1053,7 +1052,7 @@ static unsigned int ecm_nss_ipv4_ip_process(struct net_device *out_dev, struct n + * If any of the input or output interface is a GRE V4 TAP/TUN interface + * we can continue to accelerate it. + */ +- if ((in_dev->priv_flags & IFF_GRE_V4_TAP) || (out_dev->priv_flags & IFF_GRE_V4_TAP)) { ++ if ((in_dev->priv_flags_qca_ecm & IFF_QCA_ECM_GRE_V4_TAP) || (out_dev->priv_flags_qca_ecm & IFF_QCA_ECM_GRE_V4_TAP)) { + #ifndef ECM_INTERFACE_GRE_TAP_ENABLE + DEBUG_TRACE("GRE TAP acceleration is disabled\n"); + return NF_ACCEPT; +@@ -1082,7 +1081,7 @@ static unsigned int ecm_nss_ipv4_ip_process(struct net_device *out_dev, struct n + reply_tuple.dst.u3.ip = orig_tuple.src.u3.ip; + sender = ECM_TRACKER_SENDER_TYPE_SRC; + } else { +- if (unlikely(ct == &nf_conntrack_untracked)) { ++ if (unlikely(ctinfo == IP_CT_UNTRACKED)) { + DEBUG_TRACE("%p: ct: untracked\n", skb); + return NF_ACCEPT; + } +@@ -2097,7 +2096,6 @@ sync_conntrack: + } + + ct = nf_ct_tuplehash_to_ctrack(h); +- NF_CT_ASSERT(ct->timeout.data == (unsigned long)ct); + DEBUG_TRACE("%p: NSS Sync: conntrack connection\n", ct); + + ecm_front_end_flow_and_return_directions_get(ct, flow_ip, 4, &flow_dir, &return_dir); +@@ -2108,7 +2106,7 @@ sync_conntrack: + */ + if (!test_bit(IPS_FIXED_TIMEOUT_BIT, &ct->status)) { + spin_lock_bh(&ct->lock); +- ct->timeout.expires += delta_jiffies; ++ ct->timeout += delta_jiffies; + spin_unlock_bh(&ct->lock); + } + +@@ -2166,17 +2164,15 @@ sync_conntrack: + u_int64_t reply_pkts = atomic64_read(&acct[IP_CT_DIR_REPLY].packets); + + if (reply_pkts != 0) { +- struct nf_conntrack_l4proto *l4proto; + unsigned int *timeouts; + + set_bit(IPS_SEEN_REPLY_BIT, &ct->status); + set_bit(IPS_ASSURED_BIT, &ct->status); + +- l4proto = __nf_ct_l4proto_find(AF_INET, IPPROTO_UDP); +- timeouts = nf_ct_timeout_lookup(&init_net, ct, l4proto); ++ timeouts = nf_ct_timeout_lookup(ct); + + spin_lock_bh(&ct->lock); +- ct->timeout.expires = jiffies + timeouts[UDP_CT_REPLIED]; ++ ct->timeout = jiffies + timeouts[UDP_CT_REPLIED]; + spin_unlock_bh(&ct->lock); + } + } +@@ -2690,7 +2686,8 @@ int ecm_nss_ipv4_init(struct dentry *dentry) + /* + * Register netfilter hooks + */ +- result = nf_register_hooks(ecm_nss_ipv4_netfilter_hooks, ARRAY_SIZE(ecm_nss_ipv4_netfilter_hooks)); ++ result = nf_register_net_hooks(&init_net, ecm_nss_ipv4_netfilter_hooks, \ ++ ARRAY_SIZE(ecm_nss_ipv4_netfilter_hooks)); + if (result < 0) { + DEBUG_ERROR("Can't register netfilter hooks.\n"); + nss_ipv4_notify_unregister(); +@@ -2702,8 +2699,8 @@ int ecm_nss_ipv4_init(struct dentry *dentry) + if (result < 0) { + DEBUG_ERROR("Failed to init ecm ipv4 multicast frontend\n"); + nss_ipv4_notify_unregister(); +- nf_unregister_hooks(ecm_nss_ipv4_netfilter_hooks, +- ARRAY_SIZE(ecm_nss_ipv4_netfilter_hooks)); ++ nf_unregister_net_hooks(&init_net, ecm_nss_ipv4_netfilter_hooks, ++ ARRAY_SIZE(ecm_nss_ipv4_netfilter_hooks)); + goto task_cleanup; + } + #endif +@@ -2714,8 +2711,8 @@ int ecm_nss_ipv4_init(struct dentry *dentry) + #ifdef ECM_MULTICAST_ENABLE + ecm_nss_multicast_ipv4_exit(); + #endif +- nf_unregister_hooks(ecm_nss_ipv4_netfilter_hooks, +- ARRAY_SIZE(ecm_nss_ipv4_netfilter_hooks)); ++ nf_unregister_net_hooks(&init_net, ecm_nss_ipv4_netfilter_hooks, ++ ARRAY_SIZE(ecm_nss_ipv4_netfilter_hooks)); + goto task_cleanup; + } + +@@ -2742,8 +2739,8 @@ void ecm_nss_ipv4_exit(void) + /* + * Stop the network stack hooks + */ +- nf_unregister_hooks(ecm_nss_ipv4_netfilter_hooks, +- ARRAY_SIZE(ecm_nss_ipv4_netfilter_hooks)); ++ nf_unregister_net_hooks(&init_net, ecm_nss_ipv4_netfilter_hooks, ++ ARRAY_SIZE(ecm_nss_ipv4_netfilter_hooks)); + + /* + * Unregister from the Linux NSS Network driver +--- a/frontends/nss/ecm_nss_ipv6.c ++++ b/frontends/nss/ecm_nss_ipv6.c +@@ -51,7 +51,6 @@ + #include + #include + #include +-#include + #if (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 2, 0)) + #include + #else +@@ -1035,7 +1034,7 @@ static unsigned int ecm_nss_ipv6_ip_process(struct net_device *out_dev, struct n + * If any of the input or output interface is a GRE V4 TAP/TUN interface + * we can continue to accelerate it. + */ +- if ((in_dev->priv_flags & IFF_GRE_V4_TAP) || (out_dev->priv_flags & IFF_GRE_V4_TAP)) { ++ if ((in_dev->priv_flags_qca_ecm & IFF_QCA_ECM_GRE_V4_TAP) || (out_dev->priv_flags_qca_ecm & IFF_QCA_ECM_GRE_V4_TAP)) { + #ifndef ECM_INTERFACE_GRE_TAP_ENABLE + DEBUG_TRACE("GRE TAP acceleration is disabled\n"); + return NF_ACCEPT; +@@ -1064,7 +1063,7 @@ static unsigned int ecm_nss_ipv6_ip_process(struct net_device *out_dev, struct n + ECM_IP_ADDR_TO_NIN6_ADDR(reply_tuple.dst.u3.in6, ip_hdr.src_addr); + sender = ECM_TRACKER_SENDER_TYPE_SRC; + } else { +- if (unlikely(ct == &nf_conntrack_untracked)) { ++ if (unlikely(ctinfo == IP_CT_UNTRACKED)) { + DEBUG_TRACE("%p: ct: untracked\n", skb); + return NF_ACCEPT; + } +@@ -1809,7 +1808,6 @@ sync_conntrack: + } + + ct = nf_ct_tuplehash_to_ctrack(h); +- NF_CT_ASSERT(ct->timeout.data == (unsigned long)ct); + DEBUG_TRACE("%p: NSS Sync: conntrack connection\n", ct); + + ecm_front_end_flow_and_return_directions_get(ct, flow_ip, 6, &flow_dir, &return_dir); +@@ -1820,7 +1818,7 @@ sync_conntrack: + */ + if (!test_bit(IPS_FIXED_TIMEOUT_BIT, &ct->status)) { + spin_lock_bh(&ct->lock); +- ct->timeout.expires += delta_jiffies; ++ ct->timeout += delta_jiffies; + spin_unlock_bh(&ct->lock); + } + +@@ -1878,17 +1876,15 @@ sync_conntrack: + u_int64_t reply_pkts = atomic64_read(&acct[IP_CT_DIR_REPLY].packets); + + if (reply_pkts != 0) { +- struct nf_conntrack_l4proto *l4proto; + unsigned int *timeouts; + + set_bit(IPS_SEEN_REPLY_BIT, &ct->status); + set_bit(IPS_ASSURED_BIT, &ct->status); + +- l4proto = __nf_ct_l4proto_find(AF_INET6, IPPROTO_UDP); +- timeouts = nf_ct_timeout_lookup(&init_net, ct, l4proto); ++ timeouts = nf_ct_timeout_lookup(ct); + + spin_lock_bh(&ct->lock); +- ct->timeout.expires = jiffies + timeouts[UDP_CT_REPLIED]; ++ ct->timeout = jiffies + timeouts[UDP_CT_REPLIED]; + spin_unlock_bh(&ct->lock); + } + } +@@ -2402,7 +2398,7 @@ int ecm_nss_ipv6_init(struct dentry *dentry) + /* + * Register netfilter hooks + */ +- result = nf_register_hooks(ecm_nss_ipv6_netfilter_hooks, ARRAY_SIZE(ecm_nss_ipv6_netfilter_hooks)); ++ result = nf_register_net_hooks(&init_net, ecm_nss_ipv6_netfilter_hooks, ARRAY_SIZE(ecm_nss_ipv6_netfilter_hooks)); + if (result < 0) { + DEBUG_ERROR("Can't register netfilter hooks.\n"); + nss_ipv6_notify_unregister(); +@@ -2414,8 +2410,8 @@ int ecm_nss_ipv6_init(struct dentry *dentry) + if (result < 0) { + DEBUG_ERROR("Failed to init ecm ipv6 multicast frontend\n"); + nss_ipv6_notify_unregister(); +- nf_unregister_hooks(ecm_nss_ipv6_netfilter_hooks, +- ARRAY_SIZE(ecm_nss_ipv6_netfilter_hooks)); ++ nf_unregister_net_hooks(&init_net, ecm_nss_ipv6_netfilter_hooks, ++ ARRAY_SIZE(ecm_nss_ipv6_netfilter_hooks)); + goto task_cleanup; + } + #endif +@@ -2426,8 +2422,8 @@ int ecm_nss_ipv6_init(struct dentry *dentry) + #ifdef ECM_MULTICAST_ENABLE + ecm_nss_multicast_ipv6_exit(); + #endif +- nf_unregister_hooks(ecm_nss_ipv6_netfilter_hooks, +- ARRAY_SIZE(ecm_nss_ipv6_netfilter_hooks)); ++ nf_unregister_net_hooks(&init_net, ecm_nss_ipv6_netfilter_hooks, ++ ARRAY_SIZE(ecm_nss_ipv6_netfilter_hooks)); + goto task_cleanup; + } + +@@ -2453,8 +2449,8 @@ void ecm_nss_ipv6_exit(void) + /* + * Stop the network stack hooks + */ +- nf_unregister_hooks(ecm_nss_ipv6_netfilter_hooks, +- ARRAY_SIZE(ecm_nss_ipv6_netfilter_hooks)); ++ nf_unregister_net_hooks(&init_net, ecm_nss_ipv6_netfilter_hooks, ++ ARRAY_SIZE(ecm_nss_ipv6_netfilter_hooks)); + + /* + * Unregister from the Linux NSS Network driver +--- a/frontends/nss/ecm_nss_multicast_ipv4.c ++++ b/frontends/nss/ecm_nss_multicast_ipv4.c +@@ -50,7 +50,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/frontends/nss/ecm_nss_multicast_ipv6.c ++++ b/frontends/nss/ecm_nss_multicast_ipv6.c +@@ -51,7 +51,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/frontends/nss/ecm_nss_non_ported_ipv4.c ++++ b/frontends/nss/ecm_nss_non_ported_ipv4.c +@@ -47,7 +47,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -640,7 +639,7 @@ static void ecm_nss_non_ported_ipv4_connection_accelerate(struct ecm_front_end_c + #ifdef ECM_INTERFACE_GRE_TAP_ENABLE + dev = dev_get_by_index(&init_net, ecm_db_iface_interface_identifier_get(ii)); + if (dev) { +- if (dev->priv_flags & IFF_GRE_V4_TAP) { ++ if (dev->priv_flags_qca_ecm & IFF_QCA_ECM_GRE_V4_TAP) { + /* + * Clear QOS_VALID to prevent outer rule from overwriting + * inner flow's QoS classification. +--- a/frontends/nss/ecm_nss_non_ported_ipv6.c ++++ b/frontends/nss/ecm_nss_non_ported_ipv6.c +@@ -47,7 +47,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -548,7 +547,7 @@ static void ecm_nss_non_ported_ipv6_connection_accelerate(struct ecm_front_end_c + #ifdef ECM_INTERFACE_GRE_TAP_ENABLE + dev = dev_get_by_index(&init_net, ecm_db_iface_interface_identifier_get(ii)); + if (dev) { +- if (dev->priv_flags & IFF_GRE_V6_TAP) { ++ if (dev->priv_flags_qca_ecm & IFF_QCA_ECM_GRE_V6_TAP) { + /* + * Clear QOS_VALID to prevent outer rule from overwriting + * inner flow's QoS classification. +--- a/frontends/nss/ecm_nss_ported_ipv4.c ++++ b/frontends/nss/ecm_nss_ported_ipv4.c +@@ -47,7 +47,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/frontends/nss/ecm_nss_ported_ipv6.c ++++ b/frontends/nss/ecm_nss_ported_ipv6.c +@@ -47,7 +47,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -1996,7 +1995,7 @@ unsigned int ecm_nss_ported_ipv6_process + /* + * Deny acceleration for L2TP-over-UDP tunnel + */ +- if ((in_dev->priv_flags & IFF_PPP_L2TPV2) && ppp_is_xmit_locked(in_dev)) { ++ if ((in_dev->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_L2TPV2) && ppp_is_xmit_locked(in_dev)) { + DEBUG_TRACE("Skip packets for L2TP tunnel in skb %p\n", skb); + can_accel = false; + } +--- a/frontends/sfe/ecm_sfe_ipv4.c ++++ b/frontends/sfe/ecm_sfe_ipv4.c +@@ -47,7 +47,6 @@ + #include + #include + #include +-#include + #if (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 2, 0)) + #include + #else +@@ -746,7 +745,8 @@ static unsigned int ecm_sfe_ipv4_ip_proc + * If skb_dst(skb)->xfrm is not null, packet is to be encrypted by ipsec, we can't accelerate it. + * If skb->sp is not null, packet is decrypted by ipsec. We only accelerate it when configuration didn't reject ipsec. + */ +- if (unlikely((skb_dst(skb) && skb_dst(skb)->xfrm) || (ecm_sfe_ipv4_reject_acceleration_for_ipsec && skb->sp))) { ++ if (unlikely((skb_dst(skb) && skb_dst(skb)->xfrm) || \ ++ (ecm_sfe_ipv4_reject_acceleration_for_ipsec && skb_ext_exist(skb, SKB_EXT_SEC_PATH)))) { + DEBUG_TRACE("skip local ipsec flows\n"); + return NF_ACCEPT; + } +@@ -762,7 +762,7 @@ static unsigned int ecm_sfe_ipv4_ip_process(struct net_device *out_dev, struct n + reply_tuple.dst.u3.ip = orig_tuple.src.u3.ip; + sender = ECM_TRACKER_SENDER_TYPE_SRC; + } else { +- if (unlikely(ct == &nf_conntrack_untracked)) { ++ if (unlikely(ctinfo == IP_CT_UNTRACKED)) { + DEBUG_TRACE("%p: ct: untracked\n", skb); + return NF_ACCEPT; + } +@@ -1531,7 +1526,6 @@ sync_conntrack: + } + + ct = nf_ct_tuplehash_to_ctrack(h); +- NF_CT_ASSERT(ct->timeout.data == (unsigned long)ct); + DEBUG_TRACE("%p: SFE Sync: conntrack connection\n", ct); + + ecm_front_end_flow_and_return_directions_get(ct, flow_ip, 4, &flow_dir, &return_dir); +@@ -1551,7 +1545,7 @@ sync_conntrack: + delta_jiffies = ((sync->inc_ticks * HZ) + (MSEC_PER_SEC / 2)) / MSEC_PER_SEC; + + spin_lock_bh(&ct->lock); +- ct->timeout.expires += delta_jiffies; ++ ct->timeout += delta_jiffies; + spin_unlock_bh(&ct->lock); + } + +@@ -1609,17 +1603,15 @@ sync_conntrack: + u_int64_t reply_pkts = atomic64_read(&acct[IP_CT_DIR_REPLY].packets); + + if (reply_pkts != 0) { +- struct nf_conntrack_l4proto *l4proto; + unsigned int *timeouts; + + set_bit(IPS_SEEN_REPLY_BIT, &ct->status); + set_bit(IPS_ASSURED_BIT, &ct->status); + +- l4proto = __nf_ct_l4proto_find(AF_INET, IPPROTO_UDP); +- timeouts = nf_ct_timeout_lookup(&init_net, ct, l4proto); ++ timeouts = nf_ct_timeout_lookup(ct); + + spin_lock_bh(&ct->lock); +- ct->timeout.expires = jiffies + timeouts[UDP_CT_REPLIED]; ++ ct->timeout = jiffies + timeouts[UDP_CT_REPLIED]; + spin_unlock_bh(&ct->lock); + } + } +@@ -1901,7 +1893,7 @@ int ecm_sfe_ipv4_init(struct dentry *den + /* + * Register netfilter hooks + */ +- result = nf_register_hooks(ecm_sfe_ipv4_netfilter_hooks, ARRAY_SIZE(ecm_sfe_ipv4_netfilter_hooks)); ++ result = nf_register_net_hooks(&init_net, ecm_sfe_ipv4_netfilter_hooks, ARRAY_SIZE(ecm_sfe_ipv4_netfilter_hooks)); + if (result < 0) { + DEBUG_ERROR("Can't register netfilter hooks.\n"); + sfe_drv_ipv4_notify_unregister(); +@@ -1934,8 +1926,8 @@ void ecm_sfe_ipv4_exit(void) + /* + * Stop the network stack hooks + */ +- nf_unregister_hooks(ecm_sfe_ipv4_netfilter_hooks, +- ARRAY_SIZE(ecm_sfe_ipv4_netfilter_hooks)); ++ nf_unregister_net_hooks(&init_net, ecm_sfe_ipv4_netfilter_hooks, ++ ARRAY_SIZE(ecm_sfe_ipv4_netfilter_hooks)); + + /* + * Unregister from the simulated sfe driver +--- a/frontends/sfe/ecm_sfe_ipv6.c ++++ b/frontends/sfe/ecm_sfe_ipv6.c +@@ -51,7 +51,6 @@ + #include + #include + #include +-#include + #if (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 2, 0)) + #include + #else +@@ -714,7 +713,8 @@ static unsigned int ecm_sfe_ipv6_ip_proc + * If skb_dst(skb)->xfrm is not null, packet is to be encrypted by ipsec, we can't accelerate it. + * If skb->sp is not null, packet is decrypted by ipsec. We only accelerate it when configuration didn't reject ipsec. + */ +- if (unlikely((skb_dst(skb) && skb_dst(skb)->xfrm) || (ecm_sfe_ipv6_reject_acceleration_for_ipsec && skb->sp))) { ++ if (unlikely((skb_dst(skb) && skb_dst(skb)->xfrm) || \ ++ (ecm_sfe_ipv6_reject_acceleration_for_ipsec && skb_ext_exist(skb, SKB_EXT_SEC_PATH)))) { + DEBUG_TRACE("skip local ipsec flows\n"); + return NF_ACCEPT; + } +@@ -733,7 +733,7 @@ static unsigned int ecm_sfe_ipv6_ip_proc + ECM_IP_ADDR_TO_NIN6_ADDR(reply_tuple.dst.u3.in6, ip_hdr.src_addr); + sender = ECM_TRACKER_SENDER_TYPE_SRC; + } else { +- if (unlikely(ct == &nf_conntrack_untracked)) { ++ if (unlikely(ctinfo == IP_CT_UNTRACKED)) { + DEBUG_TRACE("%p: ct: untracked\n", skb); + return NF_ACCEPT; + } +@@ -1255,7 +1255,6 @@ sync_conntrack: + } + + ct = nf_ct_tuplehash_to_ctrack(h); +- NF_CT_ASSERT(ct->timeout.data == (unsigned long)ct); + DEBUG_TRACE("%p: SFE Sync: conntrack connection\n", ct); + + ecm_front_end_flow_and_return_directions_get(ct, flow_ip, 6, &flow_dir, &return_dir); +@@ -1275,7 +1274,7 @@ sync_conntrack: + delta_jiffies = ((sync->inc_ticks * HZ) + (MSEC_PER_SEC / 2)) / MSEC_PER_SEC; + + spin_lock_bh(&ct->lock); +- ct->timeout.expires += delta_jiffies; ++ ct->timeout += delta_jiffies; + spin_unlock_bh(&ct->lock); + } + #if (LINUX_VERSION_CODE <= KERNEL_VERSION(3,6,0)) +@@ -1332,17 +1331,15 @@ sync_conntrack: + u_int64_t reply_pkts = atomic64_read(&acct[IP_CT_DIR_REPLY].packets); + + if (reply_pkts != 0) { +- struct nf_conntrack_l4proto *l4proto; + unsigned int *timeouts; + + set_bit(IPS_SEEN_REPLY_BIT, &ct->status); + set_bit(IPS_ASSURED_BIT, &ct->status); + +- l4proto = __nf_ct_l4proto_find(AF_INET6, IPPROTO_UDP); +- timeouts = nf_ct_timeout_lookup(&init_net, ct, l4proto); ++ timeouts = nf_ct_timeout_lookup(ct); + + spin_lock_bh(&ct->lock); +- ct->timeout.expires = jiffies + timeouts[UDP_CT_REPLIED]; ++ ct->timeout = jiffies + timeouts[UDP_CT_REPLIED]; + spin_unlock_bh(&ct->lock); + } + } +@@ -1624,7 +1621,7 @@ int ecm_sfe_ipv6_init(struct dentry *den + /* + * Register netfilter hooks + */ +- result = nf_register_hooks(ecm_sfe_ipv6_netfilter_hooks, ARRAY_SIZE(ecm_sfe_ipv6_netfilter_hooks)); ++ result = nf_register_net_hooks(&init_net, ecm_sfe_ipv6_netfilter_hooks, ARRAY_SIZE(ecm_sfe_ipv6_netfilter_hooks)); + if (result < 0) { + DEBUG_ERROR("Can't register netfilter hooks.\n"); + sfe_drv_ipv6_notify_unregister(); +@@ -1656,8 +1653,8 @@ void ecm_sfe_ipv6_exit(void) + /* + * Stop the network stack hooks + */ +- nf_unregister_hooks(ecm_sfe_ipv6_netfilter_hooks, +- ARRAY_SIZE(ecm_sfe_ipv6_netfilter_hooks)); ++ nf_unregister_net_hooks(&init_net, ecm_sfe_ipv6_netfilter_hooks, ++ ARRAY_SIZE(ecm_sfe_ipv6_netfilter_hooks)); + + /* + * Unregister from the Linux SFE Network driver +--- a/frontends/sfe/ecm_sfe_non_ported_ipv4.c ++++ b/frontends/sfe/ecm_sfe_non_ported_ipv4.c +@@ -46,7 +46,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -1829,7 +1828,7 @@ unsigned int ecm_sfe_non_ported_ipv4_pro + /* + * Packet has been decrypted by ipsec, mark it in connection. + */ +- if (unlikely(skb->sp)) { ++ if (unlikely(skb_ext_exist(skb, SKB_EXT_SEC_PATH))) { + ((struct ecm_sfe_non_ported_ipv4_connection_instance *)feci)->flow_ipsec_state = ECM_SFE_IPSEC_STATE_WAS_DECRYPTED; + ((struct ecm_sfe_non_ported_ipv4_connection_instance *)feci)->return_ipsec_state = ECM_SFE_IPSEC_STATE_TO_ENCRYPT; + } +--- a/frontends/sfe/ecm_sfe_non_ported_ipv6.c ++++ b/frontends/sfe/ecm_sfe_non_ported_ipv6.c +@@ -47,7 +47,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -1710,7 +1709,7 @@ unsigned int ecm_sfe_non_ported_ipv6_pro + /* + * Packet has been decrypted by ipsec, mark it in connection. + */ +- if (unlikely(skb->sp)) { ++ if (unlikely(skb_ext_exist(skb, SKB_EXT_SEC_PATH))) { + ((struct ecm_sfe_non_ported_ipv6_connection_instance *)feci)->flow_ipsec_state = ECM_SFE_IPSEC_STATE_WAS_DECRYPTED; + ((struct ecm_sfe_non_ported_ipv6_connection_instance *)feci)->return_ipsec_state = ECM_SFE_IPSEC_STATE_TO_ENCRYPT; + } +--- a/frontends/sfe/ecm_sfe_ported_ipv4.c ++++ b/frontends/sfe/ecm_sfe_ported_ipv4.c +@@ -46,7 +46,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -2053,7 +2052,7 @@ unsigned int ecm_sfe_ported_ipv4_process + /* + * Packet has been decrypted by ipsec, mark it in connection. + */ +- if (unlikely(skb->sp)) { ++ if (unlikely(skb_ext_exist(skb, SKB_EXT_SEC_PATH))) { + ((struct ecm_sfe_ported_ipv4_connection_instance *)feci)->flow_ipsec_state = ECM_SFE_IPSEC_STATE_WAS_DECRYPTED; + ((struct ecm_sfe_ported_ipv4_connection_instance *)feci)->return_ipsec_state = ECM_SFE_IPSEC_STATE_TO_ENCRYPT; + } +--- a/frontends/sfe/ecm_sfe_ported_ipv6.c ++++ b/frontends/sfe/ecm_sfe_ported_ipv6.c +@@ -47,7 +47,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -1826,7 +1825,7 @@ unsigned int ecm_sfe_ported_ipv6_process + /* + * Deny acceleration for L2TP-over-UDP tunnel + */ +- if ((in_dev->priv_flags & IFF_PPP_L2TPV2) && ppp_is_xmit_locked(in_dev)) { ++ if ((in_dev->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_L2TPV2) && ppp_is_xmit_locked(in_dev)) { + DEBUG_TRACE("Skip packets for L2TP tunnel in skb %p\n", skb); + can_accel = false; + } +@@ -1958,7 +1957,7 @@ unsigned int ecm_sfe_ported_ipv6_process + /* + * Packet has been decrypted by ipsec, mark it in connection. + */ +- if (unlikely(skb->sp)) { ++ if (unlikely(skb_ext_exist(skb, SKB_EXT_SEC_PATH))) { + ((struct ecm_sfe_ported_ipv6_connection_instance *)feci)->flow_ipsec_state = ECM_SFE_IPSEC_STATE_WAS_DECRYPTED; + ((struct ecm_sfe_ported_ipv6_connection_instance *)feci)->return_ipsec_state = ECM_SFE_IPSEC_STATE_TO_ENCRYPT; + } diff --git a/package/nss/qca/qca-nss-ecm/patches/101-Fix_Kern_Panic_on_UDP_CONNTRACK.patch b/package/nss/qca/qca-nss-ecm/patches/101-Fix_Kern_Panic_on_UDP_CONNTRACK.patch new file mode 100644 index 000000000..6633f72b4 --- /dev/null +++ b/package/nss/qca/qca-nss-ecm/patches/101-Fix_Kern_Panic_on_UDP_CONNTRACK.patch @@ -0,0 +1,60 @@ +diff --git a/frontends/nss/ecm_nss_ipv4.c b/frontends/nss/ecm_nss_ipv4.c +index 1ce4b61..29e70ba 100644 +--- a/frontends/nss/ecm_nss_ipv4.c ++++ b/frontends/nss/ecm_nss_ipv4.c +@@ -2171,6 +2171,10 @@ sync_conntrack: + + timeouts = nf_ct_timeout_lookup(ct); + ++ /* Copy of udp_get_timeouts in kernel */ ++ if (!timeouts) ++ timeouts = nf_udp_pernet(nf_ct_net(ct))->timeouts; ++ + spin_lock_bh(&ct->lock); + ct->timeout = jiffies + timeouts[UDP_CT_REPLIED]; + spin_unlock_bh(&ct->lock); +diff --git a/frontends/nss/ecm_nss_ipv6.c b/frontends/nss/ecm_nss_ipv6.c +index 2adc5ec..08253b6 100644 +--- a/frontends/nss/ecm_nss_ipv6.c ++++ b/frontends/nss/ecm_nss_ipv6.c +@@ -1883,6 +1883,10 @@ sync_conntrack: + + timeouts = nf_ct_timeout_lookup(ct); + ++ /* Copy of udp_get_timeouts in kernel */ ++ if (!timeouts) ++ timeouts = nf_udp_pernet(nf_ct_net(ct))->timeouts; ++ + spin_lock_bh(&ct->lock); + ct->timeout = jiffies + timeouts[UDP_CT_REPLIED]; + spin_unlock_bh(&ct->lock); +diff --git a/frontends/sfe/ecm_sfe_ipv4.c b/frontends/sfe/ecm_sfe_ipv4.c +index 7cfe4fc..8f525ee 100644 +--- a/frontends/sfe/ecm_sfe_ipv4.c ++++ b/frontends/sfe/ecm_sfe_ipv4.c +@@ -1608,6 +1608,10 @@ sync_conntrack: + + timeouts = nf_ct_timeout_lookup(ct); + ++ /* Copy of udp_get_timeouts in kernel */ ++ if (!timeouts) ++ timeouts = nf_udp_pernet(nf_ct_net(ct))->timeouts; ++ + spin_lock_bh(&ct->lock); + ct->timeout = jiffies + timeouts[UDP_CT_REPLIED]; + spin_unlock_bh(&ct->lock); +diff --git a/frontends/sfe/ecm_sfe_ipv6.c b/frontends/sfe/ecm_sfe_ipv6.c +index dfde309..47c531a 100644 +--- a/frontends/sfe/ecm_sfe_ipv6.c ++++ b/frontends/sfe/ecm_sfe_ipv6.c +@@ -1321,6 +1321,10 @@ sync_conntrack: + + timeouts = nf_ct_timeout_lookup(ct); + ++ /* Copy of udp_get_timeouts in kernel */ ++ if (!timeouts) ++ timeouts = nf_udp_pernet(nf_ct_net(ct))->timeouts; ++ + spin_lock_bh(&ct->lock); + ct->timeout = jiffies + timeouts[UDP_CT_REPLIED]; + spin_unlock_bh(&ct->lock); diff --git a/package/nss/qca/qca-nss-ecm/patches/200-resolve-high-load.patch b/package/nss/qca/qca-nss-ecm/patches/200-resolve-high-load.patch new file mode 100644 index 000000000..2f39d2770 --- /dev/null +++ b/package/nss/qca/qca-nss-ecm/patches/200-resolve-high-load.patch @@ -0,0 +1,44 @@ +The sync update work queue tasks is calling uninterruptible sleep function, which is +causing high CPU load. Changed to interruptible sleep function. The stats update +task should be interruptible. + +--- a/frontends/nss/ecm_nss_ipv4.c ++++ b.frontends/nss/ecm_nss_ipv4.c +@@ -2411,7 +2411,7 @@ static void ecm_nss_ipv4_stats_sync_req_ + } + spin_unlock_bh(&ecm_nss_ipv4_lock); + +- usleep_range(ECM_NSS_IPV4_STATS_SYNC_UDELAY - 100, ECM_NSS_IPV4_STATS_SYNC_UDELAY); ++ msleep_interruptible(ECM_NSS_IPV4_STATS_SYNC_UDELAY / 1000); + + /* + * If index is 0, we are starting a new round, but if we still have time remain +@@ -2425,7 +2425,7 @@ static void ecm_nss_ipv4_stats_sync_req_ + } + + if (ecm_nss_ipv4_next_req_time > current_jiffies) { +- msleep(jiffies_to_msecs(ecm_nss_ipv4_next_req_time - current_jiffies)); ++ msleep_interruptible(jiffies_to_msecs(ecm_nss_ipv4_next_req_time - current_jiffies)); + } + ecm_nss_ipv4_roll_check_jiffies = jiffies; + ecm_nss_ipv4_next_req_time = ecm_nss_ipv4_roll_check_jiffies + ECM_NSS_IPV4_STATS_SYNC_PERIOD; +--- a/frontends/nss/ecm_nss_ipv6.c ++++ b.frontends/nss/ecm_nss_ipv6.c +@@ -2128,7 +2128,7 @@ static void ecm_nss_ipv6_stats_sync_req_ + } + spin_unlock_bh(&ecm_nss_ipv6_lock); + +- usleep_range(ECM_NSS_IPV6_STATS_SYNC_UDELAY - 100, ECM_NSS_IPV6_STATS_SYNC_UDELAY); ++ msleep_interruptible(ECM_NSS_IPV6_STATS_SYNC_UDELAY / 1000); + + /* + * If index is 0, we are starting a new round, but if we still have time remain +@@ -2142,7 +2142,7 @@ static void ecm_nss_ipv6_stats_sync_req_ + } + + if (ecm_nss_ipv6_next_req_time > current_jiffies) { +- msleep(jiffies_to_msecs(ecm_nss_ipv6_next_req_time - current_jiffies)); ++ msleep_interruptible(jiffies_to_msecs(ecm_nss_ipv6_next_req_time - current_jiffies)); + } + ecm_nss_ipv6_roll_check_jiffies = jiffies; + ecm_nss_ipv6_next_req_time = ecm_nss_ipv6_roll_check_jiffies + ECM_NSS_IPV6_STATS_SYNC_PERIOD; diff --git a/package/nss/qca/qca-nss-ecm/patches/203-rework-nfct-notification.patch b/package/nss/qca/qca-nss-ecm/patches/203-rework-nfct-notification.patch index 72005cd70..a0e09c1fa 100644 --- a/package/nss/qca/qca-nss-ecm/patches/203-rework-nfct-notification.patch +++ b/package/nss/qca/qca-nss-ecm/patches/203-rework-nfct-notification.patch @@ -1,25 +1,20 @@ --- a/ecm_conntrack_notifier.c +++ b/ecm_conntrack_notifier.c -@@ -421,7 +421,11 @@ int ecm_conntrack_notifier_init(struct d +@@ -411,7 +411,7 @@ int ecm_conntrack_notifier_init(struct d /* * Eventing subsystem is available so we register a notifier hook to get fast notifications of expired connections */ -+#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS +- result = nf_conntrack_register_notifier(&init_net, &ecm_conntrack_notifier); + result = nf_conntrack_register_chain_notifier(&init_net, &ecm_conntrack_notifier); -+#else - result = nf_conntrack_register_notifier(&init_net, &ecm_conntrack_notifier); -+#endif if (result < 0) { DEBUG_ERROR("Can't register nf notifier hook.\n"); debugfs_remove_recursive(ecm_conntrack_notifier_dentry); -@@ -439,7 +443,9 @@ EXPORT_SYMBOL(ecm_conntrack_notifier_ini - void ecm_conntrack_notifier_exit(void) +@@ -430,7 +430,7 @@ void ecm_conntrack_notifier_exit(void) { DEBUG_INFO("ECM Conntrack Notifier exit\n"); --#ifdef CONFIG_NF_CONNTRACK_EVENTS -+#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS + #ifdef CONFIG_NF_CONNTRACK_EVENTS +- nf_conntrack_unregister_notifier(&init_net, &ecm_conntrack_notifier); + nf_conntrack_unregister_chain_notifier(&init_net, &ecm_conntrack_notifier); -+#else - nf_conntrack_unregister_notifier(&init_net, &ecm_conntrack_notifier); #endif /* + * Remove the debugfs files recursively. diff --git a/package/nss/qca/qca-nss-ecm/patches/204-More-compile-fixes.patch b/package/nss/qca/qca-nss-ecm/patches/204-More-compile-fixes.patch deleted file mode 100644 index a998d8295..000000000 --- a/package/nss/qca/qca-nss-ecm/patches/204-More-compile-fixes.patch +++ /dev/null @@ -1,58 +0,0 @@ -From e6d701c0d454d841366c556b2ef07a5203ffb35d Mon Sep 17 00:00:00 2001 -From: Robert Marko -Date: Fri, 21 May 2021 21:41:31 +0200 -Subject: [PATCH] More compile fixes - -More runtime compile fixes. - -Signed-off-by: Robert Marko ---- - frontends/nss/ecm_nss_ported_ipv4.c | 12 +++--------- - frontends/nss/ecm_nss_ported_ipv6.c | 12 +++--------- - 2 files changed, 6 insertions(+), 18 deletions(-) - -diff --git a/frontends/nss/ecm_nss_ported_ipv4.c b/frontends/nss/ecm_nss_ported_ipv4.c -index 3522f0f..7f5fcd1 100644 ---- a/frontends/nss/ecm_nss_ported_ipv4.c -+++ b/frontends/nss/ecm_nss_ported_ipv4.c -@@ -2935,14 +2935,8 @@ done: - */ - bool ecm_nss_ported_ipv4_debugfs_init(struct dentry *dentry) - { -- struct dentry *udp_dentry; -- -- udp_dentry = debugfs_create_u32("udp_accelerated_count", S_IRUGO, dentry, -+ debugfs_create_u32("udp_accelerated_count", S_IRUGO, dentry, - &ecm_nss_ported_ipv4_accelerated_count[ECM_NSS_PORTED_IPV4_PROTO_UDP]); -- if (!udp_dentry) { -- DEBUG_ERROR("Failed to create ecm nss ipv4 udp_accelerated_count file in debugfs\n"); -- return false; -- } - - debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry, - &ecm_nss_ported_ipv4_accelerated_count[ECM_NSS_PORTED_IPV4_PROTO_TCP]); -diff --git a/frontends/nss/ecm_nss_ported_ipv6.c b/frontends/nss/ecm_nss_ported_ipv6.c -index f43ac95..e0f779c 100644 ---- a/frontends/nss/ecm_nss_ported_ipv6.c -+++ b/frontends/nss/ecm_nss_ported_ipv6.c - /* - * ecm_nss_ported_ipv6_connection_callback() -@@ -2723,14 +2723,8 @@ done: - */ - bool ecm_nss_ported_ipv6_debugfs_init(struct dentry *dentry) - { -- struct dentry *udp_dentry; -- -- udp_dentry = debugfs_create_u32("udp_accelerated_count", S_IRUGO, dentry, -+ debugfs_create_u32("udp_accelerated_count", S_IRUGO, dentry, - &ecm_nss_ported_ipv6_accelerated_count[ECM_NSS_PORTED_IPV6_PROTO_UDP]); -- if (!udp_dentry) { -- DEBUG_ERROR("Failed to create ecm nss ipv6 udp_accelerated_count file in debugfs\n"); -- return false; -- } - - debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry, - &ecm_nss_ported_ipv6_accelerated_count[ECM_NSS_PORTED_IPV6_PROTO_TCP]); --- -2.31.1 - diff --git a/package/nss/qca/qca-nss-ecm/patches/400-Check-TCP_UDP-conntrack-state-earlier.patch b/package/nss/qca/qca-nss-ecm/patches/400-Check-TCP_UDP-conntrack-state-earlier.patch new file mode 100644 index 000000000..b7882c1b3 --- /dev/null +++ b/package/nss/qca/qca-nss-ecm/patches/400-Check-TCP_UDP-conntrack-state-earlier.patch @@ -0,0 +1,236 @@ +From 90cace88a342e77ee8ca1e961cf7b7a7930d4c89 Mon Sep 17 00:00:00 2001 +From: Murat Sezgin +Date: Mon, 9 Mar 2020 12:51:03 -0700 +Subject: [qca-nss-ecm] Check TCP/UDP conntrack state earlier + +Check the conntrack state before processing the flow +and adding it to the database. The unconfirmed +connections can be changed after the confirmation. + +Changed the TCP tracker connection state matrix to set the +state of the connection as ESTABLISHED when any of the src or +dest side is set as ESTABLISHED. With this change ECM will not +handle the SYN and SYN-ACK packets of the TCP handshake. Only the +ACK and FIN flaged packets will be used during the creation and +closing the connection respectively. + +Signed-off-by: Murat Sezgin +Change-Id: I3e0a58d604df4c6a85478ca9c05f24d50cd8c894 +--- + ecm_classifier_default.c | 36 ++++++++---------------------------- + ecm_tracker_tcp.c | 4 ++-- + frontends/nss/ecm_nss_ported_ipv4.c | 17 +++++++++++++++++ + frontends/nss/ecm_nss_ported_ipv6.c | 17 +++++++++++++++++ + frontends/sfe/ecm_sfe_ported_ipv4.c | 17 +++++++++++++++++ + frontends/sfe/ecm_sfe_ported_ipv6.c | 17 +++++++++++++++++ + 6 files changed, 78 insertions(+), 30 deletions(-) + +diff --git a/ecm_classifier_default.c b/ecm_classifier_default.c +index 22c4bec..d04cdfa 100644 +--- a/ecm_classifier_default.c ++++ b/ecm_classifier_default.c +@@ -1,6 +1,6 @@ + /* + ************************************************************************** +- * Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. ++ * Copyright (c) 2014-2016, 2020, The Linux Foundation. All rights reserved. + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all copies. +@@ -285,12 +285,12 @@ static void ecm_classifier_default_process(struct ecm_classifier_instance *aci, + } + + /* +- * Check the TCP connection state. ++ * Check the TCP connection state, when the ct is NULL. ++ * ct valid case was already checked in the ecm_nss{sfe}_ported_ipv4{6}_process functions. + * If we are not established then we deny acceleration. +- * Take lead from conntrack if exists. + */ + ct = nf_ct_get(skb, &ctinfo); +- if (ct == NULL) { ++ if (!ct) { + DEBUG_TRACE("%p: No Conntrack found for packet, using ECM tracker state\n", cdii); + if (unlikely(prevailing_state != ECM_TRACKER_CONNECTION_STATE_ESTABLISHED)) { + cdii->process_response.accel_mode = ECM_CLASSIFIER_ACCELERATION_MODE_NO; +@@ -298,29 +298,10 @@ static void ecm_classifier_default_process(struct ecm_classifier_instance *aci, + } + } else { + /* +- * Unconfirmed connection may be dropped by Linux at the final step, +- * So we don't allow acceleration for the unconfirmed connections. +- */ +- if (!nf_ct_is_confirmed(ct)) { +- DEBUG_TRACE("%p: Unconfirmed connection\n", ct); +- cdii->process_response.accel_mode = ECM_CLASSIFIER_ACCELERATION_MODE_NO; +- goto return_response; +- } +- +- /* +- * Don't try to manage a non-established connection. +- */ +- if (!test_bit(IPS_ASSURED_BIT, &ct->status)) { +- DEBUG_TRACE("%p: Non-established connection\n", ct); +- cdii->process_response.accel_mode = ECM_CLASSIFIER_ACCELERATION_MODE_NO; +- goto return_response; +- } +- +- /* +- * If the connection is shutting down do not manage it. +- * state can not be SYN_SENT, SYN_RECV because connection is assured +- * Not managed states: FIN_WAIT, CLOSE_WAIT, LAST_ACK, TIME_WAIT, CLOSE. +- */ ++ * If the connection is shutting down do not manage it. ++ * state can not be SYN_SENT, SYN_RECV because connection is assured ++ * Not managed states: FIN_WAIT, CLOSE_WAIT, LAST_ACK, TIME_WAIT, CLOSE. ++ */ + spin_lock_bh(&ct->lock); + if (ct->proto.tcp.state != TCP_CONNTRACK_ESTABLISHED) { + spin_unlock_bh(&ct->lock); +@@ -333,7 +314,6 @@ static void ecm_classifier_default_process(struct ecm_classifier_instance *aci, + + return_response: + ; +- + /* + * Return the process response + */ +diff --git a/ecm_tracker_tcp.c b/ecm_tracker_tcp.c +index f073c36..e5b327a 100644 +--- a/ecm_tracker_tcp.c ++++ b/ecm_tracker_tcp.c +@@ -257,9 +257,9 @@ static DEFINE_SPINLOCK(ecm_tracker_tcp_lock); /* Global lock for the tracker gl + */ + static ecm_tracker_connection_state_t ecm_tracker_tcp_connection_state_matrix[ECM_TRACKER_SENDER_STATE_MAX][ECM_TRACKER_SENDER_STATE_MAX] = + { /* Unknown Establishing Established Closing Closed Fault */ +- /* Unknown */ {ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT}, ++ /* Unknown */ {ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_ESTABLISHED, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT}, + /* Establishing */ {ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT}, +- /* Established */ {ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_ESTABLISHED, ECM_TRACKER_CONNECTION_STATE_CLOSING, ECM_TRACKER_CONNECTION_STATE_CLOSING, ECM_TRACKER_CONNECTION_STATE_FAULT}, ++ /* Established */ {ECM_TRACKER_CONNECTION_STATE_ESTABLISHED, ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_ESTABLISHED, ECM_TRACKER_CONNECTION_STATE_CLOSING, ECM_TRACKER_CONNECTION_STATE_CLOSING, ECM_TRACKER_CONNECTION_STATE_FAULT}, + /* Closing */ {ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_CLOSING, ECM_TRACKER_CONNECTION_STATE_CLOSING, ECM_TRACKER_CONNECTION_STATE_CLOSING, ECM_TRACKER_CONNECTION_STATE_FAULT}, + /* Closed */ {ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_CLOSING, ECM_TRACKER_CONNECTION_STATE_CLOSING, ECM_TRACKER_CONNECTION_STATE_CLOSED, ECM_TRACKER_CONNECTION_STATE_FAULT}, + /* Fault */ {ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT}, +diff --git a/frontends/nss/ecm_nss_ported_ipv4.c b/frontends/nss/ecm_nss_ported_ipv4.c +index 1435ec0..34c056f 100644 +--- a/frontends/nss/ecm_nss_ported_ipv4.c ++++ b/frontends/nss/ecm_nss_ported_ipv4.c +@@ -2002,8 +2002,25 @@ unsigned int ecm_nss_ported_ipv4_process(struct net_device *out_dev, struct net_ + int protocol = (int)orig_tuple->dst.protonum; + __be16 *layer4hdr = NULL; + ++ /* ++ * Unconfirmed connection may be dropped by Linux at the final step, ++ * So we don't allow acceleration for the unconfirmed connections. ++ */ ++ if (likely(ct) && !nf_ct_is_confirmed(ct)) { ++ DEBUG_WARN("%p: Unconfirmed connection\n", ct); ++ return NF_ACCEPT; ++ } ++ + if (protocol == IPPROTO_TCP) { + /* ++ * Don't try to manage a non-established connection. ++ */ ++ if (likely(ct) && !test_bit(IPS_ASSURED_BIT, &ct->status)) { ++ DEBUG_WARN("%p: Non-established TCP connection\n", ct); ++ return NF_ACCEPT; ++ } ++ ++ /* + * Extract TCP header to obtain port information + */ + tcp_hdr = ecm_tracker_tcp_check_header_and_read(skb, iph, &tcp_hdr_buff); +diff --git a/frontends/nss/ecm_nss_ported_ipv6.c b/frontends/nss/ecm_nss_ported_ipv6.c +index 4c154a6..bd6349b 100644 +--- a/frontends/nss/ecm_nss_ported_ipv6.c ++++ b/frontends/nss/ecm_nss_ported_ipv6.c +@@ -1914,8 +1914,25 @@ unsigned int ecm_nss_ported_ipv6_process(struct net_device *out_dev, + int protocol = (int)orig_tuple->dst.protonum; + __be16 *layer4hdr = NULL; + ++ /* ++ * Unconfirmed connection may be dropped by Linux at the final step, ++ * So we don't allow acceleration for the unconfirmed connections. ++ */ ++ if (likely(ct) && !nf_ct_is_confirmed(ct)) { ++ DEBUG_WARN("%p: Unconfirmed connection\n", ct); ++ return NF_ACCEPT; ++ } ++ + if (protocol == IPPROTO_TCP) { + /* ++ * Don't try to manage a non-established connection. ++ */ ++ if (likely(ct) && !test_bit(IPS_ASSURED_BIT, &ct->status)) { ++ DEBUG_WARN("%p: Non-established TCP connection\n", ct); ++ return NF_ACCEPT; ++ } ++ ++ /* + * Extract TCP header to obtain port information + */ + tcp_hdr = ecm_tracker_tcp_check_header_and_read(skb, iph, &tcp_hdr_buff); +diff --git a/frontends/sfe/ecm_sfe_ported_ipv4.c b/frontends/sfe/ecm_sfe_ported_ipv4.c +index e034cde..df1ce57 100644 +--- a/frontends/sfe/ecm_sfe_ported_ipv4.c ++++ b/frontends/sfe/ecm_sfe_ported_ipv4.c +@@ -1805,8 +1805,25 @@ unsigned int ecm_sfe_ported_ipv4_process(struct net_device *out_dev, struct net_ + int protocol = (int)orig_tuple->dst.protonum; + __be16 *layer4hdr = NULL; + ++ /* ++ * Unconfirmed connection may be dropped by Linux at the final step, ++ * So we don't allow acceleration for the unconfirmed connections. ++ */ ++ if (likely(ct) && !nf_ct_is_confirmed(ct)) { ++ DEBUG_WARN("%p: Unconfirmed connection\n", ct); ++ return NF_ACCEPT; ++ } ++ + if (protocol == IPPROTO_TCP) { + /* ++ * Don't try to manage a non-established connection. ++ */ ++ if (likely(ct) && !test_bit(IPS_ASSURED_BIT, &ct->status)) { ++ DEBUG_WARN("%p: Non-established TCP connection\n", ct); ++ return NF_ACCEPT; ++ } ++ ++ /* + * Extract TCP header to obtain port information + */ + tcp_hdr = ecm_tracker_tcp_check_header_and_read(skb, iph, &tcp_hdr_buff); +diff --git a/frontends/sfe/ecm_sfe_ported_ipv6.c b/frontends/sfe/ecm_sfe_ported_ipv6.c +index 6ac05ad..657a1c7 100644 +--- a/frontends/sfe/ecm_sfe_ported_ipv6.c ++++ b/frontends/sfe/ecm_sfe_ported_ipv6.c +@@ -1746,8 +1746,25 @@ unsigned int ecm_sfe_ported_ipv6_process(struct net_device *out_dev, + int protocol = (int)orig_tuple->dst.protonum; + __be16 *layer4hdr = NULL; + ++ /* ++ * Unconfirmed connection may be dropped by Linux at the final step, ++ * So we don't allow acceleration for the unconfirmed connections. ++ */ ++ if (likely(ct) && !nf_ct_is_confirmed(ct)) { ++ DEBUG_WARN("%p: Unconfirmed connection\n", ct); ++ return NF_ACCEPT; ++ } ++ + if (protocol == IPPROTO_TCP) { + /* ++ * Don't try to manage a non-established connection. ++ */ ++ if (likely(ct) && !test_bit(IPS_ASSURED_BIT, &ct->status)) { ++ DEBUG_WARN("%p: Non-established TCP connection\n", ct); ++ return NF_ACCEPT; ++ } ++ ++ /* + * Extract TCP header to obtain port information + */ + tcp_hdr = ecm_tracker_tcp_check_header_and_read(skb, iph, &tcp_hdr_buff); +-- +cgit v1.1 + diff --git a/package/nss/qca/qca-nss-ecm/patches/401-Fix-NSS-stats-request-roll-over-issue.patch b/package/nss/qca/qca-nss-ecm/patches/401-Fix-NSS-stats-request-roll-over-issue.patch new file mode 100644 index 000000000..217054bb7 --- /dev/null +++ b/package/nss/qca/qca-nss-ecm/patches/401-Fix-NSS-stats-request-roll-over-issue.patch @@ -0,0 +1,52 @@ +From 9ad19ffdcfdf77baf3abd4fcc933fd3dc8e791a5 Mon Sep 17 00:00:00 2001 +From: Murat Sezgin +Date: Sat, 20 Jun 2020 09:41:01 -0700 +Subject: [qca-nss-ecm] Fix NSS stats request roll over issue + +Use the correct timer API to check the next request time +when jiffies wrap happens. + +Signed-off-by: Murat Sezgin +Change-Id: I18646d28df7e17daeff2986dfe4bd73866d47668 +--- + frontends/nss/ecm_nss_ipv4.c | 4 ++-- + frontends/nss/ecm_nss_ipv6.c | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/frontends/nss/ecm_nss_ipv4.c b/frontends/nss/ecm_nss_ipv4.c +index 3eaf5d8..80e1aee 100644 +--- a/frontends/nss/ecm_nss_ipv4.c ++++ b/frontends/nss/ecm_nss_ipv4.c +@@ -2421,10 +2421,10 @@ static void ecm_nss_ipv4_stats_sync_req_work(struct work_struct *work) + current_jiffies = jiffies; + + if (time_is_after_jiffies(ecm_nss_ipv4_roll_check_jiffies)) { +- ecm_nss_ipv4_next_req_time = 0; ++ ecm_nss_ipv4_next_req_time = jiffies + ECM_NSS_IPV4_STATS_SYNC_PERIOD; + } + +- if (ecm_nss_ipv4_next_req_time > current_jiffies) { ++ if (time_after(ecm_nss_ipv4_next_req_time, current_jiffies)) { + msleep_interruptible(jiffies_to_msecs(ecm_nss_ipv4_next_req_time - current_jiffies)); + } + ecm_nss_ipv4_roll_check_jiffies = jiffies; +diff --git a/frontends/nss/ecm_nss_ipv6.c b/frontends/nss/ecm_nss_ipv6.c +index 288dc55..483421e 100644 +--- a/frontends/nss/ecm_nss_ipv6.c ++++ b/frontends/nss/ecm_nss_ipv6.c +@@ -2135,10 +2135,10 @@ static void ecm_nss_ipv6_stats_sync_req_work(struct work_struct *work) + current_jiffies = jiffies; + + if (time_is_after_jiffies(ecm_nss_ipv6_roll_check_jiffies)) { +- ecm_nss_ipv6_next_req_time = 0; ++ ecm_nss_ipv6_next_req_time = jiffies + ECM_NSS_IPV6_STATS_SYNC_PERIOD; + } + +- if (ecm_nss_ipv6_next_req_time > current_jiffies) { ++ if (time_after(ecm_nss_ipv6_next_req_time, current_jiffies)) { + msleep_interruptible(jiffies_to_msecs(ecm_nss_ipv6_next_req_time - current_jiffies)); + } + ecm_nss_ipv6_roll_check_jiffies = jiffies; +-- +cgit v1.1 + diff --git a/package/nss/qca/qca-nss-ecm/patches/401-Fix-for-ref-leak-during-multicast.patch b/package/nss/qca/qca-nss-ecm/patches/401-Fix-for-ref-leak-during-multicast.patch new file mode 100644 index 000000000..e1df653b7 --- /dev/null +++ b/package/nss/qca/qca-nss-ecm/patches/401-Fix-for-ref-leak-during-multicast.patch @@ -0,0 +1,112 @@ +From 4b41703a181b7187d9ff8cb744eb96d09997387c Mon Sep 17 00:00:00 2001 +From: Suman Ghosh +Date: Wed, 19 Feb 2020 15:09:19 +0530 +Subject: [qca-nss-ecm] Fix for ref leak during multicast 'to' hierarchy + creation + +Change-Id: I89df9dbe5ea054cf3b87d55ce68a751cb1d6c24f +Signed-off-by: Suman Ghosh +--- + ecm_interface.c | 34 ++++++++++++++++++++++++++++++---- + 1 file changed, 30 insertions(+), 4 deletions(-) + +diff --git a/ecm_interface.c b/ecm_interface.c +index 4f7a886..2a0ca5b 100644 +--- a/ecm_interface.c ++++ b/ecm_interface.c +@@ -3885,13 +3885,13 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + dest_dev = dev_get_by_index(&init_net, *dst_if_index); + if (!dest_dev) { + if (!src_dev_is_bridge) { +- int i; +- + /* + * If already constructed any interface heirarchies before hitting + * this error condition then Deref all interface heirarchies. + */ + if (valid_if > 0) { ++ int i; ++ + for (i = 0; i < valid_if; i++) { + ifaces = ecm_db_multicast_if_heirarchy_get(interfaces, i); + ecm_db_multicast_copy_if_heirarchy(to_list_single, ifaces); +@@ -3902,11 +3902,14 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + /* + * If valid netdev not found, Return 0 + */ ++ if (br_dev_src) { ++ dev_put(br_dev_src); ++ } ++ + return 0; + } + + dest_dev = br_dev_src; +- + } + + dest_dev_type = dest_dev->type; +@@ -3945,6 +3948,10 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + } + } + ++ if (br_dev_src && (dest_dev != br_dev_src)) { ++ dev_put(br_dev_src); ++ } ++ + dev_put(dest_dev); + return 0; + } +@@ -3972,6 +3979,10 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + ecm_db_connection_interfaces_deref(to_list_single, interface_first_base[i]); + } + ++ if (br_dev_src && (dest_dev != br_dev_src)) { ++ dev_put(br_dev_src); ++ } ++ + dev_put(dest_dev); + dev_put(mc_br_slave_dev); + return 0; +@@ -3997,6 +4008,10 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + } + } + ++ if (br_dev_src && (dest_dev != br_dev_src)) { ++ dev_put(br_dev_src); ++ } ++ + dev_put(dest_dev); + dev_put(mc_br_slave_dev); + return 0; +@@ -4032,6 +4047,10 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + } + } + ++ if (br_dev_src && (dest_dev != br_dev_src)) { ++ dev_put(br_dev_src); ++ } ++ + dev_put(dest_dev); + return 0; + } +@@ -4042,8 +4061,15 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + valid_if++; + } + +- dev_put(dest_dev); ++ if (dest_dev != br_dev_src) { ++ dev_put(dest_dev); ++ } + } ++ ++ if (br_dev_src) { ++ dev_put(br_dev_src); ++ } ++ + return total_ii_count; + } + EXPORT_SYMBOL(ecm_interface_multicast_heirarchy_construct_routed); +-- +cgit v1.1 + diff --git a/package/nss/qca/qca-nss-ecm/patches/401-Fix-neighbour-solicitation-send-function.patch b/package/nss/qca/qca-nss-ecm/patches/401-Fix-neighbour-solicitation-send-function.patch new file mode 100644 index 000000000..7d32d6fd5 --- /dev/null +++ b/package/nss/qca/qca-nss-ecm/patches/401-Fix-neighbour-solicitation-send-function.patch @@ -0,0 +1,33 @@ +From 72e3ae508906553e7bc982bf3c0d99bb1cbe9008 Mon Sep 17 00:00:00 2001 +From: Murat Sezgin +Date: Wed, 20 Nov 2019 16:23:06 -0800 +Subject: [qca-nss-ecm] Fix neighbour solicitation send function. + +dst_ops->neigh_lookup function pointer is set to the +ip6_neigh_lookup function. This function returns an +error pointer with the ERR_PTR() macro. So, we should +check the return value of this function pointer with +the IS_ERR() macro. + +Change-Id: I188a6e53278faaa68f1854524f612efc1f7451fe +Signed-off-by: Murat Sezgin +--- + ecm_interface.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ecm_interface.c b/ecm_interface.c +index 3f8554b..36509f0 100644 +--- a/ecm_interface.c ++++ b/ecm_interface.c +@@ -1100,7 +1100,7 @@ void ecm_interface_send_neighbour_solicitation(struct net_device *dev, ip_addr_t + #else + neigh = rt6i->dst.ops->neigh_lookup(&rt6i->dst, NULL, &dst_addr); + #endif +- if (neigh == NULL) { ++ if (IS_ERR(neigh)) { + DEBUG_TRACE("Neighbour lookup failure for destination IPv6 address " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(addr)); + dst_release(&rt6i->dst); + return; +-- +cgit v1.1 + diff --git a/package/nss/qca/qca-nss-ecm/patches/402-Reference-leak-during-multicast_PPPoE-bridge.patch b/package/nss/qca/qca-nss-ecm/patches/402-Reference-leak-during-multicast_PPPoE-bridge.patch new file mode 100644 index 000000000..97ce7a7e8 --- /dev/null +++ b/package/nss/qca/qca-nss-ecm/patches/402-Reference-leak-during-multicast_PPPoE-bridge.patch @@ -0,0 +1,260 @@ +From 7c0610828b835b2aab96dd50ec841a3a28689112 Mon Sep 17 00:00:00 2001 +From: Suman Ghosh +Date: Mon, 16 Mar 2020 15:22:18 +0530 +Subject: [qca-nss-ecm] Reference leak during multicast + PPPoE bridge + +Signed-off-by: Suman Ghosh +Change-Id: I4472035f1bbb087e637169762ae2648c0fda792a +--- + ecm_interface.c | 136 +++++++++++++++++++++++++------------------------------- + 1 file changed, 60 insertions(+), 76 deletions(-) + +diff --git a/ecm_interface.c b/ecm_interface.c +index 1614336..c0d2357 100644 +--- a/ecm_interface.c ++++ b/ecm_interface.c +@@ -3796,6 +3796,25 @@ fail: + } + + /* ++ * ecm_interface_hierarchy_delete() ++ * Delete hierarchy of the requested interfaces. ++ */ ++static inline void ecm_interface_hierarchy_delete(struct ecm_db_iface_instance *interfaces, ++ uint32_t *interface_first_base, ++ int valid_if) ++{ ++ struct ecm_db_iface_instance *to_list_single[ECM_DB_IFACE_HEIRARCHY_MAX]; ++ struct ecm_db_iface_instance *ifaces; ++ int i; ++ ++ for (i = 0; i < valid_if; i++) { ++ ifaces = ecm_db_multicast_if_heirarchy_get(interfaces, i); ++ ecm_db_multicast_copy_if_heirarchy(to_list_single, ifaces); ++ ecm_db_connection_interfaces_deref(to_list_single, interface_first_base[i]); ++ } ++} ++ ++/* + * ecm_interface_multicast_heirarchy_construct_routed() + * Create destination interface heirarchy for a routed multicast connectiona + * +@@ -3816,7 +3835,6 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + uint32_t *interface_first_base, bool mfc_update, + __be16 *layer4hdr, struct sk_buff *skb) + { +- struct ecm_db_iface_instance *to_list_single[ECM_DB_IFACE_HEIRARCHY_MAX]; + struct ecm_db_iface_instance *ifaces; + struct net_device *dest_dev = NULL; + struct net_device *br_dev_src = NULL; +@@ -3829,7 +3847,7 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + int if_index; + int ii_cnt; + int total_ii_count = 0; +- bool src_dev_is_bridge = false; ++ bool src_dev_is_bridge = false, dest_dev_is_br_dev_src = false; + + DEBUG_TRACE("Construct interface heirarchy for dest_addr: " ECM_IP_ADDR_DOT_FMT " src_addr: " ECM_IP_ADDR_DOT_FMT "total destination ifs %d\n", + ECM_IP_ADDR_TO_DOT(packet_dest_addr), ECM_IP_ADDR_TO_DOT(packet_src_addr), max_if); +@@ -3876,6 +3894,7 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + continue; + } + ++ dest_dev_is_br_dev_src = false; + dest_dev = dev_get_by_index(&init_net, *dst_if_index); + if (!dest_dev) { + if (!src_dev_is_bridge) { +@@ -3884,26 +3903,23 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + * this error condition then Deref all interface heirarchies. + */ + if (valid_if > 0) { +- int i; +- +- for (i = 0; i < valid_if; i++) { +- ifaces = ecm_db_multicast_if_heirarchy_get(interfaces, i); +- ecm_db_multicast_copy_if_heirarchy(to_list_single, ifaces); +- ecm_db_connection_interfaces_deref(to_list_single, interface_first_base[i]); +- } ++ ecm_interface_hierarchy_delete(interfaces, interface_first_base, valid_if); + } + +- /* +- * If valid netdev not found, Return 0 +- */ +- if (br_dev_src) { +- dev_put(br_dev_src); +- } +- +- return 0; ++ goto fail1; + } + + dest_dev = br_dev_src; ++ ++ /* ++ * In some cases when WAN interface is added to bridge and traffic is downstream, ++ * the bridge device is part of the destination list from MFC, and at the same time ++ * 'src_dev_is_bridge' will be true as well. In such cases we will need to release ++ * the hold on the bridge device separately for dest_dev and br_dev_src. ++ * Setting this flag to true indicates that this is not the case, ++ * and that releasing the hold once is enough ++ */ ++ dest_dev_is_br_dev_src = true; + } + + dest_dev_type = dest_dev->type; +@@ -3927,7 +3943,6 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + } + + if ((if_num < 0) || (if_num > ECM_DB_MULTICAST_IF_MAX)) { +- int i; + DEBUG_WARN("MCS is not ready\n"); + + /* +@@ -3935,19 +3950,10 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + * this error condition then Deref all interface heirarchies. + */ + if (valid_if > 0) { +- for (i = 0; i < valid_if; i++) { +- ifaces = ecm_db_multicast_if_heirarchy_get(interfaces, i); +- ecm_db_multicast_copy_if_heirarchy(to_list_single, ifaces); +- ecm_db_connection_interfaces_deref(to_list_single, interface_first_base[i]); +- } ++ ecm_interface_hierarchy_delete(interfaces, interface_first_base, valid_if); + } + +- if (br_dev_src && (dest_dev != br_dev_src)) { +- dev_put(br_dev_src); +- } +- +- dev_put(dest_dev); +- return 0; ++ goto fail2; + } + + if (in_dev && !mfc_update) { +@@ -3955,34 +3961,20 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + } + + for (br_if = 0; br_if < if_num; br_if++) { ++ int total_if = valid_if + br_if; ++ + mc_br_slave_dev = dev_get_by_index(&init_net, mc_dst_if_index[br_if]); + if (!mc_br_slave_dev) { + continue; + } + +- if ((valid_if + br_if) > ECM_DB_MULTICAST_IF_MAX) { +- int i; +- +- /* +- * If already constructed any interface heirarchies before hitting +- * this error condition then Deref all interface heirarchies. +- */ +- for (i = 0; i < (valid_if + br_if); i++) { +- ifaces = ecm_db_multicast_if_heirarchy_get(interfaces, i); +- ecm_db_multicast_copy_if_heirarchy(to_list_single, ifaces); +- ecm_db_connection_interfaces_deref(to_list_single, interface_first_base[i]); +- } +- +- if (br_dev_src && (dest_dev != br_dev_src)) { +- dev_put(br_dev_src); +- } +- +- dev_put(dest_dev); ++ if (total_if > ECM_DB_MULTICAST_IF_MAX) { ++ ecm_interface_hierarchy_delete(interfaces, interface_first_base, total_if); + dev_put(mc_br_slave_dev); +- return 0; ++ goto fail2; + } + +- ifaces = ecm_db_multicast_if_heirarchy_get(interfaces, valid_if + br_if); ++ ifaces = ecm_db_multicast_if_heirarchy_get(interfaces, total_if); + /* + * Construct a single interface heirarchy of a multicast dev. + */ +@@ -3993,25 +3985,15 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + * If already constructed any interface heirarchies before hitting + * this error condition then Deref all interface heirarchies. + */ +- if ((valid_if + br_if) > 0) { +- int i; +- for (i = 0; i < (valid_if + br_if); i++) { +- ifaces = ecm_db_multicast_if_heirarchy_get(interfaces, i); +- ecm_db_multicast_copy_if_heirarchy(to_list_single, ifaces); +- ecm_db_connection_interfaces_deref(to_list_single, interface_first_base[i]); +- } +- } +- +- if (br_dev_src && (dest_dev != br_dev_src)) { +- dev_put(br_dev_src); ++ if (total_if > 0) { ++ ecm_interface_hierarchy_delete(interfaces, interface_first_base, total_if); + } + +- dev_put(dest_dev); + dev_put(mc_br_slave_dev); +- return 0; ++ goto fail2; + } + +- interface_first = ecm_db_multicast_if_first_get_at_index(interface_first_base, (valid_if + br_if)); ++ interface_first = ecm_db_multicast_if_first_get_at_index(interface_first_base, total_if); + *interface_first = ii_cnt; + total_ii_count += ii_cnt; + dev_put(mc_br_slave_dev); +@@ -4033,20 +4015,10 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + * this error condition then Deref all interface heirarchies. + */ + if (valid_if > 0) { +- int i; +- for (i = 0; i < valid_if; i++) { +- ifaces = ecm_db_multicast_if_heirarchy_get(interfaces, i); +- ecm_db_multicast_copy_if_heirarchy(to_list_single, ifaces); +- ecm_db_connection_interfaces_deref(to_list_single, interface_first_base[i]); +- } +- } +- +- if (br_dev_src && (dest_dev != br_dev_src)) { +- dev_put(br_dev_src); ++ ecm_interface_hierarchy_delete(interfaces, interface_first_base, valid_if); + } + +- dev_put(dest_dev); +- return 0; ++ goto fail2; + } + + interface_first = ecm_db_multicast_if_first_get_at_index(interface_first_base, valid_if); +@@ -4055,7 +4027,7 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + valid_if++; + } + +- if (dest_dev != br_dev_src) { ++ if (!dest_dev_is_br_dev_src) { + dev_put(dest_dev); + } + } +@@ -4065,6 +4037,18 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + } + + return total_ii_count; ++ ++fail2: ++ if (!dest_dev_is_br_dev_src) { ++ dev_put(dest_dev); ++ } ++ ++fail1: ++ if (br_dev_src) { ++ dev_put(br_dev_src); ++ } ++ ++ return 0; + } + EXPORT_SYMBOL(ecm_interface_multicast_heirarchy_construct_routed); + +-- +cgit v1.1 + diff --git a/package/nss/qca/qca-nss-ecm/patches/403-Access-global-accelerated-count-under-lock.patch b/package/nss/qca/qca-nss-ecm/patches/403-Access-global-accelerated-count-under-lock.patch new file mode 100644 index 000000000..d458e1134 --- /dev/null +++ b/package/nss/qca/qca-nss-ecm/patches/403-Access-global-accelerated-count-under-lock.patch @@ -0,0 +1,59 @@ +From 65a49ebd1bd12b9952dfa214de0a2da43ba2abed Mon Sep 17 00:00:00 2001 +From: Bhaskar Valaboju +Date: Tue, 13 Aug 2019 14:21:03 +0530 +Subject: [qca-nss-ecm]: Access global ipv4/ipv6 accelerated count under lock + +Flow accelerated count maintained as global variables are accessed +in multiple kernel contexts. These counters are updated under lock, +but read without lock. Read is in kernel thread context (workqueue) +and sometimes it is taking stale entry (0) and doesn't change. +Lock is added to read correct value. + +Change-Id: I74cf27fe5097c6ae7dfcc06319762a8a322d79a3 +Signed-off-by: Bhaskar Valaboju +--- + frontends/nss/ecm_nss_ipv4.c | 3 +++ + frontends/nss/ecm_nss_ipv6.c | 3 +++ + 2 files changed, 6 insertions(+) + +(limited to 'frontends') + +diff --git a/frontends/nss/ecm_nss_ipv4.c b/frontends/nss/ecm_nss_ipv4.c +index afd660e..4e66cdf 100644 +--- a/frontends/nss/ecm_nss_ipv4.c ++++ b/frontends/nss/ecm_nss_ipv4.c +@@ -2288,10 +2288,13 @@ static void ecm_nss_ipv4_stats_sync_req_work(struct work_struct *work) + int retry = 3; + unsigned long int current_jiffies; + ++ spin_lock_bh(&ecm_nss_ipv4_lock); + if (ecm_nss_ipv4_accelerated_count == 0) { ++ spin_unlock_bh(&ecm_nss_ipv4_lock); + DEBUG_TRACE("There is no accelerated IPv4 connection\n"); + goto reschedule; + } ++ spin_unlock_bh(&ecm_nss_ipv4_lock); + + usleep_range(ECM_NSS_IPV4_STATS_SYNC_UDELAY - 100, ECM_NSS_IPV4_STATS_SYNC_UDELAY); + +diff --git a/frontends/nss/ecm_nss_ipv6.c b/frontends/nss/ecm_nss_ipv6.c +index 1f7f51e..55849e7 100644 +--- a/frontends/nss/ecm_nss_ipv6.c ++++ b/frontends/nss/ecm_nss_ipv6.c +@@ -1998,10 +1998,13 @@ static void ecm_nss_ipv6_stats_sync_req_work(struct work_struct *work) + int retry = 3; + unsigned long int current_jiffies; + ++ spin_lock_bh(&ecm_nss_ipv6_lock); + if (ecm_nss_ipv6_accelerated_count == 0) { ++ spin_unlock_bh(&ecm_nss_ipv6_lock); + DEBUG_TRACE("There is no accelerated IPv6 connection\n"); + goto reschedule; + } ++ spin_unlock_bh(&ecm_nss_ipv6_lock); + + usleep_range(ECM_NSS_IPV6_STATS_SYNC_UDELAY - 100, ECM_NSS_IPV6_STATS_SYNC_UDELAY); + +-- +cgit v1.1 + diff --git a/package/nss/qca/qca-nss-ecm/patches/403-Fix-IPv6-neighbor-solicitation-request.patch b/package/nss/qca/qca-nss-ecm/patches/403-Fix-IPv6-neighbor-solicitation-request.patch new file mode 100644 index 000000000..7639b88a0 --- /dev/null +++ b/package/nss/qca/qca-nss-ecm/patches/403-Fix-IPv6-neighbor-solicitation-request.patch @@ -0,0 +1,83 @@ +From b96002061178f399c1e58a9ad821e5096a64f788 Mon Sep 17 00:00:00 2001 +From: Murat Sezgin +Date: Mon, 23 Mar 2020 10:59:39 -0700 +Subject: [qca-nss-ecm] Fix IPv6 neighbor solicitation request + +Send the solicitation request to the GW address, when +a GW address is found, while establishing the node instance. + +Signed-off-by: Murat Sezgin +Change-Id: I2187569bcfd05b0d091cf8c79171ee3c41c39cb9 +--- + frontends/nss/ecm_nss_ipv6.c | 7 ++++--- + frontends/nss/ecm_nss_multicast_ipv6.c | 9 +++++++++ + frontends/sfe/ecm_sfe_ipv6.c | 7 ++++--- + 3 files changed, 17 insertions(+), 6 deletions(-) + +diff --git a/frontends/nss/ecm_nss_ipv6.c b/frontends/nss/ecm_nss_ipv6.c +index c7dd37f..9011e18 100644 +--- a/frontends/nss/ecm_nss_ipv6.c ++++ b/frontends/nss/ecm_nss_ipv6.c +@@ -527,13 +527,14 @@ struct ecm_db_node_instance *ecm_nss_ipv6_node_establish_and_ref(struct ecm_fron + struct net_device *master; + master = ecm_interface_get_and_hold_dev_master(dev); + DEBUG_ASSERT(master, "Expected a master\n"); +- ecm_interface_send_neighbour_solicitation(master, addr); ++ ecm_interface_send_neighbour_solicitation(master, gw_addr); + dev_put(master); + } else { +- ecm_interface_send_neighbour_solicitation(dev, addr); ++ ecm_interface_send_neighbour_solicitation(dev, gw_addr); + } + +- DEBUG_TRACE("Failed to obtain mac for host " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(addr)); ++ DEBUG_TRACE("Failed to obtain mac for host " ECM_IP_ADDR_OCTAL_FMT " gw: " ECM_IP_ADDR_OCTAL_FMT "\n", ++ ECM_IP_ADDR_TO_OCTAL(addr), ECM_IP_ADDR_TO_OCTAL(gw_addr)); + return NULL; + } + done: +diff --git a/frontends/nss/ecm_nss_multicast_ipv6.c b/frontends/nss/ecm_nss_multicast_ipv6.c +index a361eec..38fde95 100644 +--- a/frontends/nss/ecm_nss_multicast_ipv6.c ++++ b/frontends/nss/ecm_nss_multicast_ipv6.c +@@ -2558,6 +2558,15 @@ static struct ecm_db_node_instance *ecm_nss_multicast_ipv6_node_establish_and_re + #endif + if (!ecm_interface_mac_addr_get(addr, node_addr, &on_link, gw_addr)) { + DEBUG_TRACE("Failed to obtain mac for host " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(addr)); ++ ++ /* ++ * If there is a gw_addr found during the lookup, use that address ++ * for neighbour solicitation request. ++ */ ++ if (!ECM_IP_ADDR_IS_NULL(gw_addr)) { ++ ECM_IP_ADDR_COPY(addr, gw_addr); ++ } ++ + if (ecm_front_end_is_bridge_port(dev)) { + struct net_device *master; + master = ecm_interface_get_and_hold_dev_master(dev); +diff --git a/frontends/sfe/ecm_sfe_ipv6.c b/frontends/sfe/ecm_sfe_ipv6.c +index 3fd5d46..51a9ccb 100644 +--- a/frontends/sfe/ecm_sfe_ipv6.c ++++ b/frontends/sfe/ecm_sfe_ipv6.c +@@ -256,13 +256,14 @@ struct ecm_db_node_instance *ecm_sfe_ipv6_node_establish_and_ref(struct ecm_fron + struct net_device *master; + master = ecm_interface_get_and_hold_dev_master(dev); + DEBUG_ASSERT(master, "Expected a master\n"); +- ecm_interface_send_neighbour_solicitation(master, addr); ++ ecm_interface_send_neighbour_solicitation(master, gw_addr); + dev_put(master); + } else { +- ecm_interface_send_neighbour_solicitation(dev, addr); ++ ecm_interface_send_neighbour_solicitation(dev, gw_addr); + } + +- DEBUG_TRACE("Failed to obtain mac for host " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(addr)); ++ DEBUG_TRACE("Failed to obtain mac for host " ECM_IP_ADDR_OCTAL_FMT " gw: " ECM_IP_ADDR_OCTAL_FMT "\n", ++ ECM_IP_ADDR_TO_OCTAL(addr), ECM_IP_ADDR_TO_OCTAL(gw_addr)); + return NULL; + } + done: +-- +cgit v1.1 + diff --git a/package/nss/qca/qca-nss-ecm/patches/404-IPv6-solicitation-fix-with-zero-gateway-address.patch b/package/nss/qca/qca-nss-ecm/patches/404-IPv6-solicitation-fix-with-zero-gateway-address.patch new file mode 100644 index 000000000..bdedff442 --- /dev/null +++ b/package/nss/qca/qca-nss-ecm/patches/404-IPv6-solicitation-fix-with-zero-gateway-address.patch @@ -0,0 +1,63 @@ +From 5b51ae2f1eca61c6f68e40a05333da5a362ff327 Mon Sep 17 00:00:00 2001 +From: Murat Sezgin +Date: Mon, 13 Apr 2020 09:01:48 -0700 +Subject: [qca-nss-ecm] IPv6 solicitation fix with zero gateway address + +The ECM function can find a zero gateway address for +a host IP address. In this case, we need to use the +host IP address while sending the solicitation request. + +Signed-off-by: Murat Sezgin +Change-Id: I1979834088ddfe1843566f51f64348f79e2df0fc +--- + frontends/nss/ecm_nss_ipv6.c | 11 ++++++++++- + frontends/sfe/ecm_sfe_ipv6.c | 11 ++++++++++- + 2 files changed, 20 insertions(+), 2 deletions(-) + +diff --git a/frontends/nss/ecm_nss_ipv6.c b/frontends/nss/ecm_nss_ipv6.c +index a05781b..9eb591c 100644 +--- a/frontends/nss/ecm_nss_ipv6.c ++++ b/frontends/nss/ecm_nss_ipv6.c +@@ -516,7 +516,16 @@ struct ecm_db_node_instance *ecm_nss_ipv6_node_establish_and_ref(struct ecm_fron + return NULL; + } + +- DEBUG_TRACE("Have a gw address " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(gw_addr)); ++ /* ++ * The found gateway address can be all zeros, ++ * so in this case use the host address. ++ */ ++ if (ECM_IP_ADDR_IS_NULL(gw_addr)) { ++ DEBUG_TRACE("GW address is found as zeros, so use host IP\n"); ++ ECM_IP_ADDR_COPY(gw_addr, addr); ++ } else { ++ DEBUG_TRACE("Have a gw address " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(gw_addr)); ++ } + + if (ecm_interface_mac_addr_get_no_route(dev, gw_addr, node_addr)) { + DEBUG_TRACE("Found the mac address for gateway\n"); +diff --git a/frontends/sfe/ecm_sfe_ipv6.c b/frontends/sfe/ecm_sfe_ipv6.c +index 51a9ccb..e609df7 100644 +--- a/frontends/sfe/ecm_sfe_ipv6.c ++++ b/frontends/sfe/ecm_sfe_ipv6.c +@@ -245,7 +245,16 @@ struct ecm_db_node_instance *ecm_sfe_ipv6_node_establish_and_ref(struct ecm_fron + return NULL; + } + +- DEBUG_TRACE("Have a gw address " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(gw_addr)); ++ /* ++ * The found gateway address can be all zeros, ++ * so in this case use the host address. ++ */ ++ if (ECM_IP_ADDR_IS_NULL(gw_addr)) { ++ DEBUG_TRACE("GW address is found as zeros, so use host IP\n"); ++ ECM_IP_ADDR_COPY(gw_addr, addr); ++ } else { ++ DEBUG_TRACE("Have a gw address " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(gw_addr)); ++ } + + if (ecm_interface_mac_addr_get_no_route(dev, gw_addr, node_addr)) { + DEBUG_TRACE("Found the mac address for gateway\n"); +-- +cgit v1.1 + diff --git a/package/nss/qca/qca-nss-ecm/patches/405-Allow-egress-on-same-port-when-bridge-hairpin-is-enabled.patch b/package/nss/qca/qca-nss-ecm/patches/405-Allow-egress-on-same-port-when-bridge-hairpin-is-enabled.patch new file mode 100644 index 000000000..a236fb757 --- /dev/null +++ b/package/nss/qca/qca-nss-ecm/patches/405-Allow-egress-on-same-port-when-bridge-hairpin-is-enabled.patch @@ -0,0 +1,126 @@ +From e23eabd570eabde1d1fc803127a97fd101642467 Mon Sep 17 00:00:00 2001 +From: Varsha Mishra +Date: Fri, 12 Jun 2020 01:06:58 +0530 +Subject: [qca-nss-ecm] Allow egress on same port when bridge hairpin is + enabled. + +When bridge hairpin is enabled, allow egress on same port. Wi-Fi intrabss +frames are getting exceptioned to stack. Bridge gets to make the decision +whether these frames need to be forwarded or dropped. + +Signed-off-by: Varsha Mishra +Change-Id: Ibdd72264d8887330ba0297ed12cbcfc390065bff +--- + frontends/nss/ecm_nss_ipv4.c | 28 ++++++++++++++++++++++------ + frontends/nss/ecm_nss_ipv6.c | 28 ++++++++++++++++++++++------ + 2 files changed, 44 insertions(+), 12 deletions(-) + +diff --git a/frontends/nss/ecm_nss_ipv4.c b/frontends/nss/ecm_nss_ipv4.c +index 60f799b..51c9ebf 100644 +--- a/frontends/nss/ecm_nss_ipv4.c ++++ b/frontends/nss/ecm_nss_ipv4.c +@@ -1756,7 +1756,9 @@ static unsigned int ecm_nss_ipv4_bridge_post_routing_hook(void *priv, + * Case 2: + * For routed packets the skb will have the src mac matching the bridge mac. + * Case 3: +- * If the packet was not local (case 1) or routed (case 2) then we process. ++ * If the packet was not local (case 1) or routed (case 2) then ++ * we process. There is an exception to case 2: when hairpin mode ++ * is enabled, we process. + */ + + /* +@@ -1768,14 +1770,28 @@ static unsigned int ecm_nss_ipv4_bridge_post_routing_hook(void *priv, + dev_put(bridge); + return NF_ACCEPT; + } ++ ++ /* ++ * This flag needs to be checked in slave port(eth0/ath0) ++ * and not on master interface(br-lan). Hairpin flag can be ++ * enabled/disabled for ports individually. ++ */ + if (in == out) { +- DEBUG_TRACE("skb: %p, bridge: %p (%s), port bounce on %p (%s)\n", skb, bridge, bridge->name, out, out->name); +- dev_put(in); +- dev_put(bridge); +- return NF_ACCEPT; ++ if (!br_is_hairpin_enabled(in)) { ++ DEBUG_TRACE("skb: %p, bridge: %p (%s), ignoring" ++ "the packet, hairpin not enabled" ++ "on port %p (%s)\n", skb, bridge, ++ bridge->name, out, out->name); ++ dev_put(in); ++ dev_put(bridge); ++ return NF_ACCEPT; ++ } ++ DEBUG_TRACE("skb: %p, bridge: %p (%s), hairpin enabled on port" ++ "%p (%s)\n", skb, bridge, bridge->name, out, out->name); + } ++ ++ /* ++ * Case 2: Routed trafffic would be handled by the INET post routing. ++ */ + if (!ecm_mac_addr_equal(skb_eth_hdr->h_source, bridge->dev_addr)) { +- /* +- * Case 2: Routed trafffic would be handled by the INET post routing. +- */ + DEBUG_TRACE("skb: %p, Ignoring routed packet to bridge: %p (%s)\n", skb, bridge, bridge->name); + goto skip_ipv4_bridge_flow; + } +diff --git a/frontends/nss/ecm_nss_ipv6.c b/frontends/nss/ecm_nss_ipv6.c +index 6ad425e..160c94c 100644 +--- a/frontends/nss/ecm_nss_ipv6.c ++++ b/frontends/nss/ecm_nss_ipv6.c +@@ -1498,7 +1498,9 @@ static unsigned int ecm_nss_ipv6_bridge_post_routing_hook(void *priv, + * Case 2: + * For routed packets the skb will have the src mac matching the bridge mac. + * Case 3: +- * If the packet was not local (case 1) or routed (case 2) then we process. ++ * If the packet was not local (case 1) or routed (case 2) then ++ * we process. There is an exception to case 2: when hairpin mode ++ * is enabled, we process. + */ + + /* +@@ -1510,14 +1512,28 @@ static unsigned int ecm_nss_ipv6_bridge_post_routing_hook(void *priv, + dev_put(bridge); + return NF_ACCEPT; + } ++ ++ /* ++ * This flag needs to be checked in slave port(eth0/ath0) ++ * and not on master interface(br-lan). Hairpin flag can be ++ * enabled/disabled for ports individually. ++ */ + if (in == out) { +- DEBUG_TRACE("skb: %p, bridge: %p (%s), port bounce on %p (%s)\n", skb, bridge, bridge->name, out, out->name); +- dev_put(in); +- dev_put(bridge); +- return NF_ACCEPT; ++ if (!br_is_hairpin_enabled(in)) { ++ DEBUG_TRACE("skb: %p, bridge: %p (%s), ignoring" ++ "the packet, hairpin not enabled" ++ "on port %p (%s)\n", skb, bridge, ++ bridge->name, out, out->name); ++ dev_put(in); ++ dev_put(bridge); ++ return NF_ACCEPT; ++ } ++ DEBUG_TRACE("skb: %p, bridge: %p (%s), hairpin enabled on port" ++ "%p (%s)\n", skb, bridge, bridge->name, out, out->name); + } ++ ++ /* ++ * Case 2: Routed trafffic would be handled by the INET post routing. ++ */ + if (!ecm_mac_addr_equal(skb_eth_hdr->h_source, bridge->dev_addr)) { +- /* +- * Case 2: Routed trafffic would be handled by the INET post routing. +- */ + DEBUG_TRACE("skb: %p, Ignoring routed packet to bridge: %p (%s)\n", skb, bridge, bridge->name); + goto skip_ipv6_bridge_flow; + } +-- +cgit v1.1 + diff --git a/package/nss/qca/qca-nss-gmac/Makefile b/package/nss/qca/qca-nss-gmac/Makefile new file mode 100644 index 000000000..586eb0c1b --- /dev/null +++ b/package/nss/qca/qca-nss-gmac/Makefile @@ -0,0 +1,47 @@ +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=qca-nss-gmac +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-gmac +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=9b74deef2816d91e58926e6fab7a6ff931eb3b22 +PKG_MIRROR_HASH:=a1939caa638414323e60f7d29f797ea831c6036e424b8e7bd6cf2d3d874de064 + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/qca-nss-gmac + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + DEPENDS:=@TARGET_ipq806x||TARGET_ipq_ipq806x @!LINUX_3_18 + TITLE:=Kernel driver for NSS gmac + FILES:=$(PKG_BUILD_DIR)/ipq806x/qca-nss-gmac.ko + AUTOLOAD:=$(call AutoLoad,31,qca-nss-gmac) +endef + +define KernelPackage/qca-nss-gmac/Description +This package contains a NSS driver for QCA chipset +endef + +define Build/InstallDev + mkdir -p $(1)/usr/include/qca-nss-gmac + $(CP) $(PKG_BUILD_DIR)/ipq806x/exports/* $(1)/usr/include/qca-nss-gmac/ +endef + +EXTRA_CFLAGS+= \ + -DCONFIG_NSS_DEBUG_LEVEL=4 \ + -I$(PKG_BUILD_DIR)/nss_hal/include \ + -I$(PKG_BUILD_DIR)/nss_hal/$(BOARD) + +define Build/Compile + $(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \ + $(KERNEL_MAKE_FLAGS) \ + $(PKG_MAKE_FLAGS) \ + M="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ + modules +endef + +$(eval $(call KernelPackage,qca-nss-gmac)) diff --git a/package/nss/qca/qca-nss-gmac/patches/100-kernel-5.4-support.patch b/package/nss/qca/qca-nss-gmac/patches/100-kernel-5.4-support.patch new file mode 100644 index 000000000..f3b91abc2 --- /dev/null +++ b/package/nss/qca/qca-nss-gmac/patches/100-kernel-5.4-support.patch @@ -0,0 +1,279 @@ +--- a/ipq806x/nss_gmac_ctrl.c ++++ b/ipq806x/nss_gmac_ctrl.c +@@ -322,16 +322,15 @@ void nss_gmac_tx_rx_desc_init(struct nss + * (for example "ifconfig eth0"). + * @param[in] pointer to net_device structure. + * @param[in] pointer to net_device_stats64 structure. +- * @return Returns pointer to net_device_stats64 structure. + */ +-struct rtnl_link_stats64 *nss_gmac_get_stats64(struct net_device *netdev, ++void nss_gmac_get_stats64(struct net_device *netdev, + struct rtnl_link_stats64 *stats) + { + struct nss_gmac_dev *gmacdev = (struct nss_gmac_dev *)netdev_priv(netdev); + BUG_ON(gmacdev == NULL); + + if (!gmacdev->data_plane_ops) +- return stats; ++ return; + + spin_lock_bh(&gmacdev->stats_lock); + gmacdev->data_plane_ops->get_stats(gmacdev->data_plane_ctx, &gmacdev->nss_stats); +@@ -354,8 +353,6 @@ struct rtnl_link_stats64 *nss_gmac_get_s + stats->tx_fifo_errors = gmacdev->nss_stats.tx_underflow_errors; + stats->tx_window_errors = gmacdev->nss_stats.tx_late_collision_errors; + spin_unlock_bh(&gmacdev->stats_lock); +- +- return stats; + } + + +@@ -439,7 +436,7 @@ static int nss_gmac_mtnp_show(struct dev + static int nss_gmac_tstamp_show(struct device *dev, struct device_attribute *attr, char *buf) + { + struct nss_gmac_dev *gmacdev = (struct nss_gmac_dev *)netdev_priv(to_net_dev(dev)); +- struct timeval tv; ++ struct timespec64 ts64; + uint32_t ret, timeout; + uint32_t ts_hi, ts_lo; + +@@ -459,11 +456,12 @@ static int nss_gmac_tstamp_show(struct d + return -1; + } + +- do_gettimeofday(&tv); ++ ktime_get_real_ts64(&ts64); + + ret = snprintf( + buf, PAGE_SIZE, +- "sec:%u nsec:%u time-of-day: %12d.%06d \n", ts_hi, ts_lo, (int)tv.tv_sec, (int)tv.tv_usec); ++ "sec:%u nsec:%u time-of-day: %12d.%06d \n", \ ++ ts_hi, ts_lo, (int)ts64.tv_sec, (int)(ts64.tv_nsec / NSEC_PER_USEC)); + + return ret; + } +@@ -951,7 +949,7 @@ static const struct net_device_ops nss_g + * @param[in] pointer to advertised features + * @return void + */ +-static void nss_gmac_update_features(uint32_t *supp, uint32_t *adv) ++static void nss_gmac_update_features(long unsigned int *supp, long unsigned int *adv) + { + *supp |= NSS_GMAC_SUPPORTED_FEATURES; + *adv |= NSS_GMAC_ADVERTISED_FEATURES; +@@ -1409,8 +1407,8 @@ static int32_t nss_gmac_probe(struct pla + goto nss_gmac_phy_attach_fail; + } + +- nss_gmac_update_features(&(gmacdev->phydev->supported), +- &(gmacdev->phydev->advertising)); ++ nss_gmac_update_features(gmacdev->phydev->supported, ++ gmacdev->phydev->advertising); + gmacdev->phydev->irq = PHY_POLL; + netdev_dbg(netdev, "PHY %s attach OK\n", phy_id); + +@@ -1440,6 +1438,8 @@ static int32_t nss_gmac_probe(struct pla + netdev_dbg(netdev, "%s MII_PHYSID2 - 0x%04x\n", netdev->name, + nss_gmac_mii_rd_reg(gmacdev, gmacdev->phy_base, MII_PHYSID2)); + } else if (gmacdev->phy_base != NSS_GMAC_NO_MDIO_PHY) { ++ SET_NETDEV_DEV(netdev, gmacdev->miibus->parent); ++ + /* + * Issue a phy_attach for the interface connected to a switch + */ +--- a/ipq806x/nss_gmac_ethtool.c ++++ b/ipq806x/nss_gmac_ethtool.c +@@ -143,9 +143,9 @@ static const struct nss_gmac_ethtool_sta + /** + * @brief Array of strings describing private flag names + */ +-static const char *gmac_strings_priv_flags[] = { +- "linkpoll", +- "tstamp", ++static const char *gmac_strings_priv_flags[][ETH_GSTRING_LEN] = { ++ {"linkpoll"}, ++ {"tstamp"}, + }; + + #define NSS_GMAC_STATS_LEN ARRAY_SIZE(gmac_gstrings_stats) +@@ -292,6 +292,7 @@ static int nss_gmac_set_pauseparam(struc + { + struct nss_gmac_dev *gmacdev = (struct nss_gmac_dev *)netdev_priv(netdev); + struct phy_device *phydev; ++ long unsigned int *advertising; + + BUG_ON(gmacdev == NULL); + BUG_ON(gmacdev->netdev != netdev); +@@ -327,14 +328,15 @@ static int nss_gmac_set_pauseparam(struc + phydev = gmacdev->phydev; + + /* Update flow control advertisment */ +- phydev->advertising &= ~(ADVERTISED_Pause | ADVERTISED_Asym_Pause); ++ advertising = phydev->advertising; ++ *advertising &= ~(ADVERTISED_Pause | ADVERTISED_Asym_Pause); + + if (gmacdev->pause & FLOW_CTRL_RX) +- phydev->advertising |= ++ *advertising |= + (ADVERTISED_Pause | ADVERTISED_Asym_Pause); + + if (gmacdev->pause & FLOW_CTRL_TX) +- phydev->advertising |= ADVERTISED_Asym_Pause; ++ *advertising |= ADVERTISED_Asym_Pause; + + genphy_config_aneg(gmacdev->phydev); + +@@ -396,12 +398,13 @@ static uint32_t nss_gmac_get_msglevel(st + * @param[in] pointer to struct net_device. + * @param[in] pointer to struct ethtool_cmd. + */ +-static int32_t nss_gmac_get_settings(struct net_device *netdev, +- struct ethtool_cmd *ecmd) ++static int nss_gmac_get_settings(struct net_device *netdev, ++ struct ethtool_link_ksettings *elk) + { + struct nss_gmac_dev *gmacdev = (struct nss_gmac_dev *)netdev_priv(netdev); + struct phy_device *phydev = NULL; + uint16_t phyreg; ++ u32 lp_advertising = 0; + + BUG_ON(gmacdev == NULL); + +@@ -413,10 +416,10 @@ static int32_t nss_gmac_get_settings(str + */ + if (!test_bit(__NSS_GMAC_LINKPOLL, &gmacdev->flags)) { + if (gmacdev->forced_speed != SPEED_UNKNOWN) { +- ethtool_cmd_speed_set(ecmd, gmacdev->forced_speed); +- ecmd->duplex = gmacdev->forced_duplex; +- ecmd->mdio_support = 0; +- ecmd->lp_advertising = 0; ++ elk->base.speed = gmacdev->forced_speed; ++ elk->base.duplex = gmacdev->forced_duplex; ++ elk->base.mdio_support = 0; ++ ethtool_convert_legacy_u32_to_link_mode(elk->link_modes.lp_advertising, 0); + return 0; + } else { + /* Non-link polled interfaced must have a forced +@@ -429,63 +429,59 @@ static int32_t nss_gmac_get_settings(struct net_device *netdev, + + /* update PHY status */ + if (phydev->is_c45 == true) { +- ecmd->mdio_support = ETH_MDIO_SUPPORTS_C45; ++ elk->base.mdio_support = ETH_MDIO_SUPPORTS_C45; + } else { + if (genphy_read_status(phydev) != 0) { + return -EIO; + } +- ecmd->mdio_support = ETH_MDIO_SUPPORTS_C22; ++ elk->base.mdio_support = ETH_MDIO_SUPPORTS_C22; + } + + /* Populate capabilities advertised by self */ +- ecmd->advertising = phydev->advertising; ++ bitmap_copy(elk->link_modes.advertising, phydev->advertising, __ETHTOOL_LINK_MODE_MASK_NBITS); + +- ecmd->autoneg = phydev->autoneg; +- +- if (gmacdev->link_state == LINKDOWN) { +- ethtool_cmd_speed_set(ecmd, SPEED_UNKNOWN); +- ecmd->duplex = DUPLEX_UNKNOWN; +- } else { +- ethtool_cmd_speed_set(ecmd, phydev->speed); +- ecmd->duplex = phydev->duplex; +- } +- +- ecmd->port = PORT_TP; +- ecmd->phy_address = gmacdev->phy_base; +- ecmd->transceiver = XCVR_EXTERNAL; ++ elk->base.autoneg = phydev->autoneg; ++ elk->base.speed = phydev->speed; ++ elk->base.duplex = phydev->duplex; ++ elk->base.port = PORT_TP; ++ elk->base.phy_address = gmacdev->phy_base; ++ elk->base.transceiver = XCVR_EXTERNAL; + + /* Populate supported capabilities */ +- ecmd->supported = phydev->supported; ++ bitmap_copy(elk->link_modes.supported, phydev->supported, __ETHTOOL_LINK_MODE_MASK_NBITS); + + if (phydev->is_c45 == true) + return 0; + + /* Populate capabilities advertised by link partner */ ++ ethtool_convert_link_mode_to_legacy_u32(&lp_advertising, elk->link_modes.lp_advertising); + phyreg = nss_gmac_mii_rd_reg(gmacdev, gmacdev->phy_base, MII_LPA); + if (phyreg & LPA_10HALF) +- ecmd->lp_advertising |= ADVERTISED_10baseT_Half; ++ lp_advertising |= ADVERTISED_10baseT_Half; + + if (phyreg & LPA_10FULL) +- ecmd->lp_advertising |= ADVERTISED_10baseT_Full; ++ lp_advertising |= ADVERTISED_10baseT_Full; + + if (phyreg & LPA_100HALF) +- ecmd->lp_advertising |= ADVERTISED_100baseT_Half; ++ lp_advertising |= ADVERTISED_100baseT_Half; + + if (phyreg & LPA_100FULL) +- ecmd->lp_advertising |= ADVERTISED_100baseT_Full; ++ lp_advertising |= ADVERTISED_100baseT_Full; + + if (phyreg & LPA_PAUSE_CAP) +- ecmd->lp_advertising |= ADVERTISED_Pause; ++ lp_advertising |= ADVERTISED_Pause; + + if (phyreg & LPA_PAUSE_ASYM) +- ecmd->lp_advertising |= ADVERTISED_Asym_Pause; ++ lp_advertising |= ADVERTISED_Asym_Pause; + + phyreg = nss_gmac_mii_rd_reg(gmacdev, gmacdev->phy_base, MII_STAT1000); + if (phyreg & LPA_1000HALF) +- ecmd->lp_advertising |= ADVERTISED_1000baseT_Half; ++ lp_advertising |= ADVERTISED_1000baseT_Half; + + if (phyreg & LPA_1000FULL) +- ecmd->lp_advertising |= ADVERTISED_1000baseT_Full; ++ lp_advertising |= ADVERTISED_1000baseT_Full; ++ ++ ethtool_convert_legacy_u32_to_link_mode(elk->link_modes.lp_advertising, lp_advertising); + + return 0; + } +@@ -489,8 +495,8 @@ static int32_t nss_gmac_get_settings(str + * @param[in] pointer to struct net_device. + * @param[in] pointer to struct ethtool_cmd. + */ +-static int32_t nss_gmac_set_settings(struct net_device *netdev, +- struct ethtool_cmd *ecmd) ++static int nss_gmac_set_settings(struct net_device *netdev, ++ const struct ethtool_link_ksettings *elk) + { + struct nss_gmac_dev *gmacdev = (struct nss_gmac_dev *)netdev_priv(netdev); + struct phy_device *phydev = NULL; +@@ -512,13 +518,13 @@ static int32_t nss_gmac_set_settings(str + return -EPERM; + } + +- if (ecmd->autoneg == AUTONEG_ENABLE) { ++ if (elk->base.autoneg == AUTONEG_ENABLE) { + set_bit(__NSS_GMAC_AUTONEG, &gmacdev->flags); + } else { + clear_bit(__NSS_GMAC_AUTONEG, &gmacdev->flags); + } + +- return phy_ethtool_sset(phydev, ecmd); ++ return phy_ethtool_ksettings_set(phydev, elk); + } + + /** +@@ -580,8 +586,8 @@ struct ethtool_ops nss_gmac_ethtool_ops + .set_pauseparam = &nss_gmac_set_pauseparam, + .nway_reset = &nss_gmac_nway_reset, + .get_wol = &nss_gmac_get_wol, +- .get_settings = &nss_gmac_get_settings, +- .set_settings = &nss_gmac_set_settings, ++ .get_link_ksettings = &nss_gmac_get_settings, ++ .set_link_ksettings = &nss_gmac_set_settings, + .get_strings = &nss_gmac_get_strings, + .get_sset_count = &nss_gmac_get_strset_count, + .get_ethtool_stats = &nss_gmac_get_ethtool_stats, diff --git a/package/nss/qca/qca-nss-gmac/patches/101-nss-gmac-test-ptr.patch b/package/nss/qca/qca-nss-gmac/patches/101-nss-gmac-test-ptr.patch new file mode 100644 index 000000000..0b1ff063d --- /dev/null +++ b/package/nss/qca/qca-nss-gmac/patches/101-nss-gmac-test-ptr.patch @@ -0,0 +1,11 @@ +--- a/ipq806x/nss_gmac_ctrl.c ++++ b/ipq806x/nss_gmac_ctrl.c +@@ -992,7 +992,7 @@ static int32_t nss_gmac_of_get_pdata(str + return -EFAULT; + } + maddr = (uint8_t *)of_get_mac_address(np); +- if (maddr) ++ if (!IS_ERR_OR_NULL(maddr)) + memcpy(gmaccfg->mac_addr, maddr, ETH_ALEN); + + if (of_address_to_resource(np, 0, &memres_devtree) != 0) diff --git a/package/nss/qca/qca-nss-gmac/patches/200-work-around-interface-close-warning.patch b/package/nss/qca/qca-nss-gmac/patches/200-work-around-interface-close-warning.patch new file mode 100644 index 000000000..7cb6d6fac --- /dev/null +++ b/package/nss/qca/qca-nss-gmac/patches/200-work-around-interface-close-warning.patch @@ -0,0 +1,15 @@ +--- a/ipq806x/nss_gmac_tx_rx_offload.c ++++ b/ipq806x/nss_gmac_tx_rx_offload.c +@@ -1027,8 +1027,10 @@ int nss_gmac_close(struct net_device *ne + nss_gmac_disable_interrupt_all(gmacdev); + gmacdev->data_plane_ops->link_state(gmacdev->data_plane_ctx, 0); + +- if (!IS_ERR(gmacdev->phydev)) +- phy_stop(gmacdev->phydev); ++ if (!IS_ERR(gmacdev->phydev)) { ++ if (test_bit(__NSS_GMAC_LINKPOLL, &gmacdev->flags)) ++ phy_stop(gmacdev->phydev); ++ } + + clear_bit(__NSS_GMAC_UP, &gmacdev->flags); + clear_bit(__NSS_GMAC_CLOSING, &gmacdev->flags); diff --git a/package/nss/qca/qca-rfs/patches/200-rework-nfct-notification.patch b/package/nss/qca/qca-rfs/patches/200-rework-nfct-notification.patch new file mode 100644 index 000000000..81e608c02 --- /dev/null +++ b/package/nss/qca/qca-rfs/patches/200-rework-nfct-notification.patch @@ -0,0 +1,20 @@ +--- a/rfs_cm.c ++++ b/rfs_cm.c +@@ -709,7 +709,7 @@ int rfs_cm_start(void) + + RFS_DEBUG("RFS cm start\n"); + #ifdef CONFIG_NF_CONNTRACK_EVENTS +- ret = nf_conntrack_register_notifier(&init_net, &rfs_cm_conntrack_notifier); ++ ret = nf_conntrack_register_chain_notifier(&init_net, &rfs_cm_conntrack_notifier); + if (ret < 0) { + RFS_ERROR("can't register nf notifier hook: %d\n", ret); + return -1; +@@ -740,7 +740,7 @@ int rfs_cm_stop(void) + #endif + + #ifdef CONFIG_NF_CONNTRACK_EVENTS +- nf_conntrack_unregister_notifier(&init_net, &rfs_cm_conntrack_notifier); ++ nf_conntrack_unregister_chain_notifier(&init_net, &rfs_cm_conntrack_notifier); + #endif + + rfs_cm_connection_destroy_all(); diff --git a/package/qca/README.md b/package/qca/README.md new file mode 100644 index 000000000..495d9b920 --- /dev/null +++ b/package/qca/README.md @@ -0,0 +1,11 @@ +QSDK NSS Drivers +================ + +This repo contains drivers required to activate and use the IPQ806x SoCs' +NSS accelerator cores. + +The drivers are from the QSDK 11.2r1 release. The entire QSDK 11.2r1 release +can be found in the link below: + +https://source.codeaurora.org/quic/qsdk/releases/manifest/qstak/tree/caf_AU_LINUX_QSDK_NHSS.QSDK.11.2.R1_TARGET_ALL.12.0.4540.030.xml?h=release + diff --git a/package/qca/nss-ifb/Makefile b/package/qca/nss-ifb/Makefile new file mode 100644 index 000000000..6b7f0b480 --- /dev/null +++ b/package/qca/nss-ifb/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2008-2012 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=nss-ifb +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/nss-ifb + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + TITLE:=NSS IFB Interface + DEPENDS:=+kmod-qca-nss-drv @LINUX_5_4 + FILES:=$(PKG_BUILD_DIR)/nss-ifb.ko + KCONFIG:= +endef + +define KernelPackage/nss-ifb/description + Kernel module to register a NSS aware IFB interface. +endef + +EXTRA_KCONFIG:= \ + CONFIG_NET_CLS=y + +EXTRA_CFLAGS:= \ + -I$(STAGING_DIR)/usr/include/qca-nss-drv + +MAKE_OPTS:= \ + $(KERNEL_MAKE_FLAGS) \ + M="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ + $(EXTRA_KCONFIG) + +define Build/Compile + $(MAKE) -C "$(LINUX_DIR)" \ + $(MAKE_OPTS) \ + modules +endef + +$(eval $(call KernelPackage,nss-ifb)) + diff --git a/package/qca/nss-ifb/README.md b/package/qca/nss-ifb/README.md new file mode 100644 index 000000000..a0af7a5eb --- /dev/null +++ b/package/qca/nss-ifb/README.md @@ -0,0 +1,45 @@ +NSS Physical Interface Ingress Driver +===================================== + +This driver redirect NSS physical interface (namely GMACs) ingress traffic to itself +and sends it back to the Linux network stack (as the source GMACs packets) as it's +egress traffic. + +This allows the NSS QDISC drivers to manage the egress traffic of this driver's +NSS virtual interface. + +This driver will create a single network interface named 'nssifb'. The default +source interface is defined as 'eth0'. It can be changed using the following module +parameter path: + +/sys/module/nss-ifb/parameter/nss_src_dev + +To change the source NSS physical interface to 'eth1', use the following command: + +printf eth1 > /sys/module/nss-ifb/parameter/nss_src_dev + +You need to change the source interface first before bringing up the 'nssifb' +interface. Changing it after the interface is up will have no effect. You need +to bring down the interface and bring it back up to have the changes take effect. + +CPU load imposed on the Krait CPUs appears negligible with this driver intercepting +the physical interface's ingress traffic. Full line speed of the GMAC interface +could still be achieved. + +The commands below shows an example to shape ingress traffic to 500 Mbps and egress +to 200 Mbps for the 'eth0' interface. + +# Load the module if it's not loaded +modprobe nss-ifb + +# Bring up the nssifb interface to active ingress redirect +ip link set up nssifb + +# Shape ingress traffic to 500 Mbit with chained NSSFQ_CODEL +tc qdisc add dev nssifb root handle 1: nsstbl rate 500Mbit burst 1Mb +tc qdisc add dev nssifb parent 1: handle 10: nssfq_codel limit 10240 flows 1024 quantum 1514 target 5ms interval 100ms set_default + +# Shape egress traffic to 200 Mbit with chained NSSFQ_CODEL +tc qdisc add dev eth0 root handle 1: nsstbl rate 200Mbit burst 1Mb +tc qdisc add dev eth0 parent 1: handle 10: nssfq_codel limit 10240 flows 1024 quantum 1514 target 5ms interval 100ms set_default + diff --git a/package/qca/nss-ifb/src/Makefile b/package/qca/nss-ifb/src/Makefile new file mode 100644 index 000000000..332b9b4ed --- /dev/null +++ b/package/qca/nss-ifb/src/Makefile @@ -0,0 +1,3 @@ +obj-m += nss-ifb.o + +nss-ifb-objs := nss_ifb.o diff --git a/package/qca/nss-ifb/src/nss_ifb.c b/package/qca/nss-ifb/src/nss_ifb.c new file mode 100644 index 000000000..18c017fe0 --- /dev/null +++ b/package/qca/nss-ifb/src/nss_ifb.c @@ -0,0 +1,304 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +/* + * This driver is adapted from the Linux /drivers/net/ifb.c file. + * + * Redirect QCA NSS physical interface ingress traffic to this driver's + * virtual interface. This will allow ingress traffic shaping using the + * QCA NSS shaper. + */ + +#include + +#define TX_Q_LIMIT 32 + +struct nss_ifb_dev_private { + struct nss_virt_if_handle *nssctx; + struct net_device *nss_src_dev; + uint32_t nss_src_if_num; + char nss_src_dev_name[32]; +}; + +char nss_dev_name_array[32] = "eth0"; +char *nss_dev_name = nss_dev_name_array; +module_param(nss_dev_name, charp, 0644); +MODULE_PARM_DESC(nss_dev_name, "NSS physical interface source device name"); + +/* + * Virtual interface egress packet callback. + * + * We send it back to the Linux network stack. + */ +static void nss_ifb_data_cb(struct net_device *netdev, struct sk_buff *skb, struct napi_struct *napi) +{ + struct nss_ifb_dev_private *dp = netdev_priv(netdev); + + skb->protocol = eth_type_trans(skb, dp->nss_src_dev); + skb->ip_summed = CHECKSUM_UNNECESSARY; + + napi_gro_receive(napi, skb); +} + +/* + * Virtual interface ingress packet callback. + * + * We just send it back to the NSS firmware to let the shaper work on it. + */ +static void nss_ifb_xmit_cb(struct net_device *netdev, struct sk_buff *skb) +{ + struct nss_ifb_dev_private *dp = netdev_priv(netdev); + int ret; + + ret = nss_virt_if_tx_buf(dp->nssctx, skb); + if (unlikely(ret)) { + pr_warn("Failed [%d] to send skb [len: %d, protocol: 0x%X] to NSS!\n", + ret, skb->len, ntohs(skb->protocol)); + } +} + +static void nss_ifb_stats64(struct net_device *dev, + struct rtnl_link_stats64 *stats) +{ + +} + +static int nss_ifb_dev_init(struct net_device *dev) +{ + struct nss_ifb_dev_private *dp = netdev_priv(dev); + + dp->nssctx = nss_virt_if_create_sync_nexthop(dev, NSS_ETH_RX_INTERFACE, NSS_ETH_RX_INTERFACE); + if (!dp->nssctx) { + dp->nssctx = NULL; + pr_warn("Could not create a NSS virtual interface for dev [%s]\n", + dev->name); + + return -ENODEV; + } + pr_info("Created a NSS virtual interface for dev [%s]\n", dev->name); + + nss_virt_if_register(dp->nssctx, nss_ifb_data_cb, dev); + pr_info("NSS IFB data callback registered\n"); + + nss_virt_if_xmit_callback_register(dp->nssctx, nss_ifb_xmit_cb); + pr_info("NSS IFB transmit callback registered\n"); + + return 0; +} + +static void nss_ifb_dev_uninit(struct net_device *dev) +{ + struct nss_ifb_dev_private *dp = netdev_priv(dev); + int ret; + + nss_virt_if_xmit_callback_unregister(dp->nssctx); + pr_info("NSS IFB transmit callback unregistered\n"); + + ret = nss_virt_if_destroy_sync(dp->nssctx); + if (ret == NSS_TX_SUCCESS) { + pr_info("NSS virtual interface destroyed for dev [%s]\n", dev->name); + } + else { + pr_warn("Unable to destroy NSS virtual interface for dev [%s], error[%d]\n", + dev->name, ret); + } + dp->nssctx = NULL; +} + +static netdev_tx_t nss_ifb_xmit(struct sk_buff *skb, struct net_device *dev) +{ + return NETDEV_TX_OK; +} + +static int nss_ifb_close(struct net_device *dev) +{ + struct nss_ifb_dev_private *dp = netdev_priv(dev); + struct nss_ctx_instance *nss_ctx; + struct net_device *src_dev; + uint32_t src_if_num; + int ret; + + nss_ctx = dp->nssctx->nss_ctx; + src_dev = dp->nss_src_dev; + src_if_num = dp->nss_src_if_num; + + ret = nss_phys_if_set_nexthop(nss_ctx, src_if_num, NSS_ETH_RX_INTERFACE); + if (ret != NSS_TX_SUCCESS) { + pr_warn("%p: Failed to reset next hop for net device [%s].\n", + nss_ctx, src_dev->name); + } + else { + pr_info("%p: Reset nexthop successful for net device [%s].\n", + nss_ctx, src_dev->name); + } + + dev_put(src_dev); + dp->nss_src_dev = NULL; + dp->nss_src_if_num = -1; + + return 0; +} + +static int nss_ifb_open(struct net_device *dev) +{ + struct nss_ifb_dev_private *dp = netdev_priv(dev); + struct net_device *src_dev; + uint32_t src_if_num; + uint32_t nh_if_num; + nss_tx_status_t nss_tx_status; + struct nss_ctx_instance *nss_ctx; + + nss_ctx = dp->nssctx->nss_ctx; + nh_if_num = dp->nssctx->if_num_n2h; + + strcpy(dp->nss_src_dev_name, nss_dev_name); + + src_dev = dev_get_by_name(&init_net, dp->nss_src_dev_name); + if (!src_dev) { + pr_warn("%p: Cannot find the net device [%s]\n", + nss_ctx, dp->nss_src_dev_name); + + return -ENODEV; + } + pr_info("%p: Found net device [%s]\n", nss_ctx, dp->nss_src_dev_name); + + src_if_num = nss_cmn_get_interface_number_by_dev(src_dev); + if (src_if_num < 0) { + pr_warn("%p: Invalid interface number:%d\n", nss_ctx, src_if_num); + dev_put(src_dev); + + return -ENODEV; + } + pr_info("%p: Net device [%s] has NSS intf_num [%d]\n", + nss_ctx, dp->nss_src_dev_name, src_if_num); + + nss_tx_status = nss_phys_if_set_nexthop(nss_ctx, src_if_num, nh_if_num); + if (nss_tx_status != NSS_TX_SUCCESS) { + pr_warn("%p: Sending message failed, cannot change nexthop for [%s]\n", + nss_ctx, dp->nss_src_dev_name); + } + else { + pr_info("Nexthop successfully set for [%s] to [%s]\n", + dp->nss_src_dev_name, dev->name); + } + + dp->nss_src_dev = src_dev; + dp->nss_src_if_num = src_if_num; + + return 0; +} + +static const struct net_device_ops nss_ifb_netdev_ops = { + .ndo_open = nss_ifb_open, + .ndo_stop = nss_ifb_close, + .ndo_get_stats64 = nss_ifb_stats64, + .ndo_start_xmit = nss_ifb_xmit, + .ndo_validate_addr = eth_validate_addr, + .ndo_init = nss_ifb_dev_init, + .ndo_uninit = nss_ifb_dev_uninit, +}; + +#define IFB_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | NETIF_F_FRAGLIST | \ + NETIF_F_TSO_ECN | NETIF_F_TSO | NETIF_F_TSO6 | \ + NETIF_F_GSO_ENCAP_ALL | \ + NETIF_F_HIGHDMA | NETIF_F_HW_VLAN_CTAG_TX | \ + NETIF_F_HW_VLAN_STAG_TX) + +static void nss_ifb_dev_free(struct net_device *dev) +{ + +} + +static void nss_ifb_setup(struct net_device *dev) +{ + /* Initialize the device structure. */ + dev->netdev_ops = &nss_ifb_netdev_ops; + + /* Fill in device structure with ethernet-generic values. */ + ether_setup(dev); + dev->tx_queue_len = TX_Q_LIMIT; + + dev->features |= IFB_FEATURES; + dev->hw_features |= dev->features; + dev->hw_enc_features |= dev->features; + dev->vlan_features |= IFB_FEATURES & ~(NETIF_F_HW_VLAN_CTAG_TX | + NETIF_F_HW_VLAN_STAG_TX); + + dev->flags |= IFF_NOARP; + dev->flags &= ~IFF_MULTICAST; + dev->priv_flags &= ~IFF_TX_SKB_SHARING; + netif_keep_dst(dev); + eth_hw_addr_random(dev); + dev->needs_free_netdev = true; + dev->priv_destructor = nss_ifb_dev_free; + + dev->min_mtu = 0; + dev->max_mtu = 0; +} + +static int nss_ifb_validate(struct nlattr *tb[], struct nlattr *data[], + struct netlink_ext_ack *extack) +{ + if (tb[IFLA_ADDRESS]) { + if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN) + return -EINVAL; + if (!is_valid_ether_addr(nla_data(tb[IFLA_ADDRESS]))) + return -EADDRNOTAVAIL; + } + return 0; +} + +static struct rtnl_link_ops nss_ifb_link_ops __read_mostly = { + .kind = "nss_ifb", + .priv_size = sizeof(struct nss_ifb_dev_private), + .setup = nss_ifb_setup, + .validate = nss_ifb_validate, +}; + +static int __init nss_ifb_init_module(void) +{ + struct net_device *dev; + int err; + + down_write(&pernet_ops_rwsem); + rtnl_lock(); + err = __rtnl_link_register(&nss_ifb_link_ops); + if (err < 0) + goto out; + + dev = alloc_netdev(sizeof(struct nss_ifb_dev_private), "nssifb", + NET_NAME_UNKNOWN, nss_ifb_setup); + + if (dev) { + dev->rtnl_link_ops = &nss_ifb_link_ops; + err = register_netdevice(dev); + } + else { + err = -ENOMEM; + } + + if (err) + __rtnl_link_unregister(&nss_ifb_link_ops); + +out: + rtnl_unlock(); + up_write(&pernet_ops_rwsem); + + if (!err) + pr_info("NSS IFB module loaded.\n"); + else + pr_warn("Failed to load NSS IFB module.\n"); + + return err; +} + +static void __exit nss_ifb_cleanup_module(void) +{ + rtnl_link_unregister(&nss_ifb_link_ops); + + pr_info("NSS IFB module unloaded.\n"); +} + +module_init(nss_ifb_init_module); +module_exit(nss_ifb_cleanup_module); +MODULE_LICENSE("GPL"); +MODULE_ALIAS_RTNL_LINK("nss_ifb"); diff --git a/package/qca/qca-nss-cfi/Makefile b/package/qca/qca-nss-cfi/Makefile new file mode 100644 index 000000000..4efce7151 --- /dev/null +++ b/package/qca/qca-nss-cfi/Makefile @@ -0,0 +1,98 @@ +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=qca-nss-cfi +PKG_RELEASE:=2 + +PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-cfi +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=8035a8ddefdcc8a2f06c96b2a82618ca6ce6406d + +include $(INCLUDE_DIR)/package.mk + +ifeq ($(CONFIG_TARGET_ipq),y) +subtarget:=$(SUBTARGET) +else +subtarget:=$(CONFIG_TARGET_BOARD) +endif + +# v1.0 is for Akronite +# v2.0 is for Hawkeye/Cypress/Maple +ifneq (, $(findstring $(subtarget), "ipq807x" "ipq807x_64" "ipq60xx" "ipq60xx_64")) + CFI_OCF_DIR:=ocf/v2.0 + CFI_CRYPTOAPI_DIR:=cryptoapi/v2.0 +else + CFI_CRYPTOAPI_DIR:=cryptoapi/v1.1 + CFI_OCF_DIR:=ocf/v1.0 + CFI_IPSEC_DIR:=ipsec/v1.0 +endif + +define KernelPackage/qca-nss-cfi-cryptoapi + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + 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-crypto +kmod-crypto-authenc @!LINUX_3_18 + TITLE:=Kernel driver for NSS cfi + FILES:=$(PKG_BUILD_DIR)/$(CFI_CRYPTOAPI_DIR)/qca-nss-cfi-cryptoapi.ko + AUTOLOAD:=$(call AutoLoad,59,qca-nss-cfi-cryptoapi) +endef + +# OCF should be dropped +# define KernelPackage/qca-nss-cfi-ocf +# SECTION:=kernel +# CATEGORY:=Kernel modules +# SUBMENU:=Network Devices +# 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-crypto +PACKAGE_kmod-crypto-ocf:kmod-crypto-ocf @!LINUX_3_18 +# TITLE:=Kernel driver for NSS cfi +# FILES:=$(PKG_BUILD_DIR)/$(CFI_OCF_DIR)/qca-nss-cfi-ocf.ko + +# ifdef CFI_IPSEC_DIR +# FILES+=$(PKG_BUILD_DIR)/$(CFI_IPSEC_DIR)/qca-nss-ipsec.ko +# AUTOLOAD:=$(call AutoLoad,61,qca-nss-cfi-ocf qca-nss-ipsec) +# else +# AUTOLOAD:=$(call AutoLoad,61,qca-nss-cfi-ocf) +# endif +# endef + +define Build/InstallDev/qca-nss-cfi + $(INSTALL_DIR) $(1)/usr/include/qca-nss-cfi + $(CP) $(PKG_BUILD_DIR)/$(CFI_CRYPTOAPI_DIR)/../exports/* $(1)/usr/include/qca-nss-cfi + $(CP) $(PKG_BUILD_DIR)/include/* $(1)/usr/include/qca-nss-cfi +endef + +define Build/InstallDev + $(call Build/InstallDev/qca-nss-cfi,$(1)) +endef + +define KernelPackage/qca-nss-cfi/Description +This package contains a NSS cfi driver for QCA chipset +endef + +EXTRA_CFLAGS+= \ + -DCONFIG_NSS_DEBUG_LEVEL=4 \ + -I$(LINUX_DIR)/crypto/ocf \ + -I$(STAGING_DIR)/usr/include/qca-nss-crypto \ + -I$(STAGING_DIR)/usr/include/crypto \ + -I$(STAGING_DIR)/usr/include/qca-nss-drv + +ifneq (, $(findstring $(subtarget), "ipq807x" "ipq807x_64" "ipq60xx" "ipq60xx_64")) +EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/qca-nss-clients +endif + +define Build/Compile + $(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \ + $(KERNEL_MAKE_FLAGS) \ + $(PKG_MAKE_FLAGS) \ + M="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ + CFI_CRYPTOAPI_DIR=$(CFI_CRYPTOAPI_DIR) \ + CFI_OCF_DIR=$(CFI_OCF_DIR) \ + CFI_IPSEC_DIR=$(CFI_IPSEC_DIR) \ + SoC=$(subtarget) \ + modules +endef + +$(eval $(call KernelPackage,qca-nss-cfi-cryptoapi)) +#$(eval $(call KernelPackage,qca-nss-cfi-ocf)) diff --git a/package/qca/qca-nss-cfi/patches/0001-compile-only-cryptoapi.patch b/package/qca/qca-nss-cfi/patches/0001-compile-only-cryptoapi.patch new file mode 100644 index 000000000..00968f5fe --- /dev/null +++ b/package/qca/qca-nss-cfi/patches/0001-compile-only-cryptoapi.patch @@ -0,0 +1,30 @@ +From a8a573c5ce83bdddca9a60c62161638a5fd906d4 Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Sat, 13 Jun 2020 12:57:14 +0200 +Subject: [PATCH 1/3] compile only cryptoapi + +--- + Makefile | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index c42adca..36a9d3f 100644 +--- a/Makefile ++++ b/Makefile +@@ -4,9 +4,9 @@ + + export BUILD_ID = \"Build Id: $(shell date +'%m/%d/%y, %H:%M:%S')\" + +-obj-m += $(CFI_OCF_DIR)/ ++# obj-m += $(CFI_OCF_DIR)/ + obj-m += $(CFI_CRYPTOAPI_DIR)/ + +-ifeq ($(SoC),$(filter $(SoC),ipq806x)) +-obj-m += $(CFI_IPSEC_DIR)/ +-endif ++# ifeq ($(SoC),$(filter $(SoC),ipq806x)) ++# obj-m += $(CFI_IPSEC_DIR)/ ++# endif +-- +2.27.0.rc0 + diff --git a/package/qca/qca-nss-cfi/patches/0002-wip-support-5.4.patch b/package/qca/qca-nss-cfi/patches/0002-wip-support-5.4.patch new file mode 100644 index 000000000..d68fc939b --- /dev/null +++ b/package/qca/qca-nss-cfi/patches/0002-wip-support-5.4.patch @@ -0,0 +1,78 @@ +From 202f57bae49947a04301ac8ac9bdc00f28f09355 Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Sat, 13 Jun 2020 12:58:26 +0200 +Subject: [PATCH 2/3] wip: support 5.4 + +--- + cryptoapi/v1.1/nss_cryptoapi.c | 1 - + cryptoapi/v1.1/nss_cryptoapi_ablk.c | 12 ++++++------ + cryptoapi/v1.1/nss_cryptoapi_aead.c | 2 +- + 3 files changed, 7 insertions(+), 8 deletions(-) + +diff --git a/cryptoapi/v1.1/nss_cryptoapi.c b/cryptoapi/v1.1/nss_cryptoapi.c +index d1a7313..a10590e 100644 +--- a/cryptoapi/v1.1/nss_cryptoapi.c ++++ b/cryptoapi/v1.1/nss_cryptoapi.c +@@ -231,7 +231,6 @@ static struct crypto_alg cryptoapi_ablkcipher_algs[] = { + .cra_u = { + .ablkcipher = { + .ivsize = CTR_RFC3686_IV_SIZE, +- .geniv = "seqiv", + .min_keysize = AES_MIN_KEY_SIZE + CTR_RFC3686_NONCE_SIZE, + .max_keysize = AES_MAX_KEY_SIZE + CTR_RFC3686_NONCE_SIZE, + .setkey = nss_cryptoapi_ablk_aes_setkey, +diff --git a/cryptoapi/v1.1/nss_cryptoapi_ablk.c b/cryptoapi/v1.1/nss_cryptoapi_ablk.c +index 223591c..9b6c65e 100644 +--- a/cryptoapi/v1.1/nss_cryptoapi_ablk.c ++++ b/cryptoapi/v1.1/nss_cryptoapi_ablk.c +@@ -108,7 +108,7 @@ EXPORT_SYMBOL(nss_cryptoapi_skcipher_ctx2session); + int nss_cryptoapi_ablkcipher_init(struct crypto_tfm *tfm) + { + struct nss_cryptoapi_ctx *ctx = crypto_tfm_ctx(tfm); +- struct crypto_ablkcipher *sw_tfm; ++ struct crypto_cipher *sw_tfm; + + nss_cfi_assert(ctx); + +@@ -122,20 +122,20 @@ int nss_cryptoapi_ablkcipher_init(struct crypto_tfm *tfm) + + nss_cryptoapi_set_magic(ctx); + +- if (!(crypto_tfm_alg_flags(tfm) & CRYPTO_ALG_NEED_FALLBACK)) ++ if (!(crypto_tfm_alg_type(tfm) & CRYPTO_ALG_NEED_FALLBACK)) + return 0; + + /* Alloc fallback transform for future use */ +- sw_tfm = crypto_alloc_ablkcipher(crypto_tfm_alg_name(tfm), 0, CRYPTO_ALG_ASYNC | +- CRYPTO_ALG_NEED_FALLBACK); ++ sw_tfm = crypto_alloc_cipher(crypto_tfm_alg_name(tfm), 0, CRYPTO_ALG_ASYNC | ++ CRYPTO_ALG_NEED_FALLBACK); + if (IS_ERR(sw_tfm)) { + nss_cfi_err("unable to alloc software crypto for %s\n", crypto_tfm_alg_name(tfm)); + return -EINVAL; + } + + /* set this tfm reqsize same to fallback tfm */ +- tfm->crt_ablkcipher.reqsize = crypto_ablkcipher_reqsize(sw_tfm); +- ctx->sw_tfm = crypto_ablkcipher_tfm(sw_tfm); ++ tfm->crt_ablkcipher.reqsize = sizeof(struct nss_cryptoapi_ctx); ++ ctx->sw_tfm = crypto_cipher_tfm(sw_tfm); + + return 0; + } +diff --git a/cryptoapi/v1.1/nss_cryptoapi_aead.c b/cryptoapi/v1.1/nss_cryptoapi_aead.c +index 527936b..53e4bed 100644 +--- a/cryptoapi/v1.1/nss_cryptoapi_aead.c ++++ b/cryptoapi/v1.1/nss_cryptoapi_aead.c +@@ -103,7 +103,7 @@ int nss_cryptoapi_aead_init(struct crypto_aead *aead) + + nss_cryptoapi_set_magic(ctx); + +- if (!(crypto_tfm_alg_flags(tfm) & CRYPTO_ALG_NEED_FALLBACK)) ++ if (!(crypto_tfm_alg_type(tfm) & CRYPTO_ALG_NEED_FALLBACK)) + return 0; + + /* Alloc fallback transform for future use */ +-- +2.27.0.rc0 + diff --git a/package/qca/qca-nss-cfi/patches/0003-Convert-ablkcipher-to-skcipher.patch b/package/qca/qca-nss-cfi/patches/0003-Convert-ablkcipher-to-skcipher.patch new file mode 100644 index 000000000..b4520a3d6 --- /dev/null +++ b/package/qca/qca-nss-cfi/patches/0003-Convert-ablkcipher-to-skcipher.patch @@ -0,0 +1,707 @@ +From e3a53a6d11b2c1770545a2820a58c117799bcb70 Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Tue, 16 Jun 2020 18:12:34 +0200 +Subject: [PATCH 3/3] Convert ablkcipher to skcipher + +--- + cryptoapi/v1.1/nss_cryptoapi.c | 149 +++++++++++-------------- + cryptoapi/v1.1/nss_cryptoapi_ablk.c | 136 +++++++++++----------- + cryptoapi/v1.1/nss_cryptoapi_debugfs.c | 1 + + cryptoapi/v1.1/nss_cryptoapi_private.h | 16 +-- + 4 files changed, 145 insertions(+), 157 deletions(-) + +diff --git a/cryptoapi/v1.1/nss_cryptoapi.c b/cryptoapi/v1.1/nss_cryptoapi.c +index a10590e..3a835dc 100644 +--- a/cryptoapi/v1.1/nss_cryptoapi.c ++++ b/cryptoapi/v1.1/nss_cryptoapi.c +@@ -66,7 +66,7 @@ struct aead_alg cryptoapi_aead_algs[] = { + .cra_name = "echainiv(authenc(hmac(sha1),cbc(aes)))", + .cra_driver_name = "nss-hmac-sha1-cbc-aes", + .cra_priority = 10000, +- .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_NEED_FALLBACK, ++ .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_NEED_FALLBACK | CRYPTO_ALG_KERN_DRIVER_ONLY, + .cra_blocksize = AES_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), + .cra_alignmask = 0, +@@ -87,7 +87,7 @@ struct aead_alg cryptoapi_aead_algs[] = { + .cra_name = "seqiv(authenc(hmac(sha1),rfc3686(ctr(aes))))", + .cra_driver_name = "nss-hmac-sha1-rfc3686-ctr-aes", + .cra_priority = 10000, +- .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_NEED_FALLBACK, ++ .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_NEED_FALLBACK | CRYPTO_ALG_KERN_DRIVER_ONLY, + .cra_blocksize = AES_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), + .cra_alignmask = 0, +@@ -108,7 +108,7 @@ struct aead_alg cryptoapi_aead_algs[] = { + .cra_name = "echainiv(authenc(hmac(sha1),cbc(des3_ede)))", + .cra_driver_name = "nss-hmac-sha1-cbc-3des", + .cra_priority = 300, +- .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG, ++ .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_KERN_DRIVER_ONLY, + .cra_blocksize = DES3_EDE_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), + .cra_alignmask = 0, +@@ -129,7 +129,7 @@ struct aead_alg cryptoapi_aead_algs[] = { + .cra_name = "echainiv(authenc(hmac(sha256),cbc(aes)))", + .cra_driver_name = "nss-hmac-sha256-cbc-aes", + .cra_priority = 10000, +- .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_NEED_FALLBACK, ++ .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_NEED_FALLBACK | CRYPTO_ALG_KERN_DRIVER_ONLY, + .cra_blocksize = AES_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), + .cra_alignmask = 0, +@@ -150,7 +150,7 @@ struct aead_alg cryptoapi_aead_algs[] = { + .cra_name = "seqiv(authenc(hmac(sha256),rfc3686(ctr(aes))))", + .cra_driver_name = "nss-hmac-sha256-rfc3686-ctr-aes", + .cra_priority = 10000, +- .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_NEED_FALLBACK, ++ .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_NEED_FALLBACK | CRYPTO_ALG_KERN_DRIVER_ONLY, + .cra_blocksize = AES_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), + .cra_alignmask = 0, +@@ -171,7 +171,7 @@ struct aead_alg cryptoapi_aead_algs[] = { + .cra_name = "echainiv(authenc(hmac(sha256),cbc(des3_ede)))", + .cra_driver_name = "nss-hmac-sha256-cbc-3des", + .cra_priority = 300, +- .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG, ++ .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_KERN_DRIVER_ONLY, + .cra_blocksize = DES3_EDE_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), + .cra_alignmask = 0, +@@ -192,75 +192,66 @@ struct aead_alg cryptoapi_aead_algs[] = { + /* + * ABLK cipher algorithms + */ +-static struct crypto_alg cryptoapi_ablkcipher_algs[] = { ++static struct skcipher_alg cryptoapi_skcipher_algs[] = { + { +- .cra_name = "cbc(aes)", +- .cra_driver_name = "nss-cbc-aes", +- .cra_priority = 10000, +- .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK, +- .cra_blocksize = AES_BLOCK_SIZE, +- .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), +- .cra_alignmask = 0, +- .cra_type = &crypto_ablkcipher_type, +- .cra_module = THIS_MODULE, +- .cra_init = nss_cryptoapi_ablkcipher_init, +- .cra_exit = nss_cryptoapi_ablkcipher_exit, +- .cra_u = { +- .ablkcipher = { +- .ivsize = AES_BLOCK_SIZE, +- .min_keysize = AES_MIN_KEY_SIZE, +- .max_keysize = AES_MAX_KEY_SIZE, +- .setkey = nss_cryptoapi_ablk_aes_setkey, +- .encrypt = nss_cryptoapi_ablk_aes_encrypt, +- .decrypt = nss_cryptoapi_ablk_aes_decrypt, +- }, ++ .base = { ++ .cra_name = "cbc(aes)", ++ .cra_driver_name = "nss-cbc-aes", ++ .cra_priority = 10000, ++ .cra_flags = CRYPTO_ALG_TYPE_SKCIPHER | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK | CRYPTO_ALG_KERN_DRIVER_ONLY, ++ .cra_blocksize = AES_BLOCK_SIZE, ++ .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), ++ .cra_alignmask = 0, ++ .cra_module = THIS_MODULE, + }, ++ .init = nss_cryptoapi_skcipher_init, ++ .exit = nss_cryptoapi_skcipher_exit, ++ .ivsize = AES_BLOCK_SIZE, ++ .min_keysize = AES_MIN_KEY_SIZE, ++ .max_keysize = AES_MAX_KEY_SIZE, ++ .setkey = nss_cryptoapi_ablk_aes_setkey, ++ .encrypt = nss_cryptoapi_ablk_aes_encrypt, ++ .decrypt = nss_cryptoapi_ablk_aes_decrypt, + }, + { +- .cra_name = "rfc3686(ctr(aes))", +- .cra_driver_name = "nss-rfc3686-ctr-aes", +- .cra_priority = 30000, +- .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK, +- .cra_blocksize = AES_BLOCK_SIZE, +- .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), +- .cra_alignmask = 0, +- .cra_type = &crypto_ablkcipher_type, +- .cra_module = THIS_MODULE, +- .cra_init = nss_cryptoapi_ablkcipher_init, +- .cra_exit = nss_cryptoapi_ablkcipher_exit, +- .cra_u = { +- .ablkcipher = { +- .ivsize = CTR_RFC3686_IV_SIZE, +- .min_keysize = AES_MIN_KEY_SIZE + CTR_RFC3686_NONCE_SIZE, +- .max_keysize = AES_MAX_KEY_SIZE + CTR_RFC3686_NONCE_SIZE, +- .setkey = nss_cryptoapi_ablk_aes_setkey, +- .encrypt = nss_cryptoapi_ablk_aes_encrypt, +- .decrypt = nss_cryptoapi_ablk_aes_decrypt, +- }, ++ .base = { ++ .cra_name = "rfc3686(ctr(aes))", ++ .cra_driver_name = "nss-rfc3686-ctr-aes", ++ .cra_priority = 30000, ++ .cra_flags = CRYPTO_ALG_TYPE_SKCIPHER | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK | CRYPTO_ALG_KERN_DRIVER_ONLY, ++ .cra_blocksize = AES_BLOCK_SIZE, ++ .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), ++ .cra_alignmask = 0, ++ .cra_module = THIS_MODULE, + }, ++ .init = nss_cryptoapi_skcipher_init, ++ .exit = nss_cryptoapi_skcipher_exit, ++ .ivsize = CTR_RFC3686_IV_SIZE, ++ .min_keysize = AES_MIN_KEY_SIZE + CTR_RFC3686_NONCE_SIZE, ++ .max_keysize = AES_MAX_KEY_SIZE + CTR_RFC3686_NONCE_SIZE, ++ .setkey = nss_cryptoapi_ablk_aes_setkey, ++ .encrypt = nss_cryptoapi_ablk_aes_encrypt, ++ .decrypt = nss_cryptoapi_ablk_aes_decrypt, + }, + { +- .cra_name = "cbc(des3_ede)", +- .cra_driver_name = "nss-cbc-3des", +- .cra_priority = 1000, +- .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_ASYNC, +- .cra_blocksize = DES3_EDE_BLOCK_SIZE, +- .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), +- .cra_alignmask = 0, +- .cra_type = &crypto_ablkcipher_type, +- .cra_module = THIS_MODULE, +- .cra_init = nss_cryptoapi_ablkcipher_init, +- .cra_exit = nss_cryptoapi_ablkcipher_exit, +- .cra_u = { +- .ablkcipher = { +- .ivsize = DES3_EDE_BLOCK_SIZE, +- .min_keysize = DES3_EDE_KEY_SIZE, +- .max_keysize = DES3_EDE_KEY_SIZE, +- .setkey = nss_cryptoapi_3des_cbc_setkey, +- .encrypt = nss_cryptoapi_3des_cbc_encrypt, +- .decrypt = nss_cryptoapi_3des_cbc_decrypt, +- }, ++ .base = { ++ .cra_name = "cbc(des3_ede)", ++ .cra_driver_name = "nss-cbc-3des", ++ .cra_priority = 1000, ++ .cra_flags = CRYPTO_ALG_TYPE_SKCIPHER | CRYPTO_ALG_NOSUPP_SG | CRYPTO_ALG_ASYNC | CRYPTO_ALG_KERN_DRIVER_ONLY, ++ .cra_blocksize = DES3_EDE_BLOCK_SIZE, ++ .cra_ctxsize = sizeof(struct nss_cryptoapi_ctx), ++ .cra_alignmask = 0, ++ .cra_module = THIS_MODULE, + }, ++ .init = nss_cryptoapi_skcipher_init, ++ .exit = nss_cryptoapi_skcipher_exit, ++ .ivsize = DES3_EDE_BLOCK_SIZE, ++ .min_keysize = DES3_EDE_KEY_SIZE, ++ .max_keysize = DES3_EDE_KEY_SIZE, ++ .setkey = nss_cryptoapi_3des_cbc_setkey, ++ .encrypt = nss_cryptoapi_3des_cbc_encrypt, ++ .decrypt = nss_cryptoapi_3des_cbc_decrypt, + }, + }; + +@@ -277,14 +268,14 @@ static nss_crypto_user_ctx_t nss_cryptoapi_register(nss_crypto_handle_t crypto) + + sc->crypto = crypto; + +- for (i = 0; i < ARRAY_SIZE(cryptoapi_ablkcipher_algs); i++) { +- rc = crypto_register_alg(&cryptoapi_ablkcipher_algs[i]); ++ for (i = 0; i < ARRAY_SIZE(cryptoapi_skcipher_algs); i++) { ++ rc = crypto_register_skcipher(&cryptoapi_skcipher_algs[i]); + if (rc) { +- nss_cfi_trace("Ablk registration failed, algo: %s\n", cryptoapi_ablkcipher_algs[i].cra_name); +- cryptoapi_ablkcipher_algs[i].cra_flags = 0; ++ nss_cfi_trace("Ablk registration failed, algo: %s\n", cryptoapi_skcipher_algs[i].base.cra_name); ++ cryptoapi_skcipher_algs[i].base.cra_flags = 0; + continue; + } +- nss_cfi_info("Ablk registration succeeded, algo: %s\n", cryptoapi_ablkcipher_algs[i].cra_name); ++ nss_cfi_info("Ablk registration succeeded, algo: %s\n", cryptoapi_skcipher_algs[i].base.cra_name); + } + + for (i = 0; i < ARRAY_SIZE(cryptoapi_aead_algs); i++) { +@@ -317,7 +308,7 @@ static nss_crypto_user_ctx_t nss_cryptoapi_register(nss_crypto_handle_t crypto) + static void nss_cryptoapi_unregister(nss_crypto_user_ctx_t cfi) + { + struct nss_cryptoapi *sc = &gbl_ctx; +- int i, ret = 0; ++ int i; + + nss_cfi_info("unregister nss_cryptoapi\n"); + +@@ -326,16 +317,12 @@ static void nss_cryptoapi_unregister(nss_crypto_user_ctx_t cfi) + */ + atomic_set(&gbl_ctx.registered, 0); + +- for (i = 0; i < ARRAY_SIZE(cryptoapi_ablkcipher_algs); i++) { +- if (!cryptoapi_ablkcipher_algs[i].cra_flags) { +- continue; +- } +- ret = crypto_unregister_alg(&cryptoapi_ablkcipher_algs[i]); +- if (ret) { +- nss_cfi_err("Ablk unregister failed, algo: %s\n", cryptoapi_ablkcipher_algs[i].cra_name); ++ for (i = 0; i < ARRAY_SIZE(cryptoapi_skcipher_algs); i++) { ++ if (!cryptoapi_skcipher_algs[i].base.cra_flags) { + continue; + } +- nss_cfi_info("Ablk unregister succeeded, algo: %s\n", cryptoapi_ablkcipher_algs[i].cra_name); ++ crypto_unregister_skcipher(&cryptoapi_skcipher_algs[i]); ++ nss_cfi_info("Ablk unregister succeeded, algo: %s\n", cryptoapi_skcipher_algs[i].base.cra_name); + } + + for (i = 0; i < ARRAY_SIZE(cryptoapi_aead_algs); i++) { +diff --git a/cryptoapi/v1.1/nss_cryptoapi_ablk.c b/cryptoapi/v1.1/nss_cryptoapi_ablk.c +index 9b6c65e..913e9cc 100644 +--- a/cryptoapi/v1.1/nss_cryptoapi_ablk.c ++++ b/cryptoapi/v1.1/nss_cryptoapi_ablk.c +@@ -102,12 +102,12 @@ int nss_cryptoapi_skcipher_ctx2session(struct crypto_skcipher *sk, uint32_t *sid + EXPORT_SYMBOL(nss_cryptoapi_skcipher_ctx2session); + + /* +- * nss_cryptoapi_ablkcipher_init() +- * Cryptoapi ablkcipher init function. ++ * nss_cryptoapi_skcipher_init() ++ * Cryptoapi skcipher init function. + */ +-int nss_cryptoapi_ablkcipher_init(struct crypto_tfm *tfm) ++int nss_cryptoapi_skcipher_init(struct crypto_skcipher *tfm) + { +- struct nss_cryptoapi_ctx *ctx = crypto_tfm_ctx(tfm); ++ struct nss_cryptoapi_ctx *ctx = crypto_skcipher_ctx(tfm); + struct crypto_cipher *sw_tfm; + + nss_cfi_assert(ctx); +@@ -122,31 +122,31 @@ int nss_cryptoapi_ablkcipher_init(struct crypto_tfm *tfm) + + nss_cryptoapi_set_magic(ctx); + +- if (!(crypto_tfm_alg_type(tfm) & CRYPTO_ALG_NEED_FALLBACK)) ++ if (!(crypto_tfm_alg_type(&tfm->base) & CRYPTO_ALG_NEED_FALLBACK)) + return 0; + + /* Alloc fallback transform for future use */ +- sw_tfm = crypto_alloc_cipher(crypto_tfm_alg_name(tfm), 0, CRYPTO_ALG_ASYNC | ++ sw_tfm = crypto_alloc_cipher(crypto_tfm_alg_name(&tfm->base), 0, CRYPTO_ALG_ASYNC | + CRYPTO_ALG_NEED_FALLBACK); + if (IS_ERR(sw_tfm)) { +- nss_cfi_err("unable to alloc software crypto for %s\n", crypto_tfm_alg_name(tfm)); ++ nss_cfi_err("unable to alloc software crypto for %s\n", crypto_tfm_alg_name(&tfm->base)); + return -EINVAL; + } + + /* set this tfm reqsize same to fallback tfm */ +- tfm->crt_ablkcipher.reqsize = sizeof(struct nss_cryptoapi_ctx); ++ crypto_skcipher_set_reqsize(tfm, sizeof(struct nss_cryptoapi_ctx)); + ctx->sw_tfm = crypto_cipher_tfm(sw_tfm); + + return 0; + } + + /* +- * nss_cryptoapi_ablkcipher_exit() +- * Cryptoapi ablkcipher exit function. ++ * nss_cryptoapi_skcipher_exit() ++ * Cryptoapi skcipher exit function. + */ +-void nss_cryptoapi_ablkcipher_exit(struct crypto_tfm *tfm) ++void nss_cryptoapi_skcipher_exit(struct crypto_skcipher *tfm) + { +- struct nss_cryptoapi_ctx *ctx = crypto_tfm_ctx(tfm); ++ struct nss_cryptoapi_ctx *ctx = crypto_skcipher_ctx(tfm); + struct nss_cryptoapi *sc = &gbl_ctx; + nss_crypto_status_t status; + +@@ -158,7 +158,7 @@ void nss_cryptoapi_ablkcipher_exit(struct crypto_tfm *tfm) + } + + if (ctx->sw_tfm) { +- crypto_free_ablkcipher(__crypto_ablkcipher_cast(ctx->sw_tfm)); ++ crypto_free_skcipher(__crypto_skcipher_cast(ctx->sw_tfm)); + ctx->sw_tfm = NULL; + } + +@@ -183,9 +183,9 @@ void nss_cryptoapi_ablkcipher_exit(struct crypto_tfm *tfm) + * nss_cryptoapi_ablk_aes_setkey() + * Cryptoapi setkey routine for aes. + */ +-int nss_cryptoapi_ablk_aes_setkey(struct crypto_ablkcipher *cipher, const u8 *key, unsigned int keylen) ++int nss_cryptoapi_ablk_aes_setkey(struct crypto_skcipher *cipher, const u8 *key, unsigned int keylen) + { +- struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); ++ struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); + struct nss_cryptoapi_ctx *ctx = crypto_tfm_ctx(tfm); + struct nss_cryptoapi *sc = &gbl_ctx; + struct nss_crypto_key cip; +@@ -255,10 +255,10 @@ int nss_cryptoapi_ablk_aes_setkey(struct crypto_ablkcipher *cipher, const u8 *ke + + /* set flag to fallback tfm */ + crypto_tfm_clear_flags(ctx->sw_tfm, CRYPTO_TFM_REQ_MASK); +- crypto_tfm_set_flags(ctx->sw_tfm, crypto_ablkcipher_get_flags(cipher) & CRYPTO_TFM_REQ_MASK); ++ crypto_tfm_set_flags(ctx->sw_tfm, crypto_skcipher_get_flags(cipher) & CRYPTO_TFM_REQ_MASK); + + /* Set key to the fallback tfm */ +- ret = crypto_ablkcipher_setkey(__crypto_ablkcipher_cast(ctx->sw_tfm), key, keylen); ++ ret = crypto_skcipher_setkey(__crypto_skcipher_cast(ctx->sw_tfm), key, keylen); + if (ret) { + nss_cfi_err("Failed to set key to the sw crypto"); + +@@ -266,7 +266,7 @@ int nss_cryptoapi_ablk_aes_setkey(struct crypto_ablkcipher *cipher, const u8 *ke + * Set back the fallback tfm flag to the original flag one after + * doing setkey + */ +- crypto_ablkcipher_set_flags(cipher, crypto_tfm_get_flags(ctx->sw_tfm)); ++ crypto_skcipher_set_flags(cipher, crypto_tfm_get_flags(ctx->sw_tfm)); + } + return ret; + default: +@@ -289,23 +289,23 @@ int nss_cryptoapi_ablk_aes_setkey(struct crypto_ablkcipher *cipher, const u8 *ke + return 0; + + fail: +- crypto_ablkcipher_set_flags(cipher, flag); ++ crypto_skcipher_set_flags(cipher, flag); + return -EINVAL; + } + + /* +- * nss_cryptoapi_ablkcipher_done() ++ * nss_cryptoapi_skcipher_done() + * Cipher operation completion callback function + */ +-void nss_cryptoapi_ablkcipher_done(struct nss_crypto_buf *buf) ++void nss_cryptoapi_skcipher_done(struct nss_crypto_buf *buf) + { + struct nss_cryptoapi_ctx *ctx; +- struct ablkcipher_request *req; ++ struct skcipher_request *req; + int err = 0; + + nss_cfi_assert(buf); + +- req = (struct ablkcipher_request *)nss_crypto_get_cb_ctx(buf); ++ req = (struct skcipher_request *)nss_crypto_get_cb_ctx(buf); + + /* + * check cryptoapi context magic number. +@@ -319,7 +319,7 @@ void nss_cryptoapi_ablkcipher_done(struct nss_crypto_buf *buf) + nss_crypto_buf_free(gbl_ctx.crypto, buf); + + nss_cfi_dbg("after transformation\n"); +- nss_cfi_dbg_data(sg_virt(req->dst), req->nbytes, ' '); ++ nss_cfi_dbg_data(sg_virt(req->dst), req->cryptlen, ' '); + + /* + * Passing always pass in case of encrypt. +@@ -337,7 +337,7 @@ void nss_cryptoapi_ablkcipher_done(struct nss_crypto_buf *buf) + * Cryptoapi: obtain sg to virtual address mapping. + * Check for multiple sg in src and dst + */ +-int nss_cryptoapi_ablk_checkaddr(struct ablkcipher_request *req) ++int nss_cryptoapi_ablk_checkaddr(struct skcipher_request *req) + { + /* + * Currently only single sg is supported +@@ -356,7 +356,7 @@ int nss_cryptoapi_ablk_checkaddr(struct ablkcipher_request *req) + /* + * If the size of data is more than 65K reject transformation + */ +- if (req->nbytes > NSS_CRYPTOAPI_MAX_DATA_LEN) { ++ if (req->cryptlen > NSS_CRYPTOAPI_MAX_DATA_LEN) { + nss_cfi_err("Buffer length exceeded limit\n"); + return -EINVAL; + } +@@ -368,10 +368,10 @@ int nss_cryptoapi_ablk_checkaddr(struct ablkcipher_request *req) + * nss_cryptoapi_ablk_transform() + * Crytoapi common routine for encryption and decryption operations. + */ +-struct nss_crypto_buf *nss_cryptoapi_ablk_transform(struct ablkcipher_request *req, struct nss_cryptoapi_ablk_info *info) ++struct nss_crypto_buf *nss_cryptoapi_ablk_transform(struct skcipher_request *req, struct nss_cryptoapi_ablk_info *info) + { +- struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(req); +- struct nss_cryptoapi_ctx *ctx = crypto_ablkcipher_ctx(cipher); ++ struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); ++ struct nss_cryptoapi_ctx *ctx = crypto_skcipher_ctx(cipher); + struct nss_crypto_buf *buf; + struct nss_cryptoapi *sc = &gbl_ctx; + nss_crypto_status_t status; +@@ -382,7 +382,7 @@ struct nss_crypto_buf *nss_cryptoapi_ablk_transform(struct ablkcipher_request *r + nss_cfi_assert(ctx); + + nss_cfi_dbg("src_vaddr: 0x%p, dst_vaddr: 0x%p, iv: 0x%p\n", +- sg_virt(req->src), sg_virt(req->dst), req->info); ++ sg_virt(req->src), sg_virt(req->dst), req->iv); + + info->params->cipher_skip = 0; + info->params->auth_skip = 0; +@@ -419,19 +419,19 @@ struct nss_crypto_buf *nss_cryptoapi_ablk_transform(struct ablkcipher_request *r + /* + * Get IV location and memcpy the IV + */ +- iv_size = crypto_ablkcipher_ivsize(cipher); ++ iv_size = crypto_skcipher_ivsize(cipher); + iv_addr = nss_crypto_get_ivaddr(buf); + + switch (ctx->cip_alg) { + case NSS_CRYPTO_CIPHER_AES_CBC: + case NSS_CRYPTO_CIPHER_DES: +- memcpy(iv_addr, req->info, iv_size); ++ memcpy(iv_addr, req->iv, iv_size); + break; + + case NSS_CRYPTO_CIPHER_AES_CTR: + ((uint32_t *)iv_addr)[0] = ctx->ctx_iv[0]; +- ((uint32_t *)iv_addr)[1] = ((uint32_t *)req->info)[0]; +- ((uint32_t *)iv_addr)[2] = ((uint32_t *)req->info)[1]; ++ ((uint32_t *)iv_addr)[1] = ((uint32_t *)req->iv)[0]; ++ ((uint32_t *)iv_addr)[2] = ((uint32_t *)req->iv)[1]; + ((uint32_t *)iv_addr)[3] = ctx->ctx_iv[3]; + break; + +@@ -446,7 +446,7 @@ struct nss_crypto_buf *nss_cryptoapi_ablk_transform(struct ablkcipher_request *r + /* + * Fill Cipher and Auth len + */ +- cipher_len = req->nbytes; ++ cipher_len = req->cryptlen; + auth_len = 0; + + nss_crypto_set_data(buf, sg_virt(req->src), sg_virt(req->dst), cipher_len); +@@ -463,12 +463,12 @@ struct nss_crypto_buf *nss_cryptoapi_ablk_transform(struct ablkcipher_request *r + } + + /* +- * nss_cryptoapi_ablkcipher_fallback() +- * Cryptoapi fallback for ablkcipher algorithm. ++ * nss_cryptoapi_skcipher_fallback() ++ * Cryptoapi fallback for skcipher algorithm. + */ +-int nss_cryptoapi_ablkcipher_fallback(struct nss_cryptoapi_ctx *ctx, struct ablkcipher_request *req, int type) ++int nss_cryptoapi_skcipher_fallback(struct nss_cryptoapi_ctx *ctx, struct skcipher_request *req, int type) + { +- struct crypto_ablkcipher *orig_tfm = crypto_ablkcipher_reqtfm(req); ++ struct crypto_skcipher *orig_tfm = crypto_skcipher_reqtfm(req); + int err; + + if (!ctx->sw_tfm) { +@@ -476,16 +476,16 @@ int nss_cryptoapi_ablkcipher_fallback(struct nss_cryptoapi_ctx *ctx, struct ablk + } + + /* Set new fallback tfm to the request */ +- ablkcipher_request_set_tfm(req, __crypto_ablkcipher_cast(ctx->sw_tfm)); ++ skcipher_request_set_tfm(req, __crypto_skcipher_cast(ctx->sw_tfm)); + + ctx->queued++; + + switch (type) { + case NSS_CRYPTOAPI_ENCRYPT: +- err = crypto_ablkcipher_encrypt(req); ++ err = crypto_skcipher_encrypt(req); + break; + case NSS_CRYPTOAPI_DECRYPT: +- err = crypto_ablkcipher_decrypt(req); ++ err = crypto_skcipher_decrypt(req); + break; + default: + err = -EINVAL; +@@ -495,7 +495,7 @@ int nss_cryptoapi_ablkcipher_fallback(struct nss_cryptoapi_ctx *ctx, struct ablk + ctx->completed++; + + /* Set original tfm to the request */ +- ablkcipher_request_set_tfm(req, orig_tfm); ++ skcipher_request_set_tfm(req, orig_tfm); + + return err; + } +@@ -504,13 +504,13 @@ int nss_cryptoapi_ablkcipher_fallback(struct nss_cryptoapi_ctx *ctx, struct ablk + * nss_cryptoapi_ablk_aes_encrypt() + * Crytoapi encrypt for aes(aes-cbc/rfc3686-aes-ctr) algorithms. + */ +-int nss_cryptoapi_ablk_aes_encrypt(struct ablkcipher_request *req) ++int nss_cryptoapi_ablk_aes_encrypt(struct skcipher_request *req) + { + struct nss_crypto_params params = { .req_type = NSS_CRYPTO_REQ_TYPE_ENCRYPT }; +- struct nss_cryptoapi_ablk_info info = {.cb_fn = nss_cryptoapi_ablkcipher_done, ++ struct nss_cryptoapi_ablk_info info = {.cb_fn = nss_cryptoapi_skcipher_done, + .params = ¶ms}; +- struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(req); +- struct nss_cryptoapi_ctx *ctx = crypto_ablkcipher_ctx(cipher); ++ struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); ++ struct nss_cryptoapi_ctx *ctx = crypto_skcipher_ctx(cipher); + struct nss_cryptoapi *sc = &gbl_ctx; + struct nss_crypto_buf *buf; + +@@ -520,7 +520,7 @@ int nss_cryptoapi_ablk_aes_encrypt(struct ablkcipher_request *req) + nss_cryptoapi_verify_magic(ctx); + + if (ctx->fallback_req) +- return nss_cryptoapi_ablkcipher_fallback(ctx, req, NSS_CRYPTOAPI_ENCRYPT); ++ return nss_cryptoapi_skcipher_fallback(ctx, req, NSS_CRYPTOAPI_ENCRYPT); + + /* + * Check if previous call to setkey couldn't allocate session with core crypto. +@@ -539,9 +539,9 @@ int nss_cryptoapi_ablk_aes_encrypt(struct ablkcipher_request *req) + * According to RFC3686, AES-CTR algo need not be padded if the + * plaintext or ciphertext is unaligned to block size boundary. + */ +- if (nss_cryptoapi_check_unalign(req->nbytes, AES_BLOCK_SIZE) && (ctx->cip_alg != NSS_CRYPTO_CIPHER_AES_CTR)) { ++ if (nss_cryptoapi_check_unalign(req->cryptlen, AES_BLOCK_SIZE) && (ctx->cip_alg != NSS_CRYPTO_CIPHER_AES_CTR)) { + nss_cfi_err("Invalid cipher len - Not aligned to algo blocksize\n"); +- crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_BLOCK_LEN); ++ crypto_skcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_BLOCK_LEN); + return -EINVAL; + } + +@@ -571,13 +571,13 @@ int nss_cryptoapi_ablk_aes_encrypt(struct ablkcipher_request *req) + * nss_cryptoapi_ablk_aes_decrypt() + * Crytoapi decrypt for aes(aes-cbc/rfc3686-aes-ctr) algorithms. + */ +-int nss_cryptoapi_ablk_aes_decrypt(struct ablkcipher_request *req) ++int nss_cryptoapi_ablk_aes_decrypt(struct skcipher_request *req) + { + struct nss_crypto_params params = { .req_type = NSS_CRYPTO_REQ_TYPE_DECRYPT }; +- struct nss_cryptoapi_ablk_info info = {.cb_fn = nss_cryptoapi_ablkcipher_done, ++ struct nss_cryptoapi_ablk_info info = {.cb_fn = nss_cryptoapi_skcipher_done, + .params = ¶ms}; +- struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(req); +- struct nss_cryptoapi_ctx *ctx = crypto_ablkcipher_ctx(cipher); ++ struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); ++ struct nss_cryptoapi_ctx *ctx = crypto_skcipher_ctx(cipher); + struct nss_cryptoapi *sc = &gbl_ctx; + struct nss_crypto_buf *buf; + +@@ -587,7 +587,7 @@ int nss_cryptoapi_ablk_aes_decrypt(struct ablkcipher_request *req) + nss_cryptoapi_verify_magic(ctx); + + if (ctx->fallback_req) +- return nss_cryptoapi_ablkcipher_fallback(ctx, req, NSS_CRYPTOAPI_DECRYPT); ++ return nss_cryptoapi_skcipher_fallback(ctx, req, NSS_CRYPTOAPI_DECRYPT); + + /* + * Check if previous call to setkey couldn't allocate session with core crypto. +@@ -606,9 +606,9 @@ int nss_cryptoapi_ablk_aes_decrypt(struct ablkcipher_request *req) + * According to RFC3686, AES-CTR algo need not be padded if the + * plaintext or ciphertext is unaligned to block size boundary. + */ +- if (nss_cryptoapi_check_unalign(req->nbytes, AES_BLOCK_SIZE) && (ctx->cip_alg != NSS_CRYPTO_CIPHER_AES_CTR)) { ++ if (nss_cryptoapi_check_unalign(req->cryptlen, AES_BLOCK_SIZE) && (ctx->cip_alg != NSS_CRYPTO_CIPHER_AES_CTR)) { + nss_cfi_err("Invalid cipher len - Not aligned to algo blocksize\n"); +- crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_BLOCK_LEN); ++ crypto_skcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_BLOCK_LEN); + return -EINVAL; + } + +@@ -638,9 +638,9 @@ int nss_cryptoapi_ablk_aes_decrypt(struct ablkcipher_request *req) + * nss_cryptoapi_3des_cbc_setkey() + * Cryptoapi DES3 CBC setkey function. + */ +-int nss_cryptoapi_3des_cbc_setkey(struct crypto_ablkcipher *cipher, const u8 *key, unsigned int keylen) ++int nss_cryptoapi_3des_cbc_setkey(struct crypto_skcipher *cipher, const u8 *key, unsigned int keylen) + { +- struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); ++ struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); + struct nss_cryptoapi_ctx *ctx = crypto_tfm_ctx(tfm); + struct nss_cryptoapi *sc = &gbl_ctx; + struct nss_crypto_key cip = { .algo = NSS_CRYPTO_CIPHER_DES }; +@@ -693,7 +693,7 @@ int nss_cryptoapi_3des_cbc_setkey(struct crypto_ablkcipher *cipher, const u8 *ke + return 0; + + fail: +- crypto_ablkcipher_set_flags(cipher, flag); ++ crypto_skcipher_set_flags(cipher, flag); + return -EINVAL; + } + +@@ -701,7 +701,7 @@ fail: + * nss_cryptoapi_3des_cbc_encrypt() + * Cryptoapi DES3 CBC encrypt function. + */ +-int nss_cryptoapi_3des_cbc_encrypt(struct ablkcipher_request *req) ++int nss_cryptoapi_3des_cbc_encrypt(struct skcipher_request *req) + { + struct nss_cryptoapi *sc = &gbl_ctx; + struct nss_cryptoapi_ctx *ctx = crypto_tfm_ctx(req->base.tfm); +@@ -727,14 +727,14 @@ int nss_cryptoapi_3des_cbc_encrypt(struct ablkcipher_request *req) + return -EINVAL; + } + +- if (nss_cryptoapi_check_unalign(req->nbytes, DES3_EDE_BLOCK_SIZE)) { ++ if (nss_cryptoapi_check_unalign(req->cryptlen, DES3_EDE_BLOCK_SIZE)) { + nss_cfi_err("Invalid cipher len - Not aligned to algo blocksize\n"); +- crypto_ablkcipher_set_flags(crypto_ablkcipher_reqtfm(req), CRYPTO_TFM_RES_BAD_BLOCK_LEN); ++ crypto_skcipher_set_flags(crypto_skcipher_reqtfm(req), CRYPTO_TFM_RES_BAD_BLOCK_LEN); + return -EINVAL; + } + + info.params = ¶ms; +- info.cb_fn = nss_cryptoapi_ablkcipher_done; ++ info.cb_fn = nss_cryptoapi_skcipher_done; + + buf = nss_cryptoapi_ablk_transform(req, &info); + if (!buf) { +@@ -762,7 +762,7 @@ int nss_cryptoapi_3des_cbc_encrypt(struct ablkcipher_request *req) + * nss_cryptoapi_3des_cbc_decrypt() + * Cryptoapi DES3 CBC decrypt function. + */ +-int nss_cryptoapi_3des_cbc_decrypt(struct ablkcipher_request *req) ++int nss_cryptoapi_3des_cbc_decrypt(struct skcipher_request *req) + { + struct nss_cryptoapi *sc = &gbl_ctx; + struct nss_cryptoapi_ctx *ctx = crypto_tfm_ctx(req->base.tfm); +@@ -788,14 +788,14 @@ int nss_cryptoapi_3des_cbc_decrypt(struct ablkcipher_request *req) + return -EINVAL; + } + +- if (nss_cryptoapi_check_unalign(req->nbytes, DES3_EDE_BLOCK_SIZE)) { ++ if (nss_cryptoapi_check_unalign(req->cryptlen, DES3_EDE_BLOCK_SIZE)) { + nss_cfi_err("Invalid cipher len - Not aligned to algo blocksize\n"); +- crypto_ablkcipher_set_flags(crypto_ablkcipher_reqtfm(req), CRYPTO_TFM_RES_BAD_BLOCK_LEN); ++ crypto_skcipher_set_flags(crypto_skcipher_reqtfm(req), CRYPTO_TFM_RES_BAD_BLOCK_LEN); + return -EINVAL; + } + + info.params = ¶ms; +- info.cb_fn = nss_cryptoapi_ablkcipher_done; ++ info.cb_fn = nss_cryptoapi_skcipher_done; + + buf = nss_cryptoapi_ablk_transform(req, &info); + if (!buf) { +diff --git a/cryptoapi/v1.1/nss_cryptoapi_debugfs.c b/cryptoapi/v1.1/nss_cryptoapi_debugfs.c +index dff774c..cf4bc70 100644 +--- a/cryptoapi/v1.1/nss_cryptoapi_debugfs.c ++++ b/cryptoapi/v1.1/nss_cryptoapi_debugfs.c +@@ -55,6 +55,7 @@ + */ + void nss_cryptoapi_debugfs_add_stats(struct dentry *parent, struct nss_cryptoapi_ctx *session_ctx) + { ++ pr_info("add stats"); + debugfs_create_u64("queued", S_IRUGO, parent, &session_ctx->queued); + debugfs_create_u64("completed", S_IRUGO, parent, &session_ctx->completed); + debugfs_create_u64("queue_failed", S_IRUGO, parent, &session_ctx->queue_failed); +diff --git a/cryptoapi/v1.1/nss_cryptoapi_private.h b/cryptoapi/v1.1/nss_cryptoapi_private.h +index 5feb9e3..70c6714 100644 +--- a/cryptoapi/v1.1/nss_cryptoapi_private.h ++++ b/cryptoapi/v1.1/nss_cryptoapi_private.h +@@ -141,16 +141,16 @@ int nss_cryptoapi_sha256_3des_encrypt(struct aead_request *req); + int nss_cryptoapi_sha256_3des_decrypt(struct aead_request *req); + + /* ABLKCIPHER */ +-int nss_cryptoapi_ablkcipher_init(struct crypto_tfm *tfm); +-void nss_cryptoapi_ablkcipher_exit(struct crypto_tfm *tfm); +-int nss_cryptoapi_ablk_aes_setkey(struct crypto_ablkcipher *cipher, const u8 *key, unsigned int len); +-int nss_cryptoapi_3des_cbc_setkey(struct crypto_ablkcipher *cipher, const u8 *key, unsigned int len); ++int nss_cryptoapi_skcipher_init(struct crypto_skcipher *tfm); ++void nss_cryptoapi_skcipher_exit(struct crypto_skcipher *tfm); ++int nss_cryptoapi_ablk_aes_setkey(struct crypto_skcipher *cipher, const u8 *key, unsigned int len); ++int nss_cryptoapi_3des_cbc_setkey(struct crypto_skcipher *cipher, const u8 *key, unsigned int len); + +-int nss_cryptoapi_ablk_aes_encrypt(struct ablkcipher_request *req); +-int nss_cryptoapi_ablk_aes_decrypt(struct ablkcipher_request *req); ++int nss_cryptoapi_ablk_aes_encrypt(struct skcipher_request *req); ++int nss_cryptoapi_ablk_aes_decrypt(struct skcipher_request *req); + +-int nss_cryptoapi_3des_cbc_encrypt(struct ablkcipher_request *req); +-int nss_cryptoapi_3des_cbc_decrypt(struct ablkcipher_request *req); ++int nss_cryptoapi_3des_cbc_encrypt(struct skcipher_request *req); ++int nss_cryptoapi_3des_cbc_decrypt(struct skcipher_request *req); + + #endif /* __NSS_CRYPTOAPI_PRIVATE_H */ + +-- +2.27.0.rc0 + diff --git a/package/qca/qca-nss-clients/Makefile b/package/qca/qca-nss-clients/Makefile new file mode 100644 index 000000000..5099c5521 --- /dev/null +++ b/package/qca/qca-nss-clients/Makefile @@ -0,0 +1,468 @@ +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=qca-nss-clients +PKG_RELEASE:=2 + +PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-clients +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=740d0102c518cd49f30c5580982b218b480006b1 + +include $(INCLUDE_DIR)/package.mk + +# Keep default as ipq806x for branches that does not have subtarget framework +ifeq ($(CONFIG_TARGET_ipq),y) +subtarget:=$(SUBTARGET) +else +subtarget:=$(CONFIG_TARGET_BOARD) +endif + +ifneq (, $(findstring $(subtarget), "ipq807x" "ipq807x_64" "ipq60xx" "ipq60xx_64")) +# DTLS Manager v2.0 for Hawkeye/Cypress + DTLSMGR_DIR:=v2.0 +# IPsec Manager v2.0 for Hawkeye/Cypress + IPSECMGR_DIR:=v2.0 +# KLIPS plugin + IPSECMGR_KLIPS:= $(PKG_BUILD_DIR)/ipsecmgr/$(IPSECMGR_DIR)/plugins/klips/qca-nss-ipsec-klips.ko +else +# DTLS Manager v1.0 for Akronite. + DTLSMGR_DIR:=v1.0 +# IPsec Manager v1.0 for Akronite. + IPSECMGR_DIR:=v1.0 +# KLIPS plugin not needed + IPSECMGR_KLIPS:= +endif + +define KernelPackage/qca-nss-drv-tun6rd + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + TITLE:=Kernel driver for NSS (connection manager) - tun6rd + DEPENDS:=+kmod-qca-nss-drv +kmod-sit +6rd @!LINUX_3_18 + FILES:=$(PKG_BUILD_DIR)/qca-nss-tun6rd.ko + AUTOLOAD:=$(call AutoLoad,60,qca-nss-tun6rd) +endef + +define KernelPackage/qca-nss-drv-tun6rd/Description +Kernel modules for NSS connection manager - Support for 6rd tunnel +endef + +define KernelPackage/qca-nss-drv-dtlsmgr + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + TITLE:=Kernel driver for NSS (connection manager) - dtlsmgr + DEPENDS:=+kmod-qca-nss-drv +kmod-qca-nss-cfi-cryptoapi @!LINUX_3_18 + FILES:=$(PKG_BUILD_DIR)/dtls/$(DTLSMGR_DIR)/qca-nss-dtlsmgr.ko +endef + +define KernelPackage/qca-nss-drv-dtls/Description +Kernel modules for NSS connection manager - Support for DTLS sessions +endef + +define KernelPackage/qca-nss-drv-l2tpv2 + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + TITLE:=Kernel driver for NSS (connection manager) - l2tp + DEPENDS:=+kmod-qca-nss-drv +kmod-ppp +kmod-l2tp @!LINUX_3_18 + FILES:=$(PKG_BUILD_DIR)/l2tp/l2tpv2/qca-nss-l2tpv2.ko + KCONFIG:=CONFIG_L2TP=y + AUTOLOAD:=$(call AutoLoad,51,qca-nss-l2tpv2) +endef + +define KernelPackage/qca-nss-drv-l2tp/Description +Kernel modules for NSS connection manager - Support for l2tp tunnel +endef + +define KernelPackage/qca-nss-drv-pptp + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + TITLE:=Kernel driver for NSS (connection manager) - PPTP + DEPENDS:=+kmod-qca-nss-drv +kmod-pptp @!LINUX_3_18 + FILES:=$(PKG_BUILD_DIR)/pptp/qca-nss-pptp.ko + AUTOLOAD:=$(call AutoLoad,51,qca-nss-pptp) +endef + +define KernelPackage/qca-nss-drv-pptp/Description +Kernel modules for NSS connection manager - Support for PPTP tunnel +endef + +define KernelPackage/qca-nss-drv-pppoe + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + TITLE:=Kernel driver for NSS (connection manager) - PPPoE + DEPENDS:=+kmod-qca-nss-drv +kmod-pppoe @!LINUX_3_18 \ + +!(TARGET_ipq_ipq807x_QSDK_256||TARGET_ipq_ipq60xx_QSDK_256):kmod-bonding + FILES:=$(PKG_BUILD_DIR)/pppoe/qca-nss-pppoe.ko + AUTOLOAD:=$(call AutoLoad,51,qca-nss-pppoe) +endef + +define KernelPackage/qca-nss-drv-pppoe/Description +Kernel modules for NSS connection manager - Support for PPPoE +endef + +define KernelPackage/qca-nss-drv-map-t + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + TITLE:=Kernel driver for NSS (connection manager) - MAP-T + DEPENDS:=+kmod-qca-nss-drv +kmod-nat46 @!LINUX_3_18 + FILES:=$(PKG_BUILD_DIR)/map/map-t/qca-nss-map-t.ko + AUTOLOAD:=$(call AutoLoad,51,qca-nss-map-t) +endef + +define KernelPackage/qca-nss-drv-map-t/Description +Kernel modules for NSS connection manager - Support for MAP-T +endef + +define KernelPackage/qca-nss-drv-gre + SECTION:=kernel + 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 @!LINUX_3_18 +kmod-gre6 + 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 + +define KernelPackage/qca-nss-drv-gre/Description +Kernel modules for NSS connection manager - Support for GRE +endef + +define KernelPackage/qca-nss-drv-tunipip6 + SECTION:=kernel + 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 @!LINUX_3_18 + FILES:=$(PKG_BUILD_DIR)/qca-nss-tunipip6.ko + AUTOLOAD:=$(call AutoLoad,60,qca-nss-tunipip6) +endef + +define KernelPackage/qca-nss-drv-tunipip6/Description +Kernel modules for NSS connection manager +Add support for DS-lite and ipip6 tunnel +endef + +define KernelPackage/qca-nss-drv-profile + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + DEPENDS:=+kmod-qca-nss-drv @!LINUX_3_18 + TITLE:=Profiler for QCA NSS driver (IPQ806x) + FILES:=$(PKG_BUILD_DIR)/profiler/qca-nss-profile-drv.ko +endef + +define KernelPackage/qca-nss-drv-profile/Description +This package contains a NSS driver profiler for QCA chipset +endef + +define KernelPackage/qca-nss-drv-ipsecmgr + SECTION:=kernel + 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-standard +kmod-qca-nss-cfi-cryptoapi @!LINUX_3_18 +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-l2tpv2),) + DEPENDS+=+kmod-qca-nss-drv-l2tpv2 +endif + FILES:=$(PKG_BUILD_DIR)/ipsecmgr/$(IPSECMGR_DIR)/qca-nss-ipsecmgr.ko $(IPSECMGR_KLIPS) + AUTOLOAD:=$(call AutoLoad,60,qca-nss-ipsecmgr) +endef + +define KernelPackage/qca-nss-drv-ipsecmgr/Description +Kernel module for NSS IPsec offload manager +endef + +define KernelPackage/qca-nss-drv-capwapmgr + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + DEPENDS:=+kmod-qca-nss-drv +kmod-qca-nss-drv-dtlsmgr @!LINUX_3_18 + TITLE:=NSS CAPWAP Manager for QCA NSS driver (IPQ806x) + FILES:=$(PKG_BUILD_DIR)/capwapmgr/qca-nss-capwapmgr.ko +endef + +define KernelPackage/qca-nss-drv-capwapmgr/Description +This package contains a NSS CAPWAP Manager +endef + +define KernelPackage/qca-nss-drv-bridge-mgr + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + TITLE:=Kernel driver for NSS bridge manager + DEPENDS:=@TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq807x||TARGET_ipq807x_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64 \ + +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_ipq807x_64: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 @!LINUX_3_18 \ + +!(TARGET_ipq_ipq807x_QSDK_256||TARGET_ipq_ipq60xx_QSDK_256):kmod-bonding + FILES:=$(PKG_BUILD_DIR)/bridge/qca-nss-bridge-mgr.ko + AUTOLOAD:=$(call AutoLoad,51,qca-nss-bridge-mgr) +endef + +define KernelPackage/qca-nss-drv-bridge-mgr/Description +Kernel modules for NSS bridge manager +endef + +define KernelPackage/qca-nss-drv-vlan-mgr + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + TITLE:=Kernel driver for NSS vlan manager + DEPENDS:=@TARGET_ipq806x||TARGET_ipq807x +kmod-qca-nss-drv @!LINUX_3_18 \ + +!(TARGET_ipq_ipq807x_QSDK_256||TARGET_ipq_ipq60xx_QSDK_256):kmod-bonding + FILES:=$(PKG_BUILD_DIR)/vlan/qca-nss-vlan.ko + AUTOLOAD:=$(call AutoLoad,51,qca-nss-vlan) +endef + +define KernelPackage/qca-nss-drv-vlan-mgr/Description +Kernel modules for NSS vlan manager +endef + +define KernelPackage/qca-nss-drv-qdisc + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Support + TITLE:=Qdisc for configuring shapers in NSS + DEPENDS:=+kmod-qca-nss-drv @!LINUX_3_18 + FILES:=$(PKG_BUILD_DIR)/nss_qdisc/qca-nss-qdisc.ko + KCONFIG:=CONFIG_NET_CLS_ACT=y + AUTOLOAD:=$(call AutoLoad,58,qca-nss-qdisc) +endef + +define KernelPackage/qca-nss-drv-qdisc/Description +Linux qdisc that aids in configuring shapers in the NSS +endef + +define KernelPackage/qca-nss-drv-lag-mgr + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + TITLE:=Kernel driver for NSS LAG manager + DEPENDS:=+kmod-qca-nss-drv @!LINUX_3_18 \ + +TARGET_ipq_ipq807x:kmod-qca-nss-drv-vlan-mgr \ + +TARGET_ipq_ipq807x_64:kmod-qca-nss-drv-vlan-mgr @!LINUX_3_18 \ + +TARGET_ipq807x:kmod-qca-nss-drv-vlan-mgr \ + +TARGET_ipq807x_64:kmod-qca-nss-drv-vlan-mgr @!LINUX_3_18 \ + +TARGET_ipq_ipq60xx:kmod-qca-nss-drv-vlan-mgr @!LINUX_3_18 \ + +TARGET_ipq_ipq60xx_64:kmod-qca-nss-drv-vlan-mgr @!LINUX_3_18 \ + +kmod-bonding + FILES:=$(PKG_BUILD_DIR)/lag/qca-nss-lag-mgr.ko + AUTOLOAD:=$(call AutoLoad,51,qca-nss-lag-mgr) +endef + +define KernelPackage/qca-nss-drv-lag-mgr/Description +Kernel modules for NSS LAG manager +endef + +define KernelPackage/qca-nss-drv-netlink + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + DEPENDS:=@TARGET_ipq807x||TARGET_ipq_ipq807x||TARGET_ipq807x_64||TARGET_ipq_ipq807x_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64||TARGET_ipq_ipq50xx||TARGET_ipq_ipq50xx_64 \ + +kmod-qca-nss-drv @!LINUX_3_18 \ + +PACKAGE_kmod-qca-nss-drv-ipsecmgr:kmod-qca-nss-drv-ipsecmgr \ + +PACKAGE_kmod-qca-nss-drv-dtlsmgr:kmod-qca-nss-drv-dtlsmgr \ + +PACKAGE_kmod-qca-nss-drv-capwapmgr:kmod-qca-nss-drv-capwapmgr @!LINUX_3_18 + TITLE:=NSS NETLINK Manager for QCA NSS driver + FILES:=$(PKG_BUILD_DIR)/netlink/qca-nss-netlink.ko +endef + +define KernelPackage/qca-nss-drv-netlink/Description +Kernel module for NSS netlink manager +endef + +define KernelPackage/qca-nss-drv-ovpn-mgr + SECTION:=kernel + 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 @!LINUX_3_18 \ + @TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64 + FILES:=$(PKG_BUILD_DIR)/openvpn/src/qca-nss-ovpn-mgr.ko +endef + +define KernelPackage/qca-nss-drv-ovpn-mgr/Description +Kernel module for NSS OpenVPN manager +endef + +define KernelPackage/qca-nss-drv-ovpn-link + SECTION:=kernel + 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-premium @!LINUX_3_18 \ + @TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64 + FILES:=$(PKG_BUILD_DIR)/openvpn/plugins/qca-nss-ovpn-link.ko +endef + +define KernelPackage/qca-nss-drv-ovpn-link/Description +This module registers with ECM and communicates with NSS OpenVPN manager for supporting OpenVPN offload. +endef + +define KernelPackage/qca-nss-drv-pvxlanmgr + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + DEPENDS:=+kmod-qca-nss-drv @!LINUX_3_18 + TITLE:=NSS PVXLAN Manager for QCA NSS driver + FILES:=$(PKG_BUILD_DIR)/pvxlanmgr/qca-nss-pvxlanmgr.ko +endef + +define KernelPackage/qca-nss-drv-pvxlanmgr/Description +Kernel module for managing NSS PVxLAN +endef + +define Build/InstallDev/qca-nss-clients + $(INSTALL_DIR) $(1)/usr/include/qca-nss-clients + $(CP) $(PKG_BUILD_DIR)/netlink/include/* $(1)/usr/include/qca-nss-clients/ + $(CP) $(PKG_BUILD_DIR)/exports/* $(1)/usr/include/qca-nss-clients/ +endef + +define Build/InstallDev + $(call Build/InstallDev/qca-nss-clients,$(1)) +endef + +define KernelPackage/qca-nss-drv-ovpn-mgr/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/qca-nss-ovpn.init $(1)/etc/init.d/qca-nss-ovpn +endef + +define KernelPackage/qca-nss-drv-ipsecmgr/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/qca-nss-ipsec $(1)/etc/init.d/qca-nss-ipsec +endef + + +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-gmac \ + -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 + +# Build individual packages if selected +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-profile),) +MAKE_OPTS+=profile=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-capwapmgr),) +MAKE_OPTS+=capwapmgr=y +EXTRA_CFLAGS += -DNSS_CAPWAPMGR_ONE_NETDEV +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-tun6rd),) +MAKE_OPTS+=tun6rd=m +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-dtlsmgr),) +MAKE_OPTS+=dtlsmgr=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-l2tpv2),) +MAKE_OPTS+=l2tpv2=y +EXTRA_CFLAGS += -DNSS_L2TPV2_ENABLED +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-pptp),) +MAKE_OPTS+=pptp=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-map-t),) +MAKE_OPTS+=map-t=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-tunipip6),) +MAKE_OPTS+=tunipip6=m +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-qdisc),) +MAKE_OPTS+=qdisc=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-ipsecmgr),) +EXTRA_CFLAGS+= -I$(PKG_BUILD_DIR)/exports \ + -I$(STAGING_DIR)/usr/include/qca-nss-ecm +MAKE_OPTS+=ipsecmgr=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-bridge-mgr),) +MAKE_OPTS+=bridge-mgr=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-vlan-mgr),) +MAKE_OPTS+=vlan-mgr=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-lag-mgr),) +MAKE_OPTS+=lag-mgr=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-gre),) +EXTRA_CFLAGS+= -I$(PKG_BUILD_DIR)/exports +MAKE_OPTS+=gre=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-pppoe),) +MAKE_OPTS+=pppoe=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-netlink),) +MAKE_OPTS+=netlink=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-ovpn-mgr),) +MAKE_OPTS+=ovpn-mgr=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-ovpn-link),) +MAKE_OPTS+=ovpn-link=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-pvxlanmgr),) +MAKE_OPTS+=pvxlanmgr=y +endif + +define Build/Compile + $(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" $(strip $(MAKE_OPTS)) \ + $(KERNEL_MAKE_FLAGS) \ + $(PKG_MAKE_FLAGS) \ + M="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ + SoC="$(subtarget)" \ + DTLSMGR_DIR="$(DTLSMGR_DIR)" \ + IPSECMGR_DIR="$(IPSECMGR_DIR)" \ + modules +endef + +$(eval $(call KernelPackage,qca-nss-drv-profile)) +$(eval $(call KernelPackage,qca-nss-drv-capwapmgr)) +$(eval $(call KernelPackage,qca-nss-drv-tun6rd)) +$(eval $(call KernelPackage,qca-nss-drv-dtlsmgr)) +$(eval $(call KernelPackage,qca-nss-drv-l2tpv2)) +$(eval $(call KernelPackage,qca-nss-drv-pptp)) +$(eval $(call KernelPackage,qca-nss-drv-pppoe)) +$(eval $(call KernelPackage,qca-nss-drv-map-t)) +$(eval $(call KernelPackage,qca-nss-drv-tunipip6)) +$(eval $(call KernelPackage,qca-nss-drv-qdisc)) +$(eval $(call KernelPackage,qca-nss-drv-netlink)) +$(eval $(call KernelPackage,qca-nss-drv-ipsecmgr)) +$(eval $(call KernelPackage,qca-nss-drv-bridge-mgr)) +$(eval $(call KernelPackage,qca-nss-drv-vlan-mgr)) +$(eval $(call KernelPackage,qca-nss-drv-lag-mgr)) +$(eval $(call KernelPackage,qca-nss-drv-gre)) +$(eval $(call KernelPackage,qca-nss-drv-ovpn-mgr)) +$(eval $(call KernelPackage,qca-nss-drv-ovpn-link)) +$(eval $(call KernelPackage,qca-nss-drv-pvxlanmgr)) diff --git a/package/qca/qca-nss-clients/files/qca-nss-ipsec b/package/qca/qca-nss-clients/files/qca-nss-ipsec new file mode 100644 index 000000000..bb202e8e7 --- /dev/null +++ b/package/qca/qca-nss-clients/files/qca-nss-ipsec @@ -0,0 +1,92 @@ +#!/bin/sh /etc/rc.common +# +# Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +NSS_IPSEC_LOG_FILE=/tmp/.nss_ipsec_log +NSS_IPSEC_LOG_STR_ECM="ECM_Loaded" + +ecm_load () { + if [ ! -d /sys/module/ecm ]; then + /etc/init.d/qca-nss-ecm start + if [ -d /sys/module/ecm ]; then + echo ${NSS_IPSEC_LOG_STR_ECM} >> ${NSS_IPSEC_LOG_FILE} + fi + fi +} + +ecm_unload () { + if [ -f /tmp/.nss_ipsec_log ]; then + str=`grep ${NSS_IPSEC_LOG_STR_ECM} ${NSS_IPSEC_LOG_FILE}` + if [[ $str == ${NSS_IPSEC_LOG_STR_ECM} ]]; then + /etc/init.d/qca-nss-ecm stop + `sed 's/${NSS_IPSEC_LOG_STR_ECM}/ /g' $NSS_IPSEC_LOG_FILE > $NSS_IPSEC_LOG_FILE` + fi + fi +} + +ecm_disable() { + + if [ ! -d /sys/module/ecm ]; then + return; + fi + + echo 1 > /sys/kernel/debug/ecm/front_end_ipv4_stop + echo 1 > /sys/kernel/debug/ecm/front_end_ipv6_stop + echo 1 > /sys/kernel/debug/ecm/ecm_db/defunct_all + sleep 2 +} + +ecm_enable() { + if [ ! -d /sys/module/ecm ]; then + return; + fi + + echo 0 > /sys/kernel/debug/ecm/ecm_db/defunct_all + echo 0 > /sys/kernel/debug/ecm/front_end_ipv4_stop + echo 0 > /sys/kernel/debug/ecm/front_end_ipv6_stop +} + +start() { + ecm_load + + local kernel_version=$(uname -r) + + insmod /lib/modules/${kernel_version}/qca-nss-ipsec-klips.ko + if [ "$?" -gt 0 ]; then + echo "Failed to load plugin. Please start ecm if not done already" + ecm_enable + return + fi + + /etc/init.d/ipsec start + sleep 2 + ipsec eroute + + ecm_enable +} + +stop() { + ecm_disable + + /etc/init.d/ipsec stop + rmmod qca-nss-ipsec-klips + + ecm_unload +} + +restart() { + stop + start +} diff --git a/package/qca/qca-nss-clients/files/qca-nss-mirred.init b/package/qca/qca-nss-clients/files/qca-nss-mirred.init new file mode 100644 index 000000000..1f931f090 --- /dev/null +++ b/package/qca/qca-nss-clients/files/qca-nss-mirred.init @@ -0,0 +1,28 @@ +#!/bin/sh /etc/rc.common + +########################################################################### +# Copyright (c) 2019, The Linux Foundation. All rights reserved. +# Permission to use, copy, modify, and/or distribute this software for +# any purpose with or without fee is hereby granted, provided that the +# above copyright notice and this permission notice appear in all copies. +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +########################################################################### + +restart() { + rmmod act_nssmirred.ko + insmod act_nssmirred.ko +} + +start() { + insmod act_nssmirred.ko +} + +stop() { + rmmod act_nssmirred.ko +} diff --git a/package/qca/qca-nss-clients/files/qca-nss-ovpn.init b/package/qca/qca-nss-clients/files/qca-nss-ovpn.init new file mode 100644 index 000000000..622e295ee --- /dev/null +++ b/package/qca/qca-nss-clients/files/qca-nss-ovpn.init @@ -0,0 +1,69 @@ +#!/bin/sh /etc/rc.common + +########################################################################### +# Copyright (c) 2019, The Linux Foundation. All rights reserved. +# Permission to use, copy, modify, and/or distribute this software for +# any purpose with or without fee is hereby granted, provided that the +# above copyright notice and this permission notice appear in all copies. +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +########################################################################### + +ecm_disable() { + if [ ! -d /sys/module/ecm ]; then + return + fi + + echo 1 > /sys/kernel/debug/ecm/front_end_ipv4_stop + echo 1 > /sys/kernel/debug/ecm/front_end_ipv6_stop + echo 1 > /sys/kernel/debug/ecm/ecm_db/defunct_all + sleep 2 +} + +ecm_enable() { + if [ ! -d /sys/module/ecm ]; then + return + fi + + echo 0 > /sys/kernel/debug/ecm/ecm_db/defunct_all + echo 0 > /sys/kernel/debug/ecm/front_end_ipv4_stop + echo 0 > /sys/kernel/debug/ecm/front_end_ipv6_stop +} + +restart() { + ecm_disable + + /etc/init.d/openvpn stop + rmmod qca-nss-ovpn-link + rmmod qca-nss-ovpn-mgr + + insmod qca-nss-ovpn-mgr + insmod qca-nss-ovpn-link + + if [ "$?" -gt 0 ]; then + echo "Failed to load plugin. Please start ecm if not done already" + ecm_enable + return + fi + + ecm_enable +} + +start() { + restart +} + +stop() { + ecm_disable + + /etc/init.d/openvpn stop + rmmod qca-nss-ovpn-link + rmmod qca-nss-ovpn-mgr + + ecm_enable +} diff --git a/package/qca/qca-nss-clients/patches/100-kernel-5.4-support-qdisc.patch b/package/qca/qca-nss-clients/patches/100-kernel-5.4-support-qdisc.patch new file mode 100644 index 000000000..0ec8d766e --- /dev/null +++ b/package/qca/qca-nss-clients/patches/100-kernel-5.4-support-qdisc.patch @@ -0,0 +1,1145 @@ +--- a/nss_qdisc/nss_qdisc.h ++++ b/nss_qdisc/nss_qdisc.h +@@ -338,7 +340,7 @@ extern void nss_qdisc_destroy(struct nss + * Initializes a shaper in NSS, based on the position of this qdisc (child or root) + * and if its a normal interface or a bridge interface. + */ +-extern int nss_qdisc_init(struct Qdisc *sch, struct nss_qdisc *nq, nss_shaper_node_type_t type, uint32_t classid, uint32_t accel_mode); ++extern int nss_qdisc_init(struct Qdisc *sch, struct netlink_ext_ack *extack, struct nss_qdisc *nq, nss_shaper_node_type_t type, uint32_t classid, uint32_t accel_mode); + + /* + * nss_qdisc_start_basic_stats_polling() +--- a/nss_qdisc/nss_bf.c ++++ b/nss_qdisc/nss_bf.c +@@ -69,7 +69,7 @@ static inline struct nss_bf_class_data * + * Configures a new class. + */ + static int nss_bf_change_class(struct Qdisc *sch, u32 classid, u32 parentid, +- struct nlattr **tca, unsigned long *arg) ++ struct nlattr **tca, unsigned long *arg, struct netlink_ext_ack *extack) + { + struct nss_bf_sched_data *q = qdisc_priv(sch); + struct nss_bf_class_data *cl = (struct nss_bf_class_data *)*arg; +@@ -121,7 +121,7 @@ static int nss_bf_change_class(struct Qd + * that is registered to Linux. Therefore we initialize the NSSBF_GROUP shaper + * here. + */ +- if (nss_qdisc_init(sch, &cl->nq, NSS_SHAPER_NODE_TYPE_BF_GROUP, classid, accel_mode) < 0) { ++ if (nss_qdisc_init(sch, extack, &cl->nq, NSS_SHAPER_NODE_TYPE_BF_GROUP, classid, accel_mode) < 0) { + nss_qdisc_error("Nss init for class %u failed\n", classid); + kfree(cl); + return -EINVAL; +@@ -260,7 +260,7 @@ static void nss_bf_destroy_class(struct + /* + * And now we destroy the child. + */ +- qdisc_destroy(cl->qdisc); ++ qdisc_put(cl->qdisc); + + /* + * Stop the stats polling timer and free class +@@ -325,7 +325,7 @@ static int nss_bf_delete_class(struct Qd + * Replaces the qdisc attached to the provided class. + */ + static int nss_bf_graft_class(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, +- struct Qdisc **old) ++ struct Qdisc **old, struct netlink_ext_ack *extack) + { + struct nss_bf_sched_data *q = qdisc_priv(sch); + struct nss_bf_class_data *cl = (struct nss_bf_class_data *)arg; +@@ -432,24 +432,6 @@ static unsigned long nss_bf_get_class(st + } + + /* +- * nss_bf_put_class() +- * Reduces reference count for this class. +- */ +-static void nss_bf_put_class(struct Qdisc *sch, unsigned long arg) +-{ +- struct nss_bf_class_data *cl = (struct nss_bf_class_data *)arg; +- nss_qdisc_info("bf put class for %p\n", cl); +- +- /* +- * We are safe to destroy the qdisc if the reference count +- * goes down to 0. +- */ +- if (atomic_sub_return(1, &cl->nq.refcnt) == 0) { +- nss_bf_destroy_class(sch, cl); +- } +-} +- +-/* + * nss_bf_dump_class() + * Dumps all configurable parameters pertaining to this class. + */ +@@ -538,7 +520,7 @@ static void nss_bf_walk(struct Qdisc *sc + * nss_bf_change_qdisc() + * Can be used to configure a nssbf qdisc. + */ +-static int nss_bf_change_qdisc(struct Qdisc *sch, struct nlattr *opt) ++static int nss_bf_change_qdisc(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_bf_sched_data *q = qdisc_priv(sch); + struct tc_nssbf_qopt *qopt; +@@ -684,7 +666,7 @@ static void nss_bf_destroy_qdisc(struct + * nss_bf_init_qdisc() + * Initializes the nssbf qdisc. + */ +-static int nss_bf_init_qdisc(struct Qdisc *sch, struct nlattr *opt) ++static int nss_bf_init_qdisc(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_bf_sched_data *q = qdisc_priv(sch); + struct tc_nssbf_qopt *qopt; +@@ -720,7 +702,7 @@ static int nss_bf_init_qdisc(struct Qdis + /* + * Initialize the NSSBF shaper in NSS + */ +- if (nss_qdisc_init(sch, &q->nq, NSS_SHAPER_NODE_TYPE_BF, 0, accel_mode) < 0) { ++ if (nss_qdisc_init(sch, extack, &q->nq, NSS_SHAPER_NODE_TYPE_BF, 0, accel_mode) < 0) { + return -EINVAL; + } + +@@ -729,7 +711,7 @@ static int nss_bf_init_qdisc(struct Qdis + /* + * Tune nss_bf parameters. + */ +- if (nss_bf_change_qdisc(sch, opt) < 0) { ++ if (nss_bf_change_qdisc(sch, opt, NULL) < 0) { + nss_qdisc_destroy(&q->nq); + return -EINVAL; + } +@@ -772,7 +754,7 @@ nla_put_failure: + * nss_bf_enqueue() + * Enqueues a skb to nssbf qdisc. + */ +-static int nss_bf_enqueue(struct sk_buff *skb, struct Qdisc *sch) ++static int nss_bf_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) + { + return nss_qdisc_enqueue(skb, sch); + } +@@ -787,18 +769,6 @@ static struct sk_buff *nss_bf_dequeue(st + } + + /* +- * nss_bf_drop() +- * Drops a single skb from linux queue, if not empty. +- * +- * Does not drop packets that are queued in the NSS. +- */ +-static unsigned int nss_bf_drop(struct Qdisc *sch) +-{ +- printk("In bf drop\n"); +- return nss_qdisc_drop(sch); +-} +- +-/* + * Registration structure for nssbf class + */ + const struct Qdisc_class_ops nss_bf_class_ops = { +@@ -807,9 +777,8 @@ const struct Qdisc_class_ops nss_bf_clas + .graft = nss_bf_graft_class, + .leaf = nss_bf_leaf_class, + .qlen_notify = nss_bf_qlen_notify, +- .get = nss_bf_get_class, +- .put = nss_bf_put_class, ++ .find = nss_bf_get_class, + .dump = nss_bf_dump_class, + .dump_stats = nss_bf_dump_class_stats, + .walk = nss_bf_walk + }; +@@ -830,7 +798,6 @@ struct Qdisc_ops nss_bf_qdisc_ops __read + .enqueue = nss_bf_enqueue, + .dequeue = nss_bf_dequeue, + .peek = qdisc_peek_dequeued, +- .drop = nss_bf_drop, + .cl_ops = &nss_bf_class_ops, + .priv_size = sizeof(struct nss_bf_sched_data), + .owner = THIS_MODULE +--- a/nss_qdisc/nss_blackhole.c ++++ b/nss_qdisc/nss_blackhole.c +@@ -35,7 +35,7 @@ static struct nla_policy nss_blackhole_p + * nss_blackhole_enqueue() + * Enqueue API for nss blackhole qdisc. + */ +-static int nss_blackhole_enqueue(struct sk_buff *skb, struct Qdisc *sch) ++static int nss_blackhole_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) + { + return nss_qdisc_enqueue(skb, sch); + } +@@ -50,18 +50,6 @@ static struct sk_buff *nss_blackhole_deq + } + + /* +- * nss_blackhole_drop() +- * The following function drops a packet from HLOS queue. +- * +- * Note, this does not drop packets from queues in the NSS. We do not support that. +- */ +-static unsigned int nss_blackhole_drop(struct Qdisc *sch) +-{ +- nss_qdisc_info("qdisc %x dropping\n", sch->handle); +- return nss_qdisc_drop(sch); +-} +- +-/* + * nss_blackhole_reset() + * Resets the nss blackhole qdisc. + */ +@@ -92,7 +80,7 @@ static void nss_blackhole_destroy(struct + * nss_blackhole_change() + * Function call used to configure the parameters of the nss blackhole qdisc. + */ +-static int nss_blackhole_change(struct Qdisc *sch, struct nlattr *opt) ++static int nss_blackhole_change(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_blackhole_sched_data *q; + struct tc_nssblackhole_qopt *qopt; +@@ -154,7 +142,7 @@ static int nss_blackhole_change(struct Q + * nss_blackhole_init() + * Initializes a nss blackhole qdisc. + */ +-static int nss_blackhole_init(struct Qdisc *sch, struct nlattr *opt) ++static int nss_blackhole_init(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_qdisc *nq = qdisc_priv(sch); + struct tc_nssblackhole_qopt *qopt; +@@ -176,12 +164,12 @@ static int nss_blackhole_init(struct Qdi + nss_qdisc_info("qdisc %x initializing\n", sch->handle); + nss_blackhole_reset(sch); + +- if (nss_qdisc_init(sch, nq, NSS_SHAPER_NODE_TYPE_FIFO, 0, accel_mode) < 0) { ++ if (nss_qdisc_init(sch, extack, nq, NSS_SHAPER_NODE_TYPE_FIFO, 0, accel_mode) < 0) { + return -EINVAL; + } + + nss_qdisc_info("qdisc %x initialized with parent %x\n", sch->handle, sch->parent); +- if (nss_blackhole_change(sch, opt) < 0) { ++ if (nss_blackhole_change(sch, opt, NULL) < 0) { + nss_qdisc_destroy(nq); + return -EINVAL; + } +@@ -251,7 +239,6 @@ struct Qdisc_ops nss_blackhole_qdisc_ops + .enqueue = nss_blackhole_enqueue, + .dequeue = nss_blackhole_dequeue, + .peek = nss_blackhole_peek, +- .drop = nss_blackhole_drop, + .init = nss_blackhole_init, + .reset = nss_blackhole_reset, + .destroy = nss_blackhole_destroy, +--- a/nss_qdisc/nss_codel.c ++++ b/nss_qdisc/nss_codel.c +@@ -76,7 +76,7 @@ static struct nla_policy nss_codel_polic + * nss_codel_enqueue() + * Enqueue a packet into nss_codel queue in NSS firmware (bounce). + */ +-static int nss_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch) ++static int nss_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) + { + return nss_qdisc_enqueue(skb, sch); + } +@@ -91,17 +91,6 @@ static struct sk_buff *nss_codel_dequeue + } + + /* +- * nss_codel_drop() +- * Drops a packet from the bounce complete queue. +- * +- * Note: this does not drop packets from the NSS queues. +- */ +-static unsigned int nss_codel_drop(struct Qdisc *sch) +-{ +- return nss_qdisc_drop(sch); +-} +- +-/* + * nss_codel_reset() + * Resets nss_codel qdisc. + */ +@@ -234,7 +223,7 @@ static int nss_codel_mem_sz_get(struct Q + * nss_codel_change() + * Used to configure the nss_codel queue in NSS firmware. + */ +-static int nss_codel_change(struct Qdisc *sch, struct nlattr *opt) ++static int nss_codel_change(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_codel_sched_data *q = qdisc_priv(sch); + struct tc_nsscodel_qopt *qopt; +@@ -381,7 +370,7 @@ fail: + * nss_codel_init() + * Initializes the nss_codel qdisc. + */ +-static int nss_codel_init(struct Qdisc *sch, struct nlattr *opt) ++static int nss_codel_init(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_qdisc *nq = qdisc_priv(sch); + struct tc_nsscodel_qopt *qopt; +@@ -404,7 +393,7 @@ static int nss_codel_init(struct Qdisc * + nss_qdisc_register_configure_callback(nq, nss_codel_configure_callback); + nss_qdisc_register_stats_callback(nq, nss_codel_stats_callback); + +- if (nss_qdisc_init(sch, nq, NSS_SHAPER_NODE_TYPE_CODEL, 0, qopt->accel_mode) < 0) { ++ if (nss_qdisc_init(sch, extack, nq, NSS_SHAPER_NODE_TYPE_CODEL, 0, qopt->accel_mode) < 0) { + return -EINVAL; + } + +@@ -412,7 +401,7 @@ static int nss_codel_init(struct Qdisc * + return -EINVAL; + } + +- if (nss_codel_change(sch, opt) < 0) { ++ if (nss_codel_change(sch, opt, NULL) < 0) { + nss_qdisc_destroy(nq); + return -EINVAL; + } +@@ -511,7 +500,6 @@ struct Qdisc_ops nss_codel_qdisc_ops __r + .enqueue = nss_codel_enqueue, + .dequeue = nss_codel_dequeue, + .peek = nss_codel_peek, +- .drop = nss_codel_drop, + .init = nss_codel_init, + .reset = nss_codel_reset, + .destroy = nss_codel_destroy, +@@ -530,7 +518,6 @@ struct Qdisc_ops nss_fq_codel_qdisc_ops + .enqueue = nss_codel_enqueue, + .dequeue = nss_codel_dequeue, + .peek = nss_codel_peek, +- .drop = nss_codel_drop, + .init = nss_codel_init, + .reset = nss_codel_reset, + .destroy = nss_codel_destroy, +--- a/nss_qdisc/nss_fifo.c ++++ b/nss_qdisc/nss_fifo.c +@@ -29,7 +29,7 @@ static struct nla_policy nss_fifo_policy + [TCA_NSSFIFO_PARMS] = { .len = sizeof(struct tc_nssfifo_qopt) }, + }; + +-static int nss_fifo_enqueue(struct sk_buff *skb, struct Qdisc *sch) ++static int nss_fifo_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) + { + return nss_qdisc_enqueue(skb, sch); + } +@@ -39,12 +39,6 @@ static struct sk_buff *nss_fifo_dequeue( + return nss_qdisc_dequeue(sch); + } + +-static unsigned int nss_fifo_drop(struct Qdisc *sch) +-{ +- nss_qdisc_info("nss_fifo dropping"); +- return nss_qdisc_drop(sch); +-} +- + static void nss_fifo_reset(struct Qdisc *sch) + { + nss_qdisc_info("nss_fifo resetting!"); +@@ -158,7 +152,7 @@ fail: + } + #endif + +-static int nss_fifo_change(struct Qdisc *sch, struct nlattr *opt) ++static int nss_fifo_change(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_fifo_sched_data *q = qdisc_priv(sch); + struct nss_qdisc *nq = &q->nq; +@@ -208,7 +202,7 @@ static int nss_fifo_change(struct Qdisc + return 0; + } + +-static int nss_fifo_init(struct Qdisc *sch, struct nlattr *opt) ++static int nss_fifo_init(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_qdisc *nq = qdisc_priv(sch); + struct tc_nssfifo_qopt *qopt; +@@ -226,13 +220,13 @@ static int nss_fifo_init(struct Qdisc *s + return -EINVAL; + } + +- if (nss_qdisc_init(sch, nq, NSS_SHAPER_NODE_TYPE_FIFO, 0, qopt->accel_mode) < 0) { ++ if (nss_qdisc_init(sch, extack, nq, NSS_SHAPER_NODE_TYPE_FIFO, 0, qopt->accel_mode) < 0) { + nss_qdisc_warning("Fifo %x init failed", sch->handle); + return -EINVAL; + } + + nss_qdisc_info("NSS fifo initialized - handle %x parent %x\n", sch->handle, sch->parent); +- if (nss_fifo_change(sch, opt) < 0) { ++ if (nss_fifo_change(sch, opt, NULL) < 0) { + nss_qdisc_destroy(nq); + return -EINVAL; + } +@@ -290,7 +284,6 @@ struct Qdisc_ops nss_pfifo_qdisc_ops __r + .enqueue = nss_fifo_enqueue, + .dequeue = nss_fifo_dequeue, + .peek = nss_fifo_peek, +- .drop = nss_fifo_drop, + .init = nss_fifo_init, + .reset = nss_fifo_reset, + .destroy = nss_fifo_destroy, +@@ -305,7 +298,6 @@ struct Qdisc_ops nss_bfifo_qdisc_ops __r + .enqueue = nss_fifo_enqueue, + .dequeue = nss_fifo_dequeue, + .peek = nss_fifo_peek, +- .drop = nss_fifo_drop, + .init = nss_fifo_init, + .reset = nss_fifo_reset, + .destroy = nss_fifo_destroy, +--- a/nss_qdisc/nss_htb.c ++++ b/nss_qdisc/nss_htb.c +@@ -267,7 +267,7 @@ static int nss_htb_ppe_change_class(stru + * Configures a new class. + */ + static int nss_htb_change_class(struct Qdisc *sch, u32 classid, u32 parentid, +- struct nlattr **tca, unsigned long *arg) ++ struct nlattr **tca, unsigned long *arg, struct netlink_ext_ack *extack) + { + struct nss_htb_sched_data *q = qdisc_priv(sch); + struct nss_htb_class_data *cl = (struct nss_htb_class_data *)*arg; +@@ -332,7 +332,7 @@ static int nss_htb_change_class(struct Q + * here. + */ + cl->nq.parent = nq_parent; +- if (nss_qdisc_init(sch, &cl->nq, NSS_SHAPER_NODE_TYPE_HTB_GROUP, classid, accel_mode) < 0) { ++ if (nss_qdisc_init(sch, extack, &cl->nq, NSS_SHAPER_NODE_TYPE_HTB_GROUP, classid, accel_mode) < 0) { + nss_qdisc_error("nss_init for htb class %x failed\n", classid); + goto failure; + } +@@ -478,7 +478,7 @@ static void nss_htb_destroy_class(struct + /* + * And now we destroy the child. + */ +- qdisc_destroy(cl->qdisc); ++ qdisc_put(cl->qdisc); + + /* + * Stop the stats polling timer and free class +@@ -577,7 +577,8 @@ static int nss_htb_delete_class(struct Q + * nss_htb_graft_class() + * Replaces the qdisc attached to the provided class. + */ +-static int nss_htb_graft_class(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, struct Qdisc **old) ++static int nss_htb_graft_class(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, struct Qdisc **old, ++ struct netlink_ext_ack *extack) + { + struct nss_htb_class_data *cl = (struct nss_htb_class_data *)arg; + struct nss_if_msg nim_detach; +@@ -682,25 +683,6 @@ static unsigned long nss_htb_get_class(s + } + + /* +- * nss_htb_put_class() +- * Reduces reference count for this class. +- */ +-static void nss_htb_put_class(struct Qdisc *sch, unsigned long arg) +-{ +- struct nss_htb_class_data *cl = (struct nss_htb_class_data *)arg; +- nss_qdisc_trace("executing put on htb class %x in qdisc %x\n", +- cl->nq.qos_tag, sch->handle); +- +- /* +- * We are safe to destroy the qdisc if the reference count +- * goes down to 0. +- */ +- if (atomic_sub_return(1, &cl->nq.refcnt) == 0) { +- nss_htb_destroy_class(sch, cl); +- } +-} +- +-/* + * nss_htb_dump_class() + * Dumps all configurable parameters pertaining to this class. + */ +@@ -795,7 +777,7 @@ static void nss_htb_walk(struct Qdisc *s + * nss_htb_change_qdisc() + * Can be used to configure a htb qdisc. + */ +-static int nss_htb_change_qdisc(struct Qdisc *sch, struct nlattr *opt) ++static int nss_htb_change_qdisc(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_htb_sched_data *q = qdisc_priv(sch); + struct tc_nsshtb_qopt *qopt; +@@ -945,7 +927,7 @@ static void nss_htb_destroy_qdisc(struct + * nss_htb_init_qdisc() + * Initializes the htb qdisc. + */ +-static int nss_htb_init_qdisc(struct Qdisc *sch, struct nlattr *opt) ++static int nss_htb_init_qdisc(struct Qdisc *sch, struct nlattr *opt,struct netlink_ext_ack *extack) + { + struct nss_htb_sched_data *q = qdisc_priv(sch); + struct tc_nsshtb_qopt *qopt; +@@ -977,7 +959,7 @@ static int nss_htb_init_qdisc(struct Qdi + /* + * Initialize the NSSHTB shaper in NSS + */ +- if (nss_qdisc_init(sch, &q->nq, NSS_SHAPER_NODE_TYPE_HTB, 0, accel_mode) < 0) { ++ if (nss_qdisc_init(sch, extack, &q->nq, NSS_SHAPER_NODE_TYPE_HTB, 0, accel_mode) < 0) { + nss_qdisc_error("failed to initialize htb qdisc %x in nss", sch->handle); + return -EINVAL; + } +@@ -987,7 +969,7 @@ static int nss_htb_init_qdisc(struct Qdi + /* + * Tune HTB parameters + */ +- if (nss_htb_change_qdisc(sch, opt) < 0) { ++ if (nss_htb_change_qdisc(sch, opt, NULL) < 0) { + nss_qdisc_destroy(&q->nq); + return -EINVAL; + } +@@ -1032,7 +1014,7 @@ static int nss_htb_dump_qdisc(struct Qdi + * nss_htb_enqueue() + * Enqueues a skb to htb qdisc. + */ +-static int nss_htb_enqueue(struct sk_buff *skb, struct Qdisc *sch) ++static int nss_htb_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) + { + return nss_qdisc_enqueue(skb, sch); + } +@@ -1047,18 +1029,6 @@ static struct sk_buff *nss_htb_dequeue(s + } + + /* +- * nss_htb_drop() +- * Drops a single skb from linux queue, if not empty. +- * +- * Does not drop packets that are queued in the NSS. +- */ +-static unsigned int nss_htb_drop(struct Qdisc *sch) +-{ +- nss_qdisc_trace("drop called on htb qdisc %x\n", sch->handle); +- return nss_qdisc_drop(sch); +-} +- +-/* + * Registration structure for htb class + */ + const struct Qdisc_class_ops nss_htb_class_ops = { +@@ -1067,9 +1037,8 @@ const struct Qdisc_class_ops nss_htb_cla + .graft = nss_htb_graft_class, + .leaf = nss_htb_leaf_class, + .qlen_notify = nss_htb_qlen_notify, +- .get = nss_htb_get_class, +- .put = nss_htb_put_class, ++ .find = nss_htb_get_class, + .dump = nss_htb_dump_class, + .dump_stats = nss_htb_dump_class_stats, + .walk = nss_htb_walk + }; +@@ -1090,7 +1058,6 @@ struct Qdisc_ops nss_htb_qdisc_ops __rea + .enqueue = nss_htb_enqueue, + .dequeue = nss_htb_dequeue, + .peek = qdisc_peek_dequeued, +- .drop = nss_htb_drop, + .cl_ops = &nss_htb_class_ops, + .priv_size = sizeof(struct nss_htb_sched_data), + .owner = THIS_MODULE +--- a/nss_qdisc/nss_prio.c ++++ b/nss_qdisc/nss_prio.c +@@ -37,7 +37,7 @@ static struct nla_policy nss_prio_policy + * nss_prio_enqueue() + * Enqueues a skb to nssprio qdisc. + */ +-static int nss_prio_enqueue(struct sk_buff *skb, struct Qdisc *sch) ++static int nss_prio_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) + { + return nss_qdisc_enqueue(skb, sch); + } +@@ -52,17 +52,6 @@ static struct sk_buff *nss_prio_dequeue( + } + + /* +- * nss_prio_drop() +- * Drops a single skb from linux queue, if not empty. +- * +- * Does not drop packets that are queued in the NSS. +- */ +-static unsigned int nss_prio_drop(struct Qdisc *sch) +-{ +- return nss_qdisc_drop(sch); +-} +- +-/* + * nss_prio_peek() + * Peeks the first packet in queue for this qdisc. + */ +@@ -117,7 +106,7 @@ static void nss_prio_destroy(struct Qdis + /* + * We can now destroy it + */ +- qdisc_destroy(q->queues[i]); ++ qdisc_put(q->queues[i]); + } + + /* +@@ -157,7 +146,7 @@ static int nss_prio_get_max_bands(struct + * nss_prio_change() + * Function call to configure the nssprio parameters + */ +-static int nss_prio_change(struct Qdisc *sch, struct nlattr *opt) ++static int nss_prio_change(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_prio_sched_data *q; + struct tc_nssprio_qopt *qopt; +@@ -209,7 +198,7 @@ static int nss_prio_change(struct Qdisc + * nss_prio_init() + * Initializes the nssprio qdisc + */ +-static int nss_prio_init(struct Qdisc *sch, struct nlattr *opt) ++static int nss_prio_init(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_prio_sched_data *q = qdisc_priv(sch); + struct tc_nssprio_qopt *qopt; +@@ -230,14 +219,14 @@ static int nss_prio_init(struct Qdisc *s + accel_mode = qopt->accel_mode; + } + +- if (nss_qdisc_init(sch, &q->nq, NSS_SHAPER_NODE_TYPE_PRIO, 0, accel_mode) < 0) { ++ if (nss_qdisc_init(sch, extack, &q->nq, NSS_SHAPER_NODE_TYPE_PRIO, 0, accel_mode) < 0) { + return -EINVAL; + } + + nss_qdisc_info("Nssprio initialized - handle %x parent %x\n", + sch->handle, sch->parent); + +- if (nss_prio_change(sch, opt) < 0) { ++ if (nss_prio_change(sch, opt, NULL) < 0) { + nss_qdisc_destroy(&q->nq); + return -EINVAL; + } +@@ -280,7 +269,7 @@ nla_put_failure: + * Replaces existing child qdisc with the new qdisc that is passed. + */ + static int nss_prio_graft(struct Qdisc *sch, unsigned long arg, +- struct Qdisc *new, struct Qdisc **old) ++ struct Qdisc *new, struct Qdisc **old, struct netlink_ext_ack *extack) + { + struct nss_prio_sched_data *q = qdisc_priv(sch); + struct nss_qdisc *nq_new = qdisc_priv(new); +@@ -383,15 +372,6 @@ static unsigned long nss_prio_get(struct + } + + /* +- * nss_prio_put() +- * Unused API. +- */ +-static void nss_prio_put(struct Qdisc *sch, unsigned long arg) +-{ +- nss_qdisc_info("Inside prio put\n"); +-} +- +-/* + * nss_prio_walk() + * Walks the priority band. + */ +@@ -460,9 +440,8 @@ static int nss_prio_dump_class_stats(str + const struct Qdisc_class_ops nss_prio_class_ops = { + .graft = nss_prio_graft, + .leaf = nss_prio_leaf, +- .get = nss_prio_get, +- .put = nss_prio_put, ++ .find = nss_prio_get, + .walk = nss_prio_walk, + .dump = nss_prio_dump_class, + .dump_stats = nss_prio_dump_class_stats, + }; +@@ -481,7 +459,6 @@ struct Qdisc_ops nss_prio_qdisc_ops __re + .enqueue = nss_prio_enqueue, + .dequeue = nss_prio_dequeue, + .peek = nss_prio_peek, +- .drop = nss_prio_drop, + .init = nss_prio_init, + .reset = nss_prio_reset, + .destroy = nss_prio_destroy, +--- a/nss_qdisc/nss_qdisc.c ++++ b/nss_qdisc/nss_qdisc.c +@@ -929,7 +929,7 @@ static inline void nss_qdisc_add_to_tail + * We do not use the qdisc_enqueue_tail() API here in order + * to prevent stats from getting updated by the API. + */ +- __skb_queue_tail(&sch->q, skb); ++ __qdisc_enqueue_tail(skb, &sch->q); + + spin_unlock_bh(&nq->bounce_protection_lock); + }; +@@ -944,7 +944,7 @@ static inline void nss_qdisc_add_to_tail + * We do not use the qdisc_enqueue_tail() API here in order + * to prevent stats from getting updated by the API. + */ +- __skb_queue_tail(&sch->q, skb); ++ __qdisc_enqueue_tail(skb, &sch->q); + }; + + /* +@@ -966,7 +966,7 @@ static inline struct sk_buff *nss_qdisc_ + * We use __skb_dequeue() to ensure that + * stats don't get updated twice. + */ +- skb = __skb_dequeue(&sch->q); ++ skb = __qdisc_dequeue_head(&sch->q); + + spin_unlock_bh(&nq->bounce_protection_lock); + +@@ -983,7 +983,7 @@ static inline struct sk_buff *nss_qdisc_ + * We use __skb_dequeue() to ensure that + * stats don't get updated twice. + */ +- return __skb_dequeue(&sch->q); ++ return __qdisc_dequeue_head(&sch->q); + }; + + /* +@@ -1064,14 +1064,19 @@ struct Qdisc *nss_qdisc_replace(struct Q + void *nss_qdisc_qopt_get(struct nlattr *opt, struct nla_policy *policy, + uint32_t tca_max, uint32_t tca_params) + { +- struct nlattr *na[tca_max + 1]; ++ struct nlattr *na[8]; + int err; + ++ if (tca_max > 8) { ++ pr_warn("nss_qdisc_qopt_get(): Too many options!\n"); ++ return NULL; ++ } ++ + if (!opt) { + return NULL; + } + +- err = nla_parse_nested(na, tca_max, opt, policy); ++ err = nla_parse_nested_deprecated(na, tca_max, opt, policy, NULL); + if (err < 0) + return NULL; + +@@ -1104,10 +1109,10 @@ struct sk_buff *nss_qdisc_peek(struct Qd + struct sk_buff *skb; + + if (!nq->is_virtual) { +- skb = skb_peek(&sch->q); ++ skb = qdisc_peek_head(sch); + } else { + spin_lock_bh(&nq->bounce_protection_lock); +- skb = skb_peek(&sch->q); ++ skb = qdisc_peek_head(sch); + spin_unlock_bh(&nq->bounce_protection_lock); + } + +@@ -1122,15 +1127,16 @@ unsigned int nss_qdisc_drop(struct Qdisc + { + struct nss_qdisc *nq = qdisc_priv(sch); + unsigned int ret; ++ struct sk_buff *to_free = qdisc_peek_head(sch); + + if (!nq->is_virtual) { +- ret = __qdisc_queue_drop_head(sch, &sch->q); ++ ret = __qdisc_queue_drop_head(sch, &sch->q, &to_free); + } else { + spin_lock_bh(&nq->bounce_protection_lock); + /* + * This function is safe to call within locks + */ +- ret = __qdisc_queue_drop_head(sch, &sch->q); ++ ret = __qdisc_queue_drop_head(sch, &sch->q, &to_free); + spin_unlock_bh(&nq->bounce_protection_lock); + } + +@@ -1958,7 +1964,7 @@ void nss_qdisc_destroy(struct nss_qdisc + * Initializes a shaper in NSS, based on the position of this qdisc (child or root) + * and if its a normal interface or a bridge interface. + */ +-int nss_qdisc_init(struct Qdisc *sch, struct nss_qdisc *nq, nss_shaper_node_type_t type, uint32_t classid, uint32_t accel_mode) ++int nss_qdisc_init(struct Qdisc *sch, struct netlink_ext_ack *extack, struct nss_qdisc *nq, nss_shaper_node_type_t type, uint32_t classid, uint32_t accel_mode) + { + struct Qdisc *root; + u32 parent; +@@ -2471,6 +2481,8 @@ static void nss_qdisc_basic_stats_callba + struct gnet_stats_queue *qstats; + struct nss_shaper_node_stats_response *response; + atomic_t *refcnt; ++ refcount_t *refcnt_new; ++ bool is_refcnt_zero = false; + + if (nim->cm.response != NSS_CMN_RESPONSE_ACK) { + nss_qdisc_warning("Qdisc %p (type %d): Receive stats FAILED - " +@@ -2494,7 +2506,7 @@ static void nss_qdisc_basic_stats_callba + } else { + bstats = &qdisc->bstats; + qstats = &qdisc->qstats; +- refcnt = &qdisc->refcnt; ++ refcnt_new = &qdisc->refcnt; + qdisc->q.qlen = response->sn_stats.qlen_packets; + } + +@@ -2533,11 +2545,20 @@ static void nss_qdisc_basic_stats_callba + * All access to nq fields below do not need lock protection. They + * do not get manipulated on different thread contexts. + */ +- if (atomic_read(refcnt) == 0) { ++ if (nq->is_class) { ++ if (atomic_read(refcnt) == 0) ++ is_refcnt_zero = true; ++ } ++ else { ++ if (refcount_read(refcnt_new) == 0) ++ is_refcnt_zero = true; ++ } ++ if (is_refcnt_zero) { + atomic_sub(1, &nq->pending_stat_requests); + wake_up(&nq->wait_queue); + return; + } ++ + + /* + * Requests for stats again, after 1 sec. +@@ -2555,9 +2576,9 @@ static void nss_qdisc_basic_stats_callba + * nss_qdisc_get_stats_timer_callback() + * Invoked periodically to get updated stats + */ +-static void nss_qdisc_get_stats_timer_callback(unsigned long int data) ++static void nss_qdisc_get_stats_timer_callback(struct timer_list *arg) + { +- struct nss_qdisc *nq = (struct nss_qdisc *)data; ++ struct nss_qdisc *nq = (struct nss_qdisc *)arg->cust_data; + nss_tx_status_t rc; + struct nss_if_msg nim; + int msg_type; +@@ -2604,9 +2625,8 @@ void nss_qdisc_start_basic_stats_polling + return; + } + +- init_timer(&nq->stats_get_timer); +- nq->stats_get_timer.function = nss_qdisc_get_stats_timer_callback; +- nq->stats_get_timer.data = (unsigned long)nq; ++ timer_setup(&nq->stats_get_timer, nss_qdisc_get_stats_timer_callback, 0); ++ nq->stats_get_timer.cust_data = (unsigned long)nq; + nq->stats_get_timer.expires = jiffies + HZ; + atomic_set(&nq->pending_stat_requests, 1); + add_timer(&nq->stats_get_timer); +@@ -2650,7 +2670,7 @@ int nss_qdisc_gnet_stats_copy_basic(stru + #if (LINUX_VERSION_CODE <= KERNEL_VERSION(3, 18, 0)) + return gnet_stats_copy_basic(d, b); + #else +- return gnet_stats_copy_basic(d, NULL, b); ++ return gnet_stats_copy_basic(NULL, d, NULL, b); + #endif + } + +--- a/nss_qdisc/nss_tbl.c ++++ b/nss_qdisc/nss_tbl.c +@@ -29,7 +29,7 @@ static struct nla_policy nss_tbl_policy[ + [TCA_NSSTBL_PARMS] = { .len = sizeof(struct tc_nsstbl_qopt) }, + }; + +-static int nss_tbl_enqueue(struct sk_buff *skb, struct Qdisc *sch) ++static int nss_tbl_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) + { + return nss_qdisc_enqueue(skb, sch); + } +@@ -39,11 +39,6 @@ static struct sk_buff *nss_tbl_dequeue(s + return nss_qdisc_dequeue(sch); + } + +-static unsigned int nss_tbl_drop(struct Qdisc *sch) +-{ +- return nss_qdisc_drop(sch); +-} +- + static struct sk_buff *nss_tbl_peek(struct Qdisc *sch) + { + return nss_qdisc_peek(sch); +@@ -77,7 +72,7 @@ static void nss_tbl_destroy(struct Qdisc + /* + * Now we can destroy our child qdisc + */ +- qdisc_destroy(q->qdisc); ++ qdisc_put(q->qdisc); + + /* + * Stop the polling of basic stats and destroy qdisc. +@@ -132,7 +127,7 @@ fail: + } + #endif + +-static int nss_tbl_change(struct Qdisc *sch, struct nlattr *opt) ++static int nss_tbl_change(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_tbl_sched_data *q = qdisc_priv(sch); + struct tc_nsstbl_qopt *qopt; +@@ -216,7 +211,7 @@ static int nss_tbl_change(struct Qdisc * + return 0; + } + +-static int nss_tbl_init(struct Qdisc *sch, struct nlattr *opt) ++static int nss_tbl_init(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_tbl_sched_data *q = qdisc_priv(sch); + struct tc_nsstbl_qopt *qopt; +@@ -232,10 +227,10 @@ static int nss_tbl_init(struct Qdisc *sc + return -EINVAL; + } + +- if (nss_qdisc_init(sch, &q->nq, NSS_SHAPER_NODE_TYPE_TBL, 0, qopt->accel_mode) < 0) ++ if (nss_qdisc_init(sch, extack, &q->nq, NSS_SHAPER_NODE_TYPE_TBL, 0, qopt->accel_mode) < 0) + return -EINVAL; + +- if (nss_tbl_change(sch, opt) < 0) { ++ if (nss_tbl_change(sch, opt, NULL) < 0) { + nss_qdisc_info("Failed to configure tbl\n"); + nss_qdisc_destroy(&q->nq); + return -EINVAL; +@@ -287,7 +282,7 @@ static int nss_tbl_dump_class(struct Qdi + } + + static int nss_tbl_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, +- struct Qdisc **old) ++ struct Qdisc **old, struct netlink_ext_ack *extack) + { + struct nss_tbl_sched_data *q = qdisc_priv(sch); + struct nss_qdisc *nq_new = (struct nss_qdisc *)qdisc_priv(new); +@@ -344,10 +339,6 @@ static unsigned long nss_tbl_get(struct + return 1; + } + +-static void nss_tbl_put(struct Qdisc *sch, unsigned long arg) +-{ +-} +- + static void nss_tbl_walk(struct Qdisc *sch, struct qdisc_walker *walker) + { + nss_qdisc_info("Nsstbl walk called"); +@@ -364,9 +355,8 @@ static void nss_tbl_walk(struct Qdisc *s + const struct Qdisc_class_ops nss_tbl_class_ops = { + .graft = nss_tbl_graft, + .leaf = nss_tbl_leaf, +- .get = nss_tbl_get, +- .put = nss_tbl_put, ++ .find = nss_tbl_get, + .walk = nss_tbl_walk, + .dump = nss_tbl_dump_class, + }; + +@@ -381,7 +370,6 @@ struct Qdisc_ops nss_tbl_qdisc_ops __rea + .enqueue = nss_tbl_enqueue, + .dequeue = nss_tbl_dequeue, + .peek = nss_tbl_peek, +- .drop = nss_tbl_drop, + .init = nss_tbl_init, + .reset = nss_tbl_reset, + .destroy = nss_tbl_destroy, +--- a/nss_qdisc/nss_wred.c ++++ b/nss_qdisc/nss_wred.c +@@ -55,7 +55,7 @@ static struct nla_policy nss_wred_policy + * nss_wred_enqueue() + * Enqueue API for nsswred qdisc + */ +-static int nss_wred_enqueue(struct sk_buff *skb, struct Qdisc *sch) ++static int nss_wred_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) + { + return nss_qdisc_enqueue(skb, sch); + } +@@ -70,16 +70,6 @@ static struct sk_buff *nss_wred_dequeue( + } + + /* +- * nss_wred_drop() +- * Drops a packet from HLOS queue. +- */ +-static unsigned int nss_wred_drop(struct Qdisc *sch) +-{ +- nss_qdisc_info("nsswred dropping"); +- return nss_qdisc_drop(sch); +-} +- +-/* + * nss_wred_reset() + * Reset the nsswred qdisc + */ +@@ -171,7 +161,7 @@ fail: + * nss_wred_change() + * Function call to configure the nsswred parameters + */ +-static int nss_wred_change(struct Qdisc *sch, struct nlattr *opt) ++static int nss_wred_change(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_wred_sched_data *q = qdisc_priv(sch); + struct tc_nsswred_qopt *qopt; +@@ -298,7 +288,7 @@ static int nss_wred_change(struct Qdisc + * nss_wred_init() + * Init the nsswred qdisc + */ +-static int nss_wred_init(struct Qdisc *sch, struct nlattr *opt) ++static int nss_wred_init(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_qdisc *nq = qdisc_priv(sch); + struct tc_nsswred_qopt *qopt; +@@ -315,11 +305,11 @@ static int nss_wred_init(struct Qdisc *s + nss_qdisc_info("Initializing Wred - type %d\n", NSS_SHAPER_NODE_TYPE_WRED); + nss_wred_reset(sch); + +- if (nss_qdisc_init(sch, nq, NSS_SHAPER_NODE_TYPE_WRED, 0, qopt->accel_mode) < 0) ++ if (nss_qdisc_init(sch, extack, nq, NSS_SHAPER_NODE_TYPE_WRED, 0, qopt->accel_mode) < 0) + return -EINVAL; + + nss_qdisc_info("NSS wred initialized - handle %x parent %x\n", sch->handle, sch->parent); +- if (nss_wred_change(sch, opt) < 0) { ++ if (nss_wred_change(sch, opt, NULL) < 0) { + nss_qdisc_destroy(nq); + return -EINVAL; + } +@@ -405,7 +395,6 @@ struct Qdisc_ops nss_red_qdisc_ops __rea + .enqueue = nss_wred_enqueue, + .dequeue = nss_wred_dequeue, + .peek = nss_wred_peek, +- .drop = nss_wred_drop, + .init = nss_wred_init, + .reset = nss_wred_reset, + .destroy = nss_wred_destroy, +@@ -423,7 +412,6 @@ struct Qdisc_ops nss_wred_qdisc_ops __re + .enqueue = nss_wred_enqueue, + .dequeue = nss_wred_dequeue, + .peek = nss_wred_peek, +- .drop = nss_wred_drop, + .init = nss_wred_init, + .reset = nss_wred_reset, + .destroy = nss_wred_destroy, +--- a/nss_qdisc/nss_wrr.c ++++ b/nss_qdisc/nss_wrr.c +@@ -84,7 +84,7 @@ static void nss_wrr_destroy_class(struct + /* + * And now we destroy the child. + */ +- qdisc_destroy(cl->qdisc); ++ qdisc_put(cl->qdisc); + + /* + * Stop the stats polling timer and free class +@@ -219,7 +219,7 @@ static int nss_wrr_ppe_change_class(stru + #endif + + static int nss_wrr_change_class(struct Qdisc *sch, u32 classid, u32 parentid, +- struct nlattr **tca, unsigned long *arg) ++ struct nlattr **tca, unsigned long *arg, struct netlink_ext_ack *extack) + { + struct nss_wrr_sched_data *q = qdisc_priv(sch); + struct nss_wrr_class_data *cl = (struct nss_wrr_class_data *)*arg; +@@ -286,7 +286,7 @@ static int nss_wrr_change_class(struct Q + * here. + */ + cl->nq.parent = &q->nq; +- if (nss_qdisc_init(sch, &cl->nq, NSS_SHAPER_NODE_TYPE_WRR_GROUP, classid, accel_mode) < 0) { ++ if (nss_qdisc_init(sch, extack, &cl->nq, NSS_SHAPER_NODE_TYPE_WRR_GROUP, classid, accel_mode) < 0) { + nss_qdisc_error("Nss init for class %u failed\n", classid); + return -EINVAL; + } +@@ -422,7 +422,7 @@ static int nss_wrr_delete_class(struct Q + } + + static int nss_wrr_graft_class(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, +- struct Qdisc **old) ++ struct Qdisc **old, struct netlink_ext_ack *extack) + { + struct nss_wrr_sched_data *q = qdisc_priv(sch); + struct nss_wrr_class_data *cl = (struct nss_wrr_class_data *)arg; +@@ -517,20 +517,6 @@ static unsigned long nss_wrr_get_class(s + return (unsigned long)cl; + } + +-static void nss_wrr_put_class(struct Qdisc *sch, unsigned long arg) +-{ +- struct nss_wrr_class_data *cl = (struct nss_wrr_class_data *)arg; +- nss_qdisc_info("nss_wrr put class for %p\n", cl); +- +- /* +- * We are safe to destroy the qdisc if the reference count +- * goes down to 0. +- */ +- if (atomic_sub_return(1, &cl->nq.refcnt) == 0) { +- nss_wrr_destroy_class(sch, cl); +- } +-} +- + static int nss_wrr_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb, + struct tcmsg *tcm) + { +@@ -600,7 +586,7 @@ static void nss_wrr_walk(struct Qdisc *s + } + } + +-static int nss_wrr_init_qdisc(struct Qdisc *sch, struct nlattr *opt) ++static int nss_wrr_init_qdisc(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_wrr_sched_data *q = qdisc_priv(sch); + int err; +@@ -629,7 +615,7 @@ static int nss_wrr_init_qdisc(struct Qdi + /* + * Initialize the NSSWRR shaper in NSS + */ +- if (nss_qdisc_init(sch, &q->nq, NSS_SHAPER_NODE_TYPE_WRR, 0, qopt->accel_mode) < 0) { ++ if (nss_qdisc_init(sch, extack, &q->nq, NSS_SHAPER_NODE_TYPE_WRR, 0, qopt->accel_mode) < 0) { + nss_qdisc_warning("Failed init nss_wrr qdisc"); + return -EINVAL; + } +@@ -669,7 +655,7 @@ static int nss_wrr_init_qdisc(struct Qdi + return 0; + } + +-static int nss_wrr_change_qdisc(struct Qdisc *sch, struct nlattr *opt) ++static int nss_wrr_change_qdisc(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) + { + struct nss_wrr_sched_data *q; + struct tc_nsswrr_qopt *qopt; +@@ -809,7 +795,7 @@ nla_put_failure: + return -EMSGSIZE; + } + +-static int nss_wrr_enqueue(struct sk_buff *skb, struct Qdisc *sch) ++static int nss_wrr_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) + { + return nss_qdisc_enqueue(skb, sch); + } +@@ -819,21 +805,14 @@ static struct sk_buff *nss_wrr_dequeue(s + return nss_qdisc_dequeue(sch); + } + +-static unsigned int nss_wrr_drop(struct Qdisc *sch) +-{ +- nss_qdisc_info("Nsswrr drop\n"); +- return nss_qdisc_drop(sch); +-} +- + const struct Qdisc_class_ops nss_wrr_class_ops = { + .change = nss_wrr_change_class, + .delete = nss_wrr_delete_class, + .graft = nss_wrr_graft_class, + .leaf = nss_wrr_leaf_class, + .qlen_notify = nss_wrr_qlen_notify, +- .get = nss_wrr_get_class, +- .put = nss_wrr_put_class, ++ .find = nss_wrr_get_class, + .dump = nss_wrr_dump_class, + .dump_stats = nss_wrr_dump_class_stats, + .walk = nss_bf_walk + }; +@@ -851,7 +829,6 @@ struct Qdisc_ops nss_wrr_qdisc_ops __rea + .enqueue = nss_wrr_enqueue, + .dequeue = nss_wrr_dequeue, + .peek = qdisc_peek_dequeued, +- .drop = nss_wrr_drop, + .cl_ops = &nss_wrr_class_ops, + .priv_size = sizeof(struct nss_wrr_sched_data), + .owner = THIS_MODULE +@@ -863,9 +840,8 @@ const struct Qdisc_class_ops nss_wfq_cla + .graft = nss_wrr_graft_class, + .leaf = nss_wrr_leaf_class, + .qlen_notify = nss_wrr_qlen_notify, +- .get = nss_wrr_get_class, +- .put = nss_wrr_put_class, ++ .find = nss_wrr_get_class, + .dump = nss_wrr_dump_class, + .dump_stats = nss_wrr_dump_class_stats, + .walk = nss_wrr_walk + }; +@@ -883,7 +858,6 @@ struct Qdisc_ops nss_wfq_qdisc_ops __rea + .enqueue = nss_wrr_enqueue, + .dequeue = nss_wrr_dequeue, + .peek = qdisc_peek_dequeued, +- .drop = nss_wrr_drop, + .cl_ops = &nss_wrr_class_ops, + .priv_size = sizeof(struct nss_wrr_sched_data), + .owner = THIS_MODULE diff --git a/package/qca/qca-nss-clients/patches/101-kernel-5.4-support-gre.patch b/package/qca/qca-nss-clients/patches/101-kernel-5.4-support-gre.patch new file mode 100644 index 000000000..705ceabe6 --- /dev/null +++ b/package/qca/qca-nss-clients/patches/101-kernel-5.4-support-gre.patch @@ -0,0 +1,106 @@ +From 7c89187ab2d165ccffed627742e7cb72cce375ef Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Sun, 12 Jul 2020 22:49:30 +0200 +Subject: [PATCH] kernel-5.4-support-gre + +--- + gre/nss_connmgr_gre.c | 16 +++++++--------- + gre/nss_connmgr_gre_v6.c | 4 ++-- + 2 files changed, 9 insertions(+), 11 deletions(-) + +diff --git a/gre/nss_connmgr_gre.c b/gre/nss_connmgr_gre.c +index 52203b1..6de8f6e 100644 +--- a/gre/nss_connmgr_gre.c ++++ b/gre/nss_connmgr_gre.c +@@ -88,7 +88,7 @@ static int nss_connmgr_gre_dev_init(struct net_device *dev) + u64_stats_init(&stats->syncp); + } + +- if ((dev->priv_flags & IFF_GRE_V4_TAP) || (dev->type == ARPHRD_IPGRE)) { ++ if ((dev->priv_flags_qca_ecm & IFF_QCA_ECM_GRE_V4_TAP) || (dev->type == ARPHRD_IPGRE)) { + dev->needed_headroom = sizeof(struct iphdr) + sizeof(struct ethhdr) + MAX_WIFI_HEADROOM + append; + dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr) - append; + dev->features |= NETIF_F_NETNS_LOCAL | NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA; +@@ -169,7 +169,7 @@ fail: + * nss_connmgr_gre_dev_stats64() + * Netdev ops function to retrieve stats. + */ +-struct rtnl_link_stats64 *nss_connmgr_gre_dev_stats64(struct net_device *dev, ++void nss_connmgr_gre_dev_stats64(struct net_device *dev, + struct rtnl_link_stats64 *tot) + { + uint64_t rx_packets, rx_bytes, tx_packets, tx_bytes; +@@ -202,8 +202,6 @@ struct rtnl_link_stats64 *nss_connmgr_gre_dev_stats64(struct net_device *dev, + tot->rx_dropped = dev->stats.rx_dropped; + tot->tx_dropped = dev->stats.tx_dropped; + } +- +- return tot; + } + + /* +@@ -390,7 +388,7 @@ static int32_t nss_connmgr_gre_prepare_config_cmd(struct net_device *dev, + { + struct nss_gre_config_msg *cmsg = &req->msg.cmsg; + +- if ((dev->type == ARPHRD_ETHER) && (dev->priv_flags & IFF_GRE_V4_TAP)) { ++ if ((dev->type == ARPHRD_ETHER) && (dev->priv_flags_qca_ecm & IFF_QCA_ECM_GRE_V4_TAP)) { + cmsg->mode = NSS_GRE_MODE_TAP; + cmsg->ip_type = NSS_GRE_IP_IPV4; + if (enable_unalign) { +@@ -399,7 +397,7 @@ static int32_t nss_connmgr_gre_prepare_config_cmd(struct net_device *dev, + return nss_connmgr_gre_v4_get_config(dev, req, next_dev, hold); + } + +- if ((dev->type == ARPHRD_ETHER) && (dev->priv_flags & IFF_GRE_V6_TAP)) { ++ if ((dev->type == ARPHRD_ETHER) && (dev->priv_flags_qca_ecm & IFF_QCA_ECM_GRE_V6_TAP)) { + cmsg->mode = NSS_GRE_MODE_TAP; + cmsg->ip_type = NSS_GRE_IP_IPV6; + if (enable_unalign) { +@@ -605,7 +603,7 @@ static bool nss_connmgr_gre_is_gre(struct net_device *dev) + { + if ((dev->type == ARPHRD_IPGRE) || + (dev->type == ARPHRD_IP6GRE) || ((dev->type == ARPHRD_ETHER) && +- (dev->priv_flags & (IFF_GRE_V4_TAP | IFF_GRE_V6_TAP)))) { ++ (dev->priv_flags_qca_ecm & (IFF_QCA_ECM_GRE_V4_TAP | IFF_QCA_ECM_GRE_V6_TAP)))) { + return true; + } + +@@ -692,10 +690,10 @@ static struct net_device *__nss_connmgr_gre_create_interface(struct nss_connmgr_ + nss_connmgr_gre_tap_setup(dev); + + if (cfg->is_ipv6) { +- dev->priv_flags |= IFF_GRE_V6_TAP; ++ dev->priv_flags_qca_ecm |= IFF_QCA_ECM_GRE_V6_TAP; + ret = nss_connmgr_gre_v6_set_config(dev, cfg); + } else { +- dev->priv_flags |= IFF_GRE_V4_TAP; ++ dev->priv_flags_qca_ecm |= IFF_QCA_ECM_GRE_V4_TAP; + ret = nss_connmgr_gre_v4_set_config(dev, cfg); + } + break; +diff --git a/gre/nss_connmgr_gre_v6.c b/gre/nss_connmgr_gre_v6.c +index f9a8e58..e93c7e4 100644 +--- a/gre/nss_connmgr_gre_v6.c ++++ b/gre/nss_connmgr_gre_v6.c +@@ -46,7 +46,7 @@ static struct net_device *nss_connmgr_gre_v6_get_tx_dev(uint8_t *dest_ip) + struct net_device *dev; + + memcpy(ipv6_addr.s6_addr, dest_ip, 16); +- rt = rt6_lookup(&init_net, &ipv6_addr, NULL, 0, 0); ++ rt = rt6_lookup(&init_net, &ipv6_addr, NULL, 0, NULL, 0); + if (!rt) { + return NULL; + } +@@ -92,7 +92,7 @@ static int nss_connmgr_gre_v6_get_mac_address(uint8_t *src_ip, uint8_t *dest_ip, + * Find dest MAC address + */ + memcpy(ipv6_addr.s6_addr, dest_ip, 16); +- rt = rt6_lookup(&init_net, &ipv6_addr, NULL, 0, 0); ++ rt = rt6_lookup(&init_net, &ipv6_addr, NULL, 0, NULL, 0); + if (!rt) { + return GRE_ERR_NEIGH_LOOKUP; + } +-- +2.27.0 + diff --git a/package/qca/qca-nss-clients/patches/102-kernel-5.4-support-ipsec.patch b/package/qca/qca-nss-clients/patches/102-kernel-5.4-support-ipsec.patch new file mode 100644 index 000000000..de43b4d01 --- /dev/null +++ b/package/qca/qca-nss-clients/patches/102-kernel-5.4-support-ipsec.patch @@ -0,0 +1,29 @@ +--- a/ipsecmgr/v1.0/nss_ipsecmgr.c ++++ b/ipsecmgr/v1.0/nss_ipsecmgr.c +@@ -377,7 +377,7 @@ free: + * nss_ipsecmgr_tunnel_stats() + * get tunnel statistics + */ +-static struct rtnl_link_stats64 *nss_ipsecmgr_tunnel_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) ++void nss_ipsecmgr_tunnel_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) + { + struct nss_ipsecmgr_priv *priv = netdev_priv(dev); + +@@ -389,8 +389,6 @@ static struct rtnl_link_stats64 *nss_ips + read_lock_bh(&ipsecmgr_ctx->lock); + memcpy(stats, &priv->stats, sizeof(struct rtnl_link_stats64)); + read_unlock_bh(&ipsecmgr_ctx->lock); +- +- return stats; + } + + /* +@@ -442,7 +440,7 @@ static void nss_ipsecmgr_tunnel_setup(st + dev->header_ops = NULL; + dev->netdev_ops = &nss_ipsecmgr_tunnel_ops; + +- dev->destructor = nss_ipsecmgr_tunnel_free; ++ dev->priv_destructor = nss_ipsecmgr_tunnel_free; + + /* + * get the MAC address from the ethernet device diff --git a/package/qca/qca-nss-clients/patches/103-kernel-5.4-support-dtls.patch b/package/qca/qca-nss-clients/patches/103-kernel-5.4-support-dtls.patch new file mode 100644 index 000000000..ae9c91470 --- /dev/null +++ b/package/qca/qca-nss-clients/patches/103-kernel-5.4-support-dtls.patch @@ -0,0 +1,11 @@ +--- a/dtls/v1.0/nss_connmgr_dtls_netdev.c ++++ b/dtls/v1.0/nss_connmgr_dtls_netdev.c +@@ -160,7 +160,7 @@ static void nss_dtlsmgr_dev_setup(struct + dev->ethtool_ops = NULL; + dev->header_ops = NULL; + dev->netdev_ops = &nss_dtlsmgr_session_ops; +- dev->destructor = NULL; ++ dev->priv_destructor = NULL; + + memcpy(dev->dev_addr, "\xaa\xbb\xcc\xdd\xee\xff", dev->addr_len); + memset(dev->broadcast, 0xff, dev->addr_len); diff --git a/package/qca/qca-nss-clients/patches/104-kernel-5.4-support-l2tp.patch b/package/qca/qca-nss-clients/patches/104-kernel-5.4-support-l2tp.patch new file mode 100644 index 000000000..c637235cc --- /dev/null +++ b/package/qca/qca-nss-clients/patches/104-kernel-5.4-support-l2tp.patch @@ -0,0 +1,64 @@ +--- a/l2tp/l2tpv2/nss_connmgr_l2tpv2.h ++++ b/l2tp/l2tpv2/nss_connmgr_l2tpv2.h +@@ -30,10 +30,10 @@ + + #define L2TP_V_2 2 + +-#define tunnel_hold(tunnel) atomic_inc(&tunnel->ref_count) +-#define tunnel_put(tunnel) atomic_dec(&tunnel->ref_count) +-#define session_hold(session) atomic_inc(&session->ref_count) +-#define session_put(session) atomic_dec(&session->ref_count) ++#define tunnel_hold(tunnel) refcount_inc(&tunnel->ref_count) ++#define tunnel_put(tunnel) refcount_dec(&tunnel->ref_count) ++#define session_hold(session) refcount_inc(&session->ref_count) ++#define session_put(session) refcount_dec(&session->ref_count) + + /* + * ---------------------------------------------------------------------------------- +--- a/l2tp/l2tpv2/nss_connmgr_l2tpv2.c ++++ b/l2tp/l2tpv2/nss_connmgr_l2tpv2.c +@@ -244,7 +244,7 @@ static struct nss_connmgr_l2tpv2_session + */ + data->l2tpv2.session.session_id = session->session_id; + data->l2tpv2.session.peer_session_id = session->peer_session_id; +- data->l2tpv2.session.offset = session->offset; ++ data->l2tpv2.session.offset = 0; + data->l2tpv2.session.hdr_len = session->hdr_len; + data->l2tpv2.session.reorder_timeout = session->reorder_timeout; + data->l2tpv2.session.recv_seq = session->recv_seq; +@@ -253,7 +253,7 @@ static struct nss_connmgr_l2tpv2_session + nss_connmgr_l2tpv2_info("sess %u, peer=%u nr=%u ns=%u off=%u hdr_len=%u timeout=%x" + " recv_seq=%x send_seq=%x\n", + session->session_id, session->peer_session_id, session->nr, +- session->ns, session->offset, session->hdr_len, ++ session->ns, 0, session->hdr_len, + session->reorder_timeout, session->recv_seq, + session->send_seq); + +--- a/l2tp/l2tpv2/nss_l2tpv2_stats.c ++++ b/l2tp/l2tpv2/nss_l2tpv2_stats.c +@@ -21,6 +21,7 @@ + */ + + #include ++#include + #include + #include + #include +@@ -103,14 +104,14 @@ void nss_l2tpv2_update_dev_stats(struct + /* + * Update tunnel & session stats + */ +- tunnel = l2tp_tunnel_find(dev_net(dev), data.l2tpv2.tunnel.tunnel_id); ++ tunnel = l2tp_tunnel_get(dev_net(dev), data.l2tpv2.tunnel.tunnel_id); + if (!tunnel) { + dev_put(dev); + return; + } + tunnel_hold(tunnel); + +- session = l2tp_session_find(dev_net(dev), tunnel, data.l2tpv2.session.session_id); ++ session = l2tp_session_get(dev_net(dev), data.l2tpv2.session.session_id); + if (!session) { + tunnel_put(tunnel); + dev_put(dev); diff --git a/package/qca/qca-nss-clients/patches/200-qdisc-fix-compile-error.patch b/package/qca/qca-nss-clients/patches/200-qdisc-fix-compile-error.patch new file mode 100644 index 000000000..4e147489b --- /dev/null +++ b/package/qca/qca-nss-clients/patches/200-qdisc-fix-compile-error.patch @@ -0,0 +1,14 @@ +--- a/nss_qdisc/nss_qdisc.c ++++ b/nss_qdisc/nss_qdisc.c +@@ -2708,9 +2708,11 @@ static int nss_qdisc_if_event_cb(struct + case NETDEV_BR_JOIN: + nss_qdisc_info("Reveived NETDEV_BR_JOIN on interface %s\n", + dev->name); ++ goto fall_through; + case NETDEV_BR_LEAVE: + nss_qdisc_info("Reveived NETDEV_BR_LEAVE on interface %s\n", + dev->name); ++fall_through: + br = nss_qdisc_get_dev_master(dev); + if_num = nss_cmn_get_interface_number(nss_qdisc_ctx, dev); + diff --git a/package/qca/qca-nss-clients/patches/202-vlanmgr-fix-compile-error.patch b/package/qca/qca-nss-clients/patches/202-vlanmgr-fix-compile-error.patch new file mode 100644 index 000000000..53af31924 --- /dev/null +++ b/package/qca/qca-nss-clients/patches/202-vlanmgr-fix-compile-error.patch @@ -0,0 +1,48 @@ +--- a/vlan/nss_vlan_mgr.c ++++ b/vlan/nss_vlan_mgr.c +@@ -820,8 +820,10 @@ static struct nss_vlan_pvt *nss_vlan_mgr + */ + static void nss_vlan_mgr_instance_free(struct nss_vlan_pvt *v) + { ++#ifdef NSS_VLAN_MGR_PPE_SUPPORT + int32_t i; + int ret = 0; ++#endif + + spin_lock(&vlan_mgr_ctx.lock); + BUG_ON(--v->refs); +@@ -979,8 +981,11 @@ static int nss_vlan_mgr_register_event(s + int ret; + #endif + uint32_t vlan_tag; ++#ifdef NSS_VLAN_MGR_PPE_SUPPORT + struct net_device *slave; +- int32_t port, port_if; ++ int32_t port; ++#endif ++ int32_t port_if; + struct vlan_dev_priv *vlan; + struct net_device *real_dev; + bool is_bond_master = false; +@@ -1354,8 +1359,10 @@ return_with_error: + int nss_vlan_mgr_join_bridge(struct net_device *dev, uint32_t bridge_vsi) + { + struct nss_vlan_pvt *v = nss_vlan_mgr_instance_find_and_ref(dev); ++#ifdef NSS_VLAN_MGR_PPE_SUPPORT + struct net_device *real_dev; + int ret; ++#endif + + if (!v) + return 0; +@@ -1415,8 +1422,10 @@ EXPORT_SYMBOL(nss_vlan_mgr_join_bridge); + int nss_vlan_mgr_leave_bridge(struct net_device *dev, uint32_t bridge_vsi) + { + struct nss_vlan_pvt *v = nss_vlan_mgr_instance_find_and_ref(dev); ++#ifdef NSS_VLAN_MGR_PPE_SUPPORT + struct net_device *real_dev; + int ret; ++#endif + + if (!v) + return 0; diff --git a/package/qca/qca-nss-crypto/Makefile b/package/qca/qca-nss-crypto/Makefile new file mode 100644 index 000000000..09a16232b --- /dev/null +++ b/package/qca/qca-nss-crypto/Makefile @@ -0,0 +1,74 @@ +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=qca-nss-crypto +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-crypto +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=e7651c2986d30b5e8ca5ad6b9a72c47febdf3cca + +include $(INCLUDE_DIR)/package.mk + +ifeq ($(CONFIG_TARGET_ipq),y) +subtarget:=$(SUBTARGET) +else +subtarget:=$(CONFIG_TARGET_BOARD) +endif + +# v1.0 is for Akronite +# v2.0 is for Hawkeye/Cypress/Maple +ifneq (, $(findstring $(subtarget), "ipq807x" "ipq807x_64" "ipq60xx" "ipq60xx_64" "ipq50xx" "ipq50xx_64")) +NSS_CRYPTO_DIR:=v2.0 +else +NSS_CRYPTO_DIR:=v1.0 +endif + +define KernelPackage/qca-nss-crypto/Default + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + DEPENDS:=@TARGET_ipq806x||TARGET_ipq_ipq806x||TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq807x||TARGET_ipq807x_64||TARGET_ipq_ipq50xx||TARGET_ipq_ipq50xx_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64 \ + +kmod-qca-nss-drv @!LINUX_3_18 +endef + +define KernelPackage/qca-nss-crypto + $(call KernelPackage/qca-nss-crypto/Default) + 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 + AUTOLOAD:=$(call AutoLoad,52,qca-nss-crypto) +endef + +define KernelPackage/qca-nss-crypto/Description +This package contains a NSS crypto driver for QCA chipset +endef + +define Build/InstallDev/qca-nss-crypto + $(INSTALL_DIR) $(1)/usr/include/qca-nss-crypto + $(CP) $(PKG_BUILD_DIR)/$(NSS_CRYPTO_DIR)/include/* $(1)/usr/include/qca-nss-crypto +endef + +define Build/InstallDev + $(call Build/InstallDev/qca-nss-crypto,$(1)) +endef + +EXTRA_CFLAGS+= \ + -DCONFIG_NSS_DEBUG_LEVEL=4 \ + -I$(STAGING_DIR)/usr/include/qca-nss-crypto \ + -I$(STAGING_DIR)/usr/include/qca-nss-drv \ + -I$(PKG_BUILD_DIR)/$(NSS_CRYPTO_DIR)/include \ + -I$(PKG_BUILD_DIR)/$(NSS_CRYPTO_DIR)/src + +define Build/Compile + $(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \ + $(KERNEL_MAKE_FLAGS) \ + $(PKG_MAKE_FLAGS) \ + M="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ + NSS_CRYPTO_DIR=$(NSS_CRYPTO_DIR) \ + SoC="$(subtarget)" \ + modules +endef + +$(eval $(call KernelPackage,qca-nss-crypto)) diff --git a/package/qca/qca-nss-crypto/patches/100-kernel-5.4-support.patch b/package/qca/qca-nss-crypto/patches/100-kernel-5.4-support.patch new file mode 100644 index 000000000..b9ef6191e --- /dev/null +++ b/package/qca/qca-nss-crypto/patches/100-kernel-5.4-support.patch @@ -0,0 +1,42 @@ +--- a/v1.0/tool/nss_crypto_bench.c ++++ b/v1.0/tool/nss_crypto_bench.c +@@ -75,8 +75,8 @@ static DECLARE_WAIT_QUEUE_HEAD(tx_comp); + static DECLARE_WAIT_QUEUE_HEAD(tx_start); + static struct task_struct *tx_thread = NULL; + +-static struct timeval init_time; +-static struct timeval comp_time; ++static struct timespec64 init_time; ++static struct timespec64 comp_time; + static spinlock_t op_lock; + static nss_crypto_handle_t crypto_hdl; + +@@ -782,7 +782,7 @@ static int crypto_bench_tx(void *arg) + crypto_bench_debug("#"); + + /* get start time */ +- do_gettimeofday(&init_time); ++ ktime_get_real_ts64(&init_time); + + /** + * Request submission +@@ -812,8 +812,8 @@ static int crypto_bench_tx(void *arg) + * Calculate time and output the Mbps + */ + +- init_usecs = (init_time.tv_sec * 1000 * 1000) + init_time.tv_usec; +- comp_usecs = (comp_time.tv_sec * 1000 * 1000) + comp_time.tv_usec; ++ init_usecs = (init_time.tv_sec * 1000 * 1000) + (init_time.tv_nsec / NSEC_PER_USEC); ++ comp_usecs = (comp_time.tv_sec * 1000 * 1000) + (comp_time.tv_nsec / NSEC_PER_USEC); + delta_usecs = comp_usecs - init_usecs; + + reqs_completed = param.num_reqs - atomic_read(&tx_reqs); +@@ -870,7 +870,7 @@ static void crypto_bench_done(struct nss + nss_crypto_buf_free(crypto_hdl, buf); + + if (atomic_dec_and_test(&tx_reqs)) { +- do_gettimeofday(&comp_time); ++ ktime_get_real_ts64(&comp_time); + + wake_up_interruptible(&tx_comp); + param.num_loops--; diff --git a/package/qca/qca-nss-crypto/patches/200-fix-NULL-pointer-exception.patch b/package/qca/qca-nss-crypto/patches/200-fix-NULL-pointer-exception.patch new file mode 100644 index 000000000..6bd95109a --- /dev/null +++ b/package/qca/qca-nss-crypto/patches/200-fix-NULL-pointer-exception.patch @@ -0,0 +1,57 @@ +--- a/v1.0/src/nss_crypto_if.c ++++ b/v1.0/src/nss_crypto_if.c +@@ -370,15 +370,16 @@ void nss_crypto_transform_done(struct ne + struct nss_crypto_buf *buf = (struct nss_crypto_buf *)skb->data; + struct nss_crypto_buf_node *entry; + void *addr; ++ struct device *cdev = gbl_crypto_ctrl.eng[0].dev; + + if (likely(buf->data_in == buf->data_out)) { +- dma_unmap_single(NULL, buf->data_in, buf->data_len, DMA_BIDIRECTIONAL); ++ dma_unmap_single(cdev, buf->data_in, buf->data_len, DMA_BIDIRECTIONAL); + } else { +- dma_unmap_single(NULL, buf->data_in, buf->data_len, DMA_TO_DEVICE); +- dma_unmap_single(NULL, buf->data_out, buf->data_len, DMA_FROM_DEVICE); ++ dma_unmap_single(cdev, buf->data_in, buf->data_len, DMA_TO_DEVICE); ++ dma_unmap_single(cdev, buf->data_out, buf->data_len, DMA_FROM_DEVICE); + } + +- dma_unmap_single(NULL, buf->iv_addr, L1_CACHE_BYTES, DMA_BIDIRECTIONAL); ++ dma_unmap_single(cdev, buf->iv_addr, L1_CACHE_BYTES, DMA_BIDIRECTIONAL); + + addr = phys_to_virt(buf->iv_addr); + entry = container_of(addr, struct nss_crypto_buf_node, results); +@@ -531,6 +532,7 @@ nss_crypto_status_t nss_crypto_transform + uint32_t paddr; + void *vaddr; + size_t len; ++ struct device *cdev = gbl_crypto_ctrl.eng[0].dev; + + if (!buf->cb_fn) { + nss_crypto_warn("%p:no buffer(%p) callback present\n", crypto, buf); +@@ -544,7 +546,7 @@ nss_crypto_status_t nss_crypto_transform + */ + vaddr = (void *)buf->data_in; + len = buf->data_len; +- paddr = dma_map_single(NULL, vaddr, len, DMA_TO_DEVICE); ++ paddr = dma_map_single(cdev, vaddr, len, DMA_TO_DEVICE); + buf->data_in = paddr; + + if (vaddr == (void *)buf->data_out) { +@@ -555,14 +557,14 @@ nss_crypto_status_t nss_crypto_transform + */ + vaddr = (void *)buf->data_out; + len = buf->data_len; +- paddr = dma_map_single(NULL, vaddr, len, DMA_FROM_DEVICE); ++ paddr = dma_map_single(cdev, vaddr, len, DMA_FROM_DEVICE); + buf->data_out = paddr; + } + + /* + * We need to map the results into IV + */ +- paddr = dma_map_single(NULL, entry->results, L1_CACHE_BYTES, DMA_BIDIRECTIONAL); ++ paddr = dma_map_single(cdev, entry->results, L1_CACHE_BYTES, DMA_BIDIRECTIONAL); + buf->hash_addr = paddr; + buf->iv_addr = paddr; + diff --git a/package/qca/qca-nss-drv/Makefile b/package/qca/qca-nss-drv/Makefile new file mode 100644 index 000000000..931697746 --- /dev/null +++ b/package/qca/qca-nss-drv/Makefile @@ -0,0 +1,124 @@ +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=qca-nss-drv +PKG_RELEASE:=2 + +PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-drv +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=809a00deffe9f3d4ecd15965790a152757073437 + +NSS_CLIENTS_DIR:=$(TOPDIR)/qca/src/qca-nss-clients + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/qca-nss-drv + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + 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||TARGET_ipq_ipq50xx||TARGET_ipq_ipq50xx_64 \ + +PACKAGE_kmod-qca-nss-gmac:kmod-qca-nss-gmac @!LINUX_3_18 + TITLE:=Kernel driver for NSS (core driver) + FILES:=$(PKG_BUILD_DIR)/qca-nss-drv.ko + AUTOLOAD:=$(call AutoLoad,32,qca-nss-drv) +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)/lib/firmware + + $(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/nss-firmware/qca-nss0-retail.bin $(1)/lib/firmware/qca-nss0.bin + $(INSTALL_BIN) ./files/nss-firmware/qca-nss1-retail.bin $(1)/lib/firmware/qca-nss1.bin + +endef + +define KernelPackage/qca-nss-drv/Description +This package contains a NSS driver for QCA chipset +endef + +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 + +# Keeping default as ipq806x for branches that does not have subtarget framework +ifeq ($(CONFIG_TARGET_ipq),y) +subtarget:=$(SUBTARGET) +else +subtarget:=$(CONFIG_TARGET_BOARD) +endif + +ifeq ($(CONFIG_KERNEL_IPQ_MEM_PROFILE),256) +EXTRA_CFLAGS+= -DNSS_MEM_PROFILE_LOW +endif + +ifeq ($(CONFIG_KERNEL_IPQ_MEM_PROFILE),512) +EXTRA_CFLAGS+= -DNSS_MEM_PROFILE_MEDIUM +endif + +ifeq ($(CONFIG_KERNEL_SKB_FIXED_SIZE_2K),y) +EXTRA_CFLAGS+= -DNSS_SKB_FIXED_SIZE_2K +endif + +DRV_MAKE_OPTS:= +ifeq ($(CONFIG_KERNEL_IPQ_MEM_PROFILE),256) +DRV_MAKE_OPTS+=NSS_DRV_C2C_ENABLE=n \ + NSS_DRV_CAPWAP_ENABLE=n \ + NSS_DRV_CLMAP_ENABLE=n \ + NSS_DRV_CRYPTO_ENABLE=n \ + 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 +endif + +define Build/Configure + $(LN) arch/nss_$(subtarget).h $(PKG_BUILD_DIR)/exports/nss_arch.h +endef + +define Build/Compile + $(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" $(strip $(DRV_MAKE_OPTS)) \ + $(KERNEL_MAKE_FLAGS) \ + $(PKG_MAKE_FLAGS) \ + M="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS)" SoC="$(subtarget)" \ + modules +endef + +$(eval $(call KernelPackage,qca-nss-drv)) diff --git a/package/qca/qca-nss-drv/files/nss-firmware/LICENSE.TXT b/package/qca/qca-nss-drv/files/nss-firmware/LICENSE.TXT new file mode 100644 index 000000000..41631989a --- /dev/null +++ b/package/qca/qca-nss-drv/files/nss-firmware/LICENSE.TXT @@ -0,0 +1,45 @@ +Copyright (c) 2014 Qualcomm Atheros, Inc. + +All rights reserved. + +Redistribution and use in binary forms, without +modification, are permitted (subject to the limitations in the +disclaimer below) provided that the following conditions are met: + +*Redistributions must reproduce the above copyright + notice, this list of conditions, and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +*Neither the name of Qualcomm Atheros, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +*No Reverse engineering, decompiling, decrypting, or disassembling of this + software is permitted. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. NO LICENSES OR OTHER RIGHTS, +WHETHER EXPRESS, IMPLIED, BASED ON ESTOPPEL OR OTHERWISE, ARE GRANTED +TO ANY PARTY'S PATENTS, PATENT APPLICATIONS, OR PATENTABLE INVENTIONS +BY VIRTUE OF THIS LICENSE OR THE DELIVERY OR PROVISION BY QUALCOMM +ATHEROS, INC. OF THE SOFTWARE. + +IN NO EVENT SHALL THE COPYRIGHT OWNER OR ANY CONTRIBUTOR BE LIABLE FOR +ANY INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND REGARDLESS OF ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF OR RESULTING FROM THE USE OF THE +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN ANY +EVENT, THE TOTAL AGGREGATE LIABILITY THAT MAY BE IMPOSED ON QUALCOMM +ATHEROS, INC. FOR ANY DIRECT DAMAGES ARISING UNDER OR RESULTING FROM +THIS AGREEMENT OR IN CONNECTION WITH ANY USE OF THE SOFTWARE SHALL NOT +EXCEED A TOTAL AMOUNT OF US$5.00. + +IF ANY OF THE ABOVE PROVISIONS ARE HELD TO BE VOID, INVALID, +UNENFORCEABLE, OR ILLEGAL, THE OTHER PROVISIONS SHALL CONTINUE IN FULL +FORCE AND EFFECT. + diff --git a/package/qca/qca-nss-drv/files/nss-firmware/NOTICE.TXT b/package/qca/qca-nss-drv/files/nss-firmware/NOTICE.TXT new file mode 100644 index 000000000..ab54aa019 --- /dev/null +++ b/package/qca/qca-nss-drv/files/nss-firmware/NOTICE.TXT @@ -0,0 +1,217 @@ +============================================================================= + +This Notice.txt file contains certain notices of software components included +with the software that Qualcomm Atheros, Inc. ("Qualcomm Atheros") is required +to provide you. Except where prohibited by the open source license, the content +of this notices file is only provided to satisfy Qualcomm Atheros's attribution +and notice requirement; your use of these software components together with the +Qualcomm Atheros software (Qualcomm Atheros software hereinafter referred to as +"Software") is subject to the terms of your license from Qualcomm Atheros. +Compliance with all copyright laws and software license agreements included in +the notice section of this file are the responsibility of the user. Except as +may be granted by separate express written agreement, this file provides no +license to any Qualcomm Atheros patents, trademarks, copyrights, or other +intellectual property. + +Copyright (c) 2014 Qualcomm Atheros, Inc. All rights reserved. + +Qualcomm is a trademark of Qualcomm Incorporated, registered in the United +States and other countries. All Qualcomm Incorporated trademarks are used with +permission. Atheros is a trademark of Qualcomm Atheros, Inc., registered in the +United States and other countries. Other products and brand names may be +trademarks or registered trademarks of their respective owners. + +NOTICES: + +============================================================================= + +/* + * doprint.c + * Formatted string print support. + * + * Copyright 2001-2012 Qualcomm Atheros, Inc. All Rights Reserved. + * + * Qualcomm Atheros Confidential and Proprietary. + * + * This code originates with BSD Unix however it has been extensively + * modified. The original copyright is reproduced below: + * + * Copyright (c) 1988 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted provided + * that: (1) source distributions retain this entire copyright notice and + * comment, and (2) distributions including binaries display the following + * acknowledgement: ``This product includes software developed by the + * University of California, Berkeley and its contributors'' in the + * documentation or other materials provided with the distribution and in + * all advertising materials mentioning features or use of this software. + * Neither the name of the University nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + + +/* + * math.c + * Support for the standard C library. + * + * Copyright 2006-2012 Qualcomm Atheros, Inc. All Rights Reserved. + * + * Qualcomm Atheros Confidential and Proprietary. + * + * Software contained within this file was originally released with the + * following + * copyright and license statement: + * + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + + +/* + * stdlib.c + * Routines from stdlib.h. + * + * Copyright 2004-2012 Qualcomm Atheros, Inc. All Rights Reserved. + * + * Qualcomm Atheros Confidential and Proprietary. + * + * The code for strtol() and strtoul() are also subject to the following: + * + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +drr_alg_utils.h: +/****************************************************************************/ +/*- + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + + +shaper_list_utils.h: +/****************************************************************************/ +/*- + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + + +codel_alg_inv_sqrt.h +/****************************************************************************/ +/*- + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ diff --git a/package/qca/qca-nss-drv/files/nss-firmware/README.md b/package/qca/qca-nss-drv/files/nss-firmware/README.md new file mode 100644 index 000000000..2d0b47508 --- /dev/null +++ b/package/qca/qca-nss-drv/files/nss-firmware/README.md @@ -0,0 +1,10 @@ +NSS FIRMWARE +============ + +This repo contains firmware files to enable the NSS MAC on QCA IPQ806x SoC. + +This product includes software developed by the University of California, +Berkeley and its contributors. + +NSS firmware extracted from Synology RT2600ac SRM 1.2 - Version: 1.2-7742-4 + diff --git a/package/qca/qca-nss-drv/files/nss-firmware/qca-nss0-retail.bin b/package/qca/qca-nss-drv/files/nss-firmware/qca-nss0-retail.bin new file mode 100644 index 000000000..08f6efe6c Binary files /dev/null and b/package/qca/qca-nss-drv/files/nss-firmware/qca-nss0-retail.bin differ diff --git a/package/qca/qca-nss-drv/files/nss-firmware/qca-nss1-retail.bin b/package/qca/qca-nss-drv/files/nss-firmware/qca-nss1-retail.bin new file mode 100644 index 000000000..e79510f34 Binary files /dev/null and b/package/qca/qca-nss-drv/files/nss-firmware/qca-nss1-retail.bin differ diff --git a/package/qca/qca-nss-drv/files/qca-nss-drv.conf b/package/qca/qca-nss-drv/files/qca-nss-drv.conf new file mode 100644 index 000000000..a8a1fbf40 --- /dev/null +++ b/package/qca/qca-nss-drv/files/qca-nss-drv.conf @@ -0,0 +1,6 @@ +config nss_firmware 'qca_nss_0' + +config nss_firmware 'qca_nss_1' + +config general + option enable_rps '1' diff --git a/package/qca/qca-nss-drv/files/qca-nss-drv.debug b/package/qca/qca-nss-drv/files/qca-nss-drv.debug new file mode 100644 index 000000000..5d435c3a7 --- /dev/null +++ b/package/qca/qca-nss-drv/files/qca-nss-drv.debug @@ -0,0 +1,26 @@ +#!/bin/sh /sbin/sysdebug +# +# Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# + +log cat /sys/kernel/debug/qca-nss-drv/stats/pppoe +log cat /sys/kernel/debug/qca-nss-drv/stats/n2h +log cat /sys/kernel/debug/qca-nss-drv/stats/ipv6 +log cat /sys/kernel/debug/qca-nss-drv/stats/ipv4 +log cat /sys/kernel/debug/qca-nss-drv/stats/gmac +log cat /sys/kernel/debug/qca-nss-drv/stats/drv +log cat /sys/kernel/debug/qca-nss-drv/stats/wifi +log cat /sys/kernel/debug/qca-nss-drv/stats/wifi_if +log cat /sys/kernel/debug/qca-nss-drv/stats/eth_rx diff --git a/package/qca/qca-nss-drv/files/qca-nss-drv.hotplug b/package/qca/qca-nss-drv/files/qca-nss-drv.hotplug new file mode 100644 index 000000000..1e4813838 --- /dev/null +++ b/package/qca/qca-nss-drv/files/qca-nss-drv.hotplug @@ -0,0 +1,70 @@ +#!/bin/sh +# +# Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# + +KERNEL=`uname -r` +case "${KERNEL}" in + 3.4*) + select_or_load=load_nss_fw + ;; + *) + select_or_load=select_nss_fw + ;; +esac + +load_nss_fw () { + ls -l $1 | awk ' { print $9,$5 } '> /dev/console + echo 1 > /sys/class/firmware/$DEVICENAME/loading + cat $1 > /sys/class/firmware/$DEVICENAME/data + echo 0 > /sys/class/firmware/$DEVICENAME/loading +} + +select_nss_fw () { + rm -f /lib/firmware/$DEVICENAME + ln -s $1 /lib/firmware/$DEVICENAME + ls -l /lib/firmware/$DEVICENAME | awk ' { print $9,$5 } '> /dev/console +} + +[ "$ACTION" != "add" ] && exit + +# dev name for UCI, since it doesn't let you use . or - +SDEVNAME=$(echo ${DEVICENAME} | sed s/[.-]/_/g) + +SELECTED_FW=$(uci get nss.${SDEVNAME}.firmware 2>/dev/null) +[ -e "${SELECTED_FW}" ] && { + $select_or_load ${SELECTED_FW} + exit +} + +case $DEVICENAME in + qca-nss0* | qca-nss.0*) + if [ -e /lib/firmware/qca-nss0-enterprise.bin ] ; then + $select_or_load /lib/firmware/qca-nss0-enterprise.bin + else + $select_or_load /lib/firmware/qca-nss0-retail.bin + fi + exit + ;; + qca-nss1* | qca-nss.1*) + if [ -e /lib/firmware/qca-nss1-enterprise.bin ] ; then + $select_or_load /lib/firmware/qca-nss1-enterprise.bin + else + $select_or_load /lib/firmware/qca-nss1-retail.bin + fi + exit + ;; +esac + diff --git a/package/qca/qca-nss-drv/files/qca-nss-drv.init b/package/qca/qca-nss-drv/files/qca-nss-drv.init new file mode 100644 index 000000000..de12cb6d1 --- /dev/null +++ b/package/qca/qca-nss-drv/files/qca-nss-drv.init @@ -0,0 +1,50 @@ +#!/bin/sh /etc/rc.common +# +# Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# + +START=70 + +enable_rps() { + irq_nss_rps=`grep nss_queue1 /proc/interrupts | cut -d ':' -f 1 | tr -d ' '` + for entry in $irq_nss_rps + do + echo 2 > /proc/irq/$entry/smp_affinity + done + + irq_nss_rps=`grep nss_queue2 /proc/interrupts | cut -d ':' -f 1 | tr -d ' '` + for entry in $irq_nss_rps + do + echo 4 > /proc/irq/$entry/smp_affinity + done + + irq_nss_rps=`grep nss_queue3 /proc/interrupts | cut -d ':' -f 1 | tr -d ' '` + for entry in $irq_nss_rps + do + echo 8 > /proc/irq/$entry/smp_affinity + done + + # Enable NSS RPS + sysctl -w dev.nss.rps.enable=1 >/dev/null 2>/dev/null + +} + + +start() { + local rps_enabled="$(uci_get nss @general[0] enable_rps)" + if [ "$rps_enabled" -eq 1 ]; then + enable_rps + fi +} diff --git a/package/qca/qca-nss-drv/files/qca-nss-drv.sysctl b/package/qca/qca-nss-drv/files/qca-nss-drv.sysctl new file mode 100644 index 000000000..fc36c33eb --- /dev/null +++ b/package/qca/qca-nss-drv/files/qca-nss-drv.sysctl @@ -0,0 +1,4 @@ +# Default Number of connection configuration +dev.nss.ipv4cfg.ipv4_conn=4096 +dev.nss.ipv6cfg.ipv6_conn=4096 + diff --git a/package/qca/qca-nss-drv/patches/100-kernel-5.4-support.patch b/package/qca/qca-nss-drv/patches/100-kernel-5.4-support.patch new file mode 100644 index 000000000..4268225c3 --- /dev/null +++ b/package/qca/qca-nss-drv/patches/100-kernel-5.4-support.patch @@ -0,0 +1,107 @@ +diff --git a/Makefile b/Makefile +index d998548..b1a4a83 100644 +--- a/Makefile ++++ b/Makefile +@@ -161,7 +161,7 @@ endif + ccflags-y += -I$(obj)/nss_hal/include -I$(obj)/nss_data_plane/include -I$(obj)/exports -DNSS_DEBUG_LEVEL=0 -DNSS_PKT_STATS_ENABLED=1 + + ccflags-y += -DNSS_PM_DEBUG_LEVEL=0 -DNSS_SKB_REUSE_SUPPORT=1 +-ccflags-y += -Werror ++# ccflags-y += -Werror + + ifneq ($(findstring 3.4, $(KERNELVERSION)),) + NSS_CCFLAGS = -DNSS_DT_SUPPORT=0 -DNSS_FW_DBG_SUPPORT=1 -DNSS_PM_SUPPORT=1 -DNSS_EMPTY_BUFFER_SIZE=1984 +diff --git a/nss_core.c b/nss_core.c +index 6c9716a..8956eb5 100644 +--- a/nss_core.c ++++ b/nss_core.c +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + #include "nss_tx_rx_common.h" + #include "nss_data_plane.h" + +@@ -45,7 +46,8 @@ + (((LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0)))) || \ + (((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(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)))))) + #error "Check skb recycle code in this file to match Linux version" + #endif + +@@ -395,7 +397,11 @@ static void nss_get_ddr_info(struct nss_mmu_ddr_info *mmu, char *name) + struct device_node *node; + + si_meminfo(&vals); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)) ++ cached = global_zone_page_state(NR_FILE_PAGES); ++#else + cached = global_page_state(NR_FILE_PAGES); ++#endif /*KERNEL_VERSION(4, 14, 0)*/ + avail_ddr = (vals.totalram + cached + vals.sharedram) * vals.mem_unit; + + /* +@@ -679,7 +685,11 @@ static inline void nss_core_handle_virt_if_pkt(struct nss_ctx_instance *nss_ctx, + * Mimic Linux behavior to allow multi-queue netdev choose which queue to use + */ + if (ndev->netdev_ops->ndo_select_queue) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)) ++ queue_offset = ndev->netdev_ops->ndo_select_queue(ndev, nbuf, NULL); ++#else + queue_offset = ndev->netdev_ops->ndo_select_queue(ndev, nbuf, NULL, NULL); ++#endif /*KERNEL_VERSION(5, 3, 0)*/ + } + + skb_set_queue_mapping(nbuf, queue_offset); +@@ -2269,7 +2279,11 @@ static inline bool nss_skb_can_reuse(struct nss_ctx_instance *nss_ctx, + * This check is added to avoid deadlock from nf_conntrack + * when ecm is trying to flush a rule. + */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) ++ if (unlikely(skb_nfct(nbuf))) { ++#else + if (unlikely(nbuf->nfct)) { ++#endif /*KERNEL_VERSION(4, 11, 0)*/ + return false; + } + #endif +@@ -2279,7 +2285,11 @@ static inline bool nss_skb_can_reuse(struct nss_ctx_instance *nss_ctx, + * This check is added to avoid deadlock from nf_bridge + * when ecm is trying to flush a rule. + */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) ++ if (unlikely(skb_ext_exist(nbuf, SKB_EXT_BRIDGE_NF))) { ++#else + if (unlikely(nbuf->nf_bridge)) { ++#endif /*KERNEL_VERSION(4, 11, 0)*/ + return false; + } + #endif +diff --git a/nss_n2h.c b/nss_n2h.c +index 781ce2b..695ac13 100644 +--- a/nss_n2h.c ++++ b/nss_n2h.c +@@ -19,6 +19,7 @@ + * NSS N2H node APIs + */ + ++#include + #include "nss_tx_rx_common.h" + #include "nss_n2h_stats.h" + + +--- a/nss_data_plane/nss_data_plane_gmac.c ++++ b/nss_data_plane/nss_data_plane_gmac.c +@@ -20,7 +20,7 @@ + #include "nss_tx_rx_common.h" + #include + +-#define NSS_DP_GMAC_SUPPORTED_FEATURES (NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_RXCSUM | NETIF_F_SG | NETIF_F_FRAGLIST | (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_UFO)) ++#define NSS_DP_GMAC_SUPPORTED_FEATURES (NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_RXCSUM | NETIF_F_SG | NETIF_F_FRAGLIST | (NETIF_F_TSO | NETIF_F_TSO6)) + #define NSS_DATA_PLANE_GMAC_MAX_INTERFACES 4 + + static DEFINE_SPINLOCK(nss_data_plane_gmac_stats_lock); diff --git a/package/qca/qca-nss-drv/patches/101-nss-drv-Control-fab-scaling-from-package-Makefile.patch b/package/qca/qca-nss-drv/patches/101-nss-drv-Control-fab-scaling-from-package-Makefile.patch new file mode 100644 index 000000000..b0facc856 --- /dev/null +++ b/package/qca/qca-nss-drv/patches/101-nss-drv-Control-fab-scaling-from-package-Makefile.patch @@ -0,0 +1,38 @@ +From 40d4b080f17883ac6b39c74a5feb1af384ab6a51 Mon Sep 17 00:00:00 2001 +From: Robert Marko +Date: Thu, 11 Jun 2020 16:57:39 +0200 +Subject: [PATCH] nss-drv: Control fab scaling from package Makefile + +Lets control the fab scaling from the package Makefile +instead of using kernel checks that dont work. +Fab scaling in OpenWrt is done in a external way. + +Signed-off-by: Robert Marko +--- + Makefile | 9 --------- + 1 file changed, 9 deletions(-) + +diff --git a/Makefile b/Makefile +index 20729ab..2567dd4 100644 +--- a/Makefile ++++ b/Makefile +@@ -405,15 +405,8 @@ NSS_CCFLAGS = -DNSS_DT_SUPPORT=1 -DNSS_FW_DBG_SUPPORT=0 -DNSS_PM_SUPPORT=0 + ccflags-y += -I$(obj) + endif + +-# Fabric scaling is supported in 3.14 and 4.4 only +-ifneq ($(findstring 3.14, $(KERNELVERSION)),) +-NSS_CCFLAGS += -DNSS_FABRIC_SCALING_SUPPORT=1 +-else ifneq ($(findstring 4.4, $(KERNELVERSION)),) +-NSS_CCFLAGS += -DNSS_FABRIC_SCALING_SUPPORT=1 +-else +-NSS_CCFLAGS += -DNSS_FABRIC_SCALING_SUPPORT=0 +-endif ++NSS_CCFLAGS += -DNSS_FABRIC_SCALING_SUPPORT=0 + + # Disable Frequency scaling + ifeq "$(NSS_FREQ_SCALE_DISABLE)" "y" + ccflags-y += -DNSS_FREQ_SCALE_SUPPORT=0 +-- +2.26.2 + diff --git a/package/qca/qca-nss-drv/patches/200-fix-NULL-pointer-exception.patch b/package/qca/qca-nss-drv/patches/200-fix-NULL-pointer-exception.patch new file mode 100644 index 000000000..3d8bba950 --- /dev/null +++ b/package/qca/qca-nss-drv/patches/200-fix-NULL-pointer-exception.patch @@ -0,0 +1,11 @@ +--- a/nss_core.c ++++ b/nss_core.c +@@ -1599,7 +1599,7 @@ static int32_t nss_core_handle_cause_que + * + */ + if (unlikely((buffer_type == N2H_BUFFER_CRYPTO_RESP))) { +- dma_unmap_single(NULL, (desc->buffer + desc->payload_offs), desc->payload_len, DMA_FROM_DEVICE); ++ dma_unmap_single(nss_ctx->dev, (desc->buffer + desc->payload_offs), desc->payload_len, DMA_FROM_DEVICE); + goto consume; + } + diff --git a/package/qca/qca-nss-drv/patches/201-Fix-Kernel-Panic-dma-with-NULL-dev.patch b/package/qca/qca-nss-drv/patches/201-Fix-Kernel-Panic-dma-with-NULL-dev.patch new file mode 100644 index 000000000..addfef1bb --- /dev/null +++ b/package/qca/qca-nss-drv/patches/201-Fix-Kernel-Panic-dma-with-NULL-dev.patch @@ -0,0 +1,82 @@ +From 89949decfd9a0f86427b502aae4fbc3a3ef399f0 Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Tue, 23 Jun 2020 19:50:28 +0200 +Subject: [PATCH] Fix Kernel Panic dma with NULL dev + +--- + nss_coredump.c | 4 ++-- + nss_log.c | 8 +++++--- + 2 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/nss_coredump.c b/nss_coredump.c +index aa4ba82..957eca0 100644 +--- a/nss_coredump.c ++++ b/nss_coredump.c +@@ -154,7 +154,7 @@ void nss_fw_coredump_notify(struct nss_ctx_instance *nss_own, + 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_ctx_instance *nss_own, + + 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("%p: %s\n", nss_own, nle_print->message); + nle_print++; +diff --git a/nss_log.c b/nss_log.c +index 06ebba4..f9bd6c8 100644 +--- a/nss_log.c ++++ b/nss_log.c +@@ -44,6 +44,7 @@ struct nss_log_data { + uint32_t last_entry; /* Last known sampled entry (or index) */ + uint32_t nentries; /* Caches the total number of entries of log buffer */ + int nss_id; /* NSS Core id being used */ ++ struct device *nss_dev; + }; + + struct nss_log_ring_buffer_addr nss_rbe[NSS_MAX_CORES]; +@@ -125,6 +126,7 @@ static int nss_log_open(struct inode *inode, struct file *filp) + data->last_entry = 0; + data->nentries = nss_rbe[nss_id].nentries; + data->dma_addr = nss_rbe[nss_id].dma_addr; ++ data->nss_dev = nss_ctx->dev; + + /* + * Increment the reference count so that we don't free +@@ -207,7 +209,7 @@ static ssize_t nss_log_read(struct file *filp, char __user *buf, size_t size, lo + /* + * Get the current index + */ +- dma_sync_single_for_cpu(NULL, data->dma_addr, sizeof(struct nss_log_descriptor), DMA_FROM_DEVICE); ++ dma_sync_single_for_cpu(data->nss_dev, data->dma_addr, sizeof(struct nss_log_descriptor), DMA_FROM_DEVICE); + entry = nss_log_current_entry(desc); + + /* +@@ -251,7 +253,7 @@ static ssize_t nss_log_read(struct file *filp, char __user *buf, size_t size, lo + offset = (offset * sizeof(struct nss_log_entry)) + + offsetof(struct nss_log_descriptor, log_ring_buffer); + +- dma_sync_single_for_cpu(NULL, data->dma_addr + offset, ++ dma_sync_single_for_cpu(data->nss_dev, data->dma_addr + offset, + sizeof(struct nss_log_entry), DMA_FROM_DEVICE); + rb = &desc->log_ring_buffer[index]; + +@@ -510,7 +512,7 @@ bool nss_debug_log_buffer_alloc(uint8_t nss_id, uint32_t nentry) + return true; + + fail: +- dma_unmap_single(NULL, dma_addr, size, DMA_FROM_DEVICE); ++ dma_unmap_single(nss_ctx->dev, dma_addr, size, DMA_FROM_DEVICE); + kfree(addr); + wake_up(&nss_log_wq); + return false; +-- +2.27.0 + diff --git a/package/qca/qca-nss-drv/patches/400-Exported-set-nexthop-function.patch b/package/qca/qca-nss-drv/patches/400-Exported-set-nexthop-function.patch new file mode 100644 index 000000000..8c0ffe774 --- /dev/null +++ b/package/qca/qca-nss-drv/patches/400-Exported-set-nexthop-function.patch @@ -0,0 +1,47 @@ +From f8cf061454a3707c0c84d0fca685e84455f91362 Mon Sep 17 00:00:00 2001 +From: Suruchi Suman +Date: Tue, 3 Dec 2019 12:57:38 +0530 +Subject: [qca-nss-drv] Exported set nexhop function from drv. + +Change-Id: I3df6658bef72fe574ac9acfb7aac61785769766f +Signed-off-by: Suruchi Suman +--- + nss_phys_if.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/nss_phys_if.c b/nss_phys_if.c +index 4f9b20f..0c58d95 100644 +--- a/nss_phys_if.c ++++ b/nss_phys_if.c +@@ -1,6 +1,6 @@ + /* + ************************************************************************** +- * Copyright (c) 2014-2019, The Linux Foundation. All rights reserved. ++ * Copyright (c) 2014-2020, The Linux Foundation. All rights reserved. + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all copies. +@@ -583,6 +583,12 @@ nss_tx_status_t nss_phys_if_set_nexthop(struct nss_ctx_instance *nss_ctx, uint32 + struct nss_phys_if_msg nim; + + NSS_VERIFY_CTX_MAGIC(nss_ctx); ++ ++ if (nexthop >= NSS_MAX_NET_INTERFACES) { ++ nss_warning("%p: Invalid nexthop interface number: %d", nss_ctx, nexthop); ++ return NSS_TX_FAILURE_BAD_PARAM; ++ } ++ + nss_info("%p: Phys If nexthop will be set to %d, id:%d\n", nss_ctx, nexthop, if_num); + + nss_cmn_msg_init(&nim.cm, if_num, NSS_PHYS_IF_SET_NEXTHOP, +@@ -591,6 +597,7 @@ nss_tx_status_t nss_phys_if_set_nexthop(struct nss_ctx_instance *nss_ctx, uint32 + + return nss_phys_if_msg_sync(nss_ctx, &nim); + } ++EXPORT_SYMBOL(nss_phys_if_set_nexthop); + + /* + * nss_get_state() +-- +cgit v1.1 + diff --git a/package/qca/qca-nss-ecm/Makefile b/package/qca/qca-nss-ecm/Makefile new file mode 100644 index 000000000..d3f8ac29c --- /dev/null +++ b/package/qca/qca-nss-ecm/Makefile @@ -0,0 +1,270 @@ +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=qca-nss-ecm +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/qca-nss-ecm +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=9228212b4238c0d8c296f795948ede8f2ca0242e + +LOCAL_VARIANT=$(patsubst qca-nss-ecm-%,%,$(patsubst qca-nss-ecm-%,%,$(BUILD_VARIANT))) +include $(INCLUDE_DIR)/package.mk + +ifeq ($(CONFIG_QCA_NSS_ECM_EXAMPLES_PCC),y) + FILES_EXAMPLES=$(PKG_BUILD_DIR)/examples/ecm_pcc_test.ko +endif + +ifeq ($(CONFIG_QCA_NSS_ECM_EXAMPLES_MARK),y) + FILES_EXAMPLES+=$(PKG_BUILD_DIR)/examples/ecm_mark_test.ko +endif + +#Explicitly enable OVS external module, if ovsmgr is enabled. +ifneq ($(CONFIG_PACKAGE_kmod-qca-ovsmgr),) +CONFIG_QCA_NSS_ECM_OVS=y +endif + +ifeq ($(CONFIG_QCA_NSS_ECM_OVS),y) + FILES_EXAMPLES+=$(PKG_BUILD_DIR)/examples/ecm_ovs.ko +endif + +define KernelPackage/qca-nss-ecm/Default + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Support + DEPENDS:=+TARGET_ipq806x:kmod-qca-nss-drv \ + +TARGET_ipq_ipq806x:kmod-qca-nss-drv \ + +TARGET_ipq_ipq807x:kmod-qca-nss-drv \ + +TARGET_ipq_ipq807x_64:kmod-qca-nss-drv \ + +TARGET_ipq807x:kmod-qca-nss-drv \ + +TARGET_ipq807x_64:kmod-qca-nss-drv \ + +TARGET_ipq_ipq60xx:kmod-qca-nss-drv \ + +TARGET_ipq_ipq60xx_64:kmod-qca-nss-drv \ + +TARGET_ipq_ipq50xx:kmod-qca-nss-drv \ + +TARGET_ipq_ipq50xx_64:kmod-qca-nss-drv \ + +iptables-mod-extra +kmod-ipt-conntrack \ + +kmod-pppoe @!LINUX_3_18 \ + +kmod-ipsec + TITLE:=QCA NSS Enhanced Connection Manager (ECM) + FILES:=$(PKG_BUILD_DIR)/*.ko $(FILES_EXAMPLES) + KCONFIG:=CONFIG_BRIDGE_NETFILTER=y \ + CONFIG_NF_CONNTRACK_EVENTS=y \ + CONFIG_NF_CONNTRACK_CHAIN_EVENTS=y \ + CONFIG_NF_CONNTRACK_DSCPREMARK_EXT=y + MENU:=1 + PROVIDES:=kmod-qca-nss-ecm +endef + +define KernelPackage/qca-nss-ecm/Description/Default +This package contains the QCA NSS Enhanced Connection Manager +endef + +define KernelPackage/qca-nss-ecm/Default/install + $(INSTALL_DIR) $(1)/etc/firewall.d $(1)/etc/init.d $(1)/usr/bin $(1)/lib/netifd/offload $(1)/etc/config $(1)/etc/uci-defaults $(1)/etc/sysctl.d + $(INSTALL_DATA) ./files/qca-nss-ecm.firewall $(1)/etc/firewall.d/qca-nss-ecm + $(INSTALL_BIN) ./files/qca-nss-ecm.init $(1)/etc/init.d/qca-nss-ecm + $(INSTALL_BIN) ./files/ecm_dump.sh $(1)/usr/bin/ + $(INSTALL_BIN) ./files/on-demand-down $(1)/lib/netifd/offload/on-demand-down + $(INSTALL_DATA) ./files/qca-nss-ecm.uci $(1)/etc/config/ecm + $(INSTALL_DATA) ./files/qca-nss-ecm.defaults $(1)/etc/uci-defaults/99-qca-nss-ecm + $(INSTALL_BIN) ./files/qca-nss-ecm.sysctl $(1)/etc/sysctl.d/qca-nss-ecm.conf +ifeq ($(CONFIG_KERNEL_IPQ_MEM_PROFILE),256) + echo 'net.netfilter.nf_conntrack_max=2048' >> $(1)/etc/sysctl.d/qca-nss-ecm.conf +endif +ifeq ($(CONFIG_KERNEL_IPQ_MEM_PROFILE),512) + echo 'net.netfilter.nf_conntrack_max=8192' >> $(1)/etc/sysctl.d/qca-nss-ecm.conf +endif +endef + +define KernelPackage/qca-nss-ecm-standard + $(call KernelPackage/qca-nss-ecm/Default) + VARIANT:=standard +endef + +define KernelPackage/qca-nss-ecm-standard/Description + $(call KernelPackage/qca-nss-ecm/Description/Default) +endef + +define KernelPackage/qca-nss-ecm-standard/install +$(call KernelPackage/qca-nss-ecm/Default/install, $(1)) +endef + +# Variant with additional features enabled for premium profile +define KernelPackage/qca-nss-ecm-premium/Default +$(call KernelPackage/qca-nss-ecm/Default) + TITLE+= (with premium features) + VARIANT:=premium + DEPENDS+=+kmod-nat46 \ + +kmod-l2tp +kmod-pppol2tp +kmod-pptp \ + +kmod-bonding +endef + +define KernelPackage/qca-nss-ecm-premium/Description/Default +$(call KernelPackage/qca-nss-ecm/Description/Default) +with the premium features enabled +endef + +define KernelPackage/qca-nss-ecm-premium/Default/install +$(call KernelPackage/qca-nss-ecm/install) +endef + +define KernelPackage/qca-nss-ecm-premium +$(call KernelPackage/qca-nss-ecm-premium/Default) +endef + +define KernelPackage/qca-nss-ecm-premium/Description +$(call KernelPackage/qca-nss-ecm-premium/Description/Default) +endef + +define KernelPackage/qca-nss-ecm-premium/install +$(call KernelPackage/qca-nss-ecm-standard/install, $(1)) +endef + +# Variant with additional features enabled for noload profile +define KernelPackage/qca-nss-ecm-noload + $(call KernelPackage/qca-nss-ecm/Default) + TITLE+= (with noload features) + PROVIDES:=kmod-qca-nss-ecm + VARIANT:=noload + DEPENDS+=+kmod-l2tp +kmod-pppol2tp +kmod-pptp \ + +kmod-bonding +endef + +define KernelPackage/qca-nss-ecm-noload/Description + $(call KernelPackage/qca-nss-ecm/Description/Default) + When selected, this package installs the driver but does not load it at init. +endef + +define KernelPackage/qca-nss-ecm-noload/install +$(call KernelPackage/qca-nss-ecm/Default/install, $(1)) + # + # Remove the START line from the init script, so that the symlink + # in the /etc/rc.d directory is not created. + # + sed -i '/START=/d' $(1)/etc/init.d/qca-nss-ecm +endef + +define KernelPackage/qca-nss-ecm-premium-noload + $(call KernelPackage/qca-nss-ecm-premium/Default) + PROVIDES:=kmod-qca-nss-ecm-premium +endef + +define KernelPackage/qca-nss-ecm-premium-noload/Description + $(call KernelPackage/qca-nss-ecm-premium/Description/Default) + When selected, this package installs the driver but does not load it at init. +endef + +define KernelPackage/qca-nss-ecm-premium-noload/install +$(call KernelPackage/qca-nss-ecm-premium/Default/install, $(1)) +endef + +define Build/InstallDev/qca-nss-ecm + $(INSTALL_DIR) $(1)/usr/include/qca-nss-ecm + $(CP) $(PKG_BUILD_DIR)/exports/* $(1)/usr/include/qca-nss-ecm/ +endef + +define Build/InstallDev + $(call Build/InstallDev/qca-nss-ecm,$(1)) +endef + +EXTRA_CFLAGS+= \ + -I$(STAGING_DIR)/usr/include/hyfibr \ + -I$(STAGING_DIR)/usr/include/qca-mcs \ + -I$(STAGING_DIR)/usr/include/qca-nss-drv \ + -I$(STAGING_DIR)/usr/include/shortcut-fe \ + -I$(STAGING_DIR)/usr/include/nat46 + +ECM_MAKE_OPTS:=ECM_CLASSIFIER_HYFI_ENABLE=y +ifneq ($(LOCAL_VARIANT),standard) +ECM_MAKE_OPTS+=ECM_MULTICAST_ENABLE=y \ + ECM_INTERFACE_IPSEC_ENABLE=y \ + # ECM_INTERFACE_PPTP_ENABLE=y \ + ECM_INTERFACE_L2TPV2_ENABLE=y \ + ECM_INTERFACE_GRE_TAP_ENABLE=y \ + ECM_INTERFACE_GRE_TUN_ENABLE=y \ + ECM_INTERFACE_SIT_ENABLE=y \ + ECM_INTERFACE_TUNIPIP6_ENABLE=y \ + ECM_INTERFACE_RAWIP_ENABLE=y + +ifeq ($(CONFIG_TARGET_ipq_ipq40xx)$(CONFIG_TARGET_ipq40xx),) +ECM_MAKE_OPTS+=ECM_INTERFACE_BOND_ENABLE=y +endif +endif + +ifeq ($(filter $(CONFIG_KERNEL_IPQ_MEM_PROFILE), 256),) +ECM_MAKE_OPTS+=ECM_XFRM_ENABLE=y +endif + +# ifneq ($(CONFIG_PACKAGE_kmod-nat46),) +# ECM_MAKE_OPTS+=ECM_INTERFACE_MAP_T_ENABLE=y +# endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-ovpn-link),) +ECM_MAKE_OPTS+=ECM_INTERFACE_OVPN_ENABLE=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-vxlanmgr),) +ECM_MAKE_OPTS+=ECM_INTERFACE_VXLAN_ENABLE=y +endif + +ifneq ($(CONFIG_PACKAGE_kmod-qca-ovsmgr),) +ECM_MAKE_OPTS+=ECM_INTERFACE_OVS_BRIDGE_ENABLE=y \ + ECM_CLASSIFIER_OVS_ENABLE=y +EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/qca-ovsmgr +endif + +# Keeping default as ipq806x for branches that does not have subtarget framework +ifeq ($(CONFIG_TARGET_ipq),y) +subtarget:=$(SUBTARGET) +else +subtarget:=$(CONFIG_TARGET_BOARD) +endif + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/qca-nss-ecm + $(CP) $(PKG_BUILD_DIR)/exports/* $(1)/usr/include/qca-nss-ecm +endef + +define Build/Compile + $(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" $(strip $(ECM_MAKE_OPTS)) \ + $(KERNEL_MAKE_FLAGS) \ + $(PKG_MAKE_FLAGS) \ + M="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS)" SoC="$(subtarget)" \ + EXAMPLES_BUILD_PCC="$(CONFIG_QCA_NSS_ECM_EXAMPLES_PCC)" \ + EXAMPLES_BUILD_MARK="$(CONFIG_QCA_NSS_ECM_EXAMPLES_MARK)" \ + EXAMPLES_BUILD_OVS="$(CONFIG_QCA_NSS_ECM_OVS)" \ + ECM_FRONT_END_SFE_ENABLE="$(CONFIG_QCA_ECM_SFE_SUPPORT)" \ + modules +endef + +define KernelPackage/qca-nss-ecm-premium/config +menu "ECM Configuration" + config QCA_NSS_ECM_EXAMPLES_PCC + bool "Build PCC usage example" + help + Selecting this will build the PCC classifier usage example module. + default n + + config QCA_NSS_ECM_EXAMPLES_MARK + bool "Build Mark classifier usage example" + help + Selecting this will build the Mark classifier usage example module. + default n + + config QCA_NSS_ECM_OVS + bool "Build OVS classifier external module" + help + Selecting this will build the OVS classifier external module. + default n + + config QCA_ECM_SFE_SUPPORT + bool "Add SFE support to ECM driver" + default n +endmenu +endef + +$(eval $(call KernelPackage,qca-nss-ecm-noload)) +$(eval $(call KernelPackage,qca-nss-ecm-standard)) +$(eval $(call KernelPackage,qca-nss-ecm-premium-noload)) +$(eval $(call KernelPackage,qca-nss-ecm-premium)) diff --git a/package/qca/qca-nss-ecm/files/ecm_dump.sh b/package/qca/qca-nss-ecm/files/ecm_dump.sh new file mode 100644 index 000000000..dbf7de753 --- /dev/null +++ b/package/qca/qca-nss-ecm/files/ecm_dump.sh @@ -0,0 +1,95 @@ +#!/bin/sh +# +# Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# + +ECM_MODULE=${1:-ecm_state} +MOUNT_ROOT=/dev/ecm + +# +# usage: ecm_dump.sh [module=ecm_db] +# +# with no parameters, ecm_dump.sh will attempt to mount the +# ecm_db state file and cat its contents. +# +# example with a parameter: ecm_dump.sh ecm_classifier_default +# +# this will cause ecm_dump to attempt to find and mount the state +# file for the ecm_classifier_default module, and if successful +# cat the contents. +# + +# this is one of the state files, which happens to be the +# last module started in ecm +ECM_STATE=/sys/kernel/debug/ecm/ecm_state/state_dev_major + +# tests to see if ECM is up and ready to receive commands. +# returns 0 if ECM is fully up and ready, else 1 +ecm_is_ready() { + if [ ! -e "${ECM_STATE}" ] + then + return 1 + fi + return 0 +} + +# +# module_state_mount(module_name) +# Mounts the state file of the module, if supported +# +module_state_mount() { + local module_name=$1 + local mount_dir=$2 + local state_file="/sys/kernel/debug/ecm/${module_name}/state_dev_major" + + if [ -e "${mount_dir}/${module_name}" ] + then + # already mounted + return 0 + fi + + #echo "Mount state file for $module_name ..." + if [ ! -e "$state_file" ] + then + #echo "... $module_name does not support state" + return 1 + fi + + local major="`cat $state_file`" + #echo "... Mounting state $state_file with major: $major" + mknod "${mount_dir}/${module_name}" c $major 0 +} + +# +# main +# +ecm_is_ready || { + #echo "ECM is not running" + exit 1 +} + +# all state files are mounted under MOUNT_ROOT, so make sure it exists +mkdir -p ${MOUNT_ROOT} + +# +# attempt to mount state files for the requested module and cat it +# if the mount succeeded +# +module_state_mount ${ECM_MODULE} ${MOUNT_ROOT} && { + cat ${MOUNT_ROOT}/${ECM_MODULE} + exit 0 +} + +exit 2 diff --git a/package/qca/qca-nss-ecm/files/on-demand-down b/package/qca/qca-nss-ecm/files/on-demand-down new file mode 100644 index 000000000..02d708e03 --- /dev/null +++ b/package/qca/qca-nss-ecm/files/on-demand-down @@ -0,0 +1,6 @@ +#!/bin/sh +# Copyright (c) 2016 The Linux Foundation. All rights reserved. + +[ -e "/sys/kernel/debug/ecm/ecm_db/defunct_all" ] && { + echo 1 > /sys/kernel/debug/ecm/ecm_db/defunct_all +} diff --git a/package/qca/qca-nss-ecm/files/qca-nss-ecm.defaults b/package/qca/qca-nss-ecm/files/qca-nss-ecm.defaults new file mode 100644 index 000000000..308e265c9 --- /dev/null +++ b/package/qca/qca-nss-ecm/files/qca-nss-ecm.defaults @@ -0,0 +1,28 @@ +#!/bin/sh +# +# Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# + +uci -q batch << EOF + delete firewall.qcanssecm + set firewall.qcanssecm=include + set firewall.qcanssecm.type=script + set firewall.qcanssecm.path=/etc/firewall.d/qca-nss-ecm + set firewall.qcanssecm.family=any + set firewall.qcanssecm.reload=1 + commit firewall +EOF + +exit 0 diff --git a/package/qca/qca-nss-ecm/files/qca-nss-ecm.firewall b/package/qca/qca-nss-ecm/files/qca-nss-ecm.firewall new file mode 100644 index 000000000..24c64def2 --- /dev/null +++ b/package/qca/qca-nss-ecm/files/qca-nss-ecm.firewall @@ -0,0 +1,18 @@ +#!/bin/sh +# +# Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# + +iptables -A FORWARD -m physdev --physdev-is-bridged -j ACCEPT diff --git a/package/qca/qca-nss-ecm/files/qca-nss-ecm.init b/package/qca/qca-nss-ecm/files/qca-nss-ecm.init new file mode 100644 index 000000000..9b43fdb09 --- /dev/null +++ b/package/qca/qca-nss-ecm/files/qca-nss-ecm.init @@ -0,0 +1,118 @@ +#!/bin/sh /etc/rc.common +# +# Copyright (c) 2014, 2019 The Linux Foundation. All rights reserved. +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +# The shebang above has an extra space intentially to avoid having +# openwrt build scripts automatically enable this package starting +# at boot. + +START=19 + +get_front_end_mode() { + config_load "ecm" + config_get front_end global acceleration_engine "auto" + + case $front_end in + auto) + echo '0' + ;; + nss) + echo '1' + ;; + sfe) + echo '2' + ;; + *) + echo 'uci_option_acceleration_engine is invalid' + esac +} + +support_bridge() { + #NSS support bridge acceleration + [ -d /sys/kernel/debug/ecm/ecm_nss_ipv4 ] && return 0 + #SFE doesn't support bridge acceleration + [ -d /sys/kernel/debug/ecm/ecm_sfe_ipv4 ] && return 1 +} + +load_sfe() { + [ -d /sys/module/shortcut_fe ] || insmod shortcut-fe + [ -d /sys/module/shortcut_fe_ipv6 ] || insmod shortcut-fe-ipv6 + [ -d /sys/module/shortcut_fe_drv ] || insmod shortcut-fe-drv +} + +load_ecm() { + [ -d /sys/module/ecm ] || { + [ ! -e /proc/device-tree/MP_256 ] && load_sfe + insmod ecm front_end_selection=$(get_front_end_mode) + } + + support_bridge && { + sysctl -w net.bridge.bridge-nf-call-ip6tables=1 + sysctl -w net.bridge.bridge-nf-call-iptables=1 + } +} + +unload_ecm() { + sysctl -w net.bridge.bridge-nf-call-ip6tables=0 + sysctl -w net.bridge.bridge-nf-call-iptables=0 + + if [ -d /sys/module/ecm ]; then + # + # Stop ECM frontends + # + echo 1 > /sys/kernel/debug/ecm/front_end_ipv4_stop + echo 1 > /sys/kernel/debug/ecm/front_end_ipv6_stop + + # + # Defunct the connections + # + echo 1 > /sys/kernel/debug/ecm/ecm_db/defunct_all + sleep 5; + + rmmod ecm + sleep 1 + fi +} + +start() { + load_ecm + + # If the acceleration engine is NSS, enable wifi redirect. + [ -d /sys/kernel/debug/ecm/ecm_nss_ipv4 ] && sysctl -w dev.nss.general.redirect=1 + + support_bridge && { + echo 'net.bridge.bridge-nf-call-ip6tables=1' >> /etc/sysctl.d/qca-nss-ecm.conf + echo 'net.bridge.bridge-nf-call-iptables=1' >> /etc/sysctl.d/qca-nss-ecm.conf + } + + if [ -d /sys/module/qca_ovsmgr ]; then + insmod ecm_ovs + fi + +} + +stop() { + # If the acceleration engine is NSS, disable wifi redirect. + [ -d /sys/kernel/debug/ecm/ecm_nss_ipv4 ] && sysctl -w dev.nss.general.redirect=0 + + sed '/net.bridge.bridge-nf-call-ip6tables=1/d' -i /etc/sysctl.d/qca-nss-ecm.conf + sed '/net.bridge.bridge-nf-call-iptables=1/d' -i /etc/sysctl.d/qca-nss-ecm.conf + + if [ -d /sys/module/ecm_ovs ]; then + rmmod ecm_ovs + fi + + unload_ecm +} diff --git a/package/qca/qca-nss-ecm/files/qca-nss-ecm.sysctl b/package/qca/qca-nss-ecm/files/qca-nss-ecm.sysctl new file mode 100644 index 000000000..1a3d76b18 --- /dev/null +++ b/package/qca/qca-nss-ecm/files/qca-nss-ecm.sysctl @@ -0,0 +1,2 @@ +# nf_conntrack_tcp_no_window_check is 0 by default, set it to 1 +net.netfilter.nf_conntrack_tcp_no_window_check=1 diff --git a/package/qca/qca-nss-ecm/files/qca-nss-ecm.uci b/package/qca/qca-nss-ecm/files/qca-nss-ecm.uci new file mode 100644 index 000000000..4f2de6877 --- /dev/null +++ b/package/qca/qca-nss-ecm/files/qca-nss-ecm.uci @@ -0,0 +1,2 @@ +config ecm 'global' + option acceleration_engine 'auto' diff --git a/package/qca/qca-nss-ecm/patches/001-Drop_SFE_from_ecm.patch b/package/qca/qca-nss-ecm/patches/001-Drop_SFE_from_ecm.patch new file mode 100644 index 000000000..b1cd2b7b1 --- /dev/null +++ b/package/qca/qca-nss-ecm/patches/001-Drop_SFE_from_ecm.patch @@ -0,0 +1,12 @@ +--- a/Makefile ++++ b/Makefile +@@ -66,8 +66,7 @@ endif + # Define ECM_FRONT_END_SFE_ENABLE=y in order to select + # sfe as ECM's front end. + # ############################################################################# +-ifeq ($(SoC),$(filter $(SoC),ipq806x ipq40xx)) +-ECM_FRONT_END_SFE_ENABLE=y ++ifeq ($(ECM_FRONT_END_SFE_ENABLE), y) + ecm-$(ECM_FRONT_END_SFE_ENABLE) += frontends/sfe/ecm_sfe_ipv4.o + ecm-$(ECM_FRONT_END_SFE_ENABLE) += frontends/sfe/ecm_sfe_ported_ipv4.o + ccflags-$(ECM_FRONT_END_SFE_ENABLE) += -DECM_FRONT_END_SFE_ENABLE diff --git a/package/qca/qca-nss-ecm/patches/100-kernel-5.4-support.patch b/package/qca/qca-nss-ecm/patches/100-kernel-5.4-support.patch new file mode 100644 index 000000000..b863ad7e0 --- /dev/null +++ b/package/qca/qca-nss-ecm/patches/100-kernel-5.4-support.patch @@ -0,0 +1,1276 @@ +--- a/ecm_classifier_default.c ++++ b/ecm_classifier_default.c +@@ -42,7 +42,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_classifier_dscp.c ++++ b/ecm_classifier_dscp.c +@@ -41,7 +41,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_classifier_hyfi.c ++++ b/ecm_classifier_hyfi.c +@@ -41,7 +41,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_classifier_nl.c ++++ b/ecm_classifier_nl.c +@@ -41,7 +41,6 @@ + #include + #include + #include +-#include + #if (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 2, 0)) + #include + #else +@@ -146,12 +145,42 @@ static struct genl_multicast_group ecm_c + }, + }; + ++static int ecm_classifier_nl_genl_msg_ACCEL(struct sk_buff *skb, struct genl_info *info); ++static int ecm_classifier_nl_genl_msg_DUMP(struct sk_buff *skb, struct netlink_callback *cb); ++ ++/* ++ * Generic Netlink message-to-handler mapping ++ */ ++static struct genl_ops ecm_cl_nl_genl_ops[] = { ++ { ++ .cmd = ECM_CL_NL_GENL_CMD_ACCEL, ++ .flags = 0, ++ .doit = ecm_classifier_nl_genl_msg_ACCEL, ++ .dumpit = NULL, ++ }, ++ { ++ .cmd = ECM_CL_NL_GENL_CMD_ACCEL_OK, ++ .flags = 0, ++ .doit = NULL, ++ .dumpit = ecm_classifier_nl_genl_msg_DUMP, ++ }, ++ { ++ .cmd = ECM_CL_NL_GENL_CMD_CONNECTION_CLOSED, ++ .flags = 0, ++ .doit = NULL, ++ .dumpit = ecm_classifier_nl_genl_msg_DUMP, ++ }, ++}; ++ + static struct genl_family ecm_cl_nl_genl_family = { +- .id = GENL_ID_GENERATE, + .hdrsize = 0, + .name = ECM_CL_NL_GENL_NAME, + .version = ECM_CL_NL_GENL_VERSION, + .maxattr = ECM_CL_NL_GENL_ATTR_MAX, ++ .ops = ecm_cl_nl_genl_ops, ++ .n_ops = ARRAY_SIZE(ecm_cl_nl_genl_ops), ++ .mcgrps = ecm_cl_nl_genl_mcgrp, ++ .n_mcgrps = ARRAY_SIZE(ecm_cl_nl_genl_mcgrp), + }; + + /* +@@ -215,12 +244,7 @@ ecm_classifier_nl_send_genl_msg(enum ECM + return ret; + } + +- ret = genlmsg_end(skb, msg_head); +- if (ret < 0) { +- DEBUG_WARN("failed to finalize genl msg: %d\n", ret); +- nlmsg_free(skb); +- return ret; +- } ++ genlmsg_end(skb, msg_head); + + /* genlmsg_multicast frees the skb in both success and error cases */ + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0) +@@ -1377,85 +1401,14 @@ static struct file_operations ecm_classi + .write = ecm_classifier_nl_set_command, + }; + +-/* +- * Generic Netlink attr checking policies +- */ +-static struct nla_policy +-ecm_cl_nl_genl_policy[ECM_CL_NL_GENL_ATTR_COUNT] = { +- [ECM_CL_NL_GENL_ATTR_TUPLE] = { +- .type = NLA_UNSPEC, +- .len = sizeof(struct ecm_cl_nl_genl_attr_tuple), }, +-}; +- +-/* +- * Generic Netlink message-to-handler mapping +- */ +-static struct genl_ops ecm_cl_nl_genl_ops[] = { +- { +- .cmd = ECM_CL_NL_GENL_CMD_ACCEL, +- .flags = 0, +- .policy = ecm_cl_nl_genl_policy, +- .doit = ecm_classifier_nl_genl_msg_ACCEL, +- .dumpit = NULL, +- }, +- { +- .cmd = ECM_CL_NL_GENL_CMD_ACCEL_OK, +- .flags = 0, +- .policy = ecm_cl_nl_genl_policy, +- .doit = NULL, +- .dumpit = ecm_classifier_nl_genl_msg_DUMP, +- }, +- { +- .cmd = ECM_CL_NL_GENL_CMD_CONNECTION_CLOSED, +- .flags = 0, +- .policy = ecm_cl_nl_genl_policy, +- .doit = NULL, +- .dumpit = ecm_classifier_nl_genl_msg_DUMP, +- }, +-}; +- + static int ecm_classifier_nl_register_genl(void) + { + int result; + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0) +- result = genl_register_family_with_ops_groups(&ecm_cl_nl_genl_family, +- ecm_cl_nl_genl_ops, +- ecm_cl_nl_genl_mcgrp); +- if (result != 0) { +- DEBUG_ERROR("failed to register genl ops: %d\n", result); +- return result; +- } +-#else + result = genl_register_family(&ecm_cl_nl_genl_family); +- if (result != 0) { ++ if (result != 0) + DEBUG_ERROR("failed to register genl family: %d\n", result); +- goto err1; +- } +- +- result = genl_register_ops(&ecm_cl_nl_genl_family, +- ecm_cl_nl_genl_ops); +- if (result != 0) { +- DEBUG_ERROR("failed to register genl ops: %d\n", result); +- goto err2; +- } +- +- result = genl_register_mc_group(&ecm_cl_nl_genl_family, +- ecm_cl_nl_genl_mcgrp); +- if (result != 0) { +- DEBUG_ERROR("failed to register genl multicast group: %d\n", +- result); +- goto err3; +- } +- +- return 0; + +-err3: +- genl_unregister_ops(&ecm_cl_nl_genl_family, ecm_cl_nl_genl_ops); +-err2: +- genl_unregister_family(&ecm_cl_nl_genl_family); +-err1: +-#endif + return result; + } + +--- a/ecm_classifier_pcc.c ++++ b/ecm_classifier_pcc.c +@@ -49,7 +49,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_conntrack_notifier.c ++++ b/ecm_conntrack_notifier.c +@@ -51,7 +51,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -345,14 +344,6 @@ static int ecm_conntrack_event(unsigned + return NOTIFY_DONE; + } + +- /* +- * Special untracked connection is not monitored +- */ +- if (ct == &nf_conntrack_untracked) { +- DEBUG_TRACE("Fake connection event - ignoring\n"); +- return NOTIFY_DONE; +- } +- + /* + * Only interested if this is IPv4 or IPv6. + */ +--- a/ecm_db/ecm_db.c ++++ b/ecm_db/ecm_db.c +@@ -42,7 +42,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_db/ecm_db_connection.c ++++ b/ecm_db/ecm_db_connection.c +@@ -41,7 +41,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_db/ecm_db_host.c ++++ b/ecm_db/ecm_db_host.c +@@ -41,7 +41,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_db/ecm_db_iface.c ++++ b/ecm_db/ecm_db_iface.c +@@ -41,7 +41,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_db/ecm_db_listener.c ++++ b/ecm_db/ecm_db_listener.c +@@ -41,7 +41,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_db/ecm_db_mapping.c ++++ b/ecm_db/ecm_db_mapping.c +@@ -41,7 +41,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_db/ecm_db_multicast.c ++++ b/ecm_db/ecm_db_multicast.c +@@ -42,7 +42,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_db/ecm_db_node.c ++++ b/ecm_db/ecm_db_node.c +@@ -41,7 +41,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_db/ecm_db_timer.c ++++ b/ecm_db/ecm_db_timer.c +@@ -42,7 +42,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -387,7 +386,7 @@ EXPORT_SYMBOL(ecm_db_time_get); + * Manage expiration of connections + * NOTE: This is softirq context + */ +-static void ecm_db_timer_callback(unsigned long data) ++static void ecm_db_timer_callback(struct timer_list *arg) + { + uint32_t timer; + +@@ -425,9 +424,7 @@ void ecm_db_timer_init(void) + /* + * Set a timer to manage cleanup of expired connections + */ +- init_timer(&ecm_db_timer); +- ecm_db_timer.function = ecm_db_timer_callback; +- ecm_db_timer.data = 0; ++ timer_setup(&ecm_db_timer, ecm_db_timer_callback, 0); + ecm_db_timer.expires = jiffies + HZ; + add_timer(&ecm_db_timer); + +--- a/ecm_interface.c ++++ b/ecm_interface.c +@@ -66,7 +66,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -537,7 +536,7 @@ static bool ecm_interface_find_gateway_ipv4(ip_addr_t addr, ip_addr_t gw_addr) + return false; + } + +- ECM_NIN4_ADDR_TO_IP_ADDR(gw_addr, rt->rt_gateway) ++ ECM_NIN4_ADDR_TO_IP_ADDR(gw_addr, rt->rt_gw4) + ecm_interface_route_release(&ecm_rt); + return true; + } +@@ -596,7 +595,7 @@ static bool ecm_interface_mac_addr_get_ipv4(ip_addr_t addr, uint8_t *mac_addr, b + if (rt->rt_uses_gateway || (rt->rt_flags & RTF_GATEWAY)) { + #endif + *on_link = false; +- ECM_NIN4_ADDR_TO_IP_ADDR(gw_addr, rt->rt_gateway) ++ ECM_NIN4_ADDR_TO_IP_ADDR(gw_addr, rt->rt_gw4) + } else { + *on_link = true; + } +@@ -1003,7 +1002,7 @@ static bool ecm_interface_find_route_by_addr_ipv6(ip_addr_t addr, struct ecm_int + * Get a route to the given IP address, this will allow us to also find the interface + * it is using to communicate with that IP address. + */ +- ecm_rt->rt.rtv6 = rt6_lookup(&init_net, &naddr, NULL, 0, 0); ++ ecm_rt->rt.rtv6 = rt6_lookup(&init_net, &naddr, NULL, 0, NULL, 0); + if (!ecm_rt->rt.rtv6) { + DEBUG_TRACE("No output route to: " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(addr)); + return NULL; +@@ -1077,7 +1076,7 @@ void ecm_interface_send_neighbour_solicitation(struct net_device *dev, ip_addr_t + /* + * Find the route entry + */ +- rt6i = rt6_lookup(netf, &dst_addr, NULL, 0, 0); ++ rt6i = rt6_lookup(netf, &dst_addr, NULL, 0, NULL, 0); + if (!rt6i) { + DEBUG_TRACE("IPv6 Route lookup failure for destination IPv6 address " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(addr)); + return; +@@ -1104,7 +1103,7 @@ void ecm_interface_send_neighbour_solicitation(struct net_device *dev, ip_addr_t + #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0)) + ndisc_send_ns(dev, neigh, &dst_addr, &mc_dst_addr, &src_addr); + #else +- ndisc_send_ns(dev, &dst_addr, &mc_dst_addr, &src_addr); ++ ndisc_send_ns(dev, &dst_addr, &mc_dst_addr, &src_addr, 0); + #endif + neigh_release(neigh); + dst_release(&rt6i->dst); +@@ -1194,7 +1193,7 @@ struct neighbour *ecm_interface_ipv6_neigh_get(ip_addr_t addr) + struct in6_addr ipv6_addr; + + ECM_IP_ADDR_TO_NIN6_ADDR(ipv6_addr, addr); +- rt = rt6_lookup(&init_net, &ipv6_addr, NULL, 0, 0); ++ rt = rt6_lookup(&init_net, &ipv6_addr, NULL, 0, NULL, 0); + if (!rt) { + return NULL; + } +@@ -1220,7 +1219,7 @@ bool ecm_interface_is_pptp(struct sk_buff *skb, const struct net_device *out) + * skip first pass of l2tp/pptp tunnel encapsulated traffic + */ + if (out->type == ARPHRD_PPP) { +- if (out->priv_flags & IFF_PPP_PPTP) { ++ if (out->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_PPTP) { + return true; + } + } +@@ -1231,7 +1230,7 @@ bool ecm_interface_is_pptp(struct sk_buff *skb, const struct net_device *out) + } + + if (in->type == ARPHRD_PPP) { +- if (in->priv_flags & IFF_PPP_PPTP) { ++ if (in->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_PPTP) { + dev_put(in); + return true; + } +@@ -1256,10 +1255,10 @@ bool ecm_interface_is_l2tp_packet_by_version(struct sk_buff *skb, const struct n + + switch (ver) { + case 2: +- flag = IFF_PPP_L2TPV2; ++ flag = IFF_QCA_ECM_PPP_L2TPV2; + break; + case 3: +- flag = IFF_PPP_L2TPV3; ++ flag = IFF_QCA_ECM_PPP_L2TPV3; + break; + default: + break; +@@ -1268,10 +1267,8 @@ bool ecm_interface_is_l2tp_packet_by_version(struct sk_buff *skb, const struct n + /* + * skip first pass of l2tp/pptp tunnel encapsulated traffic + */ +- if (out->type == ARPHRD_PPP) { +- if (out->priv_flags & flag) { +- return true; +- } ++ if (out->priv_flags_qca_ecm & flag) { ++ return true; + } + + in = dev_get_by_index(&init_net, skb->skb_iif); +@@ -1279,11 +1276,9 @@ bool ecm_interface_is_l2tp_packet_by_version(struct sk_buff *skb, const struct n + return true; + } + +- if (in->type == ARPHRD_PPP) { +- if (in->priv_flags & flag) { +- dev_put(in); +- return true; +- } ++ if (out->priv_flags_qca_ecm & flag) { ++ dev_put(in); ++ return true; + } + + dev_put(in); +@@ -1304,11 +1299,9 @@ bool ecm_interface_is_l2tp_pptp(struct sk_buff *skb, const struct net_device *ou + /* + * skip first pass of l2tp/pptp tunnel encapsulated traffic + */ +- if (out->type == ARPHRD_PPP) { +- if (out->priv_flags & (IFF_PPP_L2TPV2 | IFF_PPP_L2TPV3 | +- IFF_PPP_PPTP)) { +- return true; +- } ++ if (out->priv_flags_qca_ecm & (IFF_QCA_ECM_PPP_L2TPV2 | IFF_QCA_ECM_PPP_L2TPV3 | ++ IFF_QCA_ECM_PPP_PPTP)) { ++ return true; + } + + in = dev_get_by_index(&init_net, skb->skb_iif); +@@ -1316,12 +1309,10 @@ bool ecm_interface_is_l2tp_pptp(struct sk_buff *skb, const struct net_device *ou + return true; + } + +- if (in->type == ARPHRD_PPP) { +- if (in->priv_flags & (IFF_PPP_L2TPV2 | IFF_PPP_L2TPV3 | +- IFF_PPP_PPTP)) { +- dev_put(in); +- return true; +- } ++ if (out->priv_flags_qca_ecm & (IFF_QCA_ECM_PPP_L2TPV2 | IFF_QCA_ECM_PPP_L2TPV3 | ++ IFF_QCA_ECM_PPP_PPTP)) { ++ dev_put(in); ++ return true; + } + + dev_put(in); +@@ -2416,7 +2407,7 @@ struct ecm_db_iface_instance *ecm_interface_establish_and_ref(struct ecm_front_e + /* + * GRE TAP? + */ +- if (dev->priv_flags & (IFF_GRE_V4_TAP | IFF_GRE_V6_TAP)) { ++ if (dev->priv_flags_qca_ecm & (IFF_QCA_ECM_GRE_V4_TAP | IFF_QCA_ECM_GRE_V6_TAP)) { + interface_type = feci->ae_interface_type_get(feci, dev); + ae_interface_num = feci->ae_interface_number_by_dev_type_get(dev, interface_type); + +@@ -2680,7 +2671,7 @@ identifier_update: + /* + * OVPN Tunnel? + */ +- if ((dev_type == ARPHRD_NONE) && (dev->priv_flags & IFF_TUN_TAP)) { ++ if ((dev_type == ARPHRD_NONE) && (dev->priv_flags_qca_ecm & IFF_QCA_ECM_TUN_TAP)) { + struct net_device *tun_dev = NULL; + ip_addr_t saddr, daddr; + +@@ -2746,7 +2737,7 @@ identifier_update: + * ppp_is_multilink() and ppp_hold_channels() which acquire same lock + */ + +- if ((dev->priv_flags & IFF_PPP_L2TPV2) && ppp_is_xmit_locked(dev)) { ++ if ((dev->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_L2TPV2) && ppp_is_xmit_locked(dev)) { + if (skb && (skb->skb_iif == dev->ifindex)) { + struct pppol2tp_common_addr info; + +@@ -2804,7 +2795,7 @@ identifier_update: + #endif + + #ifdef ECM_INTERFACE_PPTP_ENABLE +- if ((protocol == IPPROTO_GRE) && skb && v4_hdr && (dev->priv_flags & IFF_PPP_PPTP)) { ++ if ((protocol == IPPROTO_GRE) && skb && v4_hdr && (dev->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_PPTP)) { + struct gre_hdr_pptp *gre_hdr; + uint16_t proto; + int ret; +@@ -3972,7 +3963,7 @@ int32_t ecm_interface_heirarchy_construct(struct ecm_front_end_connection_instan + if (((ip_version == 4) && (protocol == IPPROTO_IPV6)) || + ((ip_version == 6) && (protocol == IPPROTO_IPIP)) || + (protocol == IPPROTO_GRE) || +- ((given_dest_dev->type == ARPHRD_NONE) && (given_dest_dev->priv_flags & IFF_TUN_TAP))) { ++ ((given_dest_dev->type == ARPHRD_NONE) && (given_dest_dev->priv_flags_qca_ecm & IFF_QCA_ECM_TUN_TAP))) { + dev_put(dest_dev); + dest_dev = given_dest_dev; + if (dest_dev) { +@@ -3991,7 +3982,7 @@ int32_t ecm_interface_heirarchy_construct(struct ecm_front_end_connection_instan + /* + * if the address is a local address and indev=l2tp. + */ +- if ((given_src_dev->type == ARPHRD_PPP) && (given_src_dev->priv_flags & IFF_PPP_L2TPV2) && ppp_is_xmit_locked(given_src_dev)) { ++ if ((given_src_dev->type == ARPHRD_PPP) && (given_src_dev->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_L2TPV2) && ppp_is_xmit_locked(given_src_dev)) { + dev_put(dest_dev); + dest_dev = given_dest_dev; + if (dest_dev) { +@@ -4005,7 +3996,7 @@ int32_t ecm_interface_heirarchy_construct(struct ecm_front_end_connection_instan + /* + * if the address is a local address and indev=PPTP. + */ +- if (protocol == IPPROTO_GRE && given_dest_dev && (given_dest_dev->priv_flags & IFF_PPP_PPTP)){ ++ if (protocol == IPPROTO_GRE && given_dest_dev && (given_dest_dev->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_PPTP)){ + dev_put(dest_dev); + dest_dev = given_dest_dev; + if (dest_dev) { +@@ -4054,7 +4045,7 @@ int32_t ecm_interface_heirarchy_construct(struct ecm_front_end_connection_instan + if (((ip_version == 4) && (protocol == IPPROTO_IPV6)) || + ((ip_version == 6) && (protocol == IPPROTO_IPIP)) || + (protocol == IPPROTO_GRE) || +- ((given_src_dev->type == ARPHRD_NONE) && (given_src_dev->priv_flags & IFF_TUN_TAP))) { ++ ((given_src_dev->type == ARPHRD_NONE) && (given_src_dev->priv_flags_qca_ecm & IFF_QCA_ECM_TUN_TAP))) { + dev_put(src_dev); + src_dev = given_src_dev; + if (src_dev) { +@@ -4504,7 +4495,7 @@ lag_success: + /* + * OVPN ? + */ +- if ((dest_dev_type == ARPHRD_NONE) && (dest_dev->priv_flags & IFF_TUN_TAP)) { ++ if ((dest_dev_type == ARPHRD_NONE) && (dest_dev->priv_flags_qca_ecm & IFF_QCA_ECM_TUN_TAP)) { + DEBUG_TRACE("Net device: %p is OVPN, device name: %s\n", dest_dev, dest_dev->name); + break; + } +@@ -4523,7 +4514,7 @@ lag_success: + DEBUG_TRACE("%p: Net device: %p is PPP\n", feci, dest_dev); + + #ifdef ECM_INTERFACE_L2TPV2_ENABLE +- if ((given_src_dev->priv_flags & IFF_PPP_L2TPV2) && ppp_is_xmit_locked(given_src_dev)) { ++ if ((given_src_dev->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_L2TPV2) && ppp_is_xmit_locked(given_src_dev)) { + if (skb->skb_iif == dest_dev->ifindex) { + DEBUG_TRACE("%p: Net device: %p PPP channel is PPPoL2TPV2\n", feci, dest_dev); + break; +@@ -4532,7 +4523,7 @@ lag_success: + #endif + + #ifdef ECM_INTERFACE_PPTP_ENABLE +- if (protocol == IPPROTO_GRE && dest_dev && (dest_dev->priv_flags & IFF_PPP_PPTP)) { ++ if (protocol == IPPROTO_GRE && dest_dev && (dest_dev->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_PPTP)) { + DEBUG_TRACE("%p: Net device: %p PPP channel is PPTP\n", feci, dest_dev); + break; + } +@@ -4798,7 +4789,7 @@ int32_t ecm_interface_multicast_from_heirarchy_construct(struct ecm_front_end_co + /* + * if the address is a local address and indev=l2tp. + */ +- if ((given_src_dev->type == ARPHRD_PPP) && (given_src_dev->priv_flags & IFF_PPP_L2TPV2) && ppp_is_xmit_locked(given_src_dev)) { ++ if ((given_src_dev->type == ARPHRD_PPP) && (given_src_dev->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_L2TPV2) && ppp_is_xmit_locked(given_src_dev)) { + dev_put(dest_dev); + dest_dev = given_dest_dev; + if (dest_dev) { +@@ -5265,7 +5256,7 @@ int32_t ecm_interface_multicast_from_heirarchy_construct(struct ecm_front_end_co + DEBUG_TRACE("Net device: %p is PPP\n", dest_dev); + + #ifdef ECM_INTERFACE_L2TPV2_ENABLE +- if ((given_src_dev->priv_flags & IFF_PPP_L2TPV2) && ppp_is_xmit_locked(given_src_dev)) { ++ if ((given_src_dev->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_L2TPV2) && ppp_is_xmit_locked(given_src_dev)) { + if (skb->skb_iif == dest_dev->ifindex) { + DEBUG_TRACE("Net device: %p PPP channel is PPPoL2TPV2\n", dest_dev); + break; +@@ -6520,7 +6511,7 @@ static int ecm_interface_wifi_event_rx(struct socket *sock, struct sockaddr_nl * + #endif + oldfs = get_fs(); + set_fs(KERNEL_DS); +- size = sock_recvmsg(sock, &msg, len, msg.msg_flags); ++ size = sock_recvmsg(sock, &msg, msg.msg_flags); + set_fs(oldfs); + + return size; +@@ -6609,7 +6600,7 @@ int ecm_interface_wifi_event_stop(void) + } + + DEBUG_INFO("kill ecm_interface_wifi_event thread\n"); +- force_sig(SIGKILL, __ewn.thread); ++ send_sig(SIGKILL, __ewn.thread, 1); + err = kthread_stop(__ewn.thread); + __ewn.thread = NULL; + +--- a/ecm_tracker.c ++++ b/ecm_tracker.c +@@ -43,7 +43,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_tracker_datagram.c ++++ b/ecm_tracker_datagram.c +@@ -43,7 +43,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/ecm_tracker_tcp.c ++++ b/ecm_tracker_tcp.c +@@ -43,7 +43,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -1143,7 +1142,7 @@ static bool ecm_tracker_tcp_extract_mss( + const u8 *hash_location; + tcp_parse_options(skb, &opt_rx, &hash_location, 0); + #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)) +- tcp_parse_options(skb, &opt_rx, 0, NULL); ++ tcp_parse_options(&init_net, skb, &opt_rx, 0, NULL); + #else + #error "Unsupported kernel version for tcp_parse_options()" + #endif +--- a/ecm_tracker_udp.c ++++ b/ecm_tracker_udp.c +@@ -43,7 +43,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/frontends/ecm_front_end_ipv4.c ++++ b/frontends/ecm_front_end_ipv4.c +@@ -215,7 +215,7 @@ bool ecm_front_end_ipv4_interface_constr + * behind a gateway. + */ + DEBUG_TRACE("Gateway address will be looked up overwrite the rt_dst_addr\n"); +- ECM_NIN4_ADDR_TO_IP_ADDR(rt_dst_addr, rt->rt_gateway) ++ ECM_NIN4_ADDR_TO_IP_ADDR(rt_dst_addr, rt->rt_gw4) + gateway = true; + } + +--- a/frontends/include/ecm_front_end_common.h ++++ b/frontends/include/ecm_front_end_common.h +@@ -98,13 +98,6 @@ static inline bool ecm_front_end_acceler + return false; + } + +- if (unlikely(nf_ct_is_untracked(ct))) { +- /* +- * Untracked traffic certainly can't be accelerated. +- */ +- return true; +- } +- + #if (LINUX_VERSION_CODE <= KERNEL_VERSION(3, 6, 0)) + acct = nf_conn_acct_find(ct); + #else +--- a/frontends/nss/ecm_nss_bond_notifier.c ++++ b/frontends/nss/ecm_nss_bond_notifier.c +@@ -52,7 +52,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/frontends/nss/ecm_nss_common.h ++++ b/frontends/nss/ecm_nss_common.h +@@ -144,7 +144,7 @@ static inline int32_t ecm_nss_common_get_interface_type(struct ecm_front_end_con + /* + * If device is not GRETAP then return NONE. + */ +- if (!(dev->priv_flags & (IFF_GRE_V4_TAP | IFF_GRE_V6_TAP))) { ++ if (!(dev->priv_flags_qca_ecm & (IFF_QCA_ECM_GRE_V4_TAP | IFF_QCA_ECM_GRE_V6_TAP))) { + break; + } + #endif +--- a/frontends/nss/ecm_nss_ipv4.c ++++ b/frontends/nss/ecm_nss_ipv4.c +@@ -48,7 +48,6 @@ + #include + #include + #include +-#include + #if (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 2, 0)) + #include + #else +@@ -1053,7 +1052,7 @@ static unsigned int ecm_nss_ipv4_ip_process(struct net_device *out_dev, struct n + * If any of the input or output interface is a GRE V4 TAP/TUN interface + * we can continue to accelerate it. + */ +- if ((in_dev->priv_flags & IFF_GRE_V4_TAP) || (out_dev->priv_flags & IFF_GRE_V4_TAP)) { ++ if ((in_dev->priv_flags_qca_ecm & IFF_QCA_ECM_GRE_V4_TAP) || (out_dev->priv_flags_qca_ecm & IFF_QCA_ECM_GRE_V4_TAP)) { + #ifndef ECM_INTERFACE_GRE_TAP_ENABLE + DEBUG_TRACE("GRE TAP acceleration is disabled\n"); + return NF_ACCEPT; +@@ -1082,7 +1081,7 @@ static unsigned int ecm_nss_ipv4_ip_process(struct net_device *out_dev, struct n + reply_tuple.dst.u3.ip = orig_tuple.src.u3.ip; + sender = ECM_TRACKER_SENDER_TYPE_SRC; + } else { +- if (unlikely(ct == &nf_conntrack_untracked)) { ++ if (unlikely(ctinfo == IP_CT_UNTRACKED)) { + DEBUG_TRACE("%p: ct: untracked\n", skb); + return NF_ACCEPT; + } +@@ -2097,7 +2096,6 @@ sync_conntrack: + } + + ct = nf_ct_tuplehash_to_ctrack(h); +- NF_CT_ASSERT(ct->timeout.data == (unsigned long)ct); + DEBUG_TRACE("%p: NSS Sync: conntrack connection\n", ct); + + ecm_front_end_flow_and_return_directions_get(ct, flow_ip, 4, &flow_dir, &return_dir); +@@ -2108,7 +2106,7 @@ sync_conntrack: + */ + if (!test_bit(IPS_FIXED_TIMEOUT_BIT, &ct->status)) { + spin_lock_bh(&ct->lock); +- ct->timeout.expires += delta_jiffies; ++ ct->timeout += delta_jiffies; + spin_unlock_bh(&ct->lock); + } + +@@ -2166,17 +2164,15 @@ sync_conntrack: + u_int64_t reply_pkts = atomic64_read(&acct[IP_CT_DIR_REPLY].packets); + + if (reply_pkts != 0) { +- struct nf_conntrack_l4proto *l4proto; + unsigned int *timeouts; + + set_bit(IPS_SEEN_REPLY_BIT, &ct->status); + set_bit(IPS_ASSURED_BIT, &ct->status); + +- l4proto = __nf_ct_l4proto_find(AF_INET, IPPROTO_UDP); +- timeouts = nf_ct_timeout_lookup(&init_net, ct, l4proto); ++ timeouts = nf_ct_timeout_lookup(ct); + + spin_lock_bh(&ct->lock); +- ct->timeout.expires = jiffies + timeouts[UDP_CT_REPLIED]; ++ ct->timeout = jiffies + timeouts[UDP_CT_REPLIED]; + spin_unlock_bh(&ct->lock); + } + } +@@ -2690,7 +2686,8 @@ int ecm_nss_ipv4_init(struct dentry *dentry) + /* + * Register netfilter hooks + */ +- result = nf_register_hooks(ecm_nss_ipv4_netfilter_hooks, ARRAY_SIZE(ecm_nss_ipv4_netfilter_hooks)); ++ result = nf_register_net_hooks(&init_net, ecm_nss_ipv4_netfilter_hooks, \ ++ ARRAY_SIZE(ecm_nss_ipv4_netfilter_hooks)); + if (result < 0) { + DEBUG_ERROR("Can't register netfilter hooks.\n"); + nss_ipv4_notify_unregister(); +@@ -2702,8 +2699,8 @@ int ecm_nss_ipv4_init(struct dentry *dentry) + if (result < 0) { + DEBUG_ERROR("Failed to init ecm ipv4 multicast frontend\n"); + nss_ipv4_notify_unregister(); +- nf_unregister_hooks(ecm_nss_ipv4_netfilter_hooks, +- ARRAY_SIZE(ecm_nss_ipv4_netfilter_hooks)); ++ nf_unregister_net_hooks(&init_net, ecm_nss_ipv4_netfilter_hooks, ++ ARRAY_SIZE(ecm_nss_ipv4_netfilter_hooks)); + goto task_cleanup; + } + #endif +@@ -2714,8 +2711,8 @@ int ecm_nss_ipv4_init(struct dentry *dentry) + #ifdef ECM_MULTICAST_ENABLE + ecm_nss_multicast_ipv4_exit(); + #endif +- nf_unregister_hooks(ecm_nss_ipv4_netfilter_hooks, +- ARRAY_SIZE(ecm_nss_ipv4_netfilter_hooks)); ++ nf_unregister_net_hooks(&init_net, ecm_nss_ipv4_netfilter_hooks, ++ ARRAY_SIZE(ecm_nss_ipv4_netfilter_hooks)); + goto task_cleanup; + } + +@@ -2742,8 +2739,8 @@ void ecm_nss_ipv4_exit(void) + /* + * Stop the network stack hooks + */ +- nf_unregister_hooks(ecm_nss_ipv4_netfilter_hooks, +- ARRAY_SIZE(ecm_nss_ipv4_netfilter_hooks)); ++ nf_unregister_net_hooks(&init_net, ecm_nss_ipv4_netfilter_hooks, ++ ARRAY_SIZE(ecm_nss_ipv4_netfilter_hooks)); + + /* + * Unregister from the Linux NSS Network driver +--- a/frontends/nss/ecm_nss_ipv6.c ++++ b/frontends/nss/ecm_nss_ipv6.c +@@ -51,7 +51,6 @@ + #include + #include + #include +-#include + #if (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 2, 0)) + #include + #else +@@ -1035,7 +1034,7 @@ static unsigned int ecm_nss_ipv6_ip_process(struct net_device *out_dev, struct n + * If any of the input or output interface is a GRE V4 TAP/TUN interface + * we can continue to accelerate it. + */ +- if ((in_dev->priv_flags & IFF_GRE_V4_TAP) || (out_dev->priv_flags & IFF_GRE_V4_TAP)) { ++ if ((in_dev->priv_flags_qca_ecm & IFF_QCA_ECM_GRE_V4_TAP) || (out_dev->priv_flags_qca_ecm & IFF_QCA_ECM_GRE_V4_TAP)) { + #ifndef ECM_INTERFACE_GRE_TAP_ENABLE + DEBUG_TRACE("GRE TAP acceleration is disabled\n"); + return NF_ACCEPT; +@@ -1064,7 +1063,7 @@ static unsigned int ecm_nss_ipv6_ip_process(struct net_device *out_dev, struct n + ECM_IP_ADDR_TO_NIN6_ADDR(reply_tuple.dst.u3.in6, ip_hdr.src_addr); + sender = ECM_TRACKER_SENDER_TYPE_SRC; + } else { +- if (unlikely(ct == &nf_conntrack_untracked)) { ++ if (unlikely(ctinfo == IP_CT_UNTRACKED)) { + DEBUG_TRACE("%p: ct: untracked\n", skb); + return NF_ACCEPT; + } +@@ -1809,7 +1808,6 @@ sync_conntrack: + } + + ct = nf_ct_tuplehash_to_ctrack(h); +- NF_CT_ASSERT(ct->timeout.data == (unsigned long)ct); + DEBUG_TRACE("%p: NSS Sync: conntrack connection\n", ct); + + ecm_front_end_flow_and_return_directions_get(ct, flow_ip, 6, &flow_dir, &return_dir); +@@ -1820,7 +1818,7 @@ sync_conntrack: + */ + if (!test_bit(IPS_FIXED_TIMEOUT_BIT, &ct->status)) { + spin_lock_bh(&ct->lock); +- ct->timeout.expires += delta_jiffies; ++ ct->timeout += delta_jiffies; + spin_unlock_bh(&ct->lock); + } + +@@ -1878,17 +1876,15 @@ sync_conntrack: + u_int64_t reply_pkts = atomic64_read(&acct[IP_CT_DIR_REPLY].packets); + + if (reply_pkts != 0) { +- struct nf_conntrack_l4proto *l4proto; + unsigned int *timeouts; + + set_bit(IPS_SEEN_REPLY_BIT, &ct->status); + set_bit(IPS_ASSURED_BIT, &ct->status); + +- l4proto = __nf_ct_l4proto_find(AF_INET6, IPPROTO_UDP); +- timeouts = nf_ct_timeout_lookup(&init_net, ct, l4proto); ++ timeouts = nf_ct_timeout_lookup(ct); + + spin_lock_bh(&ct->lock); +- ct->timeout.expires = jiffies + timeouts[UDP_CT_REPLIED]; ++ ct->timeout = jiffies + timeouts[UDP_CT_REPLIED]; + spin_unlock_bh(&ct->lock); + } + } +@@ -2402,7 +2398,7 @@ int ecm_nss_ipv6_init(struct dentry *dentry) + /* + * Register netfilter hooks + */ +- result = nf_register_hooks(ecm_nss_ipv6_netfilter_hooks, ARRAY_SIZE(ecm_nss_ipv6_netfilter_hooks)); ++ result = nf_register_net_hooks(&init_net, ecm_nss_ipv6_netfilter_hooks, ARRAY_SIZE(ecm_nss_ipv6_netfilter_hooks)); + if (result < 0) { + DEBUG_ERROR("Can't register netfilter hooks.\n"); + nss_ipv6_notify_unregister(); +@@ -2414,8 +2410,8 @@ int ecm_nss_ipv6_init(struct dentry *dentry) + if (result < 0) { + DEBUG_ERROR("Failed to init ecm ipv6 multicast frontend\n"); + nss_ipv6_notify_unregister(); +- nf_unregister_hooks(ecm_nss_ipv6_netfilter_hooks, +- ARRAY_SIZE(ecm_nss_ipv6_netfilter_hooks)); ++ nf_unregister_net_hooks(&init_net, ecm_nss_ipv6_netfilter_hooks, ++ ARRAY_SIZE(ecm_nss_ipv6_netfilter_hooks)); + goto task_cleanup; + } + #endif +@@ -2426,8 +2422,8 @@ int ecm_nss_ipv6_init(struct dentry *dentry) + #ifdef ECM_MULTICAST_ENABLE + ecm_nss_multicast_ipv6_exit(); + #endif +- nf_unregister_hooks(ecm_nss_ipv6_netfilter_hooks, +- ARRAY_SIZE(ecm_nss_ipv6_netfilter_hooks)); ++ nf_unregister_net_hooks(&init_net, ecm_nss_ipv6_netfilter_hooks, ++ ARRAY_SIZE(ecm_nss_ipv6_netfilter_hooks)); + goto task_cleanup; + } + +@@ -2453,8 +2449,8 @@ void ecm_nss_ipv6_exit(void) + /* + * Stop the network stack hooks + */ +- nf_unregister_hooks(ecm_nss_ipv6_netfilter_hooks, +- ARRAY_SIZE(ecm_nss_ipv6_netfilter_hooks)); ++ nf_unregister_net_hooks(&init_net, ecm_nss_ipv6_netfilter_hooks, ++ ARRAY_SIZE(ecm_nss_ipv6_netfilter_hooks)); + + /* + * Unregister from the Linux NSS Network driver +--- a/frontends/nss/ecm_nss_multicast_ipv4.c ++++ b/frontends/nss/ecm_nss_multicast_ipv4.c +@@ -50,7 +50,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/frontends/nss/ecm_nss_multicast_ipv6.c ++++ b/frontends/nss/ecm_nss_multicast_ipv6.c +@@ -51,7 +51,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/frontends/nss/ecm_nss_non_ported_ipv4.c ++++ b/frontends/nss/ecm_nss_non_ported_ipv4.c +@@ -47,7 +47,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -640,7 +639,7 @@ static void ecm_nss_non_ported_ipv4_connection_accelerate(struct ecm_front_end_c + #ifdef ECM_INTERFACE_GRE_TAP_ENABLE + dev = dev_get_by_index(&init_net, ecm_db_iface_interface_identifier_get(ii)); + if (dev) { +- if (dev->priv_flags & IFF_GRE_V4_TAP) { ++ if (dev->priv_flags_qca_ecm & IFF_QCA_ECM_GRE_V4_TAP) { + /* + * Clear QOS_VALID to prevent outer rule from overwriting + * inner flow's QoS classification. +--- a/frontends/nss/ecm_nss_non_ported_ipv6.c ++++ b/frontends/nss/ecm_nss_non_ported_ipv6.c +@@ -47,7 +47,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -548,7 +547,7 @@ static void ecm_nss_non_ported_ipv6_connection_accelerate(struct ecm_front_end_c + #ifdef ECM_INTERFACE_GRE_TAP_ENABLE + dev = dev_get_by_index(&init_net, ecm_db_iface_interface_identifier_get(ii)); + if (dev) { +- if (dev->priv_flags & IFF_GRE_V6_TAP) { ++ if (dev->priv_flags_qca_ecm & IFF_QCA_ECM_GRE_V6_TAP) { + /* + * Clear QOS_VALID to prevent outer rule from overwriting + * inner flow's QoS classification. +--- a/frontends/nss/ecm_nss_ported_ipv4.c ++++ b/frontends/nss/ecm_nss_ported_ipv4.c +@@ -47,7 +47,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/frontends/nss/ecm_nss_ported_ipv6.c ++++ b/frontends/nss/ecm_nss_ported_ipv6.c +@@ -47,7 +47,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -1996,7 +1995,7 @@ unsigned int ecm_nss_ported_ipv6_process + /* + * Deny acceleration for L2TP-over-UDP tunnel + */ +- if ((in_dev->priv_flags & IFF_PPP_L2TPV2) && ppp_is_xmit_locked(in_dev)) { ++ if ((in_dev->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_L2TPV2) && ppp_is_xmit_locked(in_dev)) { + DEBUG_TRACE("Skip packets for L2TP tunnel in skb %p\n", skb); + can_accel = false; + } +--- a/frontends/sfe/ecm_sfe_ipv4.c ++++ b/frontends/sfe/ecm_sfe_ipv4.c +@@ -47,7 +47,6 @@ + #include + #include + #include +-#include + #if (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 2, 0)) + #include + #else +@@ -746,7 +745,8 @@ static unsigned int ecm_sfe_ipv4_ip_proc + * If skb_dst(skb)->xfrm is not null, packet is to be encrypted by ipsec, we can't accelerate it. + * If skb->sp is not null, packet is decrypted by ipsec. We only accelerate it when configuration didn't reject ipsec. + */ +- if (unlikely((skb_dst(skb) && skb_dst(skb)->xfrm) || (ecm_sfe_ipv4_reject_acceleration_for_ipsec && skb->sp))) { ++ if (unlikely((skb_dst(skb) && skb_dst(skb)->xfrm) || \ ++ (ecm_sfe_ipv4_reject_acceleration_for_ipsec && skb_ext_exist(skb, SKB_EXT_SEC_PATH)))) { + DEBUG_TRACE("skip local ipsec flows\n"); + return NF_ACCEPT; + } +@@ -762,7 +762,7 @@ static unsigned int ecm_sfe_ipv4_ip_process(struct net_device *out_dev, struct n + reply_tuple.dst.u3.ip = orig_tuple.src.u3.ip; + sender = ECM_TRACKER_SENDER_TYPE_SRC; + } else { +- if (unlikely(ct == &nf_conntrack_untracked)) { ++ if (unlikely(ctinfo == IP_CT_UNTRACKED)) { + DEBUG_TRACE("%p: ct: untracked\n", skb); + return NF_ACCEPT; + } +@@ -1531,7 +1526,6 @@ sync_conntrack: + } + + ct = nf_ct_tuplehash_to_ctrack(h); +- NF_CT_ASSERT(ct->timeout.data == (unsigned long)ct); + DEBUG_TRACE("%p: SFE Sync: conntrack connection\n", ct); + + ecm_front_end_flow_and_return_directions_get(ct, flow_ip, 4, &flow_dir, &return_dir); +@@ -1551,7 +1545,7 @@ sync_conntrack: + delta_jiffies = ((sync->inc_ticks * HZ) + (MSEC_PER_SEC / 2)) / MSEC_PER_SEC; + + spin_lock_bh(&ct->lock); +- ct->timeout.expires += delta_jiffies; ++ ct->timeout += delta_jiffies; + spin_unlock_bh(&ct->lock); + } + +@@ -1609,17 +1603,15 @@ sync_conntrack: + u_int64_t reply_pkts = atomic64_read(&acct[IP_CT_DIR_REPLY].packets); + + if (reply_pkts != 0) { +- struct nf_conntrack_l4proto *l4proto; + unsigned int *timeouts; + + set_bit(IPS_SEEN_REPLY_BIT, &ct->status); + set_bit(IPS_ASSURED_BIT, &ct->status); + +- l4proto = __nf_ct_l4proto_find(AF_INET, IPPROTO_UDP); +- timeouts = nf_ct_timeout_lookup(&init_net, ct, l4proto); ++ timeouts = nf_ct_timeout_lookup(ct); + + spin_lock_bh(&ct->lock); +- ct->timeout.expires = jiffies + timeouts[UDP_CT_REPLIED]; ++ ct->timeout = jiffies + timeouts[UDP_CT_REPLIED]; + spin_unlock_bh(&ct->lock); + } + } +@@ -1901,7 +1893,7 @@ int ecm_sfe_ipv4_init(struct dentry *den + /* + * Register netfilter hooks + */ +- result = nf_register_hooks(ecm_sfe_ipv4_netfilter_hooks, ARRAY_SIZE(ecm_sfe_ipv4_netfilter_hooks)); ++ result = nf_register_net_hooks(&init_net, ecm_sfe_ipv4_netfilter_hooks, ARRAY_SIZE(ecm_sfe_ipv4_netfilter_hooks)); + if (result < 0) { + DEBUG_ERROR("Can't register netfilter hooks.\n"); + sfe_drv_ipv4_notify_unregister(); +@@ -1934,8 +1926,8 @@ void ecm_sfe_ipv4_exit(void) + /* + * Stop the network stack hooks + */ +- nf_unregister_hooks(ecm_sfe_ipv4_netfilter_hooks, +- ARRAY_SIZE(ecm_sfe_ipv4_netfilter_hooks)); ++ nf_unregister_net_hooks(&init_net, ecm_sfe_ipv4_netfilter_hooks, ++ ARRAY_SIZE(ecm_sfe_ipv4_netfilter_hooks)); + + /* + * Unregister from the simulated sfe driver +--- a/frontends/sfe/ecm_sfe_ipv6.c ++++ b/frontends/sfe/ecm_sfe_ipv6.c +@@ -51,7 +51,6 @@ + #include + #include + #include +-#include + #if (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 2, 0)) + #include + #else +@@ -714,7 +713,8 @@ static unsigned int ecm_sfe_ipv6_ip_proc + * If skb_dst(skb)->xfrm is not null, packet is to be encrypted by ipsec, we can't accelerate it. + * If skb->sp is not null, packet is decrypted by ipsec. We only accelerate it when configuration didn't reject ipsec. + */ +- if (unlikely((skb_dst(skb) && skb_dst(skb)->xfrm) || (ecm_sfe_ipv6_reject_acceleration_for_ipsec && skb->sp))) { ++ if (unlikely((skb_dst(skb) && skb_dst(skb)->xfrm) || \ ++ (ecm_sfe_ipv6_reject_acceleration_for_ipsec && skb_ext_exist(skb, SKB_EXT_SEC_PATH)))) { + DEBUG_TRACE("skip local ipsec flows\n"); + return NF_ACCEPT; + } +@@ -733,7 +733,7 @@ static unsigned int ecm_sfe_ipv6_ip_proc + ECM_IP_ADDR_TO_NIN6_ADDR(reply_tuple.dst.u3.in6, ip_hdr.src_addr); + sender = ECM_TRACKER_SENDER_TYPE_SRC; + } else { +- if (unlikely(ct == &nf_conntrack_untracked)) { ++ if (unlikely(ctinfo == IP_CT_UNTRACKED)) { + DEBUG_TRACE("%p: ct: untracked\n", skb); + return NF_ACCEPT; + } +@@ -1255,7 +1255,6 @@ sync_conntrack: + } + + ct = nf_ct_tuplehash_to_ctrack(h); +- NF_CT_ASSERT(ct->timeout.data == (unsigned long)ct); + DEBUG_TRACE("%p: SFE Sync: conntrack connection\n", ct); + + ecm_front_end_flow_and_return_directions_get(ct, flow_ip, 6, &flow_dir, &return_dir); +@@ -1275,7 +1274,7 @@ sync_conntrack: + delta_jiffies = ((sync->inc_ticks * HZ) + (MSEC_PER_SEC / 2)) / MSEC_PER_SEC; + + spin_lock_bh(&ct->lock); +- ct->timeout.expires += delta_jiffies; ++ ct->timeout += delta_jiffies; + spin_unlock_bh(&ct->lock); + } + #if (LINUX_VERSION_CODE <= KERNEL_VERSION(3,6,0)) +@@ -1332,17 +1331,15 @@ sync_conntrack: + u_int64_t reply_pkts = atomic64_read(&acct[IP_CT_DIR_REPLY].packets); + + if (reply_pkts != 0) { +- struct nf_conntrack_l4proto *l4proto; + unsigned int *timeouts; + + set_bit(IPS_SEEN_REPLY_BIT, &ct->status); + set_bit(IPS_ASSURED_BIT, &ct->status); + +- l4proto = __nf_ct_l4proto_find(AF_INET6, IPPROTO_UDP); +- timeouts = nf_ct_timeout_lookup(&init_net, ct, l4proto); ++ timeouts = nf_ct_timeout_lookup(ct); + + spin_lock_bh(&ct->lock); +- ct->timeout.expires = jiffies + timeouts[UDP_CT_REPLIED]; ++ ct->timeout = jiffies + timeouts[UDP_CT_REPLIED]; + spin_unlock_bh(&ct->lock); + } + } +@@ -1624,7 +1621,7 @@ int ecm_sfe_ipv6_init(struct dentry *den + /* + * Register netfilter hooks + */ +- result = nf_register_hooks(ecm_sfe_ipv6_netfilter_hooks, ARRAY_SIZE(ecm_sfe_ipv6_netfilter_hooks)); ++ result = nf_register_net_hooks(&init_net, ecm_sfe_ipv6_netfilter_hooks, ARRAY_SIZE(ecm_sfe_ipv6_netfilter_hooks)); + if (result < 0) { + DEBUG_ERROR("Can't register netfilter hooks.\n"); + sfe_drv_ipv6_notify_unregister(); +@@ -1656,8 +1653,8 @@ void ecm_sfe_ipv6_exit(void) + /* + * Stop the network stack hooks + */ +- nf_unregister_hooks(ecm_sfe_ipv6_netfilter_hooks, +- ARRAY_SIZE(ecm_sfe_ipv6_netfilter_hooks)); ++ nf_unregister_net_hooks(&init_net, ecm_sfe_ipv6_netfilter_hooks, ++ ARRAY_SIZE(ecm_sfe_ipv6_netfilter_hooks)); + + /* + * Unregister from the Linux SFE Network driver +--- a/frontends/sfe/ecm_sfe_non_ported_ipv4.c ++++ b/frontends/sfe/ecm_sfe_non_ported_ipv4.c +@@ -46,7 +46,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -1829,7 +1828,7 @@ unsigned int ecm_sfe_non_ported_ipv4_pro + /* + * Packet has been decrypted by ipsec, mark it in connection. + */ +- if (unlikely(skb->sp)) { ++ if (unlikely(skb_ext_exist(skb, SKB_EXT_SEC_PATH))) { + ((struct ecm_sfe_non_ported_ipv4_connection_instance *)feci)->flow_ipsec_state = ECM_SFE_IPSEC_STATE_WAS_DECRYPTED; + ((struct ecm_sfe_non_ported_ipv4_connection_instance *)feci)->return_ipsec_state = ECM_SFE_IPSEC_STATE_TO_ENCRYPT; + } +--- a/frontends/sfe/ecm_sfe_non_ported_ipv6.c ++++ b/frontends/sfe/ecm_sfe_non_ported_ipv6.c +@@ -47,7 +47,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -1710,7 +1709,7 @@ unsigned int ecm_sfe_non_ported_ipv6_pro + /* + * Packet has been decrypted by ipsec, mark it in connection. + */ +- if (unlikely(skb->sp)) { ++ if (unlikely(skb_ext_exist(skb, SKB_EXT_SEC_PATH))) { + ((struct ecm_sfe_non_ported_ipv6_connection_instance *)feci)->flow_ipsec_state = ECM_SFE_IPSEC_STATE_WAS_DECRYPTED; + ((struct ecm_sfe_non_ported_ipv6_connection_instance *)feci)->return_ipsec_state = ECM_SFE_IPSEC_STATE_TO_ENCRYPT; + } +--- a/frontends/sfe/ecm_sfe_ported_ipv4.c ++++ b/frontends/sfe/ecm_sfe_ported_ipv4.c +@@ -46,7 +46,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -2053,7 +2052,7 @@ unsigned int ecm_sfe_ported_ipv4_process + /* + * Packet has been decrypted by ipsec, mark it in connection. + */ +- if (unlikely(skb->sp)) { ++ if (unlikely(skb_ext_exist(skb, SKB_EXT_SEC_PATH))) { + ((struct ecm_sfe_ported_ipv4_connection_instance *)feci)->flow_ipsec_state = ECM_SFE_IPSEC_STATE_WAS_DECRYPTED; + ((struct ecm_sfe_ported_ipv4_connection_instance *)feci)->return_ipsec_state = ECM_SFE_IPSEC_STATE_TO_ENCRYPT; + } +--- a/frontends/sfe/ecm_sfe_ported_ipv6.c ++++ b/frontends/sfe/ecm_sfe_ported_ipv6.c +@@ -47,7 +47,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -1826,7 +1825,7 @@ unsigned int ecm_sfe_ported_ipv6_process + /* + * Deny acceleration for L2TP-over-UDP tunnel + */ +- if ((in_dev->priv_flags & IFF_PPP_L2TPV2) && ppp_is_xmit_locked(in_dev)) { ++ if ((in_dev->priv_flags_qca_ecm & IFF_QCA_ECM_PPP_L2TPV2) && ppp_is_xmit_locked(in_dev)) { + DEBUG_TRACE("Skip packets for L2TP tunnel in skb %p\n", skb); + can_accel = false; + } +@@ -1958,7 +1957,7 @@ unsigned int ecm_sfe_ported_ipv6_process + /* + * Packet has been decrypted by ipsec, mark it in connection. + */ +- if (unlikely(skb->sp)) { ++ if (unlikely(skb_ext_exist(skb, SKB_EXT_SEC_PATH))) { + ((struct ecm_sfe_ported_ipv6_connection_instance *)feci)->flow_ipsec_state = ECM_SFE_IPSEC_STATE_WAS_DECRYPTED; + ((struct ecm_sfe_ported_ipv6_connection_instance *)feci)->return_ipsec_state = ECM_SFE_IPSEC_STATE_TO_ENCRYPT; + } diff --git a/package/qca/qca-nss-ecm/patches/101-Fix_Kern_Panic_on_UDP_CONNTRACK.patch b/package/qca/qca-nss-ecm/patches/101-Fix_Kern_Panic_on_UDP_CONNTRACK.patch new file mode 100644 index 000000000..6633f72b4 --- /dev/null +++ b/package/qca/qca-nss-ecm/patches/101-Fix_Kern_Panic_on_UDP_CONNTRACK.patch @@ -0,0 +1,60 @@ +diff --git a/frontends/nss/ecm_nss_ipv4.c b/frontends/nss/ecm_nss_ipv4.c +index 1ce4b61..29e70ba 100644 +--- a/frontends/nss/ecm_nss_ipv4.c ++++ b/frontends/nss/ecm_nss_ipv4.c +@@ -2171,6 +2171,10 @@ sync_conntrack: + + timeouts = nf_ct_timeout_lookup(ct); + ++ /* Copy of udp_get_timeouts in kernel */ ++ if (!timeouts) ++ timeouts = nf_udp_pernet(nf_ct_net(ct))->timeouts; ++ + spin_lock_bh(&ct->lock); + ct->timeout = jiffies + timeouts[UDP_CT_REPLIED]; + spin_unlock_bh(&ct->lock); +diff --git a/frontends/nss/ecm_nss_ipv6.c b/frontends/nss/ecm_nss_ipv6.c +index 2adc5ec..08253b6 100644 +--- a/frontends/nss/ecm_nss_ipv6.c ++++ b/frontends/nss/ecm_nss_ipv6.c +@@ -1883,6 +1883,10 @@ sync_conntrack: + + timeouts = nf_ct_timeout_lookup(ct); + ++ /* Copy of udp_get_timeouts in kernel */ ++ if (!timeouts) ++ timeouts = nf_udp_pernet(nf_ct_net(ct))->timeouts; ++ + spin_lock_bh(&ct->lock); + ct->timeout = jiffies + timeouts[UDP_CT_REPLIED]; + spin_unlock_bh(&ct->lock); +diff --git a/frontends/sfe/ecm_sfe_ipv4.c b/frontends/sfe/ecm_sfe_ipv4.c +index 7cfe4fc..8f525ee 100644 +--- a/frontends/sfe/ecm_sfe_ipv4.c ++++ b/frontends/sfe/ecm_sfe_ipv4.c +@@ -1608,6 +1608,10 @@ sync_conntrack: + + timeouts = nf_ct_timeout_lookup(ct); + ++ /* Copy of udp_get_timeouts in kernel */ ++ if (!timeouts) ++ timeouts = nf_udp_pernet(nf_ct_net(ct))->timeouts; ++ + spin_lock_bh(&ct->lock); + ct->timeout = jiffies + timeouts[UDP_CT_REPLIED]; + spin_unlock_bh(&ct->lock); +diff --git a/frontends/sfe/ecm_sfe_ipv6.c b/frontends/sfe/ecm_sfe_ipv6.c +index dfde309..47c531a 100644 +--- a/frontends/sfe/ecm_sfe_ipv6.c ++++ b/frontends/sfe/ecm_sfe_ipv6.c +@@ -1321,6 +1321,10 @@ sync_conntrack: + + timeouts = nf_ct_timeout_lookup(ct); + ++ /* Copy of udp_get_timeouts in kernel */ ++ if (!timeouts) ++ timeouts = nf_udp_pernet(nf_ct_net(ct))->timeouts; ++ + spin_lock_bh(&ct->lock); + ct->timeout = jiffies + timeouts[UDP_CT_REPLIED]; + spin_unlock_bh(&ct->lock); diff --git a/package/qca/qca-nss-ecm/patches/200-resolve-high-load.patch b/package/qca/qca-nss-ecm/patches/200-resolve-high-load.patch new file mode 100644 index 000000000..2f39d2770 --- /dev/null +++ b/package/qca/qca-nss-ecm/patches/200-resolve-high-load.patch @@ -0,0 +1,44 @@ +The sync update work queue tasks is calling uninterruptible sleep function, which is +causing high CPU load. Changed to interruptible sleep function. The stats update +task should be interruptible. + +--- a/frontends/nss/ecm_nss_ipv4.c ++++ b.frontends/nss/ecm_nss_ipv4.c +@@ -2411,7 +2411,7 @@ static void ecm_nss_ipv4_stats_sync_req_ + } + spin_unlock_bh(&ecm_nss_ipv4_lock); + +- usleep_range(ECM_NSS_IPV4_STATS_SYNC_UDELAY - 100, ECM_NSS_IPV4_STATS_SYNC_UDELAY); ++ msleep_interruptible(ECM_NSS_IPV4_STATS_SYNC_UDELAY / 1000); + + /* + * If index is 0, we are starting a new round, but if we still have time remain +@@ -2425,7 +2425,7 @@ static void ecm_nss_ipv4_stats_sync_req_ + } + + if (ecm_nss_ipv4_next_req_time > current_jiffies) { +- msleep(jiffies_to_msecs(ecm_nss_ipv4_next_req_time - current_jiffies)); ++ msleep_interruptible(jiffies_to_msecs(ecm_nss_ipv4_next_req_time - current_jiffies)); + } + ecm_nss_ipv4_roll_check_jiffies = jiffies; + ecm_nss_ipv4_next_req_time = ecm_nss_ipv4_roll_check_jiffies + ECM_NSS_IPV4_STATS_SYNC_PERIOD; +--- a/frontends/nss/ecm_nss_ipv6.c ++++ b.frontends/nss/ecm_nss_ipv6.c +@@ -2128,7 +2128,7 @@ static void ecm_nss_ipv6_stats_sync_req_ + } + spin_unlock_bh(&ecm_nss_ipv6_lock); + +- usleep_range(ECM_NSS_IPV6_STATS_SYNC_UDELAY - 100, ECM_NSS_IPV6_STATS_SYNC_UDELAY); ++ msleep_interruptible(ECM_NSS_IPV6_STATS_SYNC_UDELAY / 1000); + + /* + * If index is 0, we are starting a new round, but if we still have time remain +@@ -2142,7 +2142,7 @@ static void ecm_nss_ipv6_stats_sync_req_ + } + + if (ecm_nss_ipv6_next_req_time > current_jiffies) { +- msleep(jiffies_to_msecs(ecm_nss_ipv6_next_req_time - current_jiffies)); ++ msleep_interruptible(jiffies_to_msecs(ecm_nss_ipv6_next_req_time - current_jiffies)); + } + ecm_nss_ipv6_roll_check_jiffies = jiffies; + ecm_nss_ipv6_next_req_time = ecm_nss_ipv6_roll_check_jiffies + ECM_NSS_IPV6_STATS_SYNC_PERIOD; diff --git a/package/qca/qca-nss-ecm/patches/203-rework-nfct-notification.patch b/package/qca/qca-nss-ecm/patches/203-rework-nfct-notification.patch new file mode 100644 index 000000000..a0e09c1fa --- /dev/null +++ b/package/qca/qca-nss-ecm/patches/203-rework-nfct-notification.patch @@ -0,0 +1,20 @@ +--- a/ecm_conntrack_notifier.c ++++ b/ecm_conntrack_notifier.c +@@ -411,7 +411,7 @@ int ecm_conntrack_notifier_init(struct d + /* + * Eventing subsystem is available so we register a notifier hook to get fast notifications of expired connections + */ +- result = nf_conntrack_register_notifier(&init_net, &ecm_conntrack_notifier); ++ result = nf_conntrack_register_chain_notifier(&init_net, &ecm_conntrack_notifier); + if (result < 0) { + DEBUG_ERROR("Can't register nf notifier hook.\n"); + debugfs_remove_recursive(ecm_conntrack_notifier_dentry); +@@ -430,7 +430,7 @@ void ecm_conntrack_notifier_exit(void) + { + DEBUG_INFO("ECM Conntrack Notifier exit\n"); + #ifdef CONFIG_NF_CONNTRACK_EVENTS +- nf_conntrack_unregister_notifier(&init_net, &ecm_conntrack_notifier); ++ nf_conntrack_unregister_chain_notifier(&init_net, &ecm_conntrack_notifier); + #endif + /* + * Remove the debugfs files recursively. diff --git a/package/qca/qca-nss-ecm/patches/400-Check-TCP_UDP-conntrack-state-earlier.patch b/package/qca/qca-nss-ecm/patches/400-Check-TCP_UDP-conntrack-state-earlier.patch new file mode 100644 index 000000000..b7882c1b3 --- /dev/null +++ b/package/qca/qca-nss-ecm/patches/400-Check-TCP_UDP-conntrack-state-earlier.patch @@ -0,0 +1,236 @@ +From 90cace88a342e77ee8ca1e961cf7b7a7930d4c89 Mon Sep 17 00:00:00 2001 +From: Murat Sezgin +Date: Mon, 9 Mar 2020 12:51:03 -0700 +Subject: [qca-nss-ecm] Check TCP/UDP conntrack state earlier + +Check the conntrack state before processing the flow +and adding it to the database. The unconfirmed +connections can be changed after the confirmation. + +Changed the TCP tracker connection state matrix to set the +state of the connection as ESTABLISHED when any of the src or +dest side is set as ESTABLISHED. With this change ECM will not +handle the SYN and SYN-ACK packets of the TCP handshake. Only the +ACK and FIN flaged packets will be used during the creation and +closing the connection respectively. + +Signed-off-by: Murat Sezgin +Change-Id: I3e0a58d604df4c6a85478ca9c05f24d50cd8c894 +--- + ecm_classifier_default.c | 36 ++++++++---------------------------- + ecm_tracker_tcp.c | 4 ++-- + frontends/nss/ecm_nss_ported_ipv4.c | 17 +++++++++++++++++ + frontends/nss/ecm_nss_ported_ipv6.c | 17 +++++++++++++++++ + frontends/sfe/ecm_sfe_ported_ipv4.c | 17 +++++++++++++++++ + frontends/sfe/ecm_sfe_ported_ipv6.c | 17 +++++++++++++++++ + 6 files changed, 78 insertions(+), 30 deletions(-) + +diff --git a/ecm_classifier_default.c b/ecm_classifier_default.c +index 22c4bec..d04cdfa 100644 +--- a/ecm_classifier_default.c ++++ b/ecm_classifier_default.c +@@ -1,6 +1,6 @@ + /* + ************************************************************************** +- * Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. ++ * Copyright (c) 2014-2016, 2020, The Linux Foundation. All rights reserved. + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all copies. +@@ -285,12 +285,12 @@ static void ecm_classifier_default_process(struct ecm_classifier_instance *aci, + } + + /* +- * Check the TCP connection state. ++ * Check the TCP connection state, when the ct is NULL. ++ * ct valid case was already checked in the ecm_nss{sfe}_ported_ipv4{6}_process functions. + * If we are not established then we deny acceleration. +- * Take lead from conntrack if exists. + */ + ct = nf_ct_get(skb, &ctinfo); +- if (ct == NULL) { ++ if (!ct) { + DEBUG_TRACE("%p: No Conntrack found for packet, using ECM tracker state\n", cdii); + if (unlikely(prevailing_state != ECM_TRACKER_CONNECTION_STATE_ESTABLISHED)) { + cdii->process_response.accel_mode = ECM_CLASSIFIER_ACCELERATION_MODE_NO; +@@ -298,29 +298,10 @@ static void ecm_classifier_default_process(struct ecm_classifier_instance *aci, + } + } else { + /* +- * Unconfirmed connection may be dropped by Linux at the final step, +- * So we don't allow acceleration for the unconfirmed connections. +- */ +- if (!nf_ct_is_confirmed(ct)) { +- DEBUG_TRACE("%p: Unconfirmed connection\n", ct); +- cdii->process_response.accel_mode = ECM_CLASSIFIER_ACCELERATION_MODE_NO; +- goto return_response; +- } +- +- /* +- * Don't try to manage a non-established connection. +- */ +- if (!test_bit(IPS_ASSURED_BIT, &ct->status)) { +- DEBUG_TRACE("%p: Non-established connection\n", ct); +- cdii->process_response.accel_mode = ECM_CLASSIFIER_ACCELERATION_MODE_NO; +- goto return_response; +- } +- +- /* +- * If the connection is shutting down do not manage it. +- * state can not be SYN_SENT, SYN_RECV because connection is assured +- * Not managed states: FIN_WAIT, CLOSE_WAIT, LAST_ACK, TIME_WAIT, CLOSE. +- */ ++ * If the connection is shutting down do not manage it. ++ * state can not be SYN_SENT, SYN_RECV because connection is assured ++ * Not managed states: FIN_WAIT, CLOSE_WAIT, LAST_ACK, TIME_WAIT, CLOSE. ++ */ + spin_lock_bh(&ct->lock); + if (ct->proto.tcp.state != TCP_CONNTRACK_ESTABLISHED) { + spin_unlock_bh(&ct->lock); +@@ -333,7 +314,6 @@ static void ecm_classifier_default_process(struct ecm_classifier_instance *aci, + + return_response: + ; +- + /* + * Return the process response + */ +diff --git a/ecm_tracker_tcp.c b/ecm_tracker_tcp.c +index f073c36..e5b327a 100644 +--- a/ecm_tracker_tcp.c ++++ b/ecm_tracker_tcp.c +@@ -257,9 +257,9 @@ static DEFINE_SPINLOCK(ecm_tracker_tcp_lock); /* Global lock for the tracker gl + */ + static ecm_tracker_connection_state_t ecm_tracker_tcp_connection_state_matrix[ECM_TRACKER_SENDER_STATE_MAX][ECM_TRACKER_SENDER_STATE_MAX] = + { /* Unknown Establishing Established Closing Closed Fault */ +- /* Unknown */ {ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT}, ++ /* Unknown */ {ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_ESTABLISHED, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT}, + /* Establishing */ {ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT}, +- /* Established */ {ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_ESTABLISHED, ECM_TRACKER_CONNECTION_STATE_CLOSING, ECM_TRACKER_CONNECTION_STATE_CLOSING, ECM_TRACKER_CONNECTION_STATE_FAULT}, ++ /* Established */ {ECM_TRACKER_CONNECTION_STATE_ESTABLISHED, ECM_TRACKER_CONNECTION_STATE_ESTABLISHING, ECM_TRACKER_CONNECTION_STATE_ESTABLISHED, ECM_TRACKER_CONNECTION_STATE_CLOSING, ECM_TRACKER_CONNECTION_STATE_CLOSING, ECM_TRACKER_CONNECTION_STATE_FAULT}, + /* Closing */ {ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_CLOSING, ECM_TRACKER_CONNECTION_STATE_CLOSING, ECM_TRACKER_CONNECTION_STATE_CLOSING, ECM_TRACKER_CONNECTION_STATE_FAULT}, + /* Closed */ {ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_CLOSING, ECM_TRACKER_CONNECTION_STATE_CLOSING, ECM_TRACKER_CONNECTION_STATE_CLOSED, ECM_TRACKER_CONNECTION_STATE_FAULT}, + /* Fault */ {ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT, ECM_TRACKER_CONNECTION_STATE_FAULT}, +diff --git a/frontends/nss/ecm_nss_ported_ipv4.c b/frontends/nss/ecm_nss_ported_ipv4.c +index 1435ec0..34c056f 100644 +--- a/frontends/nss/ecm_nss_ported_ipv4.c ++++ b/frontends/nss/ecm_nss_ported_ipv4.c +@@ -2002,8 +2002,25 @@ unsigned int ecm_nss_ported_ipv4_process(struct net_device *out_dev, struct net_ + int protocol = (int)orig_tuple->dst.protonum; + __be16 *layer4hdr = NULL; + ++ /* ++ * Unconfirmed connection may be dropped by Linux at the final step, ++ * So we don't allow acceleration for the unconfirmed connections. ++ */ ++ if (likely(ct) && !nf_ct_is_confirmed(ct)) { ++ DEBUG_WARN("%p: Unconfirmed connection\n", ct); ++ return NF_ACCEPT; ++ } ++ + if (protocol == IPPROTO_TCP) { + /* ++ * Don't try to manage a non-established connection. ++ */ ++ if (likely(ct) && !test_bit(IPS_ASSURED_BIT, &ct->status)) { ++ DEBUG_WARN("%p: Non-established TCP connection\n", ct); ++ return NF_ACCEPT; ++ } ++ ++ /* + * Extract TCP header to obtain port information + */ + tcp_hdr = ecm_tracker_tcp_check_header_and_read(skb, iph, &tcp_hdr_buff); +diff --git a/frontends/nss/ecm_nss_ported_ipv6.c b/frontends/nss/ecm_nss_ported_ipv6.c +index 4c154a6..bd6349b 100644 +--- a/frontends/nss/ecm_nss_ported_ipv6.c ++++ b/frontends/nss/ecm_nss_ported_ipv6.c +@@ -1914,8 +1914,25 @@ unsigned int ecm_nss_ported_ipv6_process(struct net_device *out_dev, + int protocol = (int)orig_tuple->dst.protonum; + __be16 *layer4hdr = NULL; + ++ /* ++ * Unconfirmed connection may be dropped by Linux at the final step, ++ * So we don't allow acceleration for the unconfirmed connections. ++ */ ++ if (likely(ct) && !nf_ct_is_confirmed(ct)) { ++ DEBUG_WARN("%p: Unconfirmed connection\n", ct); ++ return NF_ACCEPT; ++ } ++ + if (protocol == IPPROTO_TCP) { + /* ++ * Don't try to manage a non-established connection. ++ */ ++ if (likely(ct) && !test_bit(IPS_ASSURED_BIT, &ct->status)) { ++ DEBUG_WARN("%p: Non-established TCP connection\n", ct); ++ return NF_ACCEPT; ++ } ++ ++ /* + * Extract TCP header to obtain port information + */ + tcp_hdr = ecm_tracker_tcp_check_header_and_read(skb, iph, &tcp_hdr_buff); +diff --git a/frontends/sfe/ecm_sfe_ported_ipv4.c b/frontends/sfe/ecm_sfe_ported_ipv4.c +index e034cde..df1ce57 100644 +--- a/frontends/sfe/ecm_sfe_ported_ipv4.c ++++ b/frontends/sfe/ecm_sfe_ported_ipv4.c +@@ -1805,8 +1805,25 @@ unsigned int ecm_sfe_ported_ipv4_process(struct net_device *out_dev, struct net_ + int protocol = (int)orig_tuple->dst.protonum; + __be16 *layer4hdr = NULL; + ++ /* ++ * Unconfirmed connection may be dropped by Linux at the final step, ++ * So we don't allow acceleration for the unconfirmed connections. ++ */ ++ if (likely(ct) && !nf_ct_is_confirmed(ct)) { ++ DEBUG_WARN("%p: Unconfirmed connection\n", ct); ++ return NF_ACCEPT; ++ } ++ + if (protocol == IPPROTO_TCP) { + /* ++ * Don't try to manage a non-established connection. ++ */ ++ if (likely(ct) && !test_bit(IPS_ASSURED_BIT, &ct->status)) { ++ DEBUG_WARN("%p: Non-established TCP connection\n", ct); ++ return NF_ACCEPT; ++ } ++ ++ /* + * Extract TCP header to obtain port information + */ + tcp_hdr = ecm_tracker_tcp_check_header_and_read(skb, iph, &tcp_hdr_buff); +diff --git a/frontends/sfe/ecm_sfe_ported_ipv6.c b/frontends/sfe/ecm_sfe_ported_ipv6.c +index 6ac05ad..657a1c7 100644 +--- a/frontends/sfe/ecm_sfe_ported_ipv6.c ++++ b/frontends/sfe/ecm_sfe_ported_ipv6.c +@@ -1746,8 +1746,25 @@ unsigned int ecm_sfe_ported_ipv6_process(struct net_device *out_dev, + int protocol = (int)orig_tuple->dst.protonum; + __be16 *layer4hdr = NULL; + ++ /* ++ * Unconfirmed connection may be dropped by Linux at the final step, ++ * So we don't allow acceleration for the unconfirmed connections. ++ */ ++ if (likely(ct) && !nf_ct_is_confirmed(ct)) { ++ DEBUG_WARN("%p: Unconfirmed connection\n", ct); ++ return NF_ACCEPT; ++ } ++ + if (protocol == IPPROTO_TCP) { + /* ++ * Don't try to manage a non-established connection. ++ */ ++ if (likely(ct) && !test_bit(IPS_ASSURED_BIT, &ct->status)) { ++ DEBUG_WARN("%p: Non-established TCP connection\n", ct); ++ return NF_ACCEPT; ++ } ++ ++ /* + * Extract TCP header to obtain port information + */ + tcp_hdr = ecm_tracker_tcp_check_header_and_read(skb, iph, &tcp_hdr_buff); +-- +cgit v1.1 + diff --git a/package/qca/qca-nss-ecm/patches/401-Fix-NSS-stats-request-roll-over-issue.patch b/package/qca/qca-nss-ecm/patches/401-Fix-NSS-stats-request-roll-over-issue.patch new file mode 100644 index 000000000..217054bb7 --- /dev/null +++ b/package/qca/qca-nss-ecm/patches/401-Fix-NSS-stats-request-roll-over-issue.patch @@ -0,0 +1,52 @@ +From 9ad19ffdcfdf77baf3abd4fcc933fd3dc8e791a5 Mon Sep 17 00:00:00 2001 +From: Murat Sezgin +Date: Sat, 20 Jun 2020 09:41:01 -0700 +Subject: [qca-nss-ecm] Fix NSS stats request roll over issue + +Use the correct timer API to check the next request time +when jiffies wrap happens. + +Signed-off-by: Murat Sezgin +Change-Id: I18646d28df7e17daeff2986dfe4bd73866d47668 +--- + frontends/nss/ecm_nss_ipv4.c | 4 ++-- + frontends/nss/ecm_nss_ipv6.c | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/frontends/nss/ecm_nss_ipv4.c b/frontends/nss/ecm_nss_ipv4.c +index 3eaf5d8..80e1aee 100644 +--- a/frontends/nss/ecm_nss_ipv4.c ++++ b/frontends/nss/ecm_nss_ipv4.c +@@ -2421,10 +2421,10 @@ static void ecm_nss_ipv4_stats_sync_req_work(struct work_struct *work) + current_jiffies = jiffies; + + if (time_is_after_jiffies(ecm_nss_ipv4_roll_check_jiffies)) { +- ecm_nss_ipv4_next_req_time = 0; ++ ecm_nss_ipv4_next_req_time = jiffies + ECM_NSS_IPV4_STATS_SYNC_PERIOD; + } + +- if (ecm_nss_ipv4_next_req_time > current_jiffies) { ++ if (time_after(ecm_nss_ipv4_next_req_time, current_jiffies)) { + msleep_interruptible(jiffies_to_msecs(ecm_nss_ipv4_next_req_time - current_jiffies)); + } + ecm_nss_ipv4_roll_check_jiffies = jiffies; +diff --git a/frontends/nss/ecm_nss_ipv6.c b/frontends/nss/ecm_nss_ipv6.c +index 288dc55..483421e 100644 +--- a/frontends/nss/ecm_nss_ipv6.c ++++ b/frontends/nss/ecm_nss_ipv6.c +@@ -2135,10 +2135,10 @@ static void ecm_nss_ipv6_stats_sync_req_work(struct work_struct *work) + current_jiffies = jiffies; + + if (time_is_after_jiffies(ecm_nss_ipv6_roll_check_jiffies)) { +- ecm_nss_ipv6_next_req_time = 0; ++ ecm_nss_ipv6_next_req_time = jiffies + ECM_NSS_IPV6_STATS_SYNC_PERIOD; + } + +- if (ecm_nss_ipv6_next_req_time > current_jiffies) { ++ if (time_after(ecm_nss_ipv6_next_req_time, current_jiffies)) { + msleep_interruptible(jiffies_to_msecs(ecm_nss_ipv6_next_req_time - current_jiffies)); + } + ecm_nss_ipv6_roll_check_jiffies = jiffies; +-- +cgit v1.1 + diff --git a/package/qca/qca-nss-ecm/patches/401-Fix-for-ref-leak-during-multicast.patch b/package/qca/qca-nss-ecm/patches/401-Fix-for-ref-leak-during-multicast.patch new file mode 100644 index 000000000..e1df653b7 --- /dev/null +++ b/package/qca/qca-nss-ecm/patches/401-Fix-for-ref-leak-during-multicast.patch @@ -0,0 +1,112 @@ +From 4b41703a181b7187d9ff8cb744eb96d09997387c Mon Sep 17 00:00:00 2001 +From: Suman Ghosh +Date: Wed, 19 Feb 2020 15:09:19 +0530 +Subject: [qca-nss-ecm] Fix for ref leak during multicast 'to' hierarchy + creation + +Change-Id: I89df9dbe5ea054cf3b87d55ce68a751cb1d6c24f +Signed-off-by: Suman Ghosh +--- + ecm_interface.c | 34 ++++++++++++++++++++++++++++++---- + 1 file changed, 30 insertions(+), 4 deletions(-) + +diff --git a/ecm_interface.c b/ecm_interface.c +index 4f7a886..2a0ca5b 100644 +--- a/ecm_interface.c ++++ b/ecm_interface.c +@@ -3885,13 +3885,13 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + dest_dev = dev_get_by_index(&init_net, *dst_if_index); + if (!dest_dev) { + if (!src_dev_is_bridge) { +- int i; +- + /* + * If already constructed any interface heirarchies before hitting + * this error condition then Deref all interface heirarchies. + */ + if (valid_if > 0) { ++ int i; ++ + for (i = 0; i < valid_if; i++) { + ifaces = ecm_db_multicast_if_heirarchy_get(interfaces, i); + ecm_db_multicast_copy_if_heirarchy(to_list_single, ifaces); +@@ -3902,11 +3902,14 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + /* + * If valid netdev not found, Return 0 + */ ++ if (br_dev_src) { ++ dev_put(br_dev_src); ++ } ++ + return 0; + } + + dest_dev = br_dev_src; +- + } + + dest_dev_type = dest_dev->type; +@@ -3945,6 +3948,10 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + } + } + ++ if (br_dev_src && (dest_dev != br_dev_src)) { ++ dev_put(br_dev_src); ++ } ++ + dev_put(dest_dev); + return 0; + } +@@ -3972,6 +3979,10 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + ecm_db_connection_interfaces_deref(to_list_single, interface_first_base[i]); + } + ++ if (br_dev_src && (dest_dev != br_dev_src)) { ++ dev_put(br_dev_src); ++ } ++ + dev_put(dest_dev); + dev_put(mc_br_slave_dev); + return 0; +@@ -3997,6 +4008,10 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + } + } + ++ if (br_dev_src && (dest_dev != br_dev_src)) { ++ dev_put(br_dev_src); ++ } ++ + dev_put(dest_dev); + dev_put(mc_br_slave_dev); + return 0; +@@ -4032,6 +4047,10 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + } + } + ++ if (br_dev_src && (dest_dev != br_dev_src)) { ++ dev_put(br_dev_src); ++ } ++ + dev_put(dest_dev); + return 0; + } +@@ -4042,8 +4061,15 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + valid_if++; + } + +- dev_put(dest_dev); ++ if (dest_dev != br_dev_src) { ++ dev_put(dest_dev); ++ } + } ++ ++ if (br_dev_src) { ++ dev_put(br_dev_src); ++ } ++ + return total_ii_count; + } + EXPORT_SYMBOL(ecm_interface_multicast_heirarchy_construct_routed); +-- +cgit v1.1 + diff --git a/package/qca/qca-nss-ecm/patches/401-Fix-neighbour-solicitation-send-function.patch b/package/qca/qca-nss-ecm/patches/401-Fix-neighbour-solicitation-send-function.patch new file mode 100644 index 000000000..7d32d6fd5 --- /dev/null +++ b/package/qca/qca-nss-ecm/patches/401-Fix-neighbour-solicitation-send-function.patch @@ -0,0 +1,33 @@ +From 72e3ae508906553e7bc982bf3c0d99bb1cbe9008 Mon Sep 17 00:00:00 2001 +From: Murat Sezgin +Date: Wed, 20 Nov 2019 16:23:06 -0800 +Subject: [qca-nss-ecm] Fix neighbour solicitation send function. + +dst_ops->neigh_lookup function pointer is set to the +ip6_neigh_lookup function. This function returns an +error pointer with the ERR_PTR() macro. So, we should +check the return value of this function pointer with +the IS_ERR() macro. + +Change-Id: I188a6e53278faaa68f1854524f612efc1f7451fe +Signed-off-by: Murat Sezgin +--- + ecm_interface.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ecm_interface.c b/ecm_interface.c +index 3f8554b..36509f0 100644 +--- a/ecm_interface.c ++++ b/ecm_interface.c +@@ -1100,7 +1100,7 @@ void ecm_interface_send_neighbour_solicitation(struct net_device *dev, ip_addr_t + #else + neigh = rt6i->dst.ops->neigh_lookup(&rt6i->dst, NULL, &dst_addr); + #endif +- if (neigh == NULL) { ++ if (IS_ERR(neigh)) { + DEBUG_TRACE("Neighbour lookup failure for destination IPv6 address " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(addr)); + dst_release(&rt6i->dst); + return; +-- +cgit v1.1 + diff --git a/package/qca/qca-nss-ecm/patches/402-Reference-leak-during-multicast_PPPoE-bridge.patch b/package/qca/qca-nss-ecm/patches/402-Reference-leak-during-multicast_PPPoE-bridge.patch new file mode 100644 index 000000000..97ce7a7e8 --- /dev/null +++ b/package/qca/qca-nss-ecm/patches/402-Reference-leak-during-multicast_PPPoE-bridge.patch @@ -0,0 +1,260 @@ +From 7c0610828b835b2aab96dd50ec841a3a28689112 Mon Sep 17 00:00:00 2001 +From: Suman Ghosh +Date: Mon, 16 Mar 2020 15:22:18 +0530 +Subject: [qca-nss-ecm] Reference leak during multicast + PPPoE bridge + +Signed-off-by: Suman Ghosh +Change-Id: I4472035f1bbb087e637169762ae2648c0fda792a +--- + ecm_interface.c | 136 +++++++++++++++++++++++++------------------------------- + 1 file changed, 60 insertions(+), 76 deletions(-) + +diff --git a/ecm_interface.c b/ecm_interface.c +index 1614336..c0d2357 100644 +--- a/ecm_interface.c ++++ b/ecm_interface.c +@@ -3796,6 +3796,25 @@ fail: + } + + /* ++ * ecm_interface_hierarchy_delete() ++ * Delete hierarchy of the requested interfaces. ++ */ ++static inline void ecm_interface_hierarchy_delete(struct ecm_db_iface_instance *interfaces, ++ uint32_t *interface_first_base, ++ int valid_if) ++{ ++ struct ecm_db_iface_instance *to_list_single[ECM_DB_IFACE_HEIRARCHY_MAX]; ++ struct ecm_db_iface_instance *ifaces; ++ int i; ++ ++ for (i = 0; i < valid_if; i++) { ++ ifaces = ecm_db_multicast_if_heirarchy_get(interfaces, i); ++ ecm_db_multicast_copy_if_heirarchy(to_list_single, ifaces); ++ ecm_db_connection_interfaces_deref(to_list_single, interface_first_base[i]); ++ } ++} ++ ++/* + * ecm_interface_multicast_heirarchy_construct_routed() + * Create destination interface heirarchy for a routed multicast connectiona + * +@@ -3816,7 +3835,6 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + uint32_t *interface_first_base, bool mfc_update, + __be16 *layer4hdr, struct sk_buff *skb) + { +- struct ecm_db_iface_instance *to_list_single[ECM_DB_IFACE_HEIRARCHY_MAX]; + struct ecm_db_iface_instance *ifaces; + struct net_device *dest_dev = NULL; + struct net_device *br_dev_src = NULL; +@@ -3829,7 +3847,7 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + int if_index; + int ii_cnt; + int total_ii_count = 0; +- bool src_dev_is_bridge = false; ++ bool src_dev_is_bridge = false, dest_dev_is_br_dev_src = false; + + DEBUG_TRACE("Construct interface heirarchy for dest_addr: " ECM_IP_ADDR_DOT_FMT " src_addr: " ECM_IP_ADDR_DOT_FMT "total destination ifs %d\n", + ECM_IP_ADDR_TO_DOT(packet_dest_addr), ECM_IP_ADDR_TO_DOT(packet_src_addr), max_if); +@@ -3876,6 +3894,7 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + continue; + } + ++ dest_dev_is_br_dev_src = false; + dest_dev = dev_get_by_index(&init_net, *dst_if_index); + if (!dest_dev) { + if (!src_dev_is_bridge) { +@@ -3884,26 +3903,23 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + * this error condition then Deref all interface heirarchies. + */ + if (valid_if > 0) { +- int i; +- +- for (i = 0; i < valid_if; i++) { +- ifaces = ecm_db_multicast_if_heirarchy_get(interfaces, i); +- ecm_db_multicast_copy_if_heirarchy(to_list_single, ifaces); +- ecm_db_connection_interfaces_deref(to_list_single, interface_first_base[i]); +- } ++ ecm_interface_hierarchy_delete(interfaces, interface_first_base, valid_if); + } + +- /* +- * If valid netdev not found, Return 0 +- */ +- if (br_dev_src) { +- dev_put(br_dev_src); +- } +- +- return 0; ++ goto fail1; + } + + dest_dev = br_dev_src; ++ ++ /* ++ * In some cases when WAN interface is added to bridge and traffic is downstream, ++ * the bridge device is part of the destination list from MFC, and at the same time ++ * 'src_dev_is_bridge' will be true as well. In such cases we will need to release ++ * the hold on the bridge device separately for dest_dev and br_dev_src. ++ * Setting this flag to true indicates that this is not the case, ++ * and that releasing the hold once is enough ++ */ ++ dest_dev_is_br_dev_src = true; + } + + dest_dev_type = dest_dev->type; +@@ -3927,7 +3943,6 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + } + + if ((if_num < 0) || (if_num > ECM_DB_MULTICAST_IF_MAX)) { +- int i; + DEBUG_WARN("MCS is not ready\n"); + + /* +@@ -3935,19 +3950,10 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + * this error condition then Deref all interface heirarchies. + */ + if (valid_if > 0) { +- for (i = 0; i < valid_if; i++) { +- ifaces = ecm_db_multicast_if_heirarchy_get(interfaces, i); +- ecm_db_multicast_copy_if_heirarchy(to_list_single, ifaces); +- ecm_db_connection_interfaces_deref(to_list_single, interface_first_base[i]); +- } ++ ecm_interface_hierarchy_delete(interfaces, interface_first_base, valid_if); + } + +- if (br_dev_src && (dest_dev != br_dev_src)) { +- dev_put(br_dev_src); +- } +- +- dev_put(dest_dev); +- return 0; ++ goto fail2; + } + + if (in_dev && !mfc_update) { +@@ -3955,34 +3961,20 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + } + + for (br_if = 0; br_if < if_num; br_if++) { ++ int total_if = valid_if + br_if; ++ + mc_br_slave_dev = dev_get_by_index(&init_net, mc_dst_if_index[br_if]); + if (!mc_br_slave_dev) { + continue; + } + +- if ((valid_if + br_if) > ECM_DB_MULTICAST_IF_MAX) { +- int i; +- +- /* +- * If already constructed any interface heirarchies before hitting +- * this error condition then Deref all interface heirarchies. +- */ +- for (i = 0; i < (valid_if + br_if); i++) { +- ifaces = ecm_db_multicast_if_heirarchy_get(interfaces, i); +- ecm_db_multicast_copy_if_heirarchy(to_list_single, ifaces); +- ecm_db_connection_interfaces_deref(to_list_single, interface_first_base[i]); +- } +- +- if (br_dev_src && (dest_dev != br_dev_src)) { +- dev_put(br_dev_src); +- } +- +- dev_put(dest_dev); ++ if (total_if > ECM_DB_MULTICAST_IF_MAX) { ++ ecm_interface_hierarchy_delete(interfaces, interface_first_base, total_if); + dev_put(mc_br_slave_dev); +- return 0; ++ goto fail2; + } + +- ifaces = ecm_db_multicast_if_heirarchy_get(interfaces, valid_if + br_if); ++ ifaces = ecm_db_multicast_if_heirarchy_get(interfaces, total_if); + /* + * Construct a single interface heirarchy of a multicast dev. + */ +@@ -3993,25 +3985,15 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + * If already constructed any interface heirarchies before hitting + * this error condition then Deref all interface heirarchies. + */ +- if ((valid_if + br_if) > 0) { +- int i; +- for (i = 0; i < (valid_if + br_if); i++) { +- ifaces = ecm_db_multicast_if_heirarchy_get(interfaces, i); +- ecm_db_multicast_copy_if_heirarchy(to_list_single, ifaces); +- ecm_db_connection_interfaces_deref(to_list_single, interface_first_base[i]); +- } +- } +- +- if (br_dev_src && (dest_dev != br_dev_src)) { +- dev_put(br_dev_src); ++ if (total_if > 0) { ++ ecm_interface_hierarchy_delete(interfaces, interface_first_base, total_if); + } + +- dev_put(dest_dev); + dev_put(mc_br_slave_dev); +- return 0; ++ goto fail2; + } + +- interface_first = ecm_db_multicast_if_first_get_at_index(interface_first_base, (valid_if + br_if)); ++ interface_first = ecm_db_multicast_if_first_get_at_index(interface_first_base, total_if); + *interface_first = ii_cnt; + total_ii_count += ii_cnt; + dev_put(mc_br_slave_dev); +@@ -4033,20 +4015,10 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + * this error condition then Deref all interface heirarchies. + */ + if (valid_if > 0) { +- int i; +- for (i = 0; i < valid_if; i++) { +- ifaces = ecm_db_multicast_if_heirarchy_get(interfaces, i); +- ecm_db_multicast_copy_if_heirarchy(to_list_single, ifaces); +- ecm_db_connection_interfaces_deref(to_list_single, interface_first_base[i]); +- } +- } +- +- if (br_dev_src && (dest_dev != br_dev_src)) { +- dev_put(br_dev_src); ++ ecm_interface_hierarchy_delete(interfaces, interface_first_base, valid_if); + } + +- dev_put(dest_dev); +- return 0; ++ goto fail2; + } + + interface_first = ecm_db_multicast_if_first_get_at_index(interface_first_base, valid_if); +@@ -4055,7 +4027,7 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + valid_if++; + } + +- if (dest_dev != br_dev_src) { ++ if (!dest_dev_is_br_dev_src) { + dev_put(dest_dev); + } + } +@@ -4065,6 +4037,18 @@ int32_t ecm_interface_multicast_heirarchy_construct_routed(struct ecm_front_end_ + } + + return total_ii_count; ++ ++fail2: ++ if (!dest_dev_is_br_dev_src) { ++ dev_put(dest_dev); ++ } ++ ++fail1: ++ if (br_dev_src) { ++ dev_put(br_dev_src); ++ } ++ ++ return 0; + } + EXPORT_SYMBOL(ecm_interface_multicast_heirarchy_construct_routed); + +-- +cgit v1.1 + diff --git a/package/qca/qca-nss-ecm/patches/403-Access-global-accelerated-count-under-lock.patch b/package/qca/qca-nss-ecm/patches/403-Access-global-accelerated-count-under-lock.patch new file mode 100644 index 000000000..d458e1134 --- /dev/null +++ b/package/qca/qca-nss-ecm/patches/403-Access-global-accelerated-count-under-lock.patch @@ -0,0 +1,59 @@ +From 65a49ebd1bd12b9952dfa214de0a2da43ba2abed Mon Sep 17 00:00:00 2001 +From: Bhaskar Valaboju +Date: Tue, 13 Aug 2019 14:21:03 +0530 +Subject: [qca-nss-ecm]: Access global ipv4/ipv6 accelerated count under lock + +Flow accelerated count maintained as global variables are accessed +in multiple kernel contexts. These counters are updated under lock, +but read without lock. Read is in kernel thread context (workqueue) +and sometimes it is taking stale entry (0) and doesn't change. +Lock is added to read correct value. + +Change-Id: I74cf27fe5097c6ae7dfcc06319762a8a322d79a3 +Signed-off-by: Bhaskar Valaboju +--- + frontends/nss/ecm_nss_ipv4.c | 3 +++ + frontends/nss/ecm_nss_ipv6.c | 3 +++ + 2 files changed, 6 insertions(+) + +(limited to 'frontends') + +diff --git a/frontends/nss/ecm_nss_ipv4.c b/frontends/nss/ecm_nss_ipv4.c +index afd660e..4e66cdf 100644 +--- a/frontends/nss/ecm_nss_ipv4.c ++++ b/frontends/nss/ecm_nss_ipv4.c +@@ -2288,10 +2288,13 @@ static void ecm_nss_ipv4_stats_sync_req_work(struct work_struct *work) + int retry = 3; + unsigned long int current_jiffies; + ++ spin_lock_bh(&ecm_nss_ipv4_lock); + if (ecm_nss_ipv4_accelerated_count == 0) { ++ spin_unlock_bh(&ecm_nss_ipv4_lock); + DEBUG_TRACE("There is no accelerated IPv4 connection\n"); + goto reschedule; + } ++ spin_unlock_bh(&ecm_nss_ipv4_lock); + + usleep_range(ECM_NSS_IPV4_STATS_SYNC_UDELAY - 100, ECM_NSS_IPV4_STATS_SYNC_UDELAY); + +diff --git a/frontends/nss/ecm_nss_ipv6.c b/frontends/nss/ecm_nss_ipv6.c +index 1f7f51e..55849e7 100644 +--- a/frontends/nss/ecm_nss_ipv6.c ++++ b/frontends/nss/ecm_nss_ipv6.c +@@ -1998,10 +1998,13 @@ static void ecm_nss_ipv6_stats_sync_req_work(struct work_struct *work) + int retry = 3; + unsigned long int current_jiffies; + ++ spin_lock_bh(&ecm_nss_ipv6_lock); + if (ecm_nss_ipv6_accelerated_count == 0) { ++ spin_unlock_bh(&ecm_nss_ipv6_lock); + DEBUG_TRACE("There is no accelerated IPv6 connection\n"); + goto reschedule; + } ++ spin_unlock_bh(&ecm_nss_ipv6_lock); + + usleep_range(ECM_NSS_IPV6_STATS_SYNC_UDELAY - 100, ECM_NSS_IPV6_STATS_SYNC_UDELAY); + +-- +cgit v1.1 + diff --git a/package/qca/qca-nss-ecm/patches/403-Fix-IPv6-neighbor-solicitation-request.patch b/package/qca/qca-nss-ecm/patches/403-Fix-IPv6-neighbor-solicitation-request.patch new file mode 100644 index 000000000..7639b88a0 --- /dev/null +++ b/package/qca/qca-nss-ecm/patches/403-Fix-IPv6-neighbor-solicitation-request.patch @@ -0,0 +1,83 @@ +From b96002061178f399c1e58a9ad821e5096a64f788 Mon Sep 17 00:00:00 2001 +From: Murat Sezgin +Date: Mon, 23 Mar 2020 10:59:39 -0700 +Subject: [qca-nss-ecm] Fix IPv6 neighbor solicitation request + +Send the solicitation request to the GW address, when +a GW address is found, while establishing the node instance. + +Signed-off-by: Murat Sezgin +Change-Id: I2187569bcfd05b0d091cf8c79171ee3c41c39cb9 +--- + frontends/nss/ecm_nss_ipv6.c | 7 ++++--- + frontends/nss/ecm_nss_multicast_ipv6.c | 9 +++++++++ + frontends/sfe/ecm_sfe_ipv6.c | 7 ++++--- + 3 files changed, 17 insertions(+), 6 deletions(-) + +diff --git a/frontends/nss/ecm_nss_ipv6.c b/frontends/nss/ecm_nss_ipv6.c +index c7dd37f..9011e18 100644 +--- a/frontends/nss/ecm_nss_ipv6.c ++++ b/frontends/nss/ecm_nss_ipv6.c +@@ -527,13 +527,14 @@ struct ecm_db_node_instance *ecm_nss_ipv6_node_establish_and_ref(struct ecm_fron + struct net_device *master; + master = ecm_interface_get_and_hold_dev_master(dev); + DEBUG_ASSERT(master, "Expected a master\n"); +- ecm_interface_send_neighbour_solicitation(master, addr); ++ ecm_interface_send_neighbour_solicitation(master, gw_addr); + dev_put(master); + } else { +- ecm_interface_send_neighbour_solicitation(dev, addr); ++ ecm_interface_send_neighbour_solicitation(dev, gw_addr); + } + +- DEBUG_TRACE("Failed to obtain mac for host " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(addr)); ++ DEBUG_TRACE("Failed to obtain mac for host " ECM_IP_ADDR_OCTAL_FMT " gw: " ECM_IP_ADDR_OCTAL_FMT "\n", ++ ECM_IP_ADDR_TO_OCTAL(addr), ECM_IP_ADDR_TO_OCTAL(gw_addr)); + return NULL; + } + done: +diff --git a/frontends/nss/ecm_nss_multicast_ipv6.c b/frontends/nss/ecm_nss_multicast_ipv6.c +index a361eec..38fde95 100644 +--- a/frontends/nss/ecm_nss_multicast_ipv6.c ++++ b/frontends/nss/ecm_nss_multicast_ipv6.c +@@ -2558,6 +2558,15 @@ static struct ecm_db_node_instance *ecm_nss_multicast_ipv6_node_establish_and_re + #endif + if (!ecm_interface_mac_addr_get(addr, node_addr, &on_link, gw_addr)) { + DEBUG_TRACE("Failed to obtain mac for host " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(addr)); ++ ++ /* ++ * If there is a gw_addr found during the lookup, use that address ++ * for neighbour solicitation request. ++ */ ++ if (!ECM_IP_ADDR_IS_NULL(gw_addr)) { ++ ECM_IP_ADDR_COPY(addr, gw_addr); ++ } ++ + if (ecm_front_end_is_bridge_port(dev)) { + struct net_device *master; + master = ecm_interface_get_and_hold_dev_master(dev); +diff --git a/frontends/sfe/ecm_sfe_ipv6.c b/frontends/sfe/ecm_sfe_ipv6.c +index 3fd5d46..51a9ccb 100644 +--- a/frontends/sfe/ecm_sfe_ipv6.c ++++ b/frontends/sfe/ecm_sfe_ipv6.c +@@ -256,13 +256,14 @@ struct ecm_db_node_instance *ecm_sfe_ipv6_node_establish_and_ref(struct ecm_fron + struct net_device *master; + master = ecm_interface_get_and_hold_dev_master(dev); + DEBUG_ASSERT(master, "Expected a master\n"); +- ecm_interface_send_neighbour_solicitation(master, addr); ++ ecm_interface_send_neighbour_solicitation(master, gw_addr); + dev_put(master); + } else { +- ecm_interface_send_neighbour_solicitation(dev, addr); ++ ecm_interface_send_neighbour_solicitation(dev, gw_addr); + } + +- DEBUG_TRACE("Failed to obtain mac for host " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(addr)); ++ DEBUG_TRACE("Failed to obtain mac for host " ECM_IP_ADDR_OCTAL_FMT " gw: " ECM_IP_ADDR_OCTAL_FMT "\n", ++ ECM_IP_ADDR_TO_OCTAL(addr), ECM_IP_ADDR_TO_OCTAL(gw_addr)); + return NULL; + } + done: +-- +cgit v1.1 + diff --git a/package/qca/qca-nss-ecm/patches/404-IPv6-solicitation-fix-with-zero-gateway-address.patch b/package/qca/qca-nss-ecm/patches/404-IPv6-solicitation-fix-with-zero-gateway-address.patch new file mode 100644 index 000000000..bdedff442 --- /dev/null +++ b/package/qca/qca-nss-ecm/patches/404-IPv6-solicitation-fix-with-zero-gateway-address.patch @@ -0,0 +1,63 @@ +From 5b51ae2f1eca61c6f68e40a05333da5a362ff327 Mon Sep 17 00:00:00 2001 +From: Murat Sezgin +Date: Mon, 13 Apr 2020 09:01:48 -0700 +Subject: [qca-nss-ecm] IPv6 solicitation fix with zero gateway address + +The ECM function can find a zero gateway address for +a host IP address. In this case, we need to use the +host IP address while sending the solicitation request. + +Signed-off-by: Murat Sezgin +Change-Id: I1979834088ddfe1843566f51f64348f79e2df0fc +--- + frontends/nss/ecm_nss_ipv6.c | 11 ++++++++++- + frontends/sfe/ecm_sfe_ipv6.c | 11 ++++++++++- + 2 files changed, 20 insertions(+), 2 deletions(-) + +diff --git a/frontends/nss/ecm_nss_ipv6.c b/frontends/nss/ecm_nss_ipv6.c +index a05781b..9eb591c 100644 +--- a/frontends/nss/ecm_nss_ipv6.c ++++ b/frontends/nss/ecm_nss_ipv6.c +@@ -516,7 +516,16 @@ struct ecm_db_node_instance *ecm_nss_ipv6_node_establish_and_ref(struct ecm_fron + return NULL; + } + +- DEBUG_TRACE("Have a gw address " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(gw_addr)); ++ /* ++ * The found gateway address can be all zeros, ++ * so in this case use the host address. ++ */ ++ if (ECM_IP_ADDR_IS_NULL(gw_addr)) { ++ DEBUG_TRACE("GW address is found as zeros, so use host IP\n"); ++ ECM_IP_ADDR_COPY(gw_addr, addr); ++ } else { ++ DEBUG_TRACE("Have a gw address " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(gw_addr)); ++ } + + if (ecm_interface_mac_addr_get_no_route(dev, gw_addr, node_addr)) { + DEBUG_TRACE("Found the mac address for gateway\n"); +diff --git a/frontends/sfe/ecm_sfe_ipv6.c b/frontends/sfe/ecm_sfe_ipv6.c +index 51a9ccb..e609df7 100644 +--- a/frontends/sfe/ecm_sfe_ipv6.c ++++ b/frontends/sfe/ecm_sfe_ipv6.c +@@ -245,7 +245,16 @@ struct ecm_db_node_instance *ecm_sfe_ipv6_node_establish_and_ref(struct ecm_fron + return NULL; + } + +- DEBUG_TRACE("Have a gw address " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(gw_addr)); ++ /* ++ * The found gateway address can be all zeros, ++ * so in this case use the host address. ++ */ ++ if (ECM_IP_ADDR_IS_NULL(gw_addr)) { ++ DEBUG_TRACE("GW address is found as zeros, so use host IP\n"); ++ ECM_IP_ADDR_COPY(gw_addr, addr); ++ } else { ++ DEBUG_TRACE("Have a gw address " ECM_IP_ADDR_OCTAL_FMT "\n", ECM_IP_ADDR_TO_OCTAL(gw_addr)); ++ } + + if (ecm_interface_mac_addr_get_no_route(dev, gw_addr, node_addr)) { + DEBUG_TRACE("Found the mac address for gateway\n"); +-- +cgit v1.1 + diff --git a/package/qca/qca-nss-ecm/patches/405-Allow-egress-on-same-port-when-bridge-hairpin-is-enabled.patch b/package/qca/qca-nss-ecm/patches/405-Allow-egress-on-same-port-when-bridge-hairpin-is-enabled.patch new file mode 100644 index 000000000..a236fb757 --- /dev/null +++ b/package/qca/qca-nss-ecm/patches/405-Allow-egress-on-same-port-when-bridge-hairpin-is-enabled.patch @@ -0,0 +1,126 @@ +From e23eabd570eabde1d1fc803127a97fd101642467 Mon Sep 17 00:00:00 2001 +From: Varsha Mishra +Date: Fri, 12 Jun 2020 01:06:58 +0530 +Subject: [qca-nss-ecm] Allow egress on same port when bridge hairpin is + enabled. + +When bridge hairpin is enabled, allow egress on same port. Wi-Fi intrabss +frames are getting exceptioned to stack. Bridge gets to make the decision +whether these frames need to be forwarded or dropped. + +Signed-off-by: Varsha Mishra +Change-Id: Ibdd72264d8887330ba0297ed12cbcfc390065bff +--- + frontends/nss/ecm_nss_ipv4.c | 28 ++++++++++++++++++++++------ + frontends/nss/ecm_nss_ipv6.c | 28 ++++++++++++++++++++++------ + 2 files changed, 44 insertions(+), 12 deletions(-) + +diff --git a/frontends/nss/ecm_nss_ipv4.c b/frontends/nss/ecm_nss_ipv4.c +index 60f799b..51c9ebf 100644 +--- a/frontends/nss/ecm_nss_ipv4.c ++++ b/frontends/nss/ecm_nss_ipv4.c +@@ -1756,7 +1756,9 @@ static unsigned int ecm_nss_ipv4_bridge_post_routing_hook(void *priv, + * Case 2: + * For routed packets the skb will have the src mac matching the bridge mac. + * Case 3: +- * If the packet was not local (case 1) or routed (case 2) then we process. ++ * If the packet was not local (case 1) or routed (case 2) then ++ * we process. There is an exception to case 2: when hairpin mode ++ * is enabled, we process. + */ + + /* +@@ -1768,14 +1770,28 @@ static unsigned int ecm_nss_ipv4_bridge_post_routing_hook(void *priv, + dev_put(bridge); + return NF_ACCEPT; + } ++ ++ /* ++ * This flag needs to be checked in slave port(eth0/ath0) ++ * and not on master interface(br-lan). Hairpin flag can be ++ * enabled/disabled for ports individually. ++ */ + if (in == out) { +- DEBUG_TRACE("skb: %p, bridge: %p (%s), port bounce on %p (%s)\n", skb, bridge, bridge->name, out, out->name); +- dev_put(in); +- dev_put(bridge); +- return NF_ACCEPT; ++ if (!br_is_hairpin_enabled(in)) { ++ DEBUG_TRACE("skb: %p, bridge: %p (%s), ignoring" ++ "the packet, hairpin not enabled" ++ "on port %p (%s)\n", skb, bridge, ++ bridge->name, out, out->name); ++ dev_put(in); ++ dev_put(bridge); ++ return NF_ACCEPT; ++ } ++ DEBUG_TRACE("skb: %p, bridge: %p (%s), hairpin enabled on port" ++ "%p (%s)\n", skb, bridge, bridge->name, out, out->name); + } ++ ++ /* ++ * Case 2: Routed trafffic would be handled by the INET post routing. ++ */ + if (!ecm_mac_addr_equal(skb_eth_hdr->h_source, bridge->dev_addr)) { +- /* +- * Case 2: Routed trafffic would be handled by the INET post routing. +- */ + DEBUG_TRACE("skb: %p, Ignoring routed packet to bridge: %p (%s)\n", skb, bridge, bridge->name); + goto skip_ipv4_bridge_flow; + } +diff --git a/frontends/nss/ecm_nss_ipv6.c b/frontends/nss/ecm_nss_ipv6.c +index 6ad425e..160c94c 100644 +--- a/frontends/nss/ecm_nss_ipv6.c ++++ b/frontends/nss/ecm_nss_ipv6.c +@@ -1498,7 +1498,9 @@ static unsigned int ecm_nss_ipv6_bridge_post_routing_hook(void *priv, + * Case 2: + * For routed packets the skb will have the src mac matching the bridge mac. + * Case 3: +- * If the packet was not local (case 1) or routed (case 2) then we process. ++ * If the packet was not local (case 1) or routed (case 2) then ++ * we process. There is an exception to case 2: when hairpin mode ++ * is enabled, we process. + */ + + /* +@@ -1510,14 +1512,28 @@ static unsigned int ecm_nss_ipv6_bridge_post_routing_hook(void *priv, + dev_put(bridge); + return NF_ACCEPT; + } ++ ++ /* ++ * This flag needs to be checked in slave port(eth0/ath0) ++ * and not on master interface(br-lan). Hairpin flag can be ++ * enabled/disabled for ports individually. ++ */ + if (in == out) { +- DEBUG_TRACE("skb: %p, bridge: %p (%s), port bounce on %p (%s)\n", skb, bridge, bridge->name, out, out->name); +- dev_put(in); +- dev_put(bridge); +- return NF_ACCEPT; ++ if (!br_is_hairpin_enabled(in)) { ++ DEBUG_TRACE("skb: %p, bridge: %p (%s), ignoring" ++ "the packet, hairpin not enabled" ++ "on port %p (%s)\n", skb, bridge, ++ bridge->name, out, out->name); ++ dev_put(in); ++ dev_put(bridge); ++ return NF_ACCEPT; ++ } ++ DEBUG_TRACE("skb: %p, bridge: %p (%s), hairpin enabled on port" ++ "%p (%s)\n", skb, bridge, bridge->name, out, out->name); + } ++ ++ /* ++ * Case 2: Routed trafffic would be handled by the INET post routing. ++ */ + if (!ecm_mac_addr_equal(skb_eth_hdr->h_source, bridge->dev_addr)) { +- /* +- * Case 2: Routed trafffic would be handled by the INET post routing. +- */ + DEBUG_TRACE("skb: %p, Ignoring routed packet to bridge: %p (%s)\n", skb, bridge, bridge->name); + goto skip_ipv6_bridge_flow; + } +-- +cgit v1.1 + diff --git a/package/qca/qca-nss-gmac/Makefile b/package/qca/qca-nss-gmac/Makefile new file mode 100644 index 000000000..268f5a944 --- /dev/null +++ b/package/qca/qca-nss-gmac/Makefile @@ -0,0 +1,46 @@ +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=qca-nss-gmac +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-gmac +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=9b74deef2816d91e58926e6fab7a6ff931eb3b22 + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/qca-nss-gmac + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Devices + DEPENDS:=@TARGET_ipq806x||TARGET_ipq_ipq806x @!LINUX_3_18 + TITLE:=Kernel driver for NSS gmac + FILES:=$(PKG_BUILD_DIR)/ipq806x/qca-nss-gmac.ko + AUTOLOAD:=$(call AutoLoad,31,qca-nss-gmac) +endef + +define KernelPackage/qca-nss-gmac/Description +This package contains a NSS driver for QCA chipset +endef + +define Build/InstallDev + mkdir -p $(1)/usr/include/qca-nss-gmac + $(CP) $(PKG_BUILD_DIR)/ipq806x/exports/* $(1)/usr/include/qca-nss-gmac/ +endef + +EXTRA_CFLAGS+= \ + -DCONFIG_NSS_DEBUG_LEVEL=4 \ + -I$(PKG_BUILD_DIR)/nss_hal/include \ + -I$(PKG_BUILD_DIR)/nss_hal/$(BOARD) + +define Build/Compile + $(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \ + $(KERNEL_MAKE_FLAGS) \ + $(PKG_MAKE_FLAGS) \ + M="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ + modules +endef + +$(eval $(call KernelPackage,qca-nss-gmac)) diff --git a/package/qca/qca-nss-gmac/patches/100-kernel-5.4-support.patch b/package/qca/qca-nss-gmac/patches/100-kernel-5.4-support.patch new file mode 100644 index 000000000..f3b91abc2 --- /dev/null +++ b/package/qca/qca-nss-gmac/patches/100-kernel-5.4-support.patch @@ -0,0 +1,279 @@ +--- a/ipq806x/nss_gmac_ctrl.c ++++ b/ipq806x/nss_gmac_ctrl.c +@@ -322,16 +322,15 @@ void nss_gmac_tx_rx_desc_init(struct nss + * (for example "ifconfig eth0"). + * @param[in] pointer to net_device structure. + * @param[in] pointer to net_device_stats64 structure. +- * @return Returns pointer to net_device_stats64 structure. + */ +-struct rtnl_link_stats64 *nss_gmac_get_stats64(struct net_device *netdev, ++void nss_gmac_get_stats64(struct net_device *netdev, + struct rtnl_link_stats64 *stats) + { + struct nss_gmac_dev *gmacdev = (struct nss_gmac_dev *)netdev_priv(netdev); + BUG_ON(gmacdev == NULL); + + if (!gmacdev->data_plane_ops) +- return stats; ++ return; + + spin_lock_bh(&gmacdev->stats_lock); + gmacdev->data_plane_ops->get_stats(gmacdev->data_plane_ctx, &gmacdev->nss_stats); +@@ -354,8 +353,6 @@ struct rtnl_link_stats64 *nss_gmac_get_s + stats->tx_fifo_errors = gmacdev->nss_stats.tx_underflow_errors; + stats->tx_window_errors = gmacdev->nss_stats.tx_late_collision_errors; + spin_unlock_bh(&gmacdev->stats_lock); +- +- return stats; + } + + +@@ -439,7 +436,7 @@ static int nss_gmac_mtnp_show(struct dev + static int nss_gmac_tstamp_show(struct device *dev, struct device_attribute *attr, char *buf) + { + struct nss_gmac_dev *gmacdev = (struct nss_gmac_dev *)netdev_priv(to_net_dev(dev)); +- struct timeval tv; ++ struct timespec64 ts64; + uint32_t ret, timeout; + uint32_t ts_hi, ts_lo; + +@@ -459,11 +456,12 @@ static int nss_gmac_tstamp_show(struct d + return -1; + } + +- do_gettimeofday(&tv); ++ ktime_get_real_ts64(&ts64); + + ret = snprintf( + buf, PAGE_SIZE, +- "sec:%u nsec:%u time-of-day: %12d.%06d \n", ts_hi, ts_lo, (int)tv.tv_sec, (int)tv.tv_usec); ++ "sec:%u nsec:%u time-of-day: %12d.%06d \n", \ ++ ts_hi, ts_lo, (int)ts64.tv_sec, (int)(ts64.tv_nsec / NSEC_PER_USEC)); + + return ret; + } +@@ -951,7 +949,7 @@ static const struct net_device_ops nss_g + * @param[in] pointer to advertised features + * @return void + */ +-static void nss_gmac_update_features(uint32_t *supp, uint32_t *adv) ++static void nss_gmac_update_features(long unsigned int *supp, long unsigned int *adv) + { + *supp |= NSS_GMAC_SUPPORTED_FEATURES; + *adv |= NSS_GMAC_ADVERTISED_FEATURES; +@@ -1409,8 +1407,8 @@ static int32_t nss_gmac_probe(struct pla + goto nss_gmac_phy_attach_fail; + } + +- nss_gmac_update_features(&(gmacdev->phydev->supported), +- &(gmacdev->phydev->advertising)); ++ nss_gmac_update_features(gmacdev->phydev->supported, ++ gmacdev->phydev->advertising); + gmacdev->phydev->irq = PHY_POLL; + netdev_dbg(netdev, "PHY %s attach OK\n", phy_id); + +@@ -1440,6 +1438,8 @@ static int32_t nss_gmac_probe(struct pla + netdev_dbg(netdev, "%s MII_PHYSID2 - 0x%04x\n", netdev->name, + nss_gmac_mii_rd_reg(gmacdev, gmacdev->phy_base, MII_PHYSID2)); + } else if (gmacdev->phy_base != NSS_GMAC_NO_MDIO_PHY) { ++ SET_NETDEV_DEV(netdev, gmacdev->miibus->parent); ++ + /* + * Issue a phy_attach for the interface connected to a switch + */ +--- a/ipq806x/nss_gmac_ethtool.c ++++ b/ipq806x/nss_gmac_ethtool.c +@@ -143,9 +143,9 @@ static const struct nss_gmac_ethtool_sta + /** + * @brief Array of strings describing private flag names + */ +-static const char *gmac_strings_priv_flags[] = { +- "linkpoll", +- "tstamp", ++static const char *gmac_strings_priv_flags[][ETH_GSTRING_LEN] = { ++ {"linkpoll"}, ++ {"tstamp"}, + }; + + #define NSS_GMAC_STATS_LEN ARRAY_SIZE(gmac_gstrings_stats) +@@ -292,6 +292,7 @@ static int nss_gmac_set_pauseparam(struc + { + struct nss_gmac_dev *gmacdev = (struct nss_gmac_dev *)netdev_priv(netdev); + struct phy_device *phydev; ++ long unsigned int *advertising; + + BUG_ON(gmacdev == NULL); + BUG_ON(gmacdev->netdev != netdev); +@@ -327,14 +328,15 @@ static int nss_gmac_set_pauseparam(struc + phydev = gmacdev->phydev; + + /* Update flow control advertisment */ +- phydev->advertising &= ~(ADVERTISED_Pause | ADVERTISED_Asym_Pause); ++ advertising = phydev->advertising; ++ *advertising &= ~(ADVERTISED_Pause | ADVERTISED_Asym_Pause); + + if (gmacdev->pause & FLOW_CTRL_RX) +- phydev->advertising |= ++ *advertising |= + (ADVERTISED_Pause | ADVERTISED_Asym_Pause); + + if (gmacdev->pause & FLOW_CTRL_TX) +- phydev->advertising |= ADVERTISED_Asym_Pause; ++ *advertising |= ADVERTISED_Asym_Pause; + + genphy_config_aneg(gmacdev->phydev); + +@@ -396,12 +398,13 @@ static uint32_t nss_gmac_get_msglevel(st + * @param[in] pointer to struct net_device. + * @param[in] pointer to struct ethtool_cmd. + */ +-static int32_t nss_gmac_get_settings(struct net_device *netdev, +- struct ethtool_cmd *ecmd) ++static int nss_gmac_get_settings(struct net_device *netdev, ++ struct ethtool_link_ksettings *elk) + { + struct nss_gmac_dev *gmacdev = (struct nss_gmac_dev *)netdev_priv(netdev); + struct phy_device *phydev = NULL; + uint16_t phyreg; ++ u32 lp_advertising = 0; + + BUG_ON(gmacdev == NULL); + +@@ -413,10 +416,10 @@ static int32_t nss_gmac_get_settings(str + */ + if (!test_bit(__NSS_GMAC_LINKPOLL, &gmacdev->flags)) { + if (gmacdev->forced_speed != SPEED_UNKNOWN) { +- ethtool_cmd_speed_set(ecmd, gmacdev->forced_speed); +- ecmd->duplex = gmacdev->forced_duplex; +- ecmd->mdio_support = 0; +- ecmd->lp_advertising = 0; ++ elk->base.speed = gmacdev->forced_speed; ++ elk->base.duplex = gmacdev->forced_duplex; ++ elk->base.mdio_support = 0; ++ ethtool_convert_legacy_u32_to_link_mode(elk->link_modes.lp_advertising, 0); + return 0; + } else { + /* Non-link polled interfaced must have a forced +@@ -429,63 +429,59 @@ static int32_t nss_gmac_get_settings(struct net_device *netdev, + + /* update PHY status */ + if (phydev->is_c45 == true) { +- ecmd->mdio_support = ETH_MDIO_SUPPORTS_C45; ++ elk->base.mdio_support = ETH_MDIO_SUPPORTS_C45; + } else { + if (genphy_read_status(phydev) != 0) { + return -EIO; + } +- ecmd->mdio_support = ETH_MDIO_SUPPORTS_C22; ++ elk->base.mdio_support = ETH_MDIO_SUPPORTS_C22; + } + + /* Populate capabilities advertised by self */ +- ecmd->advertising = phydev->advertising; ++ bitmap_copy(elk->link_modes.advertising, phydev->advertising, __ETHTOOL_LINK_MODE_MASK_NBITS); + +- ecmd->autoneg = phydev->autoneg; +- +- if (gmacdev->link_state == LINKDOWN) { +- ethtool_cmd_speed_set(ecmd, SPEED_UNKNOWN); +- ecmd->duplex = DUPLEX_UNKNOWN; +- } else { +- ethtool_cmd_speed_set(ecmd, phydev->speed); +- ecmd->duplex = phydev->duplex; +- } +- +- ecmd->port = PORT_TP; +- ecmd->phy_address = gmacdev->phy_base; +- ecmd->transceiver = XCVR_EXTERNAL; ++ elk->base.autoneg = phydev->autoneg; ++ elk->base.speed = phydev->speed; ++ elk->base.duplex = phydev->duplex; ++ elk->base.port = PORT_TP; ++ elk->base.phy_address = gmacdev->phy_base; ++ elk->base.transceiver = XCVR_EXTERNAL; + + /* Populate supported capabilities */ +- ecmd->supported = phydev->supported; ++ bitmap_copy(elk->link_modes.supported, phydev->supported, __ETHTOOL_LINK_MODE_MASK_NBITS); + + if (phydev->is_c45 == true) + return 0; + + /* Populate capabilities advertised by link partner */ ++ ethtool_convert_link_mode_to_legacy_u32(&lp_advertising, elk->link_modes.lp_advertising); + phyreg = nss_gmac_mii_rd_reg(gmacdev, gmacdev->phy_base, MII_LPA); + if (phyreg & LPA_10HALF) +- ecmd->lp_advertising |= ADVERTISED_10baseT_Half; ++ lp_advertising |= ADVERTISED_10baseT_Half; + + if (phyreg & LPA_10FULL) +- ecmd->lp_advertising |= ADVERTISED_10baseT_Full; ++ lp_advertising |= ADVERTISED_10baseT_Full; + + if (phyreg & LPA_100HALF) +- ecmd->lp_advertising |= ADVERTISED_100baseT_Half; ++ lp_advertising |= ADVERTISED_100baseT_Half; + + if (phyreg & LPA_100FULL) +- ecmd->lp_advertising |= ADVERTISED_100baseT_Full; ++ lp_advertising |= ADVERTISED_100baseT_Full; + + if (phyreg & LPA_PAUSE_CAP) +- ecmd->lp_advertising |= ADVERTISED_Pause; ++ lp_advertising |= ADVERTISED_Pause; + + if (phyreg & LPA_PAUSE_ASYM) +- ecmd->lp_advertising |= ADVERTISED_Asym_Pause; ++ lp_advertising |= ADVERTISED_Asym_Pause; + + phyreg = nss_gmac_mii_rd_reg(gmacdev, gmacdev->phy_base, MII_STAT1000); + if (phyreg & LPA_1000HALF) +- ecmd->lp_advertising |= ADVERTISED_1000baseT_Half; ++ lp_advertising |= ADVERTISED_1000baseT_Half; + + if (phyreg & LPA_1000FULL) +- ecmd->lp_advertising |= ADVERTISED_1000baseT_Full; ++ lp_advertising |= ADVERTISED_1000baseT_Full; ++ ++ ethtool_convert_legacy_u32_to_link_mode(elk->link_modes.lp_advertising, lp_advertising); + + return 0; + } +@@ -489,8 +495,8 @@ static int32_t nss_gmac_get_settings(str + * @param[in] pointer to struct net_device. + * @param[in] pointer to struct ethtool_cmd. + */ +-static int32_t nss_gmac_set_settings(struct net_device *netdev, +- struct ethtool_cmd *ecmd) ++static int nss_gmac_set_settings(struct net_device *netdev, ++ const struct ethtool_link_ksettings *elk) + { + struct nss_gmac_dev *gmacdev = (struct nss_gmac_dev *)netdev_priv(netdev); + struct phy_device *phydev = NULL; +@@ -512,13 +518,13 @@ static int32_t nss_gmac_set_settings(str + return -EPERM; + } + +- if (ecmd->autoneg == AUTONEG_ENABLE) { ++ if (elk->base.autoneg == AUTONEG_ENABLE) { + set_bit(__NSS_GMAC_AUTONEG, &gmacdev->flags); + } else { + clear_bit(__NSS_GMAC_AUTONEG, &gmacdev->flags); + } + +- return phy_ethtool_sset(phydev, ecmd); ++ return phy_ethtool_ksettings_set(phydev, elk); + } + + /** +@@ -580,8 +586,8 @@ struct ethtool_ops nss_gmac_ethtool_ops + .set_pauseparam = &nss_gmac_set_pauseparam, + .nway_reset = &nss_gmac_nway_reset, + .get_wol = &nss_gmac_get_wol, +- .get_settings = &nss_gmac_get_settings, +- .set_settings = &nss_gmac_set_settings, ++ .get_link_ksettings = &nss_gmac_get_settings, ++ .set_link_ksettings = &nss_gmac_set_settings, + .get_strings = &nss_gmac_get_strings, + .get_sset_count = &nss_gmac_get_strset_count, + .get_ethtool_stats = &nss_gmac_get_ethtool_stats, diff --git a/package/qca/qca-nss-gmac/patches/101-nss-gmac-test-ptr.patch b/package/qca/qca-nss-gmac/patches/101-nss-gmac-test-ptr.patch new file mode 100644 index 000000000..0b1ff063d --- /dev/null +++ b/package/qca/qca-nss-gmac/patches/101-nss-gmac-test-ptr.patch @@ -0,0 +1,11 @@ +--- a/ipq806x/nss_gmac_ctrl.c ++++ b/ipq806x/nss_gmac_ctrl.c +@@ -992,7 +992,7 @@ static int32_t nss_gmac_of_get_pdata(str + return -EFAULT; + } + maddr = (uint8_t *)of_get_mac_address(np); +- if (maddr) ++ if (!IS_ERR_OR_NULL(maddr)) + memcpy(gmaccfg->mac_addr, maddr, ETH_ALEN); + + if (of_address_to_resource(np, 0, &memres_devtree) != 0) diff --git a/package/qca/qca-nss-gmac/patches/200-work-around-interface-close-warning.patch b/package/qca/qca-nss-gmac/patches/200-work-around-interface-close-warning.patch new file mode 100644 index 000000000..7cb6d6fac --- /dev/null +++ b/package/qca/qca-nss-gmac/patches/200-work-around-interface-close-warning.patch @@ -0,0 +1,15 @@ +--- a/ipq806x/nss_gmac_tx_rx_offload.c ++++ b/ipq806x/nss_gmac_tx_rx_offload.c +@@ -1027,8 +1027,10 @@ int nss_gmac_close(struct net_device *ne + nss_gmac_disable_interrupt_all(gmacdev); + gmacdev->data_plane_ops->link_state(gmacdev->data_plane_ctx, 0); + +- if (!IS_ERR(gmacdev->phydev)) +- phy_stop(gmacdev->phydev); ++ if (!IS_ERR(gmacdev->phydev)) { ++ if (test_bit(__NSS_GMAC_LINKPOLL, &gmacdev->flags)) ++ phy_stop(gmacdev->phydev); ++ } + + clear_bit(__NSS_GMAC_UP, &gmacdev->flags); + clear_bit(__NSS_GMAC_CLOSING, &gmacdev->flags); diff --git a/package/qca/qca-rfs/patches/200-rework-nfct-notification.patch b/package/qca/qca-rfs/patches/200-rework-nfct-notification.patch new file mode 100644 index 000000000..81e608c02 --- /dev/null +++ b/package/qca/qca-rfs/patches/200-rework-nfct-notification.patch @@ -0,0 +1,20 @@ +--- a/rfs_cm.c ++++ b/rfs_cm.c +@@ -709,7 +709,7 @@ int rfs_cm_start(void) + + RFS_DEBUG("RFS cm start\n"); + #ifdef CONFIG_NF_CONNTRACK_EVENTS +- ret = nf_conntrack_register_notifier(&init_net, &rfs_cm_conntrack_notifier); ++ ret = nf_conntrack_register_chain_notifier(&init_net, &rfs_cm_conntrack_notifier); + if (ret < 0) { + RFS_ERROR("can't register nf notifier hook: %d\n", ret); + return -1; +@@ -740,7 +740,7 @@ int rfs_cm_stop(void) + #endif + + #ifdef CONFIG_NF_CONNTRACK_EVENTS +- nf_conntrack_unregister_notifier(&init_net, &rfs_cm_conntrack_notifier); ++ nf_conntrack_unregister_chain_notifier(&init_net, &rfs_cm_conntrack_notifier); + #endif + + rfs_cm_connection_destroy_all(); diff --git a/r7800.config b/r7800.config new file mode 100644 index 000000000..7f6f65ac0 --- /dev/null +++ b/r7800.config @@ -0,0 +1,6688 @@ +# +# Automatically generated file; DO NOT EDIT. +# OpenWrt Configuration +# +CONFIG_MODULES=y +CONFIG_HAVE_DOT_CONFIG=y +# CONFIG_TARGET_sunxi is not set +# CONFIG_TARGET_apm821xx is not set +# CONFIG_TARGET_ath25 is not set +# CONFIG_TARGET_ath79 is not set +# CONFIG_TARGET_bcm27xx is not set +# CONFIG_TARGET_bcm53xx is not set +# CONFIG_TARGET_bcm47xx is not set +# CONFIG_TARGET_bcm4908 is not set +# CONFIG_TARGET_bcm63xx is not set +# CONFIG_TARGET_bmips is not set +# CONFIG_TARGET_octeon is not set +# CONFIG_TARGET_gemini is not set +# CONFIG_TARGET_mpc85xx is not set +# CONFIG_TARGET_mxs is not set +# CONFIG_TARGET_lantiq is not set +# CONFIG_TARGET_malta is not set +# CONFIG_TARGET_pistachio is not set +# CONFIG_TARGET_mvebu is not set +# CONFIG_TARGET_kirkwood is not set +# CONFIG_TARGET_mediatek is not set +# CONFIG_TARGET_ramips is not set +# CONFIG_TARGET_at91 is not set +# CONFIG_TARGET_tegra is not set +# CONFIG_TARGET_layerscape is not set +# CONFIG_TARGET_imx6 is not set +# CONFIG_TARGET_octeontx is not set +# CONFIG_TARGET_oxnas is not set +# CONFIG_TARGET_armvirt is not set +# CONFIG_TARGET_ipq40xx is not set +CONFIG_TARGET_ipq806x=y +# CONFIG_TARGET_ipq807x is not set +# CONFIG_TARGET_realtek is not set +# CONFIG_TARGET_rockchip is not set +# CONFIG_TARGET_arc770 is not set +# CONFIG_TARGET_archs38 is not set +# CONFIG_TARGET_omap is not set +# CONFIG_TARGET_uml is not set +# CONFIG_TARGET_zynq is not set +# CONFIG_TARGET_x86 is not set +CONFIG_TARGET_ipq806x_generic=y +# CONFIG_TARGET_MULTI_PROFILE is not set +# CONFIG_TARGET_ipq806x_generic_DEVICE_askey_rt4230w-rev6 is not set +# CONFIG_TARGET_ipq806x_generic_DEVICE_asrock_g10 is not set +# CONFIG_TARGET_ipq806x_generic_DEVICE_buffalo_wxr-2533dhp is not set +# CONFIG_TARGET_ipq806x_generic_DEVICE_compex_wpq864 is not set +# CONFIG_TARGET_ipq806x_generic_DEVICE_edgecore_ecw5410 is not set +# CONFIG_TARGET_ipq806x_generic_DEVICE_linksys_ea7500-v1 is not set +# CONFIG_TARGET_ipq806x_generic_DEVICE_linksys_ea8500 is not set +# CONFIG_TARGET_ipq806x_generic_DEVICE_nec_wg2600hp is not set +# CONFIG_TARGET_ipq806x_generic_DEVICE_nec_wg2600hp3 is not set +# CONFIG_TARGET_ipq806x_generic_DEVICE_netgear_d7800 is not set +# CONFIG_TARGET_ipq806x_generic_DEVICE_netgear_r7500 is not set +# CONFIG_TARGET_ipq806x_generic_DEVICE_netgear_r7500v2 is not set +CONFIG_TARGET_ipq806x_generic_DEVICE_netgear_r7800=y +# CONFIG_TARGET_ipq806x_generic_DEVICE_qcom_ipq8064-ap148 is not set +# CONFIG_TARGET_ipq806x_generic_DEVICE_qcom_ipq8064-ap148-legacy is not set +# CONFIG_TARGET_ipq806x_generic_DEVICE_qcom_ipq8064-ap161 is not set +# CONFIG_TARGET_ipq806x_generic_DEVICE_qcom_ipq8064-db149 is not set +# CONFIG_TARGET_ipq806x_generic_DEVICE_tplink_ad7200 is not set +# CONFIG_TARGET_ipq806x_generic_DEVICE_tplink_c2600 is not set +# CONFIG_TARGET_ipq806x_generic_DEVICE_tplink_vr2600v is not set +# CONFIG_TARGET_ipq806x_generic_DEVICE_ubnt_unifi-ac-hd is not set +# CONFIG_TARGET_ipq806x_generic_DEVICE_zyxel_nbg6817 is not set +CONFIG_HAS_SUBTARGETS=y +CONFIG_HAS_DEVICES=y +CONFIG_TARGET_BOARD="ipq806x" +CONFIG_TARGET_SUBTARGET="generic" +CONFIG_TARGET_PROFILE="DEVICE_netgear_r7800" +CONFIG_TARGET_ARCH_PACKAGES="arm_cortex-a15_neon-vfpv4" +CONFIG_DEFAULT_TARGET_OPTIMIZATION="-Os -pipe" +CONFIG_CPU_TYPE="cortex-a15+neon-vfpv4" +CONFIG_LINUX_5_4=y +CONFIG_DEFAULT_ath10k-firmware-qca9984-ct=y +CONFIG_DEFAULT_base-files=y +CONFIG_DEFAULT_block-mount=y +CONFIG_DEFAULT_busybox=y +CONFIG_DEFAULT_coremark=y +CONFIG_DEFAULT_ddns-scripts_aliyun=y +CONFIG_DEFAULT_ddns-scripts_dnspod=y +CONFIG_DEFAULT_default-settings=y +CONFIG_DEFAULT_dnsmasq-full=y +CONFIG_DEFAULT_dropbear=y +CONFIG_DEFAULT_firewall=y +CONFIG_DEFAULT_fstools=y +CONFIG_DEFAULT_iptables=y +CONFIG_DEFAULT_iwinfo=y +CONFIG_DEFAULT_kmod-ata-ahci=y +CONFIG_DEFAULT_kmod-ata-ahci-platform=y +CONFIG_DEFAULT_kmod-ath10k-ct=y +CONFIG_DEFAULT_kmod-gpio-button-hotplug=y +CONFIG_DEFAULT_kmod-ipt-raw=y +CONFIG_DEFAULT_kmod-leds-gpio=y +CONFIG_DEFAULT_kmod-nf-nathelper=y +CONFIG_DEFAULT_kmod-nf-nathelper-extra=y +CONFIG_DEFAULT_kmod-nss-ifb=y +CONFIG_DEFAULT_kmod-phy-qcom-ipq806x-usb=y +CONFIG_DEFAULT_kmod-qca-nss-drv=y +CONFIG_DEFAULT_kmod-qca-nss-drv-pppoe=y +CONFIG_DEFAULT_kmod-qca-nss-drv-qdisc=y +CONFIG_DEFAULT_kmod-qca-nss-ecm-standard=y +CONFIG_DEFAULT_kmod-qca-nss-gmac=y +CONFIG_DEFAULT_kmod-usb-dwc3-qcom=y +CONFIG_DEFAULT_kmod-usb-ledtrig-usbport=y +CONFIG_DEFAULT_kmod-usb-ohci=y +CONFIG_DEFAULT_kmod-usb2=y +CONFIG_DEFAULT_kmod-usb3=y +CONFIG_DEFAULT_libc=y +CONFIG_DEFAULT_libgcc=y +CONFIG_DEFAULT_libustream-openssl=y +CONFIG_DEFAULT_logd=y +CONFIG_DEFAULT_luci=y +CONFIG_DEFAULT_luci-app-accesscontrol=y +CONFIG_DEFAULT_luci-app-arpbind=y +CONFIG_DEFAULT_luci-app-autoreboot=y +CONFIG_DEFAULT_luci-app-ddns=y +CONFIG_DEFAULT_luci-app-filetransfer=y +CONFIG_DEFAULT_luci-app-nlbwmon=y +CONFIG_DEFAULT_luci-app-ramfree=y +CONFIG_DEFAULT_luci-app-ssr-plus=y +CONFIG_DEFAULT_luci-app-turboacc=y +CONFIG_DEFAULT_luci-app-unblockmusic=y +CONFIG_DEFAULT_luci-app-upnp=y +CONFIG_DEFAULT_luci-app-vlmcsd=y +CONFIG_DEFAULT_luci-app-vsftpd=y +CONFIG_DEFAULT_luci-app-wol=y +CONFIG_DEFAULT_luci-newapi=y +CONFIG_DEFAULT_mtd=y +CONFIG_DEFAULT_netifd=y +CONFIG_DEFAULT_opkg=y +CONFIG_DEFAULT_ppp=y +CONFIG_DEFAULT_ppp-mod-pppoe=y +CONFIG_DEFAULT_procd=y +CONFIG_DEFAULT_swconfig=y +CONFIG_DEFAULT_uboot-envtools=y +CONFIG_DEFAULT_uci=y +CONFIG_DEFAULT_uclient-fetch=y +CONFIG_DEFAULT_urandom-seed=y +CONFIG_DEFAULT_wpad-openssl=y +CONFIG_HAS_TESTING_KERNEL=y +CONFIG_HAS_FPU=y +CONFIG_AUDIO_SUPPORT=y +CONFIG_GPIO_SUPPORT=y +CONFIG_PCI_SUPPORT=y +CONFIG_PCIE_SUPPORT=y +CONFIG_USB_SUPPORT=y +CONFIG_RTC_SUPPORT=y +CONFIG_USES_DEVICETREE=y +CONFIG_USES_INITRAMFS=y +CONFIG_USES_SQUASHFS=y +CONFIG_NAND_SUPPORT=y +CONFIG_arm=y +CONFIG_arm_v7=y +CONFIG_ARCH="arm" + +# +# Target Images +# +CONFIG_TARGET_ROOTFS_INITRAMFS=y +CONFIG_TARGET_INITRAMFS_COMPRESSION_NONE=y +# CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP is not set +# CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2 is not set +# CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA is not set +# CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO is not set +# CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4 is not set +# CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ is not set +CONFIG_EXTERNAL_CPIO="" +# CONFIG_TARGET_INITRAMFS_FORCE is not set + +# +# Root filesystem archives +# +# CONFIG_TARGET_ROOTFS_CPIOGZ is not set +# CONFIG_TARGET_ROOTFS_TARGZ is not set + +# +# Root filesystem images +# +# CONFIG_TARGET_ROOTFS_EXT4FS is not set +CONFIG_TARGET_ROOTFS_SQUASHFS=y +CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=1024 +CONFIG_TARGET_UBIFS_FREE_SPACE_FIXUP=y +CONFIG_TARGET_UBIFS_JOURNAL_SIZE="" + +# +# Image Options +# +# end of Target Images + +# CONFIG_EXPERIMENTAL is not set + +# +# Global build settings +# +# CONFIG_JSON_OVERVIEW_IMAGE_INFO is not set +# CONFIG_ALL_NONSHARED is not set +# CONFIG_ALL_KMODS is not set +# CONFIG_ALL is not set +# CONFIG_BUILDBOT is not set +CONFIG_SIGNED_PACKAGES=y +CONFIG_SIGNATURE_CHECK=y + +# +# General build options +# +# CONFIG_TESTING_KERNEL is not set +# CONFIG_DISPLAY_SUPPORT is not set +# CONFIG_BUILD_PATENTED is not set +# CONFIG_BUILD_NLS is not set +CONFIG_SHADOW_PASSWORDS=y +# CONFIG_CLEAN_IPKG is not set +# CONFIG_IPK_FILES_CHECKSUMS is not set +# CONFIG_INCLUDE_CONFIG is not set +# CONFIG_REPRODUCIBLE_DEBUG_INFO is not set +# CONFIG_COLLECT_KERNEL_DEBUG is not set + +# +# Kernel build options +# +CONFIG_KERNEL_BUILD_USER="" +CONFIG_KERNEL_BUILD_DOMAIN="" +CONFIG_KERNEL_PRINTK=y +CONFIG_KERNEL_SWAP=y +# CONFIG_KERNEL_PROC_STRIPPED is not set +CONFIG_KERNEL_DEBUG_FS=y +# CONFIG_KERNEL_ARM_PMU is not set +# CONFIG_KERNEL_PERF_EVENTS is not set +# CONFIG_KERNEL_PROFILING is not set +# CONFIG_KERNEL_UBSAN is not set +# CONFIG_KERNEL_KCOV is not set +# CONFIG_KERNEL_TASKSTATS is not set +CONFIG_KERNEL_KALLSYMS=y +# CONFIG_KERNEL_FTRACE is not set +CONFIG_KERNEL_DEBUG_KERNEL=y +CONFIG_KERNEL_DEBUG_INFO=y +# CONFIG_KERNEL_DEBUG_LL_UART_NONE is not set +# CONFIG_KERNEL_DEBUG_LL is not set +# CONFIG_KERNEL_DYNAMIC_DEBUG is not set +# CONFIG_KERNEL_EARLY_PRINTK is not set +# CONFIG_KERNEL_KPROBES is not set +CONFIG_KERNEL_AIO=y +CONFIG_KERNEL_IO_URING=y +CONFIG_KERNEL_FHANDLE=y +CONFIG_KERNEL_FANOTIFY=y +# CONFIG_KERNEL_BLK_DEV_BSG is not set +# CONFIG_KERNEL_HUGETLB_PAGE is not set +CONFIG_KERNEL_MAGIC_SYSRQ=y +# CONFIG_KERNEL_DEBUG_PINCTRL is not set +# CONFIG_KERNEL_DEBUG_GPIO is not set +CONFIG_KERNEL_COREDUMP=y +CONFIG_KERNEL_ELF_CORE=y +# CONFIG_KERNEL_PROVE_LOCKING is not set +# CONFIG_KERNEL_LOCKUP_DETECTOR is not set +# CONFIG_KERNEL_DETECT_HUNG_TASK is not set +# CONFIG_KERNEL_WQ_WATCHDOG is not set +# CONFIG_KERNEL_DEBUG_ATOMIC_SLEEP is not set +# CONFIG_KERNEL_DEBUG_VM is not set +CONFIG_KERNEL_PRINTK_TIME=y +# CONFIG_KERNEL_SLABINFO is not set +# CONFIG_KERNEL_PROC_PAGE_MONITOR is not set +CONFIG_KERNEL_KEXEC=y +CONFIG_KERNEL_PROC_VMCORE=y +CONFIG_KERNEL_PROC_KCORE=y +CONFIG_KERNEL_CRASH_DUMP=y +# CONFIG_USE_RFKILL is not set +# CONFIG_USE_SPARSE is not set +# CONFIG_KERNEL_DEVTMPFS is not set +CONFIG_KERNEL_KEYS=y +# CONFIG_KERNEL_PERSISTENT_KEYRINGS is not set +# CONFIG_KERNEL_KEYS_REQUEST_CACHE is not set +# CONFIG_KERNEL_BIG_KEYS is not set +CONFIG_KERNEL_CGROUPS=y +# CONFIG_KERNEL_CGROUP_DEBUG is not set +CONFIG_KERNEL_FREEZER=y +# CONFIG_KERNEL_CGROUP_FREEZER is not set +# CONFIG_KERNEL_CGROUP_DEVICE is not set +# CONFIG_KERNEL_CGROUP_HUGETLB is not set +CONFIG_KERNEL_CGROUP_PIDS=y +CONFIG_KERNEL_CGROUP_RDMA=y +CONFIG_KERNEL_CGROUP_BPF=y +CONFIG_KERNEL_CPUSETS=y +# CONFIG_KERNEL_PROC_PID_CPUSET is not set +CONFIG_KERNEL_CGROUP_CPUACCT=y +CONFIG_KERNEL_RESOURCE_COUNTERS=y +CONFIG_KERNEL_MM_OWNER=y +CONFIG_KERNEL_MEMCG=y +CONFIG_KERNEL_MEMCG_SWAP=y +# CONFIG_KERNEL_MEMCG_SWAP_ENABLED is not set +CONFIG_KERNEL_MEMCG_KMEM=y +# CONFIG_KERNEL_CGROUP_PERF is not set +CONFIG_KERNEL_CGROUP_SCHED=y +CONFIG_KERNEL_FAIR_GROUP_SCHED=y +CONFIG_KERNEL_CFS_BANDWIDTH=y +CONFIG_KERNEL_RT_GROUP_SCHED=y +CONFIG_KERNEL_BLK_CGROUP=y +# CONFIG_KERNEL_CFQ_GROUP_IOSCHED is not set +CONFIG_KERNEL_BLK_DEV_THROTTLING=y +# CONFIG_KERNEL_BLK_DEV_THROTTLING_LOW is not set +# CONFIG_KERNEL_DEBUG_BLK_CGROUP is not set +# CONFIG_KERNEL_NET_CLS_CGROUP is not set +# CONFIG_KERNEL_CGROUP_NET_CLASSID is not set +# CONFIG_KERNEL_CGROUP_NET_PRIO is not set +CONFIG_KERNEL_NAMESPACES=y +CONFIG_KERNEL_UTS_NS=y +CONFIG_KERNEL_IPC_NS=y +CONFIG_KERNEL_USER_NS=y +CONFIG_KERNEL_PID_NS=y +CONFIG_KERNEL_NET_NS=y +CONFIG_KERNEL_DEVPTS_MULTIPLE_INSTANCES=y +CONFIG_KERNEL_POSIX_MQUEUE=y +CONFIG_KERNEL_SECCOMP_FILTER=y +CONFIG_KERNEL_SECCOMP=y +CONFIG_KERNEL_IP_MROUTE=y +CONFIG_KERNEL_IPV6=y +CONFIG_KERNEL_IPV6_MULTIPLE_TABLES=y +CONFIG_KERNEL_IPV6_SUBTREES=y +CONFIG_KERNEL_IPV6_MROUTE=y +# CONFIG_KERNEL_IPV6_PIMSM_V2 is not set +CONFIG_KERNEL_IPV6_SEG6_LWTUNNEL=y +# CONFIG_KERNEL_LWTUNNEL_BPF is not set +# CONFIG_KERNEL_IP_PNP is not set + +# +# Filesystem ACL and attr support options +# +# CONFIG_USE_FS_ACL_ATTR is not set +# CONFIG_KERNEL_FS_POSIX_ACL is not set +# CONFIG_KERNEL_BTRFS_FS_POSIX_ACL is not set +# CONFIG_KERNEL_EXT4_FS_POSIX_ACL is not set +# CONFIG_KERNEL_F2FS_FS_POSIX_ACL is not set +# CONFIG_KERNEL_JFFS2_FS_POSIX_ACL is not set +# CONFIG_KERNEL_TMPFS_POSIX_ACL is not set +# CONFIG_KERNEL_CIFS_ACL is not set +# CONFIG_KERNEL_HFS_FS_POSIX_ACL is not set +# CONFIG_KERNEL_HFSPLUS_FS_POSIX_ACL is not set +# CONFIG_KERNEL_NFS_ACL_SUPPORT is not set +# CONFIG_KERNEL_NFS_V3_ACL_SUPPORT is not set +# CONFIG_KERNEL_NFSD_V2_ACL_SUPPORT is not set +# CONFIG_KERNEL_NFSD_V3_ACL_SUPPORT is not set +# CONFIG_KERNEL_REISER_FS_POSIX_ACL is not set +# CONFIG_KERNEL_XFS_POSIX_ACL is not set +# CONFIG_KERNEL_JFS_POSIX_ACL is not set +# end of Filesystem ACL and attr support options + +# CONFIG_KERNEL_DEVMEM is not set +# CONFIG_KERNEL_DEVKMEM is not set +CONFIG_KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_KERNEL_SQUASHFS_XATTR is not set +CONFIG_KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE=y +# CONFIG_KERNEL_CC_OPTIMIZE_FOR_SIZE is not set +# CONFIG_KERNEL_AUDIT is not set +# CONFIG_KERNEL_SECURITY is not set +# CONFIG_KERNEL_SECURITY_NETWORK is not set +# CONFIG_KERNEL_SECURITY_SELINUX is not set +# CONFIG_KERNEL_EXT4_FS_SECURITY is not set +# CONFIG_KERNEL_F2FS_FS_SECURITY is not set +# CONFIG_KERNEL_UBIFS_FS_SECURITY is not set +# CONFIG_KERNEL_JFFS2_FS_SECURITY is not set +# end of Kernel build options + +# +# Package build options +# +# CONFIG_DEBUG is not set +CONFIG_IPV6=y + +# +# Stripping options +# +# CONFIG_NO_STRIP is not set +# CONFIG_USE_STRIP is not set +CONFIG_USE_SSTRIP=y +CONFIG_SSTRIP_ARGS="-z" +# CONFIG_STRIP_KERNEL_EXPORTS is not set +# CONFIG_USE_MKLIBS is not set +CONFIG_USE_UCLIBCXX=y +# CONFIG_USE_LIBSTDCXX is not set + +# +# Hardening build options +# +CONFIG_PKG_CHECK_FORMAT_SECURITY=y +# CONFIG_PKG_ASLR_PIE_NONE is not set +CONFIG_PKG_ASLR_PIE_REGULAR=y +# CONFIG_PKG_ASLR_PIE_ALL is not set +# CONFIG_PKG_CC_STACKPROTECTOR_NONE is not set +CONFIG_PKG_CC_STACKPROTECTOR_REGULAR=y +# CONFIG_PKG_CC_STACKPROTECTOR_STRONG is not set +# CONFIG_KERNEL_CC_STACKPROTECTOR_NONE is not set +CONFIG_KERNEL_CC_STACKPROTECTOR_REGULAR=y +# CONFIG_KERNEL_CC_STACKPROTECTOR_STRONG is not set +CONFIG_KERNEL_STACKPROTECTOR=y +# CONFIG_KERNEL_STACKPROTECTOR_STRONG is not set +# CONFIG_PKG_FORTIFY_SOURCE_NONE is not set +CONFIG_PKG_FORTIFY_SOURCE_1=y +# CONFIG_PKG_FORTIFY_SOURCE_2 is not set +# CONFIG_PKG_RELRO_NONE is not set +# CONFIG_PKG_RELRO_PARTIAL is not set +CONFIG_PKG_RELRO_FULL=y +# CONFIG_SELINUX is not set +# end of Global build settings + +# CONFIG_DEVEL is not set +# CONFIG_BROKEN is not set +CONFIG_BINARY_FOLDER="" +CONFIG_DOWNLOAD_FOLDER="" +CONFIG_LOCALMIRROR="" +CONFIG_AUTOREBUILD=y +# CONFIG_AUTOREMOVE is not set +CONFIG_BUILD_SUFFIX="" +CONFIG_TARGET_ROOTFS_DIR="" +# CONFIG_CCACHE is not set +CONFIG_CCACHE_DIR="" +CONFIG_EXTERNAL_KERNEL_TREE="" +CONFIG_KERNEL_GIT_CLONE_URI="" +CONFIG_BUILD_LOG_DIR="" +CONFIG_EXTRA_OPTIMIZATION="-fno-caller-saves -fno-plt" +CONFIG_TARGET_OPTIMIZATION="-Os -pipe" +# CONFIG_EXTRA_TARGET_ARCH is not set +CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS="" +CONFIG_EXTRA_GCC_CONFIG_OPTIONS="" +# CONFIG_GCC_DEFAULT_PIE is not set +# CONFIG_GCC_DEFAULT_SSP is not set +# CONFIG_SJLJ_EXCEPTIONS is not set +# CONFIG_INSTALL_GFORTRAN is not set +CONFIG_GDB=y +# CONFIG_GDB_PYTHON is not set +CONFIG_USE_MUSL=y +CONFIG_SSP_SUPPORT=y +CONFIG_BINUTILS_VERSION_2_34=y +CONFIG_BINUTILS_VERSION="2.34" +CONFIG_GCC_VERSION="8.4.0" +# CONFIG_GCC_USE_IREMAP is not set +CONFIG_LIBC="musl" +CONFIG_TARGET_SUFFIX="muslgnueabi" +# CONFIG_IB is not set +# CONFIG_SDK is not set +# CONFIG_MAKE_TOOLCHAIN is not set +# CONFIG_IMAGEOPT is not set +# CONFIG_PREINITOPT is not set +CONFIG_TARGET_PREINIT_SUPPRESS_STDERR=y +# CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE is not set +CONFIG_TARGET_PREINIT_TIMEOUT=2 +# CONFIG_TARGET_PREINIT_SHOW_NETMSG is not set +# CONFIG_TARGET_PREINIT_SUPPRESS_FAILSAFE_NETMSG is not set +CONFIG_TARGET_PREINIT_IFNAME="" +CONFIG_TARGET_PREINIT_IP="192.168.1.1" +CONFIG_TARGET_PREINIT_NETMASK="255.255.255.0" +CONFIG_TARGET_PREINIT_BROADCAST="192.168.1.255" +# CONFIG_INITOPT is not set +CONFIG_TARGET_INIT_PATH="/usr/sbin:/usr/bin:/sbin:/bin" +CONFIG_TARGET_INIT_ENV="" +CONFIG_TARGET_INIT_CMD="/sbin/init" +CONFIG_TARGET_INIT_SUPPRESS_STDERR=y +# CONFIG_VERSIONOPT is not set +CONFIG_PER_FEED_REPO=y +CONFIG_FEED_packages=y +CONFIG_FEED_luci=y +CONFIG_FEED_routing=y +CONFIG_FEED_telephony=y + +# +# Base system +# +# CONFIG_PACKAGE_attendedsysupgrade-common is not set +# CONFIG_PACKAGE_auc is not set +CONFIG_PACKAGE_base-files=y +CONFIG_PACKAGE_block-mount=y +# CONFIG_PACKAGE_blockd is not set +# CONFIG_PACKAGE_bridge is not set +CONFIG_PACKAGE_busybox=y +# CONFIG_BUSYBOX_CUSTOM is not set +CONFIG_BUSYBOX_DEFAULT_HAVE_DOT_CONFIG=y +# CONFIG_BUSYBOX_DEFAULT_DESKTOP is not set +# CONFIG_BUSYBOX_DEFAULT_EXTRA_COMPAT is not set +# CONFIG_BUSYBOX_DEFAULT_FEDORA_COMPAT is not set +CONFIG_BUSYBOX_DEFAULT_INCLUDE_SUSv2=y +CONFIG_BUSYBOX_DEFAULT_LONG_OPTS=y +CONFIG_BUSYBOX_DEFAULT_SHOW_USAGE=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_VERBOSE_USAGE=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_COMPRESS_USAGE is not set +CONFIG_BUSYBOX_DEFAULT_LFS=y +# CONFIG_BUSYBOX_DEFAULT_PAM is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_DEVPTS=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_UTMP is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_WTMP is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_PIDFILE=y +CONFIG_BUSYBOX_DEFAULT_PID_FILE_PATH="/var/run" +# CONFIG_BUSYBOX_DEFAULT_BUSYBOX is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SHOW_SCRIPT is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_INSTALLER is not set +# CONFIG_BUSYBOX_DEFAULT_INSTALL_NO_USR is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SUID is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SUID_CONFIG is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SUID_CONFIG_QUIET is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_PREFER_APPLETS=y +CONFIG_BUSYBOX_DEFAULT_BUSYBOX_EXEC_PATH="/proc/self/exe" +# CONFIG_BUSYBOX_DEFAULT_SELINUX is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CLEAN_UP is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SYSLOG_INFO is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_SYSLOG=y +# CONFIG_BUSYBOX_DEFAULT_STATIC is not set +# CONFIG_BUSYBOX_DEFAULT_PIE is not set +# CONFIG_BUSYBOX_DEFAULT_NOMMU is not set +# CONFIG_BUSYBOX_DEFAULT_BUILD_LIBBUSYBOX is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_LIBBUSYBOX_STATIC is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_INDIVIDUAL is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SHARED_BUSYBOX is not set +CONFIG_BUSYBOX_DEFAULT_CROSS_COMPILER_PREFIX="" +CONFIG_BUSYBOX_DEFAULT_SYSROOT="" +CONFIG_BUSYBOX_DEFAULT_EXTRA_CFLAGS="" +CONFIG_BUSYBOX_DEFAULT_EXTRA_LDFLAGS="" +CONFIG_BUSYBOX_DEFAULT_EXTRA_LDLIBS="" +# CONFIG_BUSYBOX_DEFAULT_USE_PORTABLE_CODE is not set +# CONFIG_BUSYBOX_DEFAULT_STACK_OPTIMIZATION_386 is not set +# CONFIG_BUSYBOX_DEFAULT_STATIC_LIBGCC is not set +CONFIG_BUSYBOX_DEFAULT_INSTALL_APPLET_SYMLINKS=y +# CONFIG_BUSYBOX_DEFAULT_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_BUSYBOX_DEFAULT_INSTALL_APPLET_SCRIPT_WRAPPERS is not set +# CONFIG_BUSYBOX_DEFAULT_INSTALL_APPLET_DONT is not set +# CONFIG_BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SYMLINK is not set +# CONFIG_BUSYBOX_DEFAULT_INSTALL_SH_APPLET_HARDLINK is not set +# CONFIG_BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set +CONFIG_BUSYBOX_DEFAULT_PREFIX="./_install" +# CONFIG_BUSYBOX_DEFAULT_DEBUG is not set +# CONFIG_BUSYBOX_DEFAULT_DEBUG_PESSIMIZE is not set +# CONFIG_BUSYBOX_DEFAULT_DEBUG_SANITIZE is not set +# CONFIG_BUSYBOX_DEFAULT_UNIT_TEST is not set +# CONFIG_BUSYBOX_DEFAULT_WERROR is not set +# CONFIG_BUSYBOX_DEFAULT_WARN_SIMPLE_MSG is not set +CONFIG_BUSYBOX_DEFAULT_NO_DEBUG_LIB=y +# CONFIG_BUSYBOX_DEFAULT_DMALLOC is not set +# CONFIG_BUSYBOX_DEFAULT_EFENCE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_USE_BSS_TAIL is not set +# CONFIG_BUSYBOX_DEFAULT_FLOAT_DURATION is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_RTMINMAX is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_RTMINMAX_USE_LIBC_DEFINITIONS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_BUFFERS_USE_MALLOC is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_ON_STACK=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_BUSYBOX_DEFAULT_PASSWORD_MINLEN=6 +CONFIG_BUSYBOX_DEFAULT_MD5_SMALL=1 +CONFIG_BUSYBOX_DEFAULT_SHA3_SMALL=1 +CONFIG_BUSYBOX_DEFAULT_FEATURE_FAST_TOP=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_ETC_NETWORKS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_ETC_SERVICES is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_EDITING=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_EDITING_MAX_LEN=512 +# CONFIG_BUSYBOX_DEFAULT_FEATURE_EDITING_VI is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_EDITING_HISTORY=256 +# CONFIG_BUSYBOX_DEFAULT_FEATURE_EDITING_SAVEHISTORY is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_EDITING_SAVE_ON_EXIT is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_REVERSE_SEARCH is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_TAB_COMPLETION=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_USERNAME_COMPLETION is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_EDITING_FANCY_PROMPT=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_EDITING_WINCH is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_EDITING_ASK_TERMINAL is not set +# CONFIG_BUSYBOX_DEFAULT_LOCALE_SUPPORT is not set +# CONFIG_BUSYBOX_DEFAULT_UNICODE_SUPPORT is not set +# CONFIG_BUSYBOX_DEFAULT_UNICODE_USING_LOCALE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV is not set +CONFIG_BUSYBOX_DEFAULT_SUBST_WCHAR=0 +CONFIG_BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR=0 +# CONFIG_BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS is not set +# CONFIG_BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS is not set +# CONFIG_BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT is not set +# CONFIG_BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE is not set +# CONFIG_BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VERBOSE_CP_MESSAGE is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_COPYBUF_KB=4 +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SKIP_ROOTFS is not set +CONFIG_BUSYBOX_DEFAULT_MONOTONIC_SYSCALL=y +CONFIG_BUSYBOX_DEFAULT_IOCTL_HEX2STR_ERROR=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HWIB is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SEAMLESS_XZ is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SEAMLESS_LZMA is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SEAMLESS_BZ2 is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_SEAMLESS_GZ=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SEAMLESS_Z is not set +# CONFIG_BUSYBOX_DEFAULT_AR is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_AR_LONG_FILENAMES is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_AR_CREATE is not set +# CONFIG_BUSYBOX_DEFAULT_UNCOMPRESS is not set +CONFIG_BUSYBOX_DEFAULT_GUNZIP=y +CONFIG_BUSYBOX_DEFAULT_ZCAT=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_GUNZIP_LONG_OPTIONS is not set +CONFIG_BUSYBOX_DEFAULT_BUNZIP2=y +CONFIG_BUSYBOX_DEFAULT_BZCAT=y +# CONFIG_BUSYBOX_DEFAULT_UNLZMA is not set +# CONFIG_BUSYBOX_DEFAULT_LZCAT is not set +# CONFIG_BUSYBOX_DEFAULT_LZMA is not set +# CONFIG_BUSYBOX_DEFAULT_UNXZ is not set +# CONFIG_BUSYBOX_DEFAULT_XZCAT is not set +# CONFIG_BUSYBOX_DEFAULT_XZ is not set +# CONFIG_BUSYBOX_DEFAULT_BZIP2 is not set +CONFIG_BUSYBOX_DEFAULT_BZIP2_SMALL=0 +CONFIG_BUSYBOX_DEFAULT_FEATURE_BZIP2_DECOMPRESS=y +# CONFIG_BUSYBOX_DEFAULT_CPIO is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CPIO_O is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CPIO_P is not set +# CONFIG_BUSYBOX_DEFAULT_DPKG is not set +# CONFIG_BUSYBOX_DEFAULT_DPKG_DEB is not set +CONFIG_BUSYBOX_DEFAULT_GZIP=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_GZIP_LONG_OPTIONS is not set +CONFIG_BUSYBOX_DEFAULT_GZIP_FAST=0 +# CONFIG_BUSYBOX_DEFAULT_FEATURE_GZIP_LEVELS is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_GZIP_DECOMPRESS=y +# CONFIG_BUSYBOX_DEFAULT_LZOP is not set +# CONFIG_BUSYBOX_DEFAULT_UNLZOP is not set +# CONFIG_BUSYBOX_DEFAULT_LZOPCAT is not set +# CONFIG_BUSYBOX_DEFAULT_LZOP_COMPR_HIGH is not set +# CONFIG_BUSYBOX_DEFAULT_RPM is not set +# CONFIG_BUSYBOX_DEFAULT_RPM2CPIO is not set +CONFIG_BUSYBOX_DEFAULT_TAR=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TAR_LONG_OPTIONS is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_TAR_CREATE=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TAR_AUTODETECT is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_TAR_FROM=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_TAR_GNU_EXTENSIONS=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TAR_TO_COMMAND is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TAR_UNAME_GNAME is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TAR_NOPRESERVE_TIME is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TAR_SELINUX is not set +# CONFIG_BUSYBOX_DEFAULT_UNZIP is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_UNZIP_CDF is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_UNZIP_BZIP2 is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_UNZIP_LZMA is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_UNZIP_XZ is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_LZMA_FAST is not set +CONFIG_BUSYBOX_DEFAULT_BASENAME=y +CONFIG_BUSYBOX_DEFAULT_CAT=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CATN is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CATV is not set +CONFIG_BUSYBOX_DEFAULT_CHGRP=y +CONFIG_BUSYBOX_DEFAULT_CHMOD=y +CONFIG_BUSYBOX_DEFAULT_CHOWN=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CHOWN_LONG_OPTIONS is not set +CONFIG_BUSYBOX_DEFAULT_CHROOT=y +# CONFIG_BUSYBOX_DEFAULT_CKSUM is not set +# CONFIG_BUSYBOX_DEFAULT_COMM is not set +CONFIG_BUSYBOX_DEFAULT_CP=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CP_REFLINK is not set +CONFIG_BUSYBOX_DEFAULT_CUT=y +CONFIG_BUSYBOX_DEFAULT_DATE=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_DATE_ISOFMT=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_DATE_NANO is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_DATE_COMPAT is not set +CONFIG_BUSYBOX_DEFAULT_DD=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_DD_SIGNAL_HANDLING=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_DD_THIRD_STATUS_LINE is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_DD_IBS_OBS=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_DD_STATUS is not set +CONFIG_BUSYBOX_DEFAULT_DF=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_DF_FANCY is not set +CONFIG_BUSYBOX_DEFAULT_DIRNAME=y +# CONFIG_BUSYBOX_DEFAULT_DOS2UNIX is not set +# CONFIG_BUSYBOX_DEFAULT_UNIX2DOS is not set +CONFIG_BUSYBOX_DEFAULT_DU=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y +CONFIG_BUSYBOX_DEFAULT_ECHO=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_FANCY_ECHO=y +CONFIG_BUSYBOX_DEFAULT_ENV=y +# CONFIG_BUSYBOX_DEFAULT_EXPAND is not set +# CONFIG_BUSYBOX_DEFAULT_UNEXPAND is not set +CONFIG_BUSYBOX_DEFAULT_EXPR=y +CONFIG_BUSYBOX_DEFAULT_EXPR_MATH_SUPPORT_64=y +# CONFIG_BUSYBOX_DEFAULT_FACTOR is not set +CONFIG_BUSYBOX_DEFAULT_FALSE=y +# CONFIG_BUSYBOX_DEFAULT_FOLD is not set +CONFIG_BUSYBOX_DEFAULT_HEAD=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_FANCY_HEAD=y +# CONFIG_BUSYBOX_DEFAULT_HOSTID is not set +CONFIG_BUSYBOX_DEFAULT_ID=y +# CONFIG_BUSYBOX_DEFAULT_GROUPS is not set +# CONFIG_BUSYBOX_DEFAULT_INSTALL is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_INSTALL_LONG_OPTIONS is not set +# CONFIG_BUSYBOX_DEFAULT_LINK is not set +CONFIG_BUSYBOX_DEFAULT_LN=y +# CONFIG_BUSYBOX_DEFAULT_LOGNAME is not set +CONFIG_BUSYBOX_DEFAULT_LS=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_LS_FILETYPES=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_LS_FOLLOWLINKS=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_LS_RECURSIVE=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_LS_WIDTH=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_LS_SORTFILES=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_LS_TIMESTAMPS=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_LS_USERNAME=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_LS_COLOR=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_LS_COLOR_IS_DEFAULT=y +CONFIG_BUSYBOX_DEFAULT_MD5SUM=y +# CONFIG_BUSYBOX_DEFAULT_SHA1SUM is not set +CONFIG_BUSYBOX_DEFAULT_SHA256SUM=y +# CONFIG_BUSYBOX_DEFAULT_SHA512SUM is not set +# CONFIG_BUSYBOX_DEFAULT_SHA3SUM is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK=y +CONFIG_BUSYBOX_DEFAULT_MKDIR=y +CONFIG_BUSYBOX_DEFAULT_MKFIFO=y +CONFIG_BUSYBOX_DEFAULT_MKNOD=y +CONFIG_BUSYBOX_DEFAULT_MKTEMP=y +CONFIG_BUSYBOX_DEFAULT_MV=y +CONFIG_BUSYBOX_DEFAULT_NICE=y +# CONFIG_BUSYBOX_DEFAULT_NL is not set +# CONFIG_BUSYBOX_DEFAULT_NOHUP is not set +# CONFIG_BUSYBOX_DEFAULT_NPROC is not set +# CONFIG_BUSYBOX_DEFAULT_OD is not set +# CONFIG_BUSYBOX_DEFAULT_PASTE is not set +# CONFIG_BUSYBOX_DEFAULT_PRINTENV is not set +CONFIG_BUSYBOX_DEFAULT_PRINTF=y +CONFIG_BUSYBOX_DEFAULT_PWD=y +CONFIG_BUSYBOX_DEFAULT_READLINK=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_READLINK_FOLLOW=y +# CONFIG_BUSYBOX_DEFAULT_REALPATH is not set +CONFIG_BUSYBOX_DEFAULT_RM=y +CONFIG_BUSYBOX_DEFAULT_RMDIR=y +CONFIG_BUSYBOX_DEFAULT_SEQ=y +# CONFIG_BUSYBOX_DEFAULT_SHRED is not set +# CONFIG_BUSYBOX_DEFAULT_SHUF is not set +CONFIG_BUSYBOX_DEFAULT_SLEEP=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_FANCY_SLEEP=y +CONFIG_BUSYBOX_DEFAULT_SORT=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SORT_BIG is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SORT_OPTIMIZE_MEMORY is not set +# CONFIG_BUSYBOX_DEFAULT_SPLIT is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SPLIT_FANCY is not set +# CONFIG_BUSYBOX_DEFAULT_STAT is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_STAT_FORMAT is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM is not set +# CONFIG_BUSYBOX_DEFAULT_STTY is not set +# CONFIG_BUSYBOX_DEFAULT_SUM is not set +CONFIG_BUSYBOX_DEFAULT_SYNC=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY is not set +CONFIG_BUSYBOX_DEFAULT_FSYNC=y +# CONFIG_BUSYBOX_DEFAULT_TAC is not set +CONFIG_BUSYBOX_DEFAULT_TAIL=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_FANCY_TAIL=y +CONFIG_BUSYBOX_DEFAULT_TEE=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_TEE_USE_BLOCK_IO=y +CONFIG_BUSYBOX_DEFAULT_TEST=y +CONFIG_BUSYBOX_DEFAULT_TEST1=y +CONFIG_BUSYBOX_DEFAULT_TEST2=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_TEST_64=y +# CONFIG_BUSYBOX_DEFAULT_TIMEOUT is not set +CONFIG_BUSYBOX_DEFAULT_TOUCH=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3=y +CONFIG_BUSYBOX_DEFAULT_TR=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TR_CLASSES is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TR_EQUIV is not set +CONFIG_BUSYBOX_DEFAULT_TRUE=y +# CONFIG_BUSYBOX_DEFAULT_TRUNCATE is not set +# CONFIG_BUSYBOX_DEFAULT_TTY is not set +CONFIG_BUSYBOX_DEFAULT_UNAME=y +CONFIG_BUSYBOX_DEFAULT_UNAME_OSNAME="GNU/Linux" +# CONFIG_BUSYBOX_DEFAULT_BB_ARCH is not set +CONFIG_BUSYBOX_DEFAULT_UNIQ=y +# CONFIG_BUSYBOX_DEFAULT_UNLINK is not set +# CONFIG_BUSYBOX_DEFAULT_USLEEP is not set +# CONFIG_BUSYBOX_DEFAULT_UUDECODE is not set +# CONFIG_BUSYBOX_DEFAULT_BASE32 is not set +# CONFIG_BUSYBOX_DEFAULT_BASE64 is not set +# CONFIG_BUSYBOX_DEFAULT_UUENCODE is not set +CONFIG_BUSYBOX_DEFAULT_WC=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_WC_LARGE is not set +# CONFIG_BUSYBOX_DEFAULT_WHO is not set +# CONFIG_BUSYBOX_DEFAULT_W is not set +# CONFIG_BUSYBOX_DEFAULT_USERS is not set +# CONFIG_BUSYBOX_DEFAULT_WHOAMI is not set +CONFIG_BUSYBOX_DEFAULT_YES=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VERBOSE is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_PRESERVE_HARDLINKS=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_HUMAN_READABLE=y +# CONFIG_BUSYBOX_DEFAULT_CHVT is not set +CONFIG_BUSYBOX_DEFAULT_CLEAR=y +# CONFIG_BUSYBOX_DEFAULT_DEALLOCVT is not set +# CONFIG_BUSYBOX_DEFAULT_DUMPKMAP is not set +# CONFIG_BUSYBOX_DEFAULT_FGCONSOLE is not set +# CONFIG_BUSYBOX_DEFAULT_KBD_MODE is not set +# CONFIG_BUSYBOX_DEFAULT_LOADFONT is not set +# CONFIG_BUSYBOX_DEFAULT_SETFONT is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SETFONT_TEXTUAL_MAP is not set +CONFIG_BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR="" +# CONFIG_BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2 is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW is not set +# CONFIG_BUSYBOX_DEFAULT_LOADKMAP is not set +# CONFIG_BUSYBOX_DEFAULT_OPENVT is not set +CONFIG_BUSYBOX_DEFAULT_RESET=y +# CONFIG_BUSYBOX_DEFAULT_RESIZE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_RESIZE_PRINT is not set +# CONFIG_BUSYBOX_DEFAULT_SETCONSOLE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SETCONSOLE_LONG_OPTIONS is not set +# CONFIG_BUSYBOX_DEFAULT_SETKEYCODES is not set +# CONFIG_BUSYBOX_DEFAULT_SETLOGCONS is not set +# CONFIG_BUSYBOX_DEFAULT_SHOWKEY is not set +# CONFIG_BUSYBOX_DEFAULT_PIPE_PROGRESS is not set +# CONFIG_BUSYBOX_DEFAULT_RUN_PARTS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_RUN_PARTS_LONG_OPTIONS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_RUN_PARTS_FANCY is not set +CONFIG_BUSYBOX_DEFAULT_START_STOP_DAEMON=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_START_STOP_DAEMON_FANCY is not set +CONFIG_BUSYBOX_DEFAULT_WHICH=y +# CONFIG_BUSYBOX_DEFAULT_MINIPS is not set +# CONFIG_BUSYBOX_DEFAULT_NUKE is not set +# CONFIG_BUSYBOX_DEFAULT_RESUME is not set +# CONFIG_BUSYBOX_DEFAULT_RUN_INIT is not set +CONFIG_BUSYBOX_DEFAULT_AWK=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_AWK_LIBM=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_AWK_GNU_EXTENSIONS=y +CONFIG_BUSYBOX_DEFAULT_CMP=y +# CONFIG_BUSYBOX_DEFAULT_DIFF is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_DIFF_LONG_OPTIONS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_DIFF_DIR is not set +# CONFIG_BUSYBOX_DEFAULT_ED is not set +# CONFIG_BUSYBOX_DEFAULT_PATCH is not set +CONFIG_BUSYBOX_DEFAULT_SED=y +CONFIG_BUSYBOX_DEFAULT_VI=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_MAX_LEN=1024 +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_8BIT is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_COLON=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_YANKMARK=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_SEARCH=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_REGEX_SEARCH is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_USE_SIGNALS=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_DOT_CMD=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_READONLY=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_SETOPTS=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_SET=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_WIN_RESIZE=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_ASK_TERMINAL=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_UNDO is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_UNDO_QUEUE is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_UNDO_QUEUE_MAX=0 +CONFIG_BUSYBOX_DEFAULT_FEATURE_ALLOW_EXEC=y +CONFIG_BUSYBOX_DEFAULT_FIND=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_PRINT0=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_MTIME=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_MMIN=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_PERM=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_TYPE=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_EXECUTABLE is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_XDEV=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_MAXDEPTH=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_NEWER=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_INUM is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_EXEC=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_EXEC_PLUS is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_USER=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_GROUP=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_NOT=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_DEPTH=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_PAREN=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_SIZE=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_PRUNE=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_QUIT is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_DELETE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_EMPTY is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_PATH=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_REGEX=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_CONTEXT is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_LINKS is not set +CONFIG_BUSYBOX_DEFAULT_GREP=y +CONFIG_BUSYBOX_DEFAULT_EGREP=y +CONFIG_BUSYBOX_DEFAULT_FGREP=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_GREP_CONTEXT=y +CONFIG_BUSYBOX_DEFAULT_XARGS=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_XARGS_SUPPORT_CONFIRMATION=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_XARGS_SUPPORT_QUOTES=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_XARGS_SUPPORT_TERMOPT=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_XARGS_SUPPORT_ZERO_TERM=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_XARGS_SUPPORT_REPL_STR is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_XARGS_SUPPORT_PARALLEL is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_XARGS_SUPPORT_ARGS_FILE is not set +# CONFIG_BUSYBOX_DEFAULT_BOOTCHARTD is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_BOOTCHARTD_CONFIG_FILE is not set +CONFIG_BUSYBOX_DEFAULT_HALT=y +CONFIG_BUSYBOX_DEFAULT_POWEROFF=y +CONFIG_BUSYBOX_DEFAULT_REBOOT=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_WAIT_FOR_INIT is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CALL_TELINIT is not set +CONFIG_BUSYBOX_DEFAULT_TELINIT_PATH="" +# CONFIG_BUSYBOX_DEFAULT_INIT is not set +# CONFIG_BUSYBOX_DEFAULT_LINUXRC is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_USE_INITTAB is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_KILL_REMOVED is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_KILL_DELAY=0 +# CONFIG_BUSYBOX_DEFAULT_FEATURE_INIT_SCTTY is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_INIT_SYSLOG is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_INIT_QUIET is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_INIT_COREDUMPS is not set +CONFIG_BUSYBOX_DEFAULT_INIT_TERMINAL_TYPE="" +# CONFIG_BUSYBOX_DEFAULT_FEATURE_INIT_MODIFY_CMDLINE is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_SHADOWPASSWDS=y +# CONFIG_BUSYBOX_DEFAULT_USE_BB_PWD_GRP is not set +# CONFIG_BUSYBOX_DEFAULT_USE_BB_SHADOW is not set +# CONFIG_BUSYBOX_DEFAULT_USE_BB_CRYPT is not set +# CONFIG_BUSYBOX_DEFAULT_USE_BB_CRYPT_SHA is not set +# CONFIG_BUSYBOX_DEFAULT_ADD_SHELL is not set +# CONFIG_BUSYBOX_DEFAULT_REMOVE_SHELL is not set +# CONFIG_BUSYBOX_DEFAULT_ADDGROUP is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_ADDUSER_TO_GROUP is not set +# CONFIG_BUSYBOX_DEFAULT_ADDUSER is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CHECK_NAMES is not set +CONFIG_BUSYBOX_DEFAULT_LAST_ID=0 +CONFIG_BUSYBOX_DEFAULT_FIRST_SYSTEM_ID=0 +CONFIG_BUSYBOX_DEFAULT_LAST_SYSTEM_ID=0 +# CONFIG_BUSYBOX_DEFAULT_CHPASSWD is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_DEFAULT_PASSWD_ALGO="md5" +# CONFIG_BUSYBOX_DEFAULT_CRYPTPW is not set +# CONFIG_BUSYBOX_DEFAULT_MKPASSWD is not set +# CONFIG_BUSYBOX_DEFAULT_DELUSER is not set +# CONFIG_BUSYBOX_DEFAULT_DELGROUP is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_DEL_USER_FROM_GROUP is not set +# CONFIG_BUSYBOX_DEFAULT_GETTY is not set +CONFIG_BUSYBOX_DEFAULT_LOGIN=y +CONFIG_BUSYBOX_DEFAULT_LOGIN_SESSION_AS_CHILD=y +# CONFIG_BUSYBOX_DEFAULT_LOGIN_SCRIPTS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_NOLOGIN is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SECURETTY is not set +CONFIG_BUSYBOX_DEFAULT_PASSWD=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_PASSWD_WEAK_CHECK=y +# CONFIG_BUSYBOX_DEFAULT_SU is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SU_SYSLOG is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SU_CHECKS_SHELLS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTY is not set +# CONFIG_BUSYBOX_DEFAULT_SULOGIN is not set +# CONFIG_BUSYBOX_DEFAULT_VLOCK is not set +# CONFIG_BUSYBOX_DEFAULT_CHATTR is not set +# CONFIG_BUSYBOX_DEFAULT_FSCK is not set +# CONFIG_BUSYBOX_DEFAULT_LSATTR is not set +# CONFIG_BUSYBOX_DEFAULT_TUNE2FS is not set +# CONFIG_BUSYBOX_DEFAULT_MODPROBE_SMALL is not set +# CONFIG_BUSYBOX_DEFAULT_DEPMOD is not set +# CONFIG_BUSYBOX_DEFAULT_INSMOD is not set +# CONFIG_BUSYBOX_DEFAULT_LSMOD is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set +# CONFIG_BUSYBOX_DEFAULT_MODINFO is not set +# CONFIG_BUSYBOX_DEFAULT_MODPROBE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MODPROBE_BLACKLIST is not set +# CONFIG_BUSYBOX_DEFAULT_RMMOD is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CMDLINE_MODULE_OPTIONS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_2_4_MODULES is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_INSMOD_LOAD_MAP is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_INSMOD_LOAD_MAP_FULL is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CHECK_TAINTED_MODULE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_INSMOD_TRY_MMAP is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MODUTILS_ALIAS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MODUTILS_SYMBOLS is not set +CONFIG_BUSYBOX_DEFAULT_DEFAULT_MODULES_DIR="" +CONFIG_BUSYBOX_DEFAULT_DEFAULT_DEPMOD_FILE="" +# CONFIG_BUSYBOX_DEFAULT_ACPID is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_ACPID_COMPAT is not set +# CONFIG_BUSYBOX_DEFAULT_BLKDISCARD is not set +# CONFIG_BUSYBOX_DEFAULT_BLKID is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_BLKID_TYPE is not set +# CONFIG_BUSYBOX_DEFAULT_BLOCKDEV is not set +# CONFIG_BUSYBOX_DEFAULT_CAL is not set +# CONFIG_BUSYBOX_DEFAULT_CHRT is not set +CONFIG_BUSYBOX_DEFAULT_DMESG=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_DMESG_PRETTY=y +# CONFIG_BUSYBOX_DEFAULT_EJECT is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_EJECT_SCSI is not set +# CONFIG_BUSYBOX_DEFAULT_FALLOCATE is not set +# CONFIG_BUSYBOX_DEFAULT_FATATTR is not set +# CONFIG_BUSYBOX_DEFAULT_FBSET is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_FBSET_FANCY is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE is not set +# CONFIG_BUSYBOX_DEFAULT_FDFORMAT is not set +# CONFIG_BUSYBOX_DEFAULT_FDISK is not set +# CONFIG_BUSYBOX_DEFAULT_FDISK_SUPPORT_LARGE_DISKS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_FDISK_WRITABLE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_AIX_LABEL is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SGI_LABEL is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SUN_LABEL is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_OSF_LABEL is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_GPT_LABEL is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_FDISK_ADVANCED is not set +# CONFIG_BUSYBOX_DEFAULT_FINDFS is not set +CONFIG_BUSYBOX_DEFAULT_FLOCK=y +# CONFIG_BUSYBOX_DEFAULT_FDFLUSH is not set +# CONFIG_BUSYBOX_DEFAULT_FREERAMDISK is not set +# CONFIG_BUSYBOX_DEFAULT_FSCK_MINIX is not set +# CONFIG_BUSYBOX_DEFAULT_FSFREEZE is not set +# CONFIG_BUSYBOX_DEFAULT_FSTRIM is not set +# CONFIG_BUSYBOX_DEFAULT_GETOPT is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_GETOPT_LONG is not set +CONFIG_BUSYBOX_DEFAULT_HEXDUMP=y +# CONFIG_BUSYBOX_DEFAULT_HD is not set +# CONFIG_BUSYBOX_DEFAULT_XXD is not set +CONFIG_BUSYBOX_DEFAULT_HWCLOCK=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HWCLOCK_ADJTIME_FHS is not set +# CONFIG_BUSYBOX_DEFAULT_IONICE is not set +# CONFIG_BUSYBOX_DEFAULT_IPCRM is not set +# CONFIG_BUSYBOX_DEFAULT_IPCS is not set +# CONFIG_BUSYBOX_DEFAULT_LAST is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_LAST_FANCY is not set +# CONFIG_BUSYBOX_DEFAULT_LOSETUP is not set +# CONFIG_BUSYBOX_DEFAULT_LSPCI is not set +# CONFIG_BUSYBOX_DEFAULT_LSUSB is not set +# CONFIG_BUSYBOX_DEFAULT_MDEV is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MDEV_CONF is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MDEV_DAEMON is not set +# CONFIG_BUSYBOX_DEFAULT_MESG is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MESG_ENABLE_ONLY_GROUP is not set +# CONFIG_BUSYBOX_DEFAULT_MKE2FS is not set +# CONFIG_BUSYBOX_DEFAULT_MKFS_EXT2 is not set +# CONFIG_BUSYBOX_DEFAULT_MKFS_MINIX is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MINIX2 is not set +# CONFIG_BUSYBOX_DEFAULT_MKFS_REISER is not set +# CONFIG_BUSYBOX_DEFAULT_MKDOSFS is not set +# CONFIG_BUSYBOX_DEFAULT_MKFS_VFAT is not set +CONFIG_BUSYBOX_DEFAULT_MKSWAP=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MKSWAP_UUID is not set +# CONFIG_BUSYBOX_DEFAULT_MORE is not set +CONFIG_BUSYBOX_DEFAULT_MOUNT=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MOUNT_FAKE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MOUNT_VERBOSE is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_MOUNT_HELPERS=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MOUNT_LABEL is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MOUNT_NFS is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_MOUNT_CIFS=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_MOUNT_FLAGS=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_MOUNT_FSTAB=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MOUNT_OTHERTAB is not set +# CONFIG_BUSYBOX_DEFAULT_MOUNTPOINT is not set +# CONFIG_BUSYBOX_DEFAULT_NOLOGIN is not set +# CONFIG_BUSYBOX_DEFAULT_NOLOGIN_DEPENDENCIES is not set +# CONFIG_BUSYBOX_DEFAULT_NSENTER is not set +CONFIG_BUSYBOX_DEFAULT_PIVOT_ROOT=y +# CONFIG_BUSYBOX_DEFAULT_RDATE is not set +# CONFIG_BUSYBOX_DEFAULT_RDEV is not set +# CONFIG_BUSYBOX_DEFAULT_READPROFILE is not set +# CONFIG_BUSYBOX_DEFAULT_RENICE is not set +# CONFIG_BUSYBOX_DEFAULT_REV is not set +# CONFIG_BUSYBOX_DEFAULT_RTCWAKE is not set +# CONFIG_BUSYBOX_DEFAULT_SCRIPT is not set +# CONFIG_BUSYBOX_DEFAULT_SCRIPTREPLAY is not set +# CONFIG_BUSYBOX_DEFAULT_SETARCH is not set +# CONFIG_BUSYBOX_DEFAULT_LINUX32 is not set +# CONFIG_BUSYBOX_DEFAULT_LINUX64 is not set +# CONFIG_BUSYBOX_DEFAULT_SETPRIV is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SETPRIV_DUMP is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SETPRIV_CAPABILITIES is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SETPRIV_CAPABILITY_NAMES is not set +# CONFIG_BUSYBOX_DEFAULT_SETSID is not set +CONFIG_BUSYBOX_DEFAULT_SWAPON=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_SWAPON_DISCARD=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_SWAPON_PRI=y +CONFIG_BUSYBOX_DEFAULT_SWAPOFF=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SWAPONOFF_LABEL is not set +CONFIG_BUSYBOX_DEFAULT_SWITCH_ROOT=y +# CONFIG_BUSYBOX_DEFAULT_TASKSET is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TASKSET_CPULIST is not set +# CONFIG_BUSYBOX_DEFAULT_UEVENT is not set +CONFIG_BUSYBOX_DEFAULT_UMOUNT=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_UMOUNT_ALL=y +# CONFIG_BUSYBOX_DEFAULT_UNSHARE is not set +# CONFIG_BUSYBOX_DEFAULT_WALL is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_MOUNT_LOOP=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MOUNT_LOOP_CREATE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MTAB_SUPPORT is not set +# CONFIG_BUSYBOX_DEFAULT_VOLUMEID is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_BCACHE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_BTRFS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_CRAMFS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_EROFS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_EXFAT is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_EXT is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_F2FS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_FAT is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_HFS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_ISO9660 is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_JFS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LFS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LINUXRAID is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LINUXSWAP is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LUKS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_MINIX is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_NILFS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_NTFS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_OCFS2 is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_REISERFS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_ROMFS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SQUASHFS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SYSV is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UBIFS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UDF is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_XFS is not set +# CONFIG_BUSYBOX_DEFAULT_ADJTIMEX is not set +# CONFIG_BUSYBOX_DEFAULT_BBCONFIG is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_COMPRESS_BBCONFIG is not set +# CONFIG_BUSYBOX_DEFAULT_BC is not set +# CONFIG_BUSYBOX_DEFAULT_DC is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_DC_BIG is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_DC_LIBM is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_BC_INTERACTIVE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_BC_LONG_OPTIONS is not set +# CONFIG_BUSYBOX_DEFAULT_BEEP is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_BEEP_FREQ=0 +CONFIG_BUSYBOX_DEFAULT_FEATURE_BEEP_LENGTH_MS=0 +# CONFIG_BUSYBOX_DEFAULT_CHAT is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CHAT_NOFAIL is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CHAT_TTY_HIFI is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CHAT_IMPLICIT_CR is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CHAT_SWALLOW_OPTS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CHAT_SEND_ESCAPES is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CHAT_VAR_ABORT_LEN is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CHAT_CLR_ABORT is not set +# CONFIG_BUSYBOX_DEFAULT_CONSPY is not set +CONFIG_BUSYBOX_DEFAULT_CROND=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CROND_D is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_CROND_SPECIAL_TIMES is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_CROND_DIR="/etc" +CONFIG_BUSYBOX_DEFAULT_CRONTAB=y +# CONFIG_BUSYBOX_DEFAULT_DEVFSD is not set +# CONFIG_BUSYBOX_DEFAULT_DEVFSD_MODLOAD is not set +# CONFIG_BUSYBOX_DEFAULT_DEVFSD_FG_NP is not set +# CONFIG_BUSYBOX_DEFAULT_DEVFSD_VERBOSE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_DEVFS is not set +# CONFIG_BUSYBOX_DEFAULT_DEVMEM is not set +# CONFIG_BUSYBOX_DEFAULT_FBSPLASH is not set +# CONFIG_BUSYBOX_DEFAULT_FLASH_ERASEALL is not set +# CONFIG_BUSYBOX_DEFAULT_FLASH_LOCK is not set +# CONFIG_BUSYBOX_DEFAULT_FLASH_UNLOCK is not set +# CONFIG_BUSYBOX_DEFAULT_FLASHCP is not set +# CONFIG_BUSYBOX_DEFAULT_HDPARM is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HDPARM_GET_IDENTITY is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_GETSET_DMA is not set +# CONFIG_BUSYBOX_DEFAULT_HEXEDIT is not set +# CONFIG_BUSYBOX_DEFAULT_I2CGET is not set +# CONFIG_BUSYBOX_DEFAULT_I2CSET is not set +# CONFIG_BUSYBOX_DEFAULT_I2CDUMP is not set +# CONFIG_BUSYBOX_DEFAULT_I2CDETECT is not set +# CONFIG_BUSYBOX_DEFAULT_I2CTRANSFER is not set +# CONFIG_BUSYBOX_DEFAULT_INOTIFYD is not set +CONFIG_BUSYBOX_DEFAULT_LESS=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES=9999999 +# CONFIG_BUSYBOX_DEFAULT_FEATURE_LESS_BRACKETS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_LESS_TRUNCATE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_LESS_MARKS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_LESS_REGEXP is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_LESS_WINCH is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_LESS_ASK_TERMINAL is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_LESS_DASHCMD is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_LESS_RAW is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_LESS_ENV is not set +CONFIG_BUSYBOX_DEFAULT_LOCK=y +# CONFIG_BUSYBOX_DEFAULT_LSSCSI is not set +# CONFIG_BUSYBOX_DEFAULT_MAKEDEVS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MAKEDEVS_LEAF is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_MAKEDEVS_TABLE is not set +# CONFIG_BUSYBOX_DEFAULT_MAN is not set +# CONFIG_BUSYBOX_DEFAULT_MICROCOM is not set +# CONFIG_BUSYBOX_DEFAULT_MIM is not set +# CONFIG_BUSYBOX_DEFAULT_MT is not set +# CONFIG_BUSYBOX_DEFAULT_NANDWRITE is not set +# CONFIG_BUSYBOX_DEFAULT_NANDDUMP is not set +# CONFIG_BUSYBOX_DEFAULT_PARTPROBE is not set +# CONFIG_BUSYBOX_DEFAULT_RAIDAUTORUN is not set +# CONFIG_BUSYBOX_DEFAULT_READAHEAD is not set +# CONFIG_BUSYBOX_DEFAULT_RFKILL is not set +# CONFIG_BUSYBOX_DEFAULT_RUNLEVEL is not set +# CONFIG_BUSYBOX_DEFAULT_RX is not set +# CONFIG_BUSYBOX_DEFAULT_SETFATTR is not set +# CONFIG_BUSYBOX_DEFAULT_SETSERIAL is not set +CONFIG_BUSYBOX_DEFAULT_STRINGS=y +CONFIG_BUSYBOX_DEFAULT_TIME=y +# CONFIG_BUSYBOX_DEFAULT_TS is not set +# CONFIG_BUSYBOX_DEFAULT_TTYSIZE is not set +# CONFIG_BUSYBOX_DEFAULT_UBIATTACH is not set +# CONFIG_BUSYBOX_DEFAULT_UBIDETACH is not set +# CONFIG_BUSYBOX_DEFAULT_UBIMKVOL is not set +# CONFIG_BUSYBOX_DEFAULT_UBIRMVOL is not set +# CONFIG_BUSYBOX_DEFAULT_UBIRSVOL is not set +# CONFIG_BUSYBOX_DEFAULT_UBIUPDATEVOL is not set +# CONFIG_BUSYBOX_DEFAULT_UBIRENAME is not set +# CONFIG_BUSYBOX_DEFAULT_VOLNAME is not set +# CONFIG_BUSYBOX_DEFAULT_WATCHDOG is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_IPV6=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_UNIX_LOCAL is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_PREFER_IPV4_ADDRESS is not set +CONFIG_BUSYBOX_DEFAULT_VERBOSE_RESOLUTION_ERRORS=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TLS_SHA1 is not set +# CONFIG_BUSYBOX_DEFAULT_ARP is not set +# CONFIG_BUSYBOX_DEFAULT_ARPING is not set +CONFIG_BUSYBOX_DEFAULT_BRCTL=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_BRCTL_FANCY=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_BRCTL_SHOW=y +# CONFIG_BUSYBOX_DEFAULT_DNSD is not set +# CONFIG_BUSYBOX_DEFAULT_ETHER_WAKE is not set +# CONFIG_BUSYBOX_DEFAULT_FTPD is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_FTPD_WRITE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_FTPD_AUTHENTICATION is not set +# CONFIG_BUSYBOX_DEFAULT_FTPGET is not set +# CONFIG_BUSYBOX_DEFAULT_FTPPUT is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_FTPGETPUT_LONG_OPTIONS is not set +# CONFIG_BUSYBOX_DEFAULT_HOSTNAME is not set +# CONFIG_BUSYBOX_DEFAULT_DNSDOMAINNAME is not set +# CONFIG_BUSYBOX_DEFAULT_HTTPD is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HTTPD_RANGES is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HTTPD_SETUID is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HTTPD_BASIC_AUTH is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HTTPD_AUTH_MD5 is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HTTPD_CGI is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HTTPD_ENCODE_URL_STR is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HTTPD_ERROR_PAGES is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HTTPD_PROXY is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HTTPD_GZIP is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HTTPD_ETAG is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HTTPD_LAST_MODIFIED is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HTTPD_DATE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_HTTPD_ACL_IP is not set +CONFIG_BUSYBOX_DEFAULT_IFCONFIG=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_IFCONFIG_STATUS=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_IFCONFIG_HW=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_IFCONFIG_BROADCAST_PLUS=y +# CONFIG_BUSYBOX_DEFAULT_IFENSLAVE is not set +# CONFIG_BUSYBOX_DEFAULT_IFPLUGD is not set +# CONFIG_BUSYBOX_DEFAULT_IFUP is not set +# CONFIG_BUSYBOX_DEFAULT_IFDOWN is not set +CONFIG_BUSYBOX_DEFAULT_IFUPDOWN_IFSTATE_PATH="" +# CONFIG_BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IPV4 is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IPV6 is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_MAPPING is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set +# CONFIG_BUSYBOX_DEFAULT_INETD is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_INETD_RPC is not set +CONFIG_BUSYBOX_DEFAULT_IP=y +# CONFIG_BUSYBOX_DEFAULT_IPADDR is not set +# CONFIG_BUSYBOX_DEFAULT_IPLINK is not set +# CONFIG_BUSYBOX_DEFAULT_IPROUTE is not set +# CONFIG_BUSYBOX_DEFAULT_IPTUNNEL is not set +# CONFIG_BUSYBOX_DEFAULT_IPRULE is not set +# CONFIG_BUSYBOX_DEFAULT_IPNEIGH is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_IP_ADDRESS=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_IP_LINK=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_IP_ROUTE=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_IP_ROUTE_DIR="/etc/iproute2" +# CONFIG_BUSYBOX_DEFAULT_FEATURE_IP_TUNNEL is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_IP_RULE=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_IP_NEIGH=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_IP_RARE_PROTOCOLS is not set +# CONFIG_BUSYBOX_DEFAULT_IPCALC is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_IPCALC_LONG_OPTIONS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_IPCALC_FANCY is not set +# CONFIG_BUSYBOX_DEFAULT_FAKEIDENTD is not set +# CONFIG_BUSYBOX_DEFAULT_NAMEIF is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_NAMEIF_EXTENDED is not set +# CONFIG_BUSYBOX_DEFAULT_NBDCLIENT is not set +CONFIG_BUSYBOX_DEFAULT_NC=y +# CONFIG_BUSYBOX_DEFAULT_NETCAT is not set +# CONFIG_BUSYBOX_DEFAULT_NC_SERVER is not set +# CONFIG_BUSYBOX_DEFAULT_NC_EXTRA is not set +# CONFIG_BUSYBOX_DEFAULT_NC_110_COMPAT is not set +CONFIG_BUSYBOX_DEFAULT_NETMSG=y +CONFIG_BUSYBOX_DEFAULT_NETSTAT=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_NETSTAT_WIDE=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_NETSTAT_PRG=y +CONFIG_BUSYBOX_DEFAULT_NSLOOKUP=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_NSLOOKUP_BIG=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_NSLOOKUP_LONG_OPTIONS is not set +CONFIG_BUSYBOX_DEFAULT_NTPD=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_NTPD_SERVER=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_NTPD_CONF is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_NTP_AUTH is not set +CONFIG_BUSYBOX_DEFAULT_PING=y +CONFIG_BUSYBOX_DEFAULT_PING6=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_FANCY_PING=y +# CONFIG_BUSYBOX_DEFAULT_PSCAN is not set +CONFIG_BUSYBOX_DEFAULT_ROUTE=y +# CONFIG_BUSYBOX_DEFAULT_SLATTACH is not set +# CONFIG_BUSYBOX_DEFAULT_SSL_CLIENT is not set +# CONFIG_BUSYBOX_DEFAULT_TC is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TC_INGRESS is not set +# CONFIG_BUSYBOX_DEFAULT_TCPSVD is not set +# CONFIG_BUSYBOX_DEFAULT_UDPSVD is not set +# CONFIG_BUSYBOX_DEFAULT_TELNET is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TELNET_TTYPE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TELNET_AUTOLOGIN is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TELNET_WIDTH is not set +# CONFIG_BUSYBOX_DEFAULT_TELNETD is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TELNETD_STANDALONE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TELNETD_INETD_WAIT is not set +# CONFIG_BUSYBOX_DEFAULT_TFTP is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TFTP_PROGRESS_BAR is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TFTP_HPA_COMPAT is not set +# CONFIG_BUSYBOX_DEFAULT_TFTPD is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TFTP_GET is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TFTP_PUT is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TFTP_BLOCKSIZE is not set +# CONFIG_BUSYBOX_DEFAULT_TFTP_DEBUG is not set +# CONFIG_BUSYBOX_DEFAULT_TLS is not set +CONFIG_BUSYBOX_DEFAULT_TRACEROUTE=y +CONFIG_BUSYBOX_DEFAULT_TRACEROUTE6=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_VERBOSE=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_USE_ICMP is not set +# CONFIG_BUSYBOX_DEFAULT_TUNCTL is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TUNCTL_UG is not set +# CONFIG_BUSYBOX_DEFAULT_VCONFIG is not set +# CONFIG_BUSYBOX_DEFAULT_WGET is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_WGET_HTTPS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL is not set +# CONFIG_BUSYBOX_DEFAULT_WHOIS is not set +# CONFIG_BUSYBOX_DEFAULT_ZCIP is not set +# CONFIG_BUSYBOX_DEFAULT_UDHCPD is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set +CONFIG_BUSYBOX_DEFAULT_DHCPD_LEASES_FILE="" +# CONFIG_BUSYBOX_DEFAULT_DUMPLEASES is not set +# CONFIG_BUSYBOX_DEFAULT_DHCPRELAY is not set +CONFIG_BUSYBOX_DEFAULT_UDHCPC=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_UDHCPC_ARPING is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_UDHCPC_SANITIZEOPT is not set +CONFIG_BUSYBOX_DEFAULT_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" +# CONFIG_BUSYBOX_DEFAULT_UDHCPC6 is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_UDHCPC6_RFC3646 is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_UDHCPC6_RFC4704 is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_UDHCPC6_RFC4833 is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_UDHCPC6_RFC5970 is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_UDHCP_PORT is not set +CONFIG_BUSYBOX_DEFAULT_UDHCP_DEBUG=0 +CONFIG_BUSYBOX_DEFAULT_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 +CONFIG_BUSYBOX_DEFAULT_FEATURE_UDHCP_RFC3397=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_UDHCP_8021Q is not set +CONFIG_BUSYBOX_DEFAULT_IFUPDOWN_UDHCPC_CMD_OPTIONS="" +# CONFIG_BUSYBOX_DEFAULT_LPD is not set +# CONFIG_BUSYBOX_DEFAULT_LPR is not set +# CONFIG_BUSYBOX_DEFAULT_LPQ is not set +# CONFIG_BUSYBOX_DEFAULT_MAKEMIME is not set +# CONFIG_BUSYBOX_DEFAULT_POPMAILDIR is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_POPMAILDIR_DELIVERY is not set +# CONFIG_BUSYBOX_DEFAULT_REFORMIME is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_REFORMIME_COMPAT is not set +# CONFIG_BUSYBOX_DEFAULT_SENDMAIL is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET="" +CONFIG_BUSYBOX_DEFAULT_FREE=y +# CONFIG_BUSYBOX_DEFAULT_FUSER is not set +# CONFIG_BUSYBOX_DEFAULT_IOSTAT is not set +CONFIG_BUSYBOX_DEFAULT_KILL=y +CONFIG_BUSYBOX_DEFAULT_KILLALL=y +# CONFIG_BUSYBOX_DEFAULT_KILLALL5 is not set +# CONFIG_BUSYBOX_DEFAULT_LSOF is not set +# CONFIG_BUSYBOX_DEFAULT_MPSTAT is not set +# CONFIG_BUSYBOX_DEFAULT_NMETER is not set +CONFIG_BUSYBOX_DEFAULT_PGREP=y +# CONFIG_BUSYBOX_DEFAULT_PKILL is not set +CONFIG_BUSYBOX_DEFAULT_PIDOF=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_PIDOF_SINGLE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_PIDOF_OMIT is not set +# CONFIG_BUSYBOX_DEFAULT_PMAP is not set +# CONFIG_BUSYBOX_DEFAULT_POWERTOP is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_POWERTOP_INTERACTIVE is not set +CONFIG_BUSYBOX_DEFAULT_PS=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_PS_WIDE=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_PS_LONG is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_PS_TIME is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_PS_UNUSUAL_SYSTEMS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_PS_ADDITIONAL_COLUMNS is not set +# CONFIG_BUSYBOX_DEFAULT_PSTREE is not set +# CONFIG_BUSYBOX_DEFAULT_PWDX is not set +# CONFIG_BUSYBOX_DEFAULT_SMEMCAP is not set +CONFIG_BUSYBOX_DEFAULT_BB_SYSCTL=y +CONFIG_BUSYBOX_DEFAULT_TOP=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TOP_INTERACTIVE is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_TOPMEM is not set +CONFIG_BUSYBOX_DEFAULT_UPTIME=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT is not set +# CONFIG_BUSYBOX_DEFAULT_WATCH is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS is not set +# CONFIG_BUSYBOX_DEFAULT_CHPST is not set +# CONFIG_BUSYBOX_DEFAULT_SETUIDGID is not set +# CONFIG_BUSYBOX_DEFAULT_ENVUIDGID is not set +# CONFIG_BUSYBOX_DEFAULT_ENVDIR is not set +# CONFIG_BUSYBOX_DEFAULT_SOFTLIMIT is not set +# CONFIG_BUSYBOX_DEFAULT_RUNSV is not set +# CONFIG_BUSYBOX_DEFAULT_RUNSVDIR is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_RUNSVDIR_LOG is not set +# CONFIG_BUSYBOX_DEFAULT_SV is not set +CONFIG_BUSYBOX_DEFAULT_SV_DEFAULT_SERVICE_DIR="" +# CONFIG_BUSYBOX_DEFAULT_SVC is not set +# CONFIG_BUSYBOX_DEFAULT_SVOK is not set +# CONFIG_BUSYBOX_DEFAULT_SVLOGD is not set +# CONFIG_BUSYBOX_DEFAULT_CHCON is not set +# CONFIG_BUSYBOX_DEFAULT_GETENFORCE is not set +# CONFIG_BUSYBOX_DEFAULT_GETSEBOOL is not set +# CONFIG_BUSYBOX_DEFAULT_LOAD_POLICY is not set +# CONFIG_BUSYBOX_DEFAULT_MATCHPATHCON is not set +# CONFIG_BUSYBOX_DEFAULT_RUNCON is not set +# CONFIG_BUSYBOX_DEFAULT_SELINUXENABLED is not set +# CONFIG_BUSYBOX_DEFAULT_SESTATUS is not set +# CONFIG_BUSYBOX_DEFAULT_SETENFORCE is not set +# CONFIG_BUSYBOX_DEFAULT_SETFILES is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SETFILES_CHECK_OPTION is not set +# CONFIG_BUSYBOX_DEFAULT_RESTORECON is not set +# CONFIG_BUSYBOX_DEFAULT_SETSEBOOL is not set +CONFIG_BUSYBOX_DEFAULT_SH_IS_ASH=y +# CONFIG_BUSYBOX_DEFAULT_SH_IS_HUSH is not set +# CONFIG_BUSYBOX_DEFAULT_SH_IS_NONE is not set +# CONFIG_BUSYBOX_DEFAULT_BASH_IS_ASH is not set +# CONFIG_BUSYBOX_DEFAULT_BASH_IS_HUSH is not set +CONFIG_BUSYBOX_DEFAULT_BASH_IS_NONE=y +CONFIG_BUSYBOX_DEFAULT_SHELL_ASH=y +CONFIG_BUSYBOX_DEFAULT_ASH=y +# CONFIG_BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE is not set +CONFIG_BUSYBOX_DEFAULT_ASH_INTERNAL_GLOB=y +CONFIG_BUSYBOX_DEFAULT_ASH_BASH_COMPAT=y +# CONFIG_BUSYBOX_DEFAULT_ASH_BASH_SOURCE_CURDIR is not set +# CONFIG_BUSYBOX_DEFAULT_ASH_BASH_NOT_FOUND_HOOK is not set +CONFIG_BUSYBOX_DEFAULT_ASH_JOB_CONTROL=y +CONFIG_BUSYBOX_DEFAULT_ASH_ALIAS=y +# CONFIG_BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT is not set +CONFIG_BUSYBOX_DEFAULT_ASH_EXPAND_PRMT=y +# CONFIG_BUSYBOX_DEFAULT_ASH_IDLE_TIMEOUT is not set +# CONFIG_BUSYBOX_DEFAULT_ASH_MAIL is not set +CONFIG_BUSYBOX_DEFAULT_ASH_ECHO=y +CONFIG_BUSYBOX_DEFAULT_ASH_PRINTF=y +CONFIG_BUSYBOX_DEFAULT_ASH_TEST=y +# CONFIG_BUSYBOX_DEFAULT_ASH_HELP is not set +CONFIG_BUSYBOX_DEFAULT_ASH_GETOPTS=y +CONFIG_BUSYBOX_DEFAULT_ASH_CMDCMD=y +# CONFIG_BUSYBOX_DEFAULT_CTTYHACK is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH is not set +# CONFIG_BUSYBOX_DEFAULT_SHELL_HUSH is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_BASH_COMPAT is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_BRACE_EXPANSION is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_LINENO_VAR is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_BASH_SOURCE_CURDIR is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_INTERACTIVE is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_SAVEHISTORY is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_JOB is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_TICK is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_IF is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_LOOPS is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_CASE is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_FUNCTIONS is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_LOCAL is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_RANDOM_SUPPORT is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_MODE_X is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_ECHO is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_PRINTF is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_TEST is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_HELP is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_EXPORT is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_EXPORT_N is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_READONLY is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_KILL is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_WAIT is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_COMMAND is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_TRAP is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_TYPE is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_TIMES is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_READ is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_SET is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_UNSET is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_ULIMIT is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_UMASK is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_GETOPTS is not set +# CONFIG_BUSYBOX_DEFAULT_HUSH_MEMLEAK is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_SH_MATH=y +CONFIG_BUSYBOX_DEFAULT_FEATURE_SH_MATH_64=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SH_MATH_BASE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SH_EXTRA_QUIET is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SH_STANDALONE is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_SH_NOFORK=y +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SH_READ_FRAC is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SH_HISTFILESIZE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SH_EMBEDDED_SCRIPTS is not set +# CONFIG_BUSYBOX_DEFAULT_KLOGD is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_KLOGD_KLOGCTL is not set +CONFIG_BUSYBOX_DEFAULT_LOGGER=y +# CONFIG_BUSYBOX_DEFAULT_LOGREAD is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_LOGREAD_REDUCED_LOCKING is not set +# CONFIG_BUSYBOX_DEFAULT_SYSLOGD is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_ROTATE_LOGFILE is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_REMOTE_LOG is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SYSLOGD_DUP is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SYSLOGD_CFG is not set +# CONFIG_BUSYBOX_DEFAULT_FEATURE_SYSLOGD_PRECISE_TIMESTAMPS is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0 +# CONFIG_BUSYBOX_DEFAULT_FEATURE_IPC_SYSLOG is not set +CONFIG_BUSYBOX_DEFAULT_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 +# CONFIG_BUSYBOX_DEFAULT_FEATURE_KMSG_SYSLOG is not set +# CONFIG_PACKAGE_busybox-selinux is not set +CONFIG_PACKAGE_ca-bundle=y +# CONFIG_PACKAGE_ca-certificates is not set +# CONFIG_PACKAGE_dnsmasq is not set +# CONFIG_PACKAGE_dnsmasq-dhcpv6 is not set +CONFIG_PACKAGE_dnsmasq-full=y +CONFIG_PACKAGE_dnsmasq_full_dhcp=y +# CONFIG_PACKAGE_dnsmasq_full_dhcpv6 is not set +# CONFIG_PACKAGE_dnsmasq_full_dnssec is not set +# CONFIG_PACKAGE_dnsmasq_full_auth is not set +CONFIG_PACKAGE_dnsmasq_full_ipset=y +# CONFIG_PACKAGE_dnsmasq_full_conntrack is not set +# CONFIG_PACKAGE_dnsmasq_full_noid is not set +# CONFIG_PACKAGE_dnsmasq_full_broken_rtc is not set +CONFIG_PACKAGE_dnsmasq_full_tftp=y +CONFIG_PACKAGE_dropbear=y + +# +# Configuration +# +CONFIG_DROPBEAR_CURVE25519=y +# CONFIG_DROPBEAR_ECC is not set +CONFIG_DROPBEAR_ED25519=y +CONFIG_DROPBEAR_CHACHA20POLY1305=y +# CONFIG_DROPBEAR_ZLIB is not set +CONFIG_DROPBEAR_DBCLIENT=y +CONFIG_DROPBEAR_SCP=y +# CONFIG_DROPBEAR_ASKPASS is not set +# end of Configuration + +# CONFIG_PACKAGE_ead is not set +CONFIG_PACKAGE_firewall=y +# CONFIG_PACKAGE_firewall4 is not set +CONFIG_PACKAGE_fstools=y +CONFIG_FSTOOLS_UBIFS_EXTROOT=y +# CONFIG_FSTOOLS_OVL_MOUNT_FULL_ACCESS_TIME is not set +# CONFIG_FSTOOLS_OVL_MOUNT_COMPRESS_ZLIB is not set +CONFIG_PACKAGE_fwtool=y +CONFIG_PACKAGE_getrandom=y +CONFIG_PACKAGE_jsonfilter=y +# CONFIG_PACKAGE_libatomic is not set +CONFIG_PACKAGE_libc=y +CONFIG_PACKAGE_libgcc=y +# CONFIG_PACKAGE_libgomp is not set +CONFIG_PACKAGE_libpthread=y +CONFIG_PACKAGE_librt=y +# CONFIG_PACKAGE_libstdcpp is not set +CONFIG_PACKAGE_logd=y +CONFIG_PACKAGE_mtd=y +CONFIG_PACKAGE_netifd=y +# CONFIG_PACKAGE_nft-qos is not set +# CONFIG_PACKAGE_om-watchdog is not set +CONFIG_PACKAGE_openwrt-keyring=y +CONFIG_PACKAGE_opkg=y +CONFIG_PACKAGE_procd=y + +# +# Configuration +# +# CONFIG_PROCD_SHOW_BOOT is not set +# CONFIG_PROCD_ZRAM_TMPFS is not set +# end of Configuration + +# CONFIG_PACKAGE_procd-seccomp is not set +# CONFIG_PACKAGE_procd-selinux is not set +# CONFIG_PACKAGE_procd-ujail is not set +# CONFIG_PACKAGE_procd-ujail-console is not set +# CONFIG_PACKAGE_qos-scripts is not set +# CONFIG_PACKAGE_refpolicy is not set +CONFIG_PACKAGE_resolveip=y +CONFIG_PACKAGE_rpcd=y +# CONFIG_PACKAGE_rpcd-mod-file is not set +# CONFIG_PACKAGE_rpcd-mod-iwinfo is not set +# CONFIG_PACKAGE_rpcd-mod-rpcsys is not set +# CONFIG_PACKAGE_selinux-policy is not set +# CONFIG_PACKAGE_snapshot-tool is not set +# CONFIG_PACKAGE_sqm-scripts is not set +# CONFIG_PACKAGE_sqm-scripts-extra is not set +CONFIG_PACKAGE_swconfig=y +CONFIG_PACKAGE_ubox=y +CONFIG_PACKAGE_ubus=y +CONFIG_PACKAGE_ubusd=y +# CONFIG_PACKAGE_ucert is not set +# CONFIG_PACKAGE_ucert-full is not set +CONFIG_PACKAGE_uci=y +CONFIG_PACKAGE_urandom-seed=y +# CONFIG_PACKAGE_urngd is not set +CONFIG_PACKAGE_usign=y +# CONFIG_PACKAGE_uxc is not set +# CONFIG_PACKAGE_wireless-tools is not set +# CONFIG_PACKAGE_zram-swap is not set +# end of Base system + +# +# Administration +# + +# +# Zabbix +# +# CONFIG_PACKAGE_zabbix-agentd is not set + +# +# SSL support +# +# CONFIG_ZABBIX_OPENSSL is not set +# CONFIG_ZABBIX_GNUTLS is not set +CONFIG_ZABBIX_NOSSL=y +# CONFIG_PACKAGE_zabbix-extra-mac80211 is not set +# CONFIG_PACKAGE_zabbix-extra-network is not set +# CONFIG_PACKAGE_zabbix-extra-wifi is not set +# CONFIG_PACKAGE_zabbix-get is not set +# CONFIG_PACKAGE_zabbix-proxy is not set +# CONFIG_PACKAGE_zabbix-sender is not set +# CONFIG_PACKAGE_zabbix-server is not set + +# +# Database Software +# +# CONFIG_ZABBIX_MYSQL is not set +CONFIG_ZABBIX_POSTGRESQL=y +# CONFIG_PACKAGE_zabbix-server-frontend is not set +# end of Zabbix + +# +# openwisp +# +# CONFIG_PACKAGE_openwisp-config-mbedtls is not set +# CONFIG_PACKAGE_openwisp-config-nossl is not set +# CONFIG_PACKAGE_openwisp-config-openssl is not set +# CONFIG_PACKAGE_openwisp-config-wolfssl is not set +# end of openwisp + +# CONFIG_PACKAGE_atop is not set +# CONFIG_PACKAGE_backuppc is not set +# CONFIG_PACKAGE_debian-archive-keyring is not set +# CONFIG_PACKAGE_debootstrap is not set +# CONFIG_PACKAGE_gkrellmd is not set +# CONFIG_PACKAGE_htop is not set +# CONFIG_PACKAGE_ipmitool is not set +# CONFIG_PACKAGE_monit is not set +# CONFIG_PACKAGE_monit-nossl is not set +# CONFIG_PACKAGE_muninlite is not set +# CONFIG_PACKAGE_netatop is not set +# CONFIG_PACKAGE_netdata is not set +# CONFIG_PACKAGE_nyx is not set +# CONFIG_PACKAGE_schroot is not set + +# +# Configuration +# +# CONFIG_SCHROOT_BTRFS is not set +# CONFIG_SCHROOT_LOOPBACK is not set +# CONFIG_SCHROOT_LVM is not set +# CONFIG_SCHROOT_UUID is not set +# end of Configuration + +# CONFIG_PACKAGE_sudo is not set +# CONFIG_PACKAGE_syslog-ng is not set +# end of Administration + +# +# Boot Loaders +# +# end of Boot Loaders + +# +# Development +# + +# +# Libraries +# +# CONFIG_PACKAGE_libncurses-dev is not set +# CONFIG_PACKAGE_libxml2-dev is not set +# CONFIG_PACKAGE_zlib-dev is not set +# end of Libraries + +# CONFIG_PACKAGE_ar is not set +# CONFIG_PACKAGE_autoconf is not set +# CONFIG_PACKAGE_automake is not set +# CONFIG_PACKAGE_binutils is not set +# CONFIG_PACKAGE_diffutils is not set +# CONFIG_PACKAGE_gcc is not set +# CONFIG_PACKAGE_gdb is not set +# CONFIG_PACKAGE_gdbserver is not set +# CONFIG_PACKAGE_gitlab-runner is not set +# CONFIG_PACKAGE_libtool-bin is not set +# CONFIG_PACKAGE_lpc21isp is not set +# CONFIG_PACKAGE_lttng-tools is not set +# CONFIG_PACKAGE_m4 is not set +# CONFIG_PACKAGE_make is not set +# CONFIG_PACKAGE_meson is not set +# CONFIG_PACKAGE_ninja is not set +# CONFIG_PACKAGE_objdump is not set +# CONFIG_PACKAGE_packr is not set +# CONFIG_PACKAGE_patch is not set +# CONFIG_PACKAGE_pkg-config is not set +# CONFIG_PACKAGE_pkgconf is not set +# CONFIG_PACKAGE_trace-cmd is not set +# CONFIG_PACKAGE_trace-cmd-extra is not set +# CONFIG_PACKAGE_valgrind is not set +# end of Development + +# +# Extra packages +# +# CONFIG_PACKAGE_autocore-arm is not set +# CONFIG_PACKAGE_automount is not set +# CONFIG_PACKAGE_autosamba is not set +# CONFIG_PACKAGE_ipv6helper is not set +# CONFIG_PACKAGE_jose is not set +# CONFIG_PACKAGE_k3wifi is not set +# CONFIG_PACKAGE_libjose is not set +# CONFIG_PACKAGE_nginx is not set +# CONFIG_PACKAGE_nginx-mod-luci-ssl is not set +# CONFIG_PACKAGE_nginx-util is not set +# CONFIG_PACKAGE_tang is not set +# end of Extra packages + +# +# Firmware +# + +# +# ath10k Board-Specific Overrides +# +# CONFIG_PACKAGE_ipq-wifi-8dev_habanero-dvk is not set +# CONFIG_PACKAGE_ipq-wifi-aruba_ap-303 is not set +# CONFIG_PACKAGE_ipq-wifi-asus_rt-acrh17 is not set +# CONFIG_PACKAGE_ipq-wifi-avm_fritzrepeater-1200 is not set +# CONFIG_PACKAGE_ipq-wifi-buffalo_wtr-m2133hp is not set +# CONFIG_PACKAGE_ipq-wifi-cellc_rtl30vw is not set +# CONFIG_PACKAGE_ipq-wifi-century_wr142ac is not set +# CONFIG_PACKAGE_ipq-wifi-devolo_magic-2-wifi-next is not set +# CONFIG_PACKAGE_ipq-wifi-dlink_dap2610 is not set +# CONFIG_PACKAGE_ipq-wifi-edgecore_ecw5410 is not set +# CONFIG_PACKAGE_ipq-wifi-edgecore_oap100 is not set +# CONFIG_PACKAGE_ipq-wifi-engenius_eap2200 is not set +# CONFIG_PACKAGE_ipq-wifi-engenius_emd1 is not set +# CONFIG_PACKAGE_ipq-wifi-engenius_emr3500 is not set +# CONFIG_PACKAGE_ipq-wifi-ezviz_cs-w3-wd1200g-eup is not set +# CONFIG_PACKAGE_ipq-wifi-glinet_gl-ap1300 is not set +# CONFIG_PACKAGE_ipq-wifi-glinet_gl-s1300 is not set +# CONFIG_PACKAGE_ipq-wifi-hiwifi_c526a is not set +# CONFIG_PACKAGE_ipq-wifi-linksys_ea8300 is not set +# CONFIG_PACKAGE_ipq-wifi-linksys_mr8300-v0 is not set +# CONFIG_PACKAGE_ipq-wifi-luma_wrtq-329acn is not set +# CONFIG_PACKAGE_ipq-wifi-mikrotik_hap-ac2 is not set +# CONFIG_PACKAGE_ipq-wifi-mikrotik_sxtsq-5-ac is not set +# CONFIG_PACKAGE_ipq-wifi-mobipromo_cm520-79f is not set +# CONFIG_PACKAGE_ipq-wifi-nec_wg2600hp3 is not set +# CONFIG_PACKAGE_ipq-wifi-netgear_sxr80 is not set +# CONFIG_PACKAGE_ipq-wifi-netgear_wac510 is not set +# CONFIG_PACKAGE_ipq-wifi-p2w_r619ac is not set +# CONFIG_PACKAGE_ipq-wifi-plasmacloud_pa1200 is not set +# CONFIG_PACKAGE_ipq-wifi-plasmacloud_pa2200 is not set +# CONFIG_PACKAGE_ipq-wifi-qxwlan_e2600ac is not set +# CONFIG_PACKAGE_ipq-wifi-redmi_ax6 is not set +# CONFIG_PACKAGE_ipq-wifi-xiaomi_ax3600 is not set +# CONFIG_PACKAGE_ipq-wifi-xiaomi_ax9000 is not set +# end of ath10k Board-Specific Overrides + +# CONFIG_PACKAGE_aircard-pcmcia-firmware is not set +# CONFIG_PACKAGE_amdgpu-firmware is not set +# CONFIG_PACKAGE_ar3k-firmware is not set +# CONFIG_PACKAGE_ath10k-board-qca4019 is not set +# CONFIG_PACKAGE_ath10k-board-qca9377 is not set +# CONFIG_PACKAGE_ath10k-board-qca9887 is not set +# CONFIG_PACKAGE_ath10k-board-qca9888 is not set +# CONFIG_PACKAGE_ath10k-board-qca988x is not set +CONFIG_PACKAGE_ath10k-board-qca9984=y +# CONFIG_PACKAGE_ath10k-board-qca99x0 is not set +# CONFIG_PACKAGE_ath10k-firmware-qca4019 is not set +# CONFIG_PACKAGE_ath10k-firmware-qca4019-ct is not set +# CONFIG_PACKAGE_ath10k-firmware-qca4019-ct-full-htt is not set +# CONFIG_PACKAGE_ath10k-firmware-qca4019-ct-htt is not set +# CONFIG_PACKAGE_ath10k-firmware-qca6174 is not set +# CONFIG_PACKAGE_ath10k-firmware-qca9377 is not set +# CONFIG_PACKAGE_ath10k-firmware-qca9887 is not set +# CONFIG_PACKAGE_ath10k-firmware-qca9887-ct is not set +# CONFIG_PACKAGE_ath10k-firmware-qca9887-ct-full-htt is not set +# CONFIG_PACKAGE_ath10k-firmware-qca9888 is not set +# CONFIG_PACKAGE_ath10k-firmware-qca9888-ct is not set +# CONFIG_PACKAGE_ath10k-firmware-qca9888-ct-full-htt is not set +# CONFIG_PACKAGE_ath10k-firmware-qca9888-ct-htt is not set +# CONFIG_PACKAGE_ath10k-firmware-qca988x is not set +# CONFIG_PACKAGE_ath10k-firmware-qca988x-ct is not set +# CONFIG_PACKAGE_ath10k-firmware-qca988x-ct-full-htt is not set +# CONFIG_PACKAGE_ath10k-firmware-qca9984 is not set +CONFIG_PACKAGE_ath10k-firmware-qca9984-ct=y +# CONFIG_PACKAGE_ath10k-firmware-qca9984-ct-full-htt is not set +# CONFIG_PACKAGE_ath10k-firmware-qca9984-ct-htt is not set +# CONFIG_PACKAGE_ath10k-firmware-qca99x0 is not set +# CONFIG_PACKAGE_ath10k-firmware-qca99x0-ct is not set +# CONFIG_PACKAGE_ath10k-firmware-qca99x0-ct-full-htt is not set +# CONFIG_PACKAGE_ath10k-firmware-qca99x0-ct-htt is not set +# CONFIG_PACKAGE_ath11k-firmware-ipq6018 is not set +# CONFIG_PACKAGE_ath11k-firmware-ipq8074 is not set +# CONFIG_PACKAGE_ath11k-firmware-qca6390 is not set +# CONFIG_PACKAGE_ath6k-firmware is not set +# CONFIG_PACKAGE_ath9k-htc-firmware is not set +# CONFIG_PACKAGE_b43legacy-firmware is not set +# CONFIG_PACKAGE_bnx2-firmware is not set +# CONFIG_PACKAGE_bnx2x-firmware is not set +# CONFIG_PACKAGE_brcmfmac-firmware-4329-sdio is not set +# CONFIG_PACKAGE_brcmfmac-firmware-43430-sdio-rpi-3b is not set +# CONFIG_PACKAGE_brcmfmac-firmware-43430-sdio-rpi-zero-w is not set +# CONFIG_PACKAGE_brcmfmac-firmware-43430a0-sdio is not set +# CONFIG_PACKAGE_brcmfmac-firmware-43455-sdio-rpi-3b-plus is not set +# CONFIG_PACKAGE_brcmfmac-firmware-43455-sdio-rpi-4b is not set +# CONFIG_PACKAGE_brcmfmac-firmware-43602a1-pcie is not set +# CONFIG_PACKAGE_brcmfmac-firmware-4366b1-pcie is not set +# CONFIG_PACKAGE_brcmfmac-firmware-4366c0-pcie is not set +# CONFIG_PACKAGE_brcmfmac-firmware-usb is not set +# CONFIG_PACKAGE_brcmsmac-firmware is not set +# CONFIG_PACKAGE_carl9170-firmware is not set +# CONFIG_PACKAGE_cypress-firmware-43012-sdio is not set +# CONFIG_PACKAGE_cypress-firmware-43340-sdio is not set +# CONFIG_PACKAGE_cypress-firmware-43362-sdio is not set +# CONFIG_PACKAGE_cypress-firmware-4339-sdio is not set +# CONFIG_PACKAGE_cypress-firmware-43430-sdio is not set +# CONFIG_PACKAGE_cypress-firmware-43455-sdio is not set +# CONFIG_PACKAGE_cypress-firmware-4354-sdio is not set +# CONFIG_PACKAGE_cypress-firmware-4356-pcie is not set +# CONFIG_PACKAGE_cypress-firmware-4356-sdio is not set +# CONFIG_PACKAGE_cypress-firmware-43570-pcie is not set +# CONFIG_PACKAGE_cypress-firmware-4359-pcie is not set +# CONFIG_PACKAGE_cypress-firmware-4359-sdio is not set +# CONFIG_PACKAGE_cypress-firmware-4373-sdio is not set +# CONFIG_PACKAGE_cypress-firmware-4373-usb is not set +# CONFIG_PACKAGE_cypress-firmware-54591-pcie is not set +# CONFIG_PACKAGE_cypress-firmware-89459-pcie is not set +# CONFIG_PACKAGE_e100-firmware is not set +# CONFIG_PACKAGE_edgeport-firmware is not set +# CONFIG_PACKAGE_eip197-mini-firmware is not set +# CONFIG_PACKAGE_ibt-firmware is not set +# CONFIG_PACKAGE_iwl3945-firmware is not set +# CONFIG_PACKAGE_iwl4965-firmware is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl100 is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl1000 is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl105 is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl135 is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl2000 is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl2030 is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl3160 is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl3168 is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl5000 is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl5150 is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl6000g2 is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl6000g2a is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl6000g2b is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl6050 is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl7260 is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl7265 is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl7265d is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl8260c is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl8265 is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl9000 is not set +# CONFIG_PACKAGE_iwlwifi-firmware-iwl9260 is not set +# CONFIG_PACKAGE_libertas-sdio-firmware is not set +# CONFIG_PACKAGE_libertas-spi-firmware is not set +# CONFIG_PACKAGE_libertas-usb-firmware is not set +# CONFIG_PACKAGE_mt7601u-firmware is not set +# CONFIG_PACKAGE_mt7622bt-firmware is not set +# CONFIG_PACKAGE_mwifiex-pcie-firmware is not set +# CONFIG_PACKAGE_mwifiex-sdio-firmware is not set +# CONFIG_PACKAGE_mwl8k-firmware is not set +# CONFIG_PACKAGE_p54-pci-firmware is not set +# CONFIG_PACKAGE_p54-spi-firmware is not set +# CONFIG_PACKAGE_p54-usb-firmware is not set +# CONFIG_PACKAGE_prism54-firmware is not set +# CONFIG_PACKAGE_r8169-firmware is not set +# CONFIG_PACKAGE_radeon-firmware is not set +# CONFIG_PACKAGE_rs9113-firmware is not set +# CONFIG_PACKAGE_rt2800-pci-firmware is not set +# CONFIG_PACKAGE_rt2800-usb-firmware is not set +# CONFIG_PACKAGE_rt61-pci-firmware is not set +# CONFIG_PACKAGE_rt73-usb-firmware is not set +# CONFIG_PACKAGE_rtl8188eu-firmware is not set +# CONFIG_PACKAGE_rtl8192ce-firmware is not set +# CONFIG_PACKAGE_rtl8192cu-firmware is not set +# CONFIG_PACKAGE_rtl8192de-firmware is not set +# CONFIG_PACKAGE_rtl8192eu-firmware is not set +# CONFIG_PACKAGE_rtl8192se-firmware is not set +# CONFIG_PACKAGE_rtl8192su-firmware is not set +# CONFIG_PACKAGE_rtl8723au-firmware is not set +# CONFIG_PACKAGE_rtl8723bs-firmware is not set +# CONFIG_PACKAGE_rtl8723bu-firmware is not set +# CONFIG_PACKAGE_rtl8821ae-firmware is not set +# CONFIG_PACKAGE_rtl8822be-firmware is not set +# CONFIG_PACKAGE_rtl8822ce-firmware is not set +# CONFIG_PACKAGE_ti-3410-firmware is not set +# CONFIG_PACKAGE_ti-5052-firmware is not set +# CONFIG_PACKAGE_wil6210-firmware is not set +CONFIG_PACKAGE_wireless-regdb=y +# CONFIG_PACKAGE_wl12xx-firmware is not set +# CONFIG_PACKAGE_wl18xx-firmware is not set +# end of Firmware + +# +# Fonts +# + +# +# DejaVu +# +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuMathTeXGyre is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSans is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSans-Bold is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSans-BoldOblique is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSans-ExtraLight is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSans-Oblique is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSansCondensed is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSansCondensed-Bold is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSansCondensed-BoldOblique is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSansCondensed-Oblique is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSansMono is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSansMono-Bold is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSansMono-BoldOblique is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSansMono-Oblique is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSerif is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSerif-Bold is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSerif-BoldItalic is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSerif-Italic is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSerifCondensed is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSerifCondensed-Bold is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSerifCondensed-BoldItalic is not set +# CONFIG_PACKAGE_dejavu-fonts-ttf-DejaVuSerifCondensed-Italic is not set +# end of DejaVu +# end of Fonts + +# +# Kernel modules +# + +# +# Block Devices +# +# CONFIG_PACKAGE_kmod-aoe is not set +CONFIG_PACKAGE_kmod-ata-ahci=y +CONFIG_PACKAGE_kmod-ata-ahci-platform=y +# CONFIG_PACKAGE_kmod-ata-artop is not set +CONFIG_PACKAGE_kmod-ata-core=y +# CONFIG_PACKAGE_kmod-ata-marvell-sata is not set +# CONFIG_PACKAGE_kmod-ata-nvidia-sata is not set +# CONFIG_PACKAGE_kmod-ata-pdc202xx-old is not set +# CONFIG_PACKAGE_kmod-ata-piix is not set +# CONFIG_PACKAGE_kmod-ata-sil is not set +# CONFIG_PACKAGE_kmod-ata-sil24 is not set +# CONFIG_PACKAGE_kmod-ata-via-sata is not set +# CONFIG_PACKAGE_kmod-block2mtd is not set +# CONFIG_PACKAGE_kmod-dax is not set +# CONFIG_PACKAGE_kmod-dm is not set +# CONFIG_PACKAGE_kmod-dm-raid is not set +# CONFIG_PACKAGE_kmod-iosched-bfq is not set +# CONFIG_PACKAGE_kmod-iscsi-initiator is not set +# CONFIG_PACKAGE_kmod-loop is not set +# CONFIG_PACKAGE_kmod-md-mod is not set +# CONFIG_PACKAGE_kmod-nbd is not set +# CONFIG_PACKAGE_kmod-scsi-cdrom is not set +CONFIG_PACKAGE_kmod-scsi-core=y +# CONFIG_PACKAGE_kmod-scsi-generic is not set +# CONFIG_PACKAGE_kmod-scsi-tape is not set +# end of Block Devices + +# +# CAN Support +# +# CONFIG_PACKAGE_kmod-can is not set +# end of CAN Support + +# +# Cryptographic API modules +# +CONFIG_PACKAGE_kmod-crypto-acompress=y +CONFIG_PACKAGE_kmod-crypto-aead=y +CONFIG_PACKAGE_kmod-crypto-arc4=y +CONFIG_PACKAGE_kmod-crypto-authenc=y +CONFIG_PACKAGE_kmod-crypto-cbc=y +CONFIG_PACKAGE_kmod-crypto-ccm=y +CONFIG_PACKAGE_kmod-crypto-cmac=y +# CONFIG_PACKAGE_kmod-crypto-crc32c is not set +CONFIG_PACKAGE_kmod-crypto-ctr=y +# CONFIG_PACKAGE_kmod-crypto-cts is not set +CONFIG_PACKAGE_kmod-crypto-deflate=y +CONFIG_PACKAGE_kmod-crypto-des=y +CONFIG_PACKAGE_kmod-crypto-ecb=y +# CONFIG_PACKAGE_kmod-crypto-ecdh is not set +CONFIG_PACKAGE_kmod-crypto-echainiv=y +# CONFIG_PACKAGE_kmod-crypto-fcrypt is not set +CONFIG_PACKAGE_kmod-crypto-gcm=y +CONFIG_PACKAGE_kmod-crypto-gf128=y +CONFIG_PACKAGE_kmod-crypto-ghash=y +CONFIG_PACKAGE_kmod-crypto-hash=y +CONFIG_PACKAGE_kmod-crypto-hmac=y +# CONFIG_PACKAGE_kmod-crypto-hw-hifn-795x is not set +# CONFIG_PACKAGE_kmod-crypto-hw-padlock is not set +# CONFIG_PACKAGE_kmod-crypto-kpp is not set +CONFIG_PACKAGE_kmod-crypto-manager=y +# CONFIG_PACKAGE_kmod-crypto-md4 is not set +CONFIG_PACKAGE_kmod-crypto-md5=y +# CONFIG_PACKAGE_kmod-crypto-michael-mic is not set +# CONFIG_PACKAGE_kmod-crypto-misc is not set +CONFIG_PACKAGE_kmod-crypto-null=y +# CONFIG_PACKAGE_kmod-crypto-pcbc is not set +# CONFIG_PACKAGE_kmod-crypto-rmd160 is not set +CONFIG_PACKAGE_kmod-crypto-rng=y +CONFIG_PACKAGE_kmod-crypto-seqiv=y +CONFIG_PACKAGE_kmod-crypto-sha1=y +CONFIG_PACKAGE_kmod-crypto-sha256=y +# CONFIG_PACKAGE_kmod-crypto-sha512 is not set +# CONFIG_PACKAGE_kmod-crypto-test is not set +CONFIG_PACKAGE_kmod-crypto-user=y +# CONFIG_PACKAGE_kmod-crypto-xcbc is not set +# CONFIG_PACKAGE_kmod-crypto-xts is not set +CONFIG_PACKAGE_kmod-cryptodev=y +# end of Cryptographic API modules + +# +# Filesystems +# +# CONFIG_PACKAGE_kmod-fs-afs is not set +# CONFIG_PACKAGE_kmod-fs-antfs is not set +# CONFIG_PACKAGE_kmod-fs-autofs4 is not set +# CONFIG_PACKAGE_kmod-fs-btrfs is not set +# CONFIG_PACKAGE_kmod-fs-cifs is not set +# CONFIG_PACKAGE_kmod-fs-configfs is not set +# CONFIG_PACKAGE_kmod-fs-cramfs is not set +# CONFIG_PACKAGE_kmod-fs-exfat is not set +# CONFIG_PACKAGE_kmod-fs-exportfs is not set +# CONFIG_PACKAGE_kmod-fs-ext4 is not set +# CONFIG_PACKAGE_kmod-fs-f2fs is not set +# CONFIG_PACKAGE_kmod-fs-fscache is not set +# CONFIG_PACKAGE_kmod-fs-hfs is not set +# CONFIG_PACKAGE_kmod-fs-hfsplus is not set +# CONFIG_PACKAGE_kmod-fs-isofs is not set +# CONFIG_PACKAGE_kmod-fs-jfs is not set +# CONFIG_PACKAGE_kmod-fs-ksmbd is not set +# CONFIG_PACKAGE_kmod-fs-minix is not set +# CONFIG_PACKAGE_kmod-fs-msdos is not set +# CONFIG_PACKAGE_kmod-fs-nfs is not set +# CONFIG_PACKAGE_kmod-fs-nfs-common is not set +# CONFIG_PACKAGE_kmod-fs-nfs-common-rpcsec is not set +# CONFIG_PACKAGE_kmod-fs-nfs-v3 is not set +# CONFIG_PACKAGE_kmod-fs-nfs-v4 is not set +# CONFIG_PACKAGE_kmod-fs-nfsd is not set +# CONFIG_PACKAGE_kmod-fs-ntfs is not set +# CONFIG_PACKAGE_kmod-fs-ntfs3 is not set +# CONFIG_PACKAGE_kmod-fs-reiserfs is not set +# CONFIG_PACKAGE_kmod-fs-squashfs is not set +# CONFIG_PACKAGE_kmod-fs-udf is not set +# CONFIG_PACKAGE_kmod-fs-vfat is not set +# CONFIG_PACKAGE_kmod-fs-xfs is not set +# CONFIG_PACKAGE_kmod-fuse is not set +# end of Filesystems + +# +# FireWire support +# +# CONFIG_PACKAGE_kmod-firewire is not set +# end of FireWire support + +# +# Hardware Monitoring Support +# +# CONFIG_PACKAGE_kmod-gl-mifi-mcu is not set +# CONFIG_PACKAGE_kmod-hwmon-ad7418 is not set +# CONFIG_PACKAGE_kmod-hwmon-adcxx is not set +# CONFIG_PACKAGE_kmod-hwmon-ads1015 is not set +# CONFIG_PACKAGE_kmod-hwmon-adt7410 is not set +# CONFIG_PACKAGE_kmod-hwmon-adt7475 is not set +CONFIG_PACKAGE_kmod-hwmon-core=y +# CONFIG_PACKAGE_kmod-hwmon-dme1737 is not set +# CONFIG_PACKAGE_kmod-hwmon-drivetemp is not set +# CONFIG_PACKAGE_kmod-hwmon-emc2305 is not set +# CONFIG_PACKAGE_kmod-hwmon-gpiofan is not set +# CONFIG_PACKAGE_kmod-hwmon-ina209 is not set +# CONFIG_PACKAGE_kmod-hwmon-ina2xx is not set +# CONFIG_PACKAGE_kmod-hwmon-it87 is not set +# CONFIG_PACKAGE_kmod-hwmon-lm63 is not set +# CONFIG_PACKAGE_kmod-hwmon-lm75 is not set +# CONFIG_PACKAGE_kmod-hwmon-lm77 is not set +# CONFIG_PACKAGE_kmod-hwmon-lm85 is not set +# CONFIG_PACKAGE_kmod-hwmon-lm90 is not set +# CONFIG_PACKAGE_kmod-hwmon-lm92 is not set +# CONFIG_PACKAGE_kmod-hwmon-lm95241 is not set +# CONFIG_PACKAGE_kmod-hwmon-ltc4151 is not set +# CONFIG_PACKAGE_kmod-hwmon-mcp3021 is not set +# CONFIG_PACKAGE_kmod-hwmon-pwmfan is not set +# CONFIG_PACKAGE_kmod-hwmon-sch5627 is not set +# CONFIG_PACKAGE_kmod-hwmon-sht21 is not set +# CONFIG_PACKAGE_kmod-hwmon-tmp102 is not set +# CONFIG_PACKAGE_kmod-hwmon-tmp103 is not set +# CONFIG_PACKAGE_kmod-hwmon-tmp421 is not set +# CONFIG_PACKAGE_kmod-hwmon-vid is not set +# CONFIG_PACKAGE_kmod-hwmon-w83793 is not set +# CONFIG_PACKAGE_kmod-pmbus-core is not set +# CONFIG_PACKAGE_kmod-pmbus-zl6100 is not set +# end of Hardware Monitoring Support + +# +# I2C support +# +# CONFIG_PACKAGE_kmod-i2c-algo-bit is not set +# CONFIG_PACKAGE_kmod-i2c-algo-pca is not set +# CONFIG_PACKAGE_kmod-i2c-algo-pcf is not set +# CONFIG_PACKAGE_kmod-i2c-core is not set +# CONFIG_PACKAGE_kmod-i2c-designware-pci is not set +# CONFIG_PACKAGE_kmod-i2c-gpio is not set +# CONFIG_PACKAGE_kmod-i2c-mux is not set +# CONFIG_PACKAGE_kmod-i2c-mux-gpio is not set +# CONFIG_PACKAGE_kmod-i2c-mux-pca9541 is not set +# CONFIG_PACKAGE_kmod-i2c-mux-pca954x is not set +# CONFIG_PACKAGE_kmod-i2c-pxa is not set +# CONFIG_PACKAGE_kmod-i2c-smbus is not set +# CONFIG_PACKAGE_kmod-i2c-tiny-usb is not set +# end of I2C support + +# +# Industrial I/O Modules +# +# CONFIG_PACKAGE_kmod-iio-ad799x is not set +# CONFIG_PACKAGE_kmod-iio-am2315 is not set +# CONFIG_PACKAGE_kmod-iio-bh1750 is not set +# CONFIG_PACKAGE_kmod-iio-bme680 is not set +# CONFIG_PACKAGE_kmod-iio-bme680-i2c is not set +# CONFIG_PACKAGE_kmod-iio-bme680-spi is not set +# CONFIG_PACKAGE_kmod-iio-bmp280 is not set +# CONFIG_PACKAGE_kmod-iio-bmp280-i2c is not set +# CONFIG_PACKAGE_kmod-iio-bmp280-spi is not set +# CONFIG_PACKAGE_kmod-iio-ccs811 is not set +# CONFIG_PACKAGE_kmod-iio-core is not set +# CONFIG_PACKAGE_kmod-iio-dht11 is not set +# CONFIG_PACKAGE_kmod-iio-fxas21002c is not set +# CONFIG_PACKAGE_kmod-iio-fxas21002c-i2c is not set +# CONFIG_PACKAGE_kmod-iio-fxas21002c-spi is not set +# CONFIG_PACKAGE_kmod-iio-fxos8700 is not set +# CONFIG_PACKAGE_kmod-iio-fxos8700-i2c is not set +# CONFIG_PACKAGE_kmod-iio-fxos8700-spi is not set +# CONFIG_PACKAGE_kmod-iio-hmc5843 is not set +# CONFIG_PACKAGE_kmod-iio-htu21 is not set +# CONFIG_PACKAGE_kmod-iio-kfifo-buf is not set +# CONFIG_PACKAGE_kmod-iio-lsm6dsx is not set +# CONFIG_PACKAGE_kmod-iio-lsm6dsx-i2c is not set +# CONFIG_PACKAGE_kmod-iio-lsm6dsx-spi is not set +# CONFIG_PACKAGE_kmod-iio-si7020 is not set +# CONFIG_PACKAGE_kmod-iio-sps30 is not set +# CONFIG_PACKAGE_kmod-iio-st_accel is not set +# CONFIG_PACKAGE_kmod-iio-st_accel-i2c is not set +# CONFIG_PACKAGE_kmod-iio-st_accel-spi is not set +# CONFIG_PACKAGE_kmod-iio-tsl4531 is not set +# CONFIG_PACKAGE_kmod-industrialio-triggered-buffer is not set +# end of Industrial I/O Modules + +# +# Input modules +# +# CONFIG_PACKAGE_kmod-hid is not set +# CONFIG_PACKAGE_kmod-hid-generic is not set +# CONFIG_PACKAGE_kmod-input-core is not set +# CONFIG_PACKAGE_kmod-input-evdev is not set +# CONFIG_PACKAGE_kmod-input-gpio-encoder is not set +# CONFIG_PACKAGE_kmod-input-gpio-keys is not set +# CONFIG_PACKAGE_kmod-input-gpio-keys-polled is not set +# CONFIG_PACKAGE_kmod-input-joydev is not set +# CONFIG_PACKAGE_kmod-input-matrixkmap is not set +# CONFIG_PACKAGE_kmod-input-polldev is not set +# CONFIG_PACKAGE_kmod-input-touchscreen-ads7846 is not set +# CONFIG_PACKAGE_kmod-input-uinput is not set +# end of Input modules + +# +# LED modules +# +# CONFIG_PACKAGE_kmod-input-leds is not set +CONFIG_PACKAGE_kmod-leds-gpio=y +# CONFIG_PACKAGE_kmod-leds-pca963x is not set +# CONFIG_PACKAGE_kmod-leds-uleds is not set +# CONFIG_PACKAGE_kmod-ledtrig-activity is not set +# CONFIG_PACKAGE_kmod-ledtrig-audio is not set +# CONFIG_PACKAGE_kmod-ledtrig-gpio is not set +# CONFIG_PACKAGE_kmod-ledtrig-oneshot is not set +# CONFIG_PACKAGE_kmod-ledtrig-transient is not set +# end of LED modules + +# +# Libraries +# +CONFIG_PACKAGE_kmod-asn1-decoder=y +# CONFIG_PACKAGE_kmod-lib-cordic is not set +CONFIG_PACKAGE_kmod-lib-crc-ccitt=y +# CONFIG_PACKAGE_kmod-lib-crc-itu-t is not set +# CONFIG_PACKAGE_kmod-lib-crc16 is not set +# CONFIG_PACKAGE_kmod-lib-crc32c is not set +# CONFIG_PACKAGE_kmod-lib-crc7 is not set +# CONFIG_PACKAGE_kmod-lib-crc8 is not set +# CONFIG_PACKAGE_kmod-lib-lz4 is not set +CONFIG_PACKAGE_kmod-lib-textsearch=y +CONFIG_PACKAGE_kmod-lib-zlib-deflate=y +CONFIG_PACKAGE_kmod-lib-zlib-inflate=y +# CONFIG_PACKAGE_kmod-lib-zstd is not set +# end of Libraries + +# +# Native Language Support +# +CONFIG_PACKAGE_kmod-nls-base=y +# CONFIG_PACKAGE_kmod-nls-cp1250 is not set +# CONFIG_PACKAGE_kmod-nls-cp1251 is not set +# CONFIG_PACKAGE_kmod-nls-cp437 is not set +# CONFIG_PACKAGE_kmod-nls-cp775 is not set +# CONFIG_PACKAGE_kmod-nls-cp850 is not set +# CONFIG_PACKAGE_kmod-nls-cp852 is not set +# CONFIG_PACKAGE_kmod-nls-cp862 is not set +# CONFIG_PACKAGE_kmod-nls-cp864 is not set +# CONFIG_PACKAGE_kmod-nls-cp866 is not set +# CONFIG_PACKAGE_kmod-nls-cp932 is not set +# CONFIG_PACKAGE_kmod-nls-cp936 is not set +# CONFIG_PACKAGE_kmod-nls-cp950 is not set +# CONFIG_PACKAGE_kmod-nls-iso8859-1 is not set +# CONFIG_PACKAGE_kmod-nls-iso8859-13 is not set +# CONFIG_PACKAGE_kmod-nls-iso8859-15 is not set +# CONFIG_PACKAGE_kmod-nls-iso8859-2 is not set +# CONFIG_PACKAGE_kmod-nls-iso8859-6 is not set +# CONFIG_PACKAGE_kmod-nls-iso8859-8 is not set +# CONFIG_PACKAGE_kmod-nls-koi8r is not set +# CONFIG_PACKAGE_kmod-nls-utf8 is not set +# end of Native Language Support + +# +# Netfilter Extensions +# +# CONFIG_PACKAGE_kmod-arptables is not set +# CONFIG_PACKAGE_kmod-br-netfilter is not set +# CONFIG_PACKAGE_kmod-ebtables is not set +# CONFIG_PACKAGE_kmod-ebtables-ipv4 is not set +# CONFIG_PACKAGE_kmod-ebtables-ipv6 is not set +# CONFIG_PACKAGE_kmod-ebtables-watchers is not set +CONFIG_PACKAGE_kmod-ip6tables=y +# CONFIG_PACKAGE_kmod-ip6tables-extra is not set +# CONFIG_PACKAGE_kmod-ipt-account is not set +# CONFIG_PACKAGE_kmod-ipt-chaos is not set +# CONFIG_PACKAGE_kmod-ipt-checksum is not set +# CONFIG_PACKAGE_kmod-ipt-cluster is not set +# CONFIG_PACKAGE_kmod-ipt-clusterip is not set +# CONFIG_PACKAGE_kmod-ipt-compat-xtables is not set +# CONFIG_PACKAGE_kmod-ipt-condition is not set +CONFIG_PACKAGE_kmod-ipt-conntrack=y +# CONFIG_PACKAGE_kmod-ipt-conntrack-extra is not set +# CONFIG_PACKAGE_kmod-ipt-conntrack-label is not set +CONFIG_PACKAGE_kmod-ipt-core=y +# CONFIG_PACKAGE_kmod-ipt-debug is not set +# CONFIG_PACKAGE_kmod-ipt-delude is not set +# CONFIG_PACKAGE_kmod-ipt-dhcpmac is not set +# CONFIG_PACKAGE_kmod-ipt-dnetmap is not set +CONFIG_PACKAGE_kmod-ipt-extra=y +# CONFIG_PACKAGE_kmod-ipt-filter is not set +CONFIG_PACKAGE_kmod-ipt-fullconenat=y +# CONFIG_PACKAGE_kmod-ipt-fuzzy is not set +# CONFIG_PACKAGE_kmod-ipt-geoip is not set +# CONFIG_PACKAGE_kmod-ipt-hashlimit is not set +# CONFIG_PACKAGE_kmod-ipt-iface is not set +# CONFIG_PACKAGE_kmod-ipt-ipmark is not set +# CONFIG_PACKAGE_kmod-ipt-ipopt is not set +# CONFIG_PACKAGE_kmod-ipt-ipp2p is not set +# CONFIG_PACKAGE_kmod-ipt-iprange is not set +# CONFIG_PACKAGE_kmod-ipt-ipsec is not set +CONFIG_PACKAGE_kmod-ipt-ipset=y +# CONFIG_PACKAGE_kmod-ipt-ipv4options is not set +# CONFIG_PACKAGE_kmod-ipt-led is not set +# CONFIG_PACKAGE_kmod-ipt-length2 is not set +# CONFIG_PACKAGE_kmod-ipt-logmark is not set +# CONFIG_PACKAGE_kmod-ipt-lscan is not set +# CONFIG_PACKAGE_kmod-ipt-lua is not set +CONFIG_PACKAGE_kmod-ipt-nat=y +# CONFIG_PACKAGE_kmod-ipt-nat-extra is not set +# CONFIG_PACKAGE_kmod-ipt-nat6 is not set +# CONFIG_PACKAGE_kmod-ipt-nathelper-rtsp is not set +# CONFIG_PACKAGE_kmod-ipt-nflog is not set +# CONFIG_PACKAGE_kmod-ipt-nfqueue is not set +# CONFIG_PACKAGE_kmod-ipt-offload is not set +# CONFIG_PACKAGE_kmod-ipt-physdev is not set +# CONFIG_PACKAGE_kmod-ipt-proto is not set +# CONFIG_PACKAGE_kmod-ipt-psd is not set +# CONFIG_PACKAGE_kmod-ipt-quota2 is not set +CONFIG_PACKAGE_kmod-ipt-raw=y +# CONFIG_PACKAGE_kmod-ipt-raw6 is not set +# CONFIG_PACKAGE_kmod-ipt-rpfilter is not set +# CONFIG_PACKAGE_kmod-ipt-rtpengine is not set +# CONFIG_PACKAGE_kmod-ipt-sysrq is not set +# CONFIG_PACKAGE_kmod-ipt-tarpit is not set +# CONFIG_PACKAGE_kmod-ipt-tee is not set +CONFIG_PACKAGE_kmod-ipt-tproxy=y +# CONFIG_PACKAGE_kmod-ipt-u32 is not set +# CONFIG_PACKAGE_kmod-ipt-ulog is not set +# CONFIG_PACKAGE_kmod-netatop is not set +CONFIG_PACKAGE_kmod-nf-conntrack=y +CONFIG_PACKAGE_kmod-nf-conntrack-netlink=y +CONFIG_PACKAGE_kmod-nf-conntrack6=y +# CONFIG_PACKAGE_kmod-nf-flow is not set +CONFIG_PACKAGE_kmod-nf-ipt=y +CONFIG_PACKAGE_kmod-nf-ipt6=y +# CONFIG_PACKAGE_kmod-nf-ipvs is not set +CONFIG_PACKAGE_kmod-nf-nat=y +# CONFIG_PACKAGE_kmod-nf-nat6 is not set +CONFIG_PACKAGE_kmod-nf-nathelper=y +CONFIG_PACKAGE_kmod-nf-nathelper-extra=y +CONFIG_PACKAGE_kmod-nf-reject=y +CONFIG_PACKAGE_kmod-nf-reject6=y +CONFIG_PACKAGE_kmod-nfnetlink=y +# CONFIG_PACKAGE_kmod-nfnetlink-log is not set +# CONFIG_PACKAGE_kmod-nfnetlink-queue is not set +# CONFIG_PACKAGE_kmod-nft-arp is not set +# CONFIG_PACKAGE_kmod-nft-bridge is not set +# CONFIG_PACKAGE_kmod-nft-core is not set +# CONFIG_PACKAGE_kmod-nft-fib is not set +# CONFIG_PACKAGE_kmod-nft-nat is not set +# CONFIG_PACKAGE_kmod-nft-nat6 is not set +# CONFIG_PACKAGE_kmod-nft-netdev is not set +# CONFIG_PACKAGE_kmod-nft-offload is not set +# CONFIG_PACKAGE_kmod-nft-queue is not set +# end of Netfilter Extensions + +# +# Network Devices +# +# CONFIG_PACKAGE_kmod-3c59x is not set +# CONFIG_PACKAGE_kmod-8139cp is not set +# CONFIG_PACKAGE_kmod-8139too is not set +# CONFIG_PACKAGE_kmod-alx is not set +# CONFIG_PACKAGE_kmod-atl1 is not set +# CONFIG_PACKAGE_kmod-atl1c is not set +# CONFIG_PACKAGE_kmod-atl1e is not set +# CONFIG_PACKAGE_kmod-atl2 is not set +# CONFIG_PACKAGE_kmod-b44 is not set +# CONFIG_PACKAGE_kmod-be2net is not set +# CONFIG_PACKAGE_kmod-bnx2 is not set +# CONFIG_PACKAGE_kmod-bnx2x is not set +# CONFIG_PACKAGE_kmod-dm9000 is not set +# CONFIG_PACKAGE_kmod-dummy is not set +# CONFIG_PACKAGE_kmod-e100 is not set +# CONFIG_PACKAGE_kmod-e1000 is not set +# CONFIG_PACKAGE_kmod-e1000e is not set +# CONFIG_PACKAGE_kmod-et131x is not set +# CONFIG_PACKAGE_kmod-ethoc is not set +# CONFIG_PACKAGE_kmod-forcedeth is not set +# CONFIG_PACKAGE_kmod-hfcmulti is not set +# CONFIG_PACKAGE_kmod-hfcpci is not set +# CONFIG_PACKAGE_kmod-i40e is not set +# CONFIG_PACKAGE_kmod-iavf is not set +# CONFIG_PACKAGE_kmod-ifb is not set +# CONFIG_PACKAGE_kmod-igb is not set +# CONFIG_PACKAGE_kmod-igc is not set +# CONFIG_PACKAGE_kmod-ipvlan is not set +# CONFIG_PACKAGE_kmod-ixgbe is not set +# CONFIG_PACKAGE_kmod-ixgbevf is not set +# CONFIG_PACKAGE_kmod-libphy is not set +CONFIG_PACKAGE_kmod-macvlan=y +# CONFIG_PACKAGE_kmod-mdio-gpio is not set +# CONFIG_PACKAGE_kmod-mii is not set +# CONFIG_PACKAGE_kmod-mlx4-core is not set +# CONFIG_PACKAGE_kmod-mlx5-core is not set +# CONFIG_PACKAGE_kmod-natsemi is not set +# CONFIG_PACKAGE_kmod-ne2k-pci is not set +# CONFIG_PACKAGE_kmod-niu is not set +CONFIG_PACKAGE_kmod-nss-ifb=y +# CONFIG_PACKAGE_kmod-of-mdio is not set +# CONFIG_PACKAGE_kmod-pcnet32 is not set +# CONFIG_PACKAGE_kmod-phy-bcm84881 is not set +# CONFIG_PACKAGE_kmod-phy-broadcom is not set +# CONFIG_PACKAGE_kmod-phy-realtek is not set +# CONFIG_PACKAGE_kmod-phylink is not set +# CONFIG_PACKAGE_kmod-qca-nss-cfi-cryptoapi is not set +# CONFIG_PACKAGE_kmod-qca-nss-crypto is not set +CONFIG_PACKAGE_kmod-qca-nss-drv=y +# CONFIG_PACKAGE_kmod-qca-nss-drv-capwapmgr is not set +# CONFIG_PACKAGE_kmod-qca-nss-drv-dtlsmgr is not set +# CONFIG_PACKAGE_kmod-qca-nss-drv-gre is not set +# CONFIG_PACKAGE_kmod-qca-nss-drv-ipsecmgr is not set +# CONFIG_PACKAGE_kmod-qca-nss-drv-l2tpv2 is not set +# CONFIG_PACKAGE_kmod-qca-nss-drv-lag-mgr is not set +# CONFIG_PACKAGE_kmod-qca-nss-drv-map-t is not set +CONFIG_PACKAGE_kmod-qca-nss-drv-pppoe=y +# CONFIG_PACKAGE_kmod-qca-nss-drv-pptp is not set +# CONFIG_PACKAGE_kmod-qca-nss-drv-profile is not set +# CONFIG_PACKAGE_kmod-qca-nss-drv-pvxlanmgr is not set +# CONFIG_PACKAGE_kmod-qca-nss-drv-tun6rd is not set +# CONFIG_PACKAGE_kmod-qca-nss-drv-tunipip6 is not set +# CONFIG_PACKAGE_kmod-qca-nss-drv-vlan-mgr is not set +CONFIG_PACKAGE_kmod-qca-nss-gmac=y +# CONFIG_PACKAGE_kmod-qlcnic is not set +# CONFIG_PACKAGE_kmod-r6040 is not set +# CONFIG_PACKAGE_kmod-r8125 is not set +# CONFIG_PACKAGE_kmod-r8168 is not set +# CONFIG_PACKAGE_kmod-r8169 is not set +# CONFIG_PACKAGE_kmod-sfc is not set +# CONFIG_PACKAGE_kmod-sfc-falcon is not set +# CONFIG_PACKAGE_kmod-sfp is not set +# CONFIG_PACKAGE_kmod-siit is not set +# CONFIG_PACKAGE_kmod-sis190 is not set +# CONFIG_PACKAGE_kmod-sis900 is not set +# CONFIG_PACKAGE_kmod-skge is not set +# CONFIG_PACKAGE_kmod-sky2 is not set +# CONFIG_PACKAGE_kmod-solos-pci is not set +# CONFIG_PACKAGE_kmod-spi-ks8995 is not set +# CONFIG_PACKAGE_kmod-swconfig is not set +# CONFIG_PACKAGE_kmod-switch-bcm53xx is not set +# CONFIG_PACKAGE_kmod-switch-bcm53xx-mdio is not set +# CONFIG_PACKAGE_kmod-switch-ip17xx is not set +# CONFIG_PACKAGE_kmod-switch-rtl8306 is not set +# CONFIG_PACKAGE_kmod-switch-rtl8366-smi is not set +# CONFIG_PACKAGE_kmod-switch-rtl8366rb is not set +# CONFIG_PACKAGE_kmod-switch-rtl8366s is not set +# CONFIG_PACKAGE_kmod-switch-rtl8367b is not set +# CONFIG_PACKAGE_kmod-tg3 is not set +# CONFIG_PACKAGE_kmod-tulip is not set +# CONFIG_PACKAGE_kmod-via-rhine is not set +# CONFIG_PACKAGE_kmod-via-velocity is not set +# CONFIG_PACKAGE_kmod-vmxnet3 is not set +# end of Network Devices + +# +# Network Support +# +# CONFIG_PACKAGE_kmod-atm is not set +# CONFIG_PACKAGE_kmod-ax25 is not set +# CONFIG_PACKAGE_kmod-batman-adv is not set +CONFIG_PACKAGE_kmod-bonding=y +# CONFIG_PACKAGE_kmod-bpf-test is not set +# CONFIG_PACKAGE_kmod-dnsresolver is not set +# CONFIG_PACKAGE_kmod-fast-classifier is not set +# CONFIG_PACKAGE_kmod-fast-classifier-noload is not set +# CONFIG_PACKAGE_kmod-fou is not set +# CONFIG_PACKAGE_kmod-fou6 is not set +# CONFIG_PACKAGE_kmod-geneve is not set +# CONFIG_PACKAGE_kmod-gre is not set +# CONFIG_PACKAGE_kmod-gre6 is not set +# CONFIG_PACKAGE_kmod-ip-vti is not set +# CONFIG_PACKAGE_kmod-ip6-tunnel is not set +# CONFIG_PACKAGE_kmod-ip6-vti is not set +# CONFIG_PACKAGE_kmod-ipip is not set +CONFIG_PACKAGE_kmod-ipsec=y +# CONFIG_PACKAGE_kmod-ipsec4 is not set +# CONFIG_PACKAGE_kmod-ipsec6 is not set +# CONFIG_PACKAGE_kmod-iptunnel6 is not set +# CONFIG_PACKAGE_kmod-isdn4linux is not set +# CONFIG_PACKAGE_kmod-jool is not set +# CONFIG_PACKAGE_kmod-l2tp is not set +# CONFIG_PACKAGE_kmod-l2tp-eth is not set +# CONFIG_PACKAGE_kmod-l2tp-ip is not set +# CONFIG_PACKAGE_kmod-macremapper is not set +# CONFIG_PACKAGE_kmod-macsec is not set +# CONFIG_PACKAGE_kmod-misdn is not set +# CONFIG_PACKAGE_kmod-mpls is not set +# CONFIG_PACKAGE_kmod-nat46 is not set +# CONFIG_PACKAGE_kmod-netem is not set +# CONFIG_PACKAGE_kmod-netlink-diag is not set +# CONFIG_PACKAGE_kmod-nlmon is not set +# CONFIG_PACKAGE_kmod-nsh is not set +# CONFIG_PACKAGE_kmod-openvswitch is not set +# CONFIG_PACKAGE_kmod-openvswitch-geneve is not set +# CONFIG_PACKAGE_kmod-openvswitch-gre is not set +# CONFIG_PACKAGE_kmod-openvswitch-vxlan is not set +# CONFIG_PACKAGE_kmod-pf-ring is not set +# CONFIG_PACKAGE_kmod-pktgen is not set +CONFIG_PACKAGE_kmod-ppp=y +CONFIG_PACKAGE_kmod-mppe=y +# CONFIG_PACKAGE_kmod-ppp-synctty is not set +# CONFIG_PACKAGE_kmod-pppoa is not set +CONFIG_PACKAGE_kmod-pppoe=y +# CONFIG_PACKAGE_kmod-pppol2tp is not set +CONFIG_PACKAGE_kmod-pppox=y +# CONFIG_PACKAGE_kmod-pptp is not set +CONFIG_PACKAGE_kmod-qca-nss-drv-qdisc=y +# CONFIG_PACKAGE_kmod-qca-nss-ecm-noload is not set +# CONFIG_PACKAGE_kmod-qca-nss-ecm-premium is not set + +# +# ECM Configuration +# +# CONFIG_QCA_NSS_ECM_EXAMPLES_PCC is not set +# CONFIG_QCA_NSS_ECM_EXAMPLES_MARK is not set +# CONFIG_QCA_NSS_ECM_OVS is not set +# CONFIG_QCA_ECM_SFE_SUPPORT is not set +# end of ECM Configuration + +# CONFIG_PACKAGE_kmod-qca-nss-ecm-premium-noload is not set +CONFIG_PACKAGE_kmod-qca-nss-ecm-standard=y +# CONFIG_PACKAGE_kmod-sched is not set +# CONFIG_PACKAGE_kmod-sched-act-vlan is not set +# CONFIG_PACKAGE_kmod-sched-bpf is not set +# CONFIG_PACKAGE_kmod-sched-cake is not set +# CONFIG_PACKAGE_kmod-sched-connmark is not set +# CONFIG_PACKAGE_kmod-sched-core is not set +# CONFIG_PACKAGE_kmod-sched-ctinfo is not set +# CONFIG_PACKAGE_kmod-sched-flower is not set +# CONFIG_PACKAGE_kmod-sched-ipset is not set +# CONFIG_PACKAGE_kmod-sched-mqprio is not set +# CONFIG_PACKAGE_kmod-sctp is not set +CONFIG_PACKAGE_kmod-shortcut-fe=y +# CONFIG_PACKAGE_kmod-shortcut-fe-cm is not set +# CONFIG_PACKAGE_kmod-shortcut-fe-drv is not set +# CONFIG_PACKAGE_kmod-sit is not set +CONFIG_PACKAGE_kmod-slhc=y +# CONFIG_PACKAGE_kmod-slip is not set +CONFIG_PACKAGE_kmod-tcp-bbr=y +# CONFIG_PACKAGE_kmod-tcp-hybla is not set +# CONFIG_PACKAGE_kmod-trelay is not set +# CONFIG_PACKAGE_kmod-tun is not set +# CONFIG_PACKAGE_kmod-veth is not set +# CONFIG_PACKAGE_kmod-vxlan is not set +# CONFIG_PACKAGE_kmod-wireguard is not set +# CONFIG_PACKAGE_kmod-xfrm-interface is not set +# end of Network Support + +# +# Other modules +# +# CONFIG_PACKAGE_kmod-6lowpan is not set +# CONFIG_PACKAGE_kmod-ath3k is not set +# CONFIG_PACKAGE_kmod-bcma is not set +# CONFIG_PACKAGE_kmod-bluetooth is not set +# CONFIG_PACKAGE_kmod-bluetooth-6lowpan is not set +# CONFIG_PACKAGE_kmod-btmrvl is not set +# CONFIG_PACKAGE_kmod-button-hotplug is not set +# CONFIG_PACKAGE_kmod-echo is not set +# CONFIG_PACKAGE_kmod-eeprom-93cx6 is not set +# CONFIG_PACKAGE_kmod-eeprom-at24 is not set +# CONFIG_PACKAGE_kmod-eeprom-at25 is not set +# CONFIG_PACKAGE_kmod-gpio-beeper is not set +CONFIG_PACKAGE_kmod-gpio-button-hotplug=y +# CONFIG_PACKAGE_kmod-gpio-dev is not set +# CONFIG_PACKAGE_kmod-gpio-mcp23s08 is not set +# CONFIG_PACKAGE_kmod-gpio-nxp-74hc164 is not set +# CONFIG_PACKAGE_kmod-gpio-pca953x is not set +# CONFIG_PACKAGE_kmod-gpio-pcf857x is not set +# CONFIG_PACKAGE_kmod-ikconfig is not set +# CONFIG_PACKAGE_kmod-it87-wdt is not set +# CONFIG_PACKAGE_kmod-itco-wdt is not set +# CONFIG_PACKAGE_kmod-keys-encrypted is not set +# CONFIG_PACKAGE_kmod-keys-trusted is not set +# CONFIG_PACKAGE_kmod-lp is not set +# CONFIG_PACKAGE_kmod-mmc is not set +# CONFIG_PACKAGE_kmod-mtd-rw is not set +# CONFIG_PACKAGE_kmod-mtdoops is not set +# CONFIG_PACKAGE_kmod-mtdram is not set +# CONFIG_PACKAGE_kmod-mtdtests is not set +# CONFIG_PACKAGE_kmod-parport-pc is not set +# CONFIG_PACKAGE_kmod-ppdev is not set +# CONFIG_PACKAGE_kmod-pps is not set +# CONFIG_PACKAGE_kmod-pps-gpio is not set +# CONFIG_PACKAGE_kmod-pps-ldisc is not set +# CONFIG_PACKAGE_kmod-ptp is not set +# CONFIG_PACKAGE_kmod-random-core is not set +# CONFIG_PACKAGE_kmod-rtc-ds1307 is not set +# CONFIG_PACKAGE_kmod-rtc-ds1374 is not set +# CONFIG_PACKAGE_kmod-rtc-ds1672 is not set +# CONFIG_PACKAGE_kmod-rtc-em3027 is not set +# CONFIG_PACKAGE_kmod-rtc-isl1208 is not set +# CONFIG_PACKAGE_kmod-rtc-pcf2123 is not set +# CONFIG_PACKAGE_kmod-rtc-pcf2127 is not set +# CONFIG_PACKAGE_kmod-rtc-pcf8563 is not set +# CONFIG_PACKAGE_kmod-rtc-pt7c4338 is not set +# CONFIG_PACKAGE_kmod-rtc-rs5c372a is not set +# CONFIG_PACKAGE_kmod-rtc-rx8025 is not set +# CONFIG_PACKAGE_kmod-rtc-s35390a is not set +# CONFIG_PACKAGE_kmod-sdhci is not set +# CONFIG_PACKAGE_kmod-serial-8250 is not set +# CONFIG_PACKAGE_kmod-serial-8250-exar is not set +# CONFIG_PACKAGE_kmod-softdog is not set +# CONFIG_PACKAGE_kmod-ssb is not set +# CONFIG_PACKAGE_kmod-tpm is not set +# CONFIG_PACKAGE_kmod-tpm-i2c-atmel is not set +# CONFIG_PACKAGE_kmod-tpm-i2c-infineon is not set +# CONFIG_PACKAGE_kmod-w83627hf-wdt is not set +# CONFIG_PACKAGE_kmod-zram is not set +# end of Other modules + +# +# PCMCIA support +# +# end of PCMCIA support + +# +# SPI Support +# +# CONFIG_PACKAGE_kmod-mmc-spi is not set +# CONFIG_PACKAGE_kmod-spi-bitbang is not set +# CONFIG_PACKAGE_kmod-spi-dev is not set +# CONFIG_PACKAGE_kmod-spi-gpio is not set +# end of SPI Support + +# +# Sound Support +# +# CONFIG_PACKAGE_kmod-sound-core is not set +# end of Sound Support + +# +# USB Support +# +# CONFIG_PACKAGE_kmod-chaoskey is not set +CONFIG_PACKAGE_kmod-phy-qcom-ipq806x-usb=y +# CONFIG_PACKAGE_kmod-usb-acm is not set +# CONFIG_PACKAGE_kmod-usb-atm is not set +# CONFIG_PACKAGE_kmod-usb-cm109 is not set +CONFIG_PACKAGE_kmod-usb-core=y +# CONFIG_PACKAGE_kmod-usb-dwc2 is not set +CONFIG_PACKAGE_kmod-usb-dwc3=y +CONFIG_PACKAGE_kmod-usb-dwc3-qcom=y +CONFIG_PACKAGE_kmod-usb-ehci=y +# CONFIG_PACKAGE_kmod-usb-hid is not set +# CONFIG_PACKAGE_kmod-usb-hid-cp2112 is not set +CONFIG_PACKAGE_kmod-usb-ledtrig-usbport=y +# CONFIG_PACKAGE_kmod-usb-net is not set +# CONFIG_PACKAGE_kmod-usb-net-aqc111 is not set +# CONFIG_PACKAGE_kmod-usb-net-asix is not set +# CONFIG_PACKAGE_kmod-usb-net-asix-ax88179 is not set +# CONFIG_PACKAGE_kmod-usb-net-cdc-eem is not set +# CONFIG_PACKAGE_kmod-usb-net-cdc-ether is not set +# CONFIG_PACKAGE_kmod-usb-net-cdc-mbim is not set +# CONFIG_PACKAGE_kmod-usb-net-cdc-ncm is not set +# CONFIG_PACKAGE_kmod-usb-net-cdc-subset is not set +# CONFIG_PACKAGE_kmod-usb-net-dm9601-ether is not set +# CONFIG_PACKAGE_kmod-usb-net-hso is not set +# CONFIG_PACKAGE_kmod-usb-net-huawei-cdc-ncm is not set +# CONFIG_PACKAGE_kmod-usb-net-ipheth is not set +# CONFIG_PACKAGE_kmod-usb-net-kalmia is not set +# CONFIG_PACKAGE_kmod-usb-net-kaweth is not set +# CONFIG_PACKAGE_kmod-usb-net-mcs7830 is not set +# CONFIG_PACKAGE_kmod-usb-net-pegasus is not set +# CONFIG_PACKAGE_kmod-usb-net-pl is not set +# CONFIG_PACKAGE_kmod-usb-net-qmi-wwan is not set +# CONFIG_PACKAGE_kmod-usb-net-rndis is not set +# CONFIG_PACKAGE_kmod-usb-net-rtl8150 is not set +# CONFIG_PACKAGE_kmod-usb-net-rtl8152 is not set +# CONFIG_PACKAGE_kmod-usb-net-rtl8152-vendor is not set +# CONFIG_PACKAGE_kmod-usb-net-sierrawireless is not set +# CONFIG_PACKAGE_kmod-usb-net-smsc95xx is not set +# CONFIG_PACKAGE_kmod-usb-net-sr9700 is not set +CONFIG_PACKAGE_kmod-usb-ohci=y +# CONFIG_PACKAGE_kmod-usb-ohci-pci is not set +# CONFIG_PACKAGE_kmod-usb-printer is not set +# CONFIG_PACKAGE_kmod-usb-serial is not set +# CONFIG_PACKAGE_kmod-usb-serial-ark3116 is not set +# CONFIG_PACKAGE_kmod-usb-serial-belkin is not set +# CONFIG_PACKAGE_kmod-usb-serial-ch341 is not set +# CONFIG_PACKAGE_kmod-usb-serial-cp210x is not set +# CONFIG_PACKAGE_kmod-usb-serial-cypress-m8 is not set +# CONFIG_PACKAGE_kmod-usb-serial-edgeport is not set +# CONFIG_PACKAGE_kmod-usb-serial-ftdi is not set +# CONFIG_PACKAGE_kmod-usb-serial-garmin is not set +# CONFIG_PACKAGE_kmod-usb-serial-ipw is not set +# CONFIG_PACKAGE_kmod-usb-serial-keyspan is not set +# CONFIG_PACKAGE_kmod-usb-serial-mct is not set +# CONFIG_PACKAGE_kmod-usb-serial-mos7720 is not set +# CONFIG_PACKAGE_kmod-usb-serial-mos7840 is not set +# CONFIG_PACKAGE_kmod-usb-serial-option is not set +# CONFIG_PACKAGE_kmod-usb-serial-oti6858 is not set +# CONFIG_PACKAGE_kmod-usb-serial-pl2303 is not set +# CONFIG_PACKAGE_kmod-usb-serial-qualcomm is not set +# CONFIG_PACKAGE_kmod-usb-serial-sierrawireless is not set +# CONFIG_PACKAGE_kmod-usb-serial-simple is not set +# CONFIG_PACKAGE_kmod-usb-serial-ti-usb is not set +# CONFIG_PACKAGE_kmod-usb-serial-visor is not set +# CONFIG_PACKAGE_kmod-usb-storage is not set +# CONFIG_PACKAGE_kmod-usb-storage-extras is not set +# CONFIG_PACKAGE_kmod-usb-storage-uas is not set +# CONFIG_PACKAGE_kmod-usb-uhci is not set +# CONFIG_PACKAGE_kmod-usb-wdm is not set +CONFIG_PACKAGE_kmod-usb-xhci-hcd=y +# CONFIG_PACKAGE_kmod-usb-yealink is not set +CONFIG_PACKAGE_kmod-usb2=y +# CONFIG_PACKAGE_kmod-usb2-pci is not set +CONFIG_PACKAGE_kmod-usb3=y +# CONFIG_PACKAGE_kmod-usbip is not set +# CONFIG_PACKAGE_kmod-usbip-client is not set +# CONFIG_PACKAGE_kmod-usbip-server is not set +# CONFIG_PACKAGE_kmod-usbmon is not set +# end of USB Support + +# +# Video Support +# +# CONFIG_PACKAGE_kmod-multimedia-input is not set +# CONFIG_PACKAGE_kmod-video-core is not set +# end of Video Support + +# +# Virtualization +# +# end of Virtualization + +# +# Voice over IP +# +# CONFIG_PACKAGE_kmod-dahdi is not set +# end of Voice over IP + +# +# W1 support +# +# CONFIG_PACKAGE_kmod-w1 is not set +# end of W1 support + +# +# WPAN 802.15.4 Support +# +# CONFIG_PACKAGE_kmod-at86rf230 is not set +# CONFIG_PACKAGE_kmod-atusb is not set +# CONFIG_PACKAGE_kmod-ca8210 is not set +# CONFIG_PACKAGE_kmod-cc2520 is not set +# CONFIG_PACKAGE_kmod-fakelb is not set +# CONFIG_PACKAGE_kmod-ieee802154 is not set +# CONFIG_PACKAGE_kmod-ieee802154-6lowpan is not set +# CONFIG_PACKAGE_kmod-mac802154 is not set +# CONFIG_PACKAGE_kmod-mrf24j40 is not set +# end of WPAN 802.15.4 Support + +# +# Wireless Drivers +# +# CONFIG_PACKAGE_kmod-adm8211 is not set +# CONFIG_PACKAGE_kmod-ar5523 is not set +CONFIG_PACKAGE_kmod-ath=y +CONFIG_ATH_USER_REGD=y +# CONFIG_PACKAGE_ATH_DEBUG is not set +CONFIG_PACKAGE_ATH_DFS=y +# CONFIG_PACKAGE_kmod-ath10k is not set +CONFIG_PACKAGE_kmod-ath10k-ct=y +CONFIG_ATH10K-CT_LEDS=y +# CONFIG_PACKAGE_kmod-ath10k-ct-smallbuffers is not set +# CONFIG_PACKAGE_kmod-ath11k is not set +# CONFIG_PACKAGE_kmod-ath5k is not set +# CONFIG_PACKAGE_kmod-ath6kl-sdio is not set +# CONFIG_PACKAGE_kmod-ath6kl-usb is not set +# CONFIG_PACKAGE_kmod-ath9k is not set +# CONFIG_PACKAGE_kmod-ath9k-htc is not set +# CONFIG_PACKAGE_kmod-b43 is not set +# CONFIG_PACKAGE_kmod-b43legacy is not set +# CONFIG_PACKAGE_kmod-brcmfmac is not set +# CONFIG_PACKAGE_kmod-brcmsmac is not set +# CONFIG_PACKAGE_kmod-brcmutil is not set +# CONFIG_PACKAGE_kmod-carl9170 is not set +CONFIG_PACKAGE_kmod-cfg80211=y +# CONFIG_PACKAGE_CFG80211_TESTMODE is not set +# CONFIG_PACKAGE_kmod-hermes is not set +# CONFIG_PACKAGE_kmod-hermes-pci is not set +# CONFIG_PACKAGE_kmod-hermes-plx is not set +# CONFIG_PACKAGE_kmod-ipw2100 is not set +# CONFIG_PACKAGE_kmod-ipw2200 is not set +# CONFIG_PACKAGE_kmod-iwl-legacy is not set +# CONFIG_PACKAGE_kmod-iwl3945 is not set +# CONFIG_PACKAGE_kmod-iwl4965 is not set +# CONFIG_PACKAGE_kmod-iwlwifi is not set +# CONFIG_PACKAGE_kmod-lib80211 is not set +# CONFIG_PACKAGE_kmod-libertas-sdio is not set +# CONFIG_PACKAGE_kmod-libertas-spi is not set +# CONFIG_PACKAGE_kmod-libertas-usb is not set +# CONFIG_PACKAGE_kmod-libipw is not set +CONFIG_PACKAGE_kmod-mac80211=y +CONFIG_PACKAGE_MAC80211_NSS_SUPPORT=y +CONFIG_PACKAGE_MAC80211_DEBUGFS=y +# CONFIG_PACKAGE_MAC80211_TRACING is not set +CONFIG_PACKAGE_MAC80211_MESH=y +# CONFIG_PACKAGE_kmod-mac80211-hwsim is not set +# CONFIG_PACKAGE_kmod-mt76 is not set +# CONFIG_PACKAGE_kmod-mt7601u is not set +# CONFIG_PACKAGE_kmod-mt7603 is not set +# CONFIG_PACKAGE_kmod-mt7615-firmware is not set +# CONFIG_PACKAGE_kmod-mt7615e is not set +# CONFIG_PACKAGE_kmod-mt7663-firmware-ap is not set +# CONFIG_PACKAGE_kmod-mt7663-firmware-sta is not set +# CONFIG_PACKAGE_kmod-mt7663s is not set +# CONFIG_PACKAGE_kmod-mt7663u is not set +# CONFIG_PACKAGE_kmod-mt76x0e is not set +# CONFIG_PACKAGE_kmod-mt76x0u is not set +# CONFIG_PACKAGE_kmod-mt76x2 is not set +# CONFIG_PACKAGE_kmod-mt76x2u is not set +# CONFIG_PACKAGE_kmod-mt7915e is not set +# CONFIG_PACKAGE_kmod-mt7921e is not set +# CONFIG_PACKAGE_kmod-mwifiex-pcie is not set +# CONFIG_PACKAGE_kmod-mwifiex-sdio is not set +# CONFIG_PACKAGE_kmod-mwl8k is not set +# CONFIG_PACKAGE_kmod-net-prism54 is not set +# CONFIG_PACKAGE_kmod-net-rtl8192su is not set +# CONFIG_PACKAGE_kmod-owl-loader is not set +# CONFIG_PACKAGE_kmod-p54-common is not set +# CONFIG_PACKAGE_kmod-p54-pci is not set +# CONFIG_PACKAGE_kmod-p54-usb is not set +# CONFIG_PACKAGE_kmod-rsi91x is not set +# CONFIG_PACKAGE_kmod-rsi91x-sdio is not set +# CONFIG_PACKAGE_kmod-rsi91x-usb is not set +# CONFIG_PACKAGE_kmod-rt2400-pci is not set +# CONFIG_PACKAGE_kmod-rt2500-pci is not set +# CONFIG_PACKAGE_kmod-rt2500-usb is not set +# CONFIG_PACKAGE_kmod-rt2800-pci is not set +# CONFIG_PACKAGE_kmod-rt2800-usb is not set +# CONFIG_PACKAGE_kmod-rt2x00-lib is not set +# CONFIG_PACKAGE_kmod-rt61-pci is not set +# CONFIG_PACKAGE_kmod-rt73-usb is not set +# CONFIG_PACKAGE_kmod-rtl8180 is not set +# CONFIG_PACKAGE_kmod-rtl8187 is not set +# CONFIG_PACKAGE_kmod-rtl8192ce is not set +# CONFIG_PACKAGE_kmod-rtl8192cu is not set +# CONFIG_PACKAGE_kmod-rtl8192de is not set +# CONFIG_PACKAGE_kmod-rtl8192se is not set +# CONFIG_PACKAGE_kmod-rtl8723bs is not set +# CONFIG_PACKAGE_kmod-rtl8812au-ct is not set +# CONFIG_PACKAGE_kmod-rtl8821ae is not set +# CONFIG_PACKAGE_kmod-rtl8xxxu is not set +# CONFIG_PACKAGE_kmod-rtw88 is not set +# CONFIG_PACKAGE_kmod-wil6210 is not set +# CONFIG_PACKAGE_kmod-wl12xx is not set +# CONFIG_PACKAGE_kmod-wl18xx is not set +# CONFIG_PACKAGE_kmod-wlcore is not set +# CONFIG_PACKAGE_kmod-zd1211rw is not set +# end of Wireless Drivers +# end of Kernel modules + +# +# Languages +# + +# +# Erlang +# +# CONFIG_PACKAGE_erlang is not set +# CONFIG_PACKAGE_erlang-asn1 is not set +# CONFIG_PACKAGE_erlang-compiler is not set +# CONFIG_PACKAGE_erlang-crypto is not set +# CONFIG_PACKAGE_erlang-erl-interface is not set +# CONFIG_PACKAGE_erlang-hipe is not set +# CONFIG_PACKAGE_erlang-inets is not set +# CONFIG_PACKAGE_erlang-mnesia is not set +# CONFIG_PACKAGE_erlang-os_mon is not set +# CONFIG_PACKAGE_erlang-public-key is not set +# CONFIG_PACKAGE_erlang-reltool is not set +# CONFIG_PACKAGE_erlang-runtime-tools is not set +# CONFIG_PACKAGE_erlang-snmp is not set +# CONFIG_PACKAGE_erlang-ssh is not set +# CONFIG_PACKAGE_erlang-ssl is not set +# CONFIG_PACKAGE_erlang-syntax-tools is not set +# CONFIG_PACKAGE_erlang-tools is not set +# CONFIG_PACKAGE_erlang-xmerl is not set +# end of Erlang + +# +# Go +# +# CONFIG_PACKAGE_golang is not set + +# +# Configuration +# +CONFIG_GOLANG_EXTERNAL_BOOTSTRAP_ROOT="" +CONFIG_GOLANG_BUILD_CACHE_DIR="" +# CONFIG_GOLANG_MOD_CACHE_WORLD_READABLE is not set +# end of Configuration + +# CONFIG_PACKAGE_golang-doc is not set +# CONFIG_PACKAGE_golang-github-jedisct1-dnscrypt-proxy2-dev is not set +# CONFIG_PACKAGE_golang-github-nextdns-nextdns-dev is not set +# CONFIG_PACKAGE_golang-gitlab-yawning-obfs4-dev is not set +# CONFIG_PACKAGE_golang-src is not set +# CONFIG_PACKAGE_golang-torproject-tor-fw-helper-dev is not set +# end of Go + +# +# Lua +# +# CONFIG_PACKAGE_dkjson is not set +# CONFIG_PACKAGE_json4lua is not set +# CONFIG_PACKAGE_ldbus is not set +CONFIG_PACKAGE_libiwinfo-lua=y +# CONFIG_PACKAGE_linotify is not set +# CONFIG_PACKAGE_lpeg is not set +# CONFIG_PACKAGE_lsqlite3 is not set +CONFIG_PACKAGE_lua=y +# CONFIG_PACKAGE_lua-argparse is not set +# CONFIG_PACKAGE_lua-bencode is not set +# CONFIG_PACKAGE_lua-bit32 is not set +# CONFIG_PACKAGE_lua-cjson is not set +# CONFIG_PACKAGE_lua-copas is not set +# CONFIG_PACKAGE_lua-coxpcall is not set +# CONFIG_PACKAGE_lua-ev is not set +# CONFIG_PACKAGE_lua-examples is not set +# CONFIG_PACKAGE_lua-libmodbus is not set +# CONFIG_PACKAGE_lua-lzlib is not set +# CONFIG_PACKAGE_lua-md5 is not set +# CONFIG_PACKAGE_lua-mobdebug is not set +# CONFIG_PACKAGE_lua-mosquitto is not set +# CONFIG_PACKAGE_lua-openssl is not set +# CONFIG_PACKAGE_lua-penlight is not set +# CONFIG_PACKAGE_lua-rings is not set +# CONFIG_PACKAGE_lua-rs232 is not set +# CONFIG_PACKAGE_lua-sha2 is not set +# CONFIG_PACKAGE_lua-wsapi-base is not set +# CONFIG_PACKAGE_lua-wsapi-xavante is not set +# CONFIG_PACKAGE_lua-xavante is not set +# CONFIG_PACKAGE_lua5.3 is not set +# CONFIG_PACKAGE_luabitop is not set +# CONFIG_PACKAGE_luac is not set +# CONFIG_PACKAGE_luac5.3 is not set +# CONFIG_PACKAGE_luaexpat is not set +# CONFIG_PACKAGE_luafilesystem is not set +# CONFIG_PACKAGE_luajit is not set +# CONFIG_PACKAGE_lualanes is not set +# CONFIG_PACKAGE_luaposix is not set +# CONFIG_PACKAGE_luarocks is not set +# CONFIG_PACKAGE_luasec is not set +# CONFIG_PACKAGE_luasoap is not set +# CONFIG_PACKAGE_luasocket is not set +# CONFIG_PACKAGE_luasocket5.3 is not set +# CONFIG_PACKAGE_luasql-mysql is not set +# CONFIG_PACKAGE_luasql-pgsql is not set +# CONFIG_PACKAGE_luasql-sqlite3 is not set +# CONFIG_PACKAGE_luasrcdiet is not set +CONFIG_PACKAGE_luci-lib-fs=y +# CONFIG_PACKAGE_luv is not set +# CONFIG_PACKAGE_lyaml is not set +# CONFIG_PACKAGE_lzmq is not set +# CONFIG_PACKAGE_uuid is not set +# end of Lua + +# +# Node.js +# +# CONFIG_PACKAGE_node is not set +# CONFIG_PACKAGE_node-arduino-firmata is not set +# CONFIG_PACKAGE_node-cylon is not set +# CONFIG_PACKAGE_node-cylon-firmata is not set +# CONFIG_PACKAGE_node-cylon-gpio is not set +# CONFIG_PACKAGE_node-cylon-i2c is not set +# CONFIG_PACKAGE_node-hid is not set +# CONFIG_PACKAGE_node-homebridge is not set +# CONFIG_PACKAGE_node-javascript-obfuscator is not set +# CONFIG_PACKAGE_node-npm is not set +# CONFIG_PACKAGE_node-serialport is not set +# CONFIG_PACKAGE_node-serialport-bindings is not set +# end of Node.js + +# +# PHP7 +# +# CONFIG_PACKAGE_php7 is not set +# end of PHP7 + +# +# PHP8 +# +# CONFIG_PACKAGE_php8 is not set +# end of PHP8 + +# +# Perl +# +# CONFIG_PACKAGE_perl is not set +# end of Perl + +# +# Python +# +# CONFIG_PACKAGE_libpython3 is not set +# CONFIG_PACKAGE_micropython is not set +# CONFIG_PACKAGE_micropython-lib is not set +# CONFIG_PACKAGE_python-pip-conf is not set +# CONFIG_PACKAGE_python3 is not set +# CONFIG_PACKAGE_python3-aiohttp is not set +# CONFIG_PACKAGE_python3-aiohttp-cors is not set +# CONFIG_PACKAGE_python3-apipkg is not set +# CONFIG_PACKAGE_python3-apparmor is not set +# CONFIG_PACKAGE_python3-appdirs is not set +# CONFIG_PACKAGE_python3-asgiref is not set +# CONFIG_PACKAGE_python3-asn1crypto is not set +# CONFIG_PACKAGE_python3-astral is not set +# CONFIG_PACKAGE_python3-async-timeout is not set +# CONFIG_PACKAGE_python3-asyncio is not set +# CONFIG_PACKAGE_python3-atomicwrites is not set +# CONFIG_PACKAGE_python3-attrs is not set +# CONFIG_PACKAGE_python3-augeas is not set +# CONFIG_PACKAGE_python3-automat is not set +# CONFIG_PACKAGE_python3-awscli is not set +# CONFIG_PACKAGE_python3-babel is not set +# CONFIG_PACKAGE_python3-base is not set +# CONFIG_PACKAGE_python3-bcrypt is not set +# CONFIG_PACKAGE_python3-bidict is not set +# CONFIG_PACKAGE_python3-boto3 is not set +# CONFIG_PACKAGE_python3-botocore is not set +# CONFIG_PACKAGE_python3-bottle is not set +# CONFIG_PACKAGE_python3-cached-property is not set +# CONFIG_PACKAGE_python3-cachelib is not set +# CONFIG_PACKAGE_python3-cachetools is not set +# CONFIG_PACKAGE_python3-certifi is not set +# CONFIG_PACKAGE_python3-cffi is not set +# CONFIG_PACKAGE_python3-cgi is not set +# CONFIG_PACKAGE_python3-cgitb is not set +# CONFIG_PACKAGE_python3-chardet is not set +# CONFIG_PACKAGE_python3-ciso8601 is not set +# CONFIG_PACKAGE_python3-click is not set +# CONFIG_PACKAGE_python3-click-log is not set +# CONFIG_PACKAGE_python3-codecs is not set +# CONFIG_PACKAGE_python3-colorama is not set +# CONFIG_PACKAGE_python3-constantly is not set +# CONFIG_PACKAGE_python3-contextlib2 is not set +# CONFIG_PACKAGE_python3-cryptodome is not set +# CONFIG_PACKAGE_python3-cryptodomex is not set +# CONFIG_PACKAGE_python3-cryptography is not set +# CONFIG_PACKAGE_python3-ctypes is not set +# CONFIG_PACKAGE_python3-curl is not set +# CONFIG_PACKAGE_python3-dateutil is not set +# CONFIG_PACKAGE_python3-dbm is not set +# CONFIG_PACKAGE_python3-decimal is not set +# CONFIG_PACKAGE_python3-decorator is not set +# CONFIG_PACKAGE_python3-defusedxml is not set +# CONFIG_PACKAGE_python3-dev is not set +# CONFIG_PACKAGE_python3-distro is not set +# CONFIG_PACKAGE_python3-distutils is not set +# CONFIG_PACKAGE_python3-django is not set +# CONFIG_PACKAGE_python3-django-appconf is not set +# CONFIG_PACKAGE_python3-django-compressor is not set +# CONFIG_PACKAGE_python3-django-cors-headers is not set +# CONFIG_PACKAGE_python3-django-etesync-journal is not set +# CONFIG_PACKAGE_python3-django-formtools is not set +# CONFIG_PACKAGE_python3-django-jsonfield is not set +# CONFIG_PACKAGE_python3-django-jsonfield2 is not set +# CONFIG_PACKAGE_python3-django-picklefield is not set +# CONFIG_PACKAGE_python3-django-postoffice is not set +# CONFIG_PACKAGE_python3-django-ranged-response is not set +# CONFIG_PACKAGE_python3-django-restframework is not set +# CONFIG_PACKAGE_python3-django-restframework39 is not set +# CONFIG_PACKAGE_python3-django-simple-captcha is not set +# CONFIG_PACKAGE_python3-django-statici18n is not set +# CONFIG_PACKAGE_python3-django-webpack-loader is not set +# CONFIG_PACKAGE_python3-django1 is not set +# CONFIG_PACKAGE_python3-dns is not set +# CONFIG_PACKAGE_python3-docker is not set +# CONFIG_PACKAGE_python3-dockerpty is not set +# CONFIG_PACKAGE_python3-docopt is not set +# CONFIG_PACKAGE_python3-docutils is not set +# CONFIG_PACKAGE_python3-dotenv is not set +# CONFIG_PACKAGE_python3-drf-nested-routers is not set +# CONFIG_PACKAGE_python3-email is not set +# CONFIG_PACKAGE_python3-engineio is not set +# CONFIG_PACKAGE_python3-et_xmlfile is not set +# CONFIG_PACKAGE_python3-evdev is not set +# CONFIG_PACKAGE_python3-eventlet is not set +# CONFIG_PACKAGE_python3-execnet is not set +# CONFIG_PACKAGE_python3-flask is not set +# CONFIG_PACKAGE_python3-flask-babel is not set +# CONFIG_PACKAGE_python3-flask-httpauth is not set +# CONFIG_PACKAGE_python3-flask-login is not set +# CONFIG_PACKAGE_python3-flask-seasurf is not set +# CONFIG_PACKAGE_python3-flask-session is not set +# CONFIG_PACKAGE_python3-flask-socketio is not set +# CONFIG_PACKAGE_python3-flup is not set +# CONFIG_PACKAGE_python3-gdbm is not set +# CONFIG_PACKAGE_python3-gmpy2 is not set +# CONFIG_PACKAGE_python3-gnupg is not set +# CONFIG_PACKAGE_python3-gpiod is not set +# CONFIG_PACKAGE_python3-greenlet is not set +# CONFIG_PACKAGE_python3-hyperlink is not set +# CONFIG_PACKAGE_python3-idna is not set +# CONFIG_PACKAGE_python3-ifaddr is not set +# CONFIG_PACKAGE_python3-incremental is not set +# CONFIG_PACKAGE_python3-influxdb is not set +# CONFIG_PACKAGE_python3-iniconfig is not set +# CONFIG_PACKAGE_python3-intelhex is not set +# CONFIG_PACKAGE_python3-itsdangerous is not set +# CONFIG_PACKAGE_python3-jdcal is not set +# CONFIG_PACKAGE_python3-jinja2 is not set +# CONFIG_PACKAGE_python3-jmespath is not set +# CONFIG_PACKAGE_python3-jsonpath-ng is not set +# CONFIG_PACKAGE_python3-jsonschema is not set +# CONFIG_PACKAGE_python3-lib2to3 is not set +# CONFIG_PACKAGE_python3-libmodbus is not set +# CONFIG_PACKAGE_python3-libselinux is not set +# CONFIG_PACKAGE_python3-libsemanage is not set +# CONFIG_PACKAGE_python3-light is not set + +# +# Configuration +# +# CONFIG_PYTHON3_BLUETOOTH_SUPPORT is not set +# CONFIG_PYTHON3_HOST_PIP_CACHE_WORLD_READABLE is not set +# end of Configuration + +# CONFIG_PACKAGE_python3-logging is not set +# CONFIG_PACKAGE_python3-lxml is not set +# CONFIG_PACKAGE_python3-lzma is not set +# CONFIG_PACKAGE_python3-markdown is not set +# CONFIG_PACKAGE_python3-markupsafe is not set +# CONFIG_PACKAGE_python3-maxminddb is not set +# CONFIG_PACKAGE_python3-more-itertools is not set +# CONFIG_PACKAGE_python3-msgpack is not set +# CONFIG_PACKAGE_python3-multidict is not set +# CONFIG_PACKAGE_python3-multiprocessing is not set +# CONFIG_PACKAGE_python3-ncurses is not set +# CONFIG_PACKAGE_python3-netdisco is not set +# CONFIG_PACKAGE_python3-netifaces is not set +# CONFIG_PACKAGE_python3-networkx is not set +# CONFIG_PACKAGE_python3-newt is not set +# CONFIG_PACKAGE_python3-numpy is not set +# CONFIG_PACKAGE_python3-oauthlib is not set +# CONFIG_PACKAGE_python3-openpyxl is not set +# CONFIG_PACKAGE_python3-openssl is not set +# CONFIG_PACKAGE_python3-packaging is not set +# CONFIG_PACKAGE_python3-paho-mqtt is not set +# CONFIG_PACKAGE_python3-paramiko is not set +# CONFIG_PACKAGE_python3-parsley is not set +# CONFIG_PACKAGE_python3-passlib is not set +# CONFIG_PACKAGE_python3-pillow is not set +# CONFIG_PACKAGE_python3-pip is not set +# CONFIG_PACKAGE_python3-pkg-resources is not set +# CONFIG_PACKAGE_python3-pluggy is not set +# CONFIG_PACKAGE_python3-ply is not set +# CONFIG_PACKAGE_python3-psutil is not set +# CONFIG_PACKAGE_python3-psycopg2 is not set +# CONFIG_PACKAGE_python3-py is not set +# CONFIG_PACKAGE_python3-pyasn1 is not set +# CONFIG_PACKAGE_python3-pyasn1-modules is not set +# CONFIG_PACKAGE_python3-pycparser is not set +# CONFIG_PACKAGE_python3-pydoc is not set +# CONFIG_PACKAGE_python3-pyjwt is not set +# CONFIG_PACKAGE_python3-pymysql is not set +# CONFIG_PACKAGE_python3-pynacl is not set +# CONFIG_PACKAGE_python3-pyodbc is not set +# CONFIG_PACKAGE_python3-pyopenssl is not set +# CONFIG_PACKAGE_python3-pyotp is not set +# CONFIG_PACKAGE_python3-pyparsing is not set +# CONFIG_PACKAGE_python3-pyroute2 is not set +# CONFIG_PACKAGE_python3-pyrsistent is not set +# CONFIG_PACKAGE_python3-pyserial is not set +# CONFIG_PACKAGE_python3-pysocks is not set +# CONFIG_PACKAGE_python3-pytest is not set +# CONFIG_PACKAGE_python3-pytest-forked is not set +# CONFIG_PACKAGE_python3-pytest-xdist is not set +# CONFIG_PACKAGE_python3-pytz is not set +# CONFIG_PACKAGE_python3-qrcode is not set +# CONFIG_PACKAGE_python3-rcssmin is not set +# CONFIG_PACKAGE_python3-readline is not set +# CONFIG_PACKAGE_python3-requests is not set +# CONFIG_PACKAGE_python3-requests-oauthlib is not set +# CONFIG_PACKAGE_python3-rsa is not set +# CONFIG_PACKAGE_python3-ruamel-yaml is not set +# CONFIG_PACKAGE_python3-s3transfer is not set +# CONFIG_PACKAGE_python3-schedule is not set +# CONFIG_PACKAGE_python3-schema is not set +# CONFIG_PACKAGE_python3-seafile-ccnet is not set +# CONFIG_PACKAGE_python3-seafile-server is not set +# CONFIG_PACKAGE_python3-searpc is not set +# CONFIG_PACKAGE_python3-sentry-sdk is not set +# CONFIG_PACKAGE_python3-sepolgen is not set +# CONFIG_PACKAGE_python3-sepolicy is not set +# CONFIG_PACKAGE_python3-service-identity is not set +# CONFIG_PACKAGE_python3-setuptools is not set +# CONFIG_PACKAGE_python3-simplejson is not set +# CONFIG_PACKAGE_python3-six is not set +# CONFIG_PACKAGE_python3-slugify is not set +# CONFIG_PACKAGE_python3-smbus is not set +# CONFIG_PACKAGE_python3-socketio is not set +# CONFIG_PACKAGE_python3-speedtest-cli is not set +# CONFIG_PACKAGE_python3-sqlalchemy is not set +# CONFIG_PACKAGE_python3-sqlite3 is not set +# CONFIG_PACKAGE_python3-sqlparse is not set +# CONFIG_PACKAGE_python3-stem is not set +# CONFIG_PACKAGE_python3-sysrepo is not set +# CONFIG_PACKAGE_python3-text-unidecode is not set +# CONFIG_PACKAGE_python3-texttable is not set +# CONFIG_PACKAGE_python3-toml is not set +# CONFIG_PACKAGE_python3-tornado is not set +# CONFIG_PACKAGE_python3-twisted is not set +# CONFIG_PACKAGE_python3-typing-extensions is not set +# CONFIG_PACKAGE_python3-ubus is not set +# CONFIG_PACKAGE_python3-uci is not set +# CONFIG_PACKAGE_python3-unidecode is not set +# CONFIG_PACKAGE_python3-unittest is not set +# CONFIG_PACKAGE_python3-urllib is not set +# CONFIG_PACKAGE_python3-urllib3 is not set +# CONFIG_PACKAGE_python3-vobject is not set +# CONFIG_PACKAGE_python3-voluptuous is not set +# CONFIG_PACKAGE_python3-voluptuous-serialize is not set +# CONFIG_PACKAGE_python3-wcwidth is not set +# CONFIG_PACKAGE_python3-websocket-client is not set +# CONFIG_PACKAGE_python3-werkzeug is not set +# CONFIG_PACKAGE_python3-xml is not set +# CONFIG_PACKAGE_python3-xmltodict is not set +# CONFIG_PACKAGE_python3-yaml is not set +# CONFIG_PACKAGE_python3-yarl is not set +# CONFIG_PACKAGE_python3-zeroconf is not set +# CONFIG_PACKAGE_python3-zipp is not set +# CONFIG_PACKAGE_python3-zope-interface is not set +# end of Python + +# +# Ruby +# +# CONFIG_PACKAGE_ruby is not set +# end of Ruby + +# +# Tcl +# +# CONFIG_PACKAGE_tcl is not set +# end of Tcl + +# CONFIG_PACKAGE_chicken-scheme-full is not set +# CONFIG_PACKAGE_chicken-scheme-interpreter is not set +# CONFIG_PACKAGE_slsh is not set +# end of Languages + +# +# Libraries +# + +# +# Compression +# +# CONFIG_PACKAGE_libbz2 is not set +# CONFIG_PACKAGE_liblz4 is not set +# CONFIG_PACKAGE_liblzma is not set +# CONFIG_PACKAGE_libunrar is not set +# CONFIG_PACKAGE_libzip-gnutls is not set +# CONFIG_PACKAGE_libzip-mbedtls is not set +# CONFIG_PACKAGE_libzip-nossl is not set +# CONFIG_PACKAGE_libzip-openssl is not set +# CONFIG_PACKAGE_libzstd is not set +# end of Compression + +# +# Database +# +# CONFIG_PACKAGE_libmariadb is not set +# CONFIG_PACKAGE_libpq is not set +# CONFIG_PACKAGE_libpqxx is not set +# CONFIG_PACKAGE_libsqlite3 is not set +# CONFIG_PACKAGE_pgsqlodbc is not set +# CONFIG_PACKAGE_psqlodbca is not set +# CONFIG_PACKAGE_psqlodbcw is not set +# CONFIG_PACKAGE_redis-cli is not set +# CONFIG_PACKAGE_redis-server is not set +# CONFIG_PACKAGE_redis-utils is not set +# CONFIG_PACKAGE_tdb is not set +# CONFIG_PACKAGE_unixodbc is not set +# end of Database + +# +# Filesystem +# +# CONFIG_PACKAGE_libacl is not set +# CONFIG_PACKAGE_libattr is not set +# CONFIG_PACKAGE_libfuse is not set +# CONFIG_PACKAGE_libfuse3 is not set +# CONFIG_PACKAGE_libow is not set +# CONFIG_PACKAGE_libow-capi is not set +# CONFIG_PACKAGE_libsysfs is not set +# end of Filesystem + +# +# Firewall +# +# CONFIG_PACKAGE_libfko is not set +CONFIG_PACKAGE_libip4tc=y +CONFIG_PACKAGE_libip6tc=y +CONFIG_PACKAGE_libxtables=y +# CONFIG_PACKAGE_libxtables-nft is not set +# end of Firewall + +# +# Instant Messaging +# +# CONFIG_PACKAGE_quasselc is not set +# end of Instant Messaging + +# +# IoT +# +# CONFIG_PACKAGE_libmraa is not set +# CONFIG_PACKAGE_libmraa-python3 is not set +# CONFIG_PACKAGE_libupm is not set +# CONFIG_PACKAGE_libupm-a110x is not set +# CONFIG_PACKAGE_libupm-a110x-python3 is not set +# CONFIG_PACKAGE_libupm-abp is not set +# CONFIG_PACKAGE_libupm-abp-python3 is not set +# CONFIG_PACKAGE_libupm-ad8232 is not set +# CONFIG_PACKAGE_libupm-ad8232-python3 is not set +# CONFIG_PACKAGE_libupm-adafruitms1438 is not set +# CONFIG_PACKAGE_libupm-adafruitms1438-python3 is not set +# CONFIG_PACKAGE_libupm-adafruitss is not set +# CONFIG_PACKAGE_libupm-adafruitss-python3 is not set +# CONFIG_PACKAGE_libupm-adc121c021 is not set +# CONFIG_PACKAGE_libupm-adc121c021-python3 is not set +# CONFIG_PACKAGE_libupm-adis16448 is not set +# CONFIG_PACKAGE_libupm-adis16448-python3 is not set +# CONFIG_PACKAGE_libupm-ads1x15 is not set +# CONFIG_PACKAGE_libupm-ads1x15-python3 is not set +# CONFIG_PACKAGE_libupm-adxl335 is not set +# CONFIG_PACKAGE_libupm-adxl335-python3 is not set +# CONFIG_PACKAGE_libupm-adxl345 is not set +# CONFIG_PACKAGE_libupm-adxl345-python3 is not set +# CONFIG_PACKAGE_libupm-adxrs610 is not set +# CONFIG_PACKAGE_libupm-adxrs610-python3 is not set +# CONFIG_PACKAGE_libupm-am2315 is not set +# CONFIG_PACKAGE_libupm-am2315-python3 is not set +# CONFIG_PACKAGE_libupm-apa102 is not set +# CONFIG_PACKAGE_libupm-apa102-python3 is not set +# CONFIG_PACKAGE_libupm-apds9002 is not set +# CONFIG_PACKAGE_libupm-apds9002-python3 is not set +# CONFIG_PACKAGE_libupm-apds9930 is not set +# CONFIG_PACKAGE_libupm-apds9930-python3 is not set +# CONFIG_PACKAGE_libupm-at42qt1070 is not set +# CONFIG_PACKAGE_libupm-at42qt1070-python3 is not set +# CONFIG_PACKAGE_libupm-bh1749 is not set +# CONFIG_PACKAGE_libupm-bh1749-python3 is not set +# CONFIG_PACKAGE_libupm-bh1750 is not set +# CONFIG_PACKAGE_libupm-bh1750-python3 is not set +# CONFIG_PACKAGE_libupm-bh1792 is not set +# CONFIG_PACKAGE_libupm-bh1792-python3 is not set +# CONFIG_PACKAGE_libupm-biss0001 is not set +# CONFIG_PACKAGE_libupm-biss0001-python3 is not set +# CONFIG_PACKAGE_libupm-bma220 is not set +# CONFIG_PACKAGE_libupm-bma220-python3 is not set +# CONFIG_PACKAGE_libupm-bma250e is not set +# CONFIG_PACKAGE_libupm-bma250e-python3 is not set +# CONFIG_PACKAGE_libupm-bmg160 is not set +# CONFIG_PACKAGE_libupm-bmg160-python3 is not set +# CONFIG_PACKAGE_libupm-bmi160 is not set +# CONFIG_PACKAGE_libupm-bmi160-python3 is not set +# CONFIG_PACKAGE_libupm-bmm150 is not set +# CONFIG_PACKAGE_libupm-bmm150-python3 is not set +# CONFIG_PACKAGE_libupm-bmp280 is not set +# CONFIG_PACKAGE_libupm-bmp280-python3 is not set +# CONFIG_PACKAGE_libupm-bmpx8x is not set +# CONFIG_PACKAGE_libupm-bmpx8x-python3 is not set +# CONFIG_PACKAGE_libupm-bmx055 is not set +# CONFIG_PACKAGE_libupm-bmx055-python3 is not set +# CONFIG_PACKAGE_libupm-bno055 is not set +# CONFIG_PACKAGE_libupm-bno055-python3 is not set +# CONFIG_PACKAGE_libupm-button is not set +# CONFIG_PACKAGE_libupm-button-python3 is not set +# CONFIG_PACKAGE_libupm-buzzer is not set +# CONFIG_PACKAGE_libupm-buzzer-python3 is not set +# CONFIG_PACKAGE_libupm-cjq4435 is not set +# CONFIG_PACKAGE_libupm-cjq4435-python3 is not set +# CONFIG_PACKAGE_libupm-collision is not set +# CONFIG_PACKAGE_libupm-collision-python3 is not set +# CONFIG_PACKAGE_libupm-curieimu is not set +# CONFIG_PACKAGE_libupm-curieimu-python3 is not set +# CONFIG_PACKAGE_libupm-cwlsxxa is not set +# CONFIG_PACKAGE_libupm-cwlsxxa-python3 is not set +# CONFIG_PACKAGE_libupm-dfrec is not set +# CONFIG_PACKAGE_libupm-dfrec-python3 is not set +# CONFIG_PACKAGE_libupm-dfrorp is not set +# CONFIG_PACKAGE_libupm-dfrorp-python3 is not set +# CONFIG_PACKAGE_libupm-dfrph is not set +# CONFIG_PACKAGE_libupm-dfrph-python3 is not set +# CONFIG_PACKAGE_libupm-ds1307 is not set +# CONFIG_PACKAGE_libupm-ds1307-python3 is not set +# CONFIG_PACKAGE_libupm-ds1808lc is not set +# CONFIG_PACKAGE_libupm-ds1808lc-python3 is not set +# CONFIG_PACKAGE_libupm-ds18b20 is not set +# CONFIG_PACKAGE_libupm-ds18b20-python3 is not set +# CONFIG_PACKAGE_libupm-ds2413 is not set +# CONFIG_PACKAGE_libupm-ds2413-python3 is not set +# CONFIG_PACKAGE_libupm-ecezo is not set +# CONFIG_PACKAGE_libupm-ecezo-python3 is not set +# CONFIG_PACKAGE_libupm-ecs1030 is not set +# CONFIG_PACKAGE_libupm-ecs1030-python3 is not set +# CONFIG_PACKAGE_libupm-ehr is not set +# CONFIG_PACKAGE_libupm-ehr-python3 is not set +# CONFIG_PACKAGE_libupm-eldriver is not set +# CONFIG_PACKAGE_libupm-eldriver-python3 is not set +# CONFIG_PACKAGE_libupm-electromagnet is not set +# CONFIG_PACKAGE_libupm-electromagnet-python3 is not set +# CONFIG_PACKAGE_libupm-emg is not set +# CONFIG_PACKAGE_libupm-emg-python3 is not set +# CONFIG_PACKAGE_libupm-enc03r is not set +# CONFIG_PACKAGE_libupm-enc03r-python3 is not set +# CONFIG_PACKAGE_libupm-flex is not set +# CONFIG_PACKAGE_libupm-flex-python3 is not set +# CONFIG_PACKAGE_libupm-gas is not set +# CONFIG_PACKAGE_libupm-gas-python3 is not set +# CONFIG_PACKAGE_libupm-gp2y0a is not set +# CONFIG_PACKAGE_libupm-gp2y0a-python3 is not set +# CONFIG_PACKAGE_libupm-gprs is not set +# CONFIG_PACKAGE_libupm-gprs-python3 is not set +# CONFIG_PACKAGE_libupm-gsr is not set +# CONFIG_PACKAGE_libupm-gsr-python3 is not set +# CONFIG_PACKAGE_libupm-guvas12d is not set +# CONFIG_PACKAGE_libupm-guvas12d-python3 is not set +# CONFIG_PACKAGE_libupm-h3lis331dl is not set +# CONFIG_PACKAGE_libupm-h3lis331dl-python3 is not set +# CONFIG_PACKAGE_libupm-h803x is not set +# CONFIG_PACKAGE_libupm-h803x-python3 is not set +# CONFIG_PACKAGE_libupm-hcsr04 is not set +# CONFIG_PACKAGE_libupm-hcsr04-python3 is not set +# CONFIG_PACKAGE_libupm-hdc1000 is not set +# CONFIG_PACKAGE_libupm-hdc1000-python3 is not set +# CONFIG_PACKAGE_libupm-hdxxvxta is not set +# CONFIG_PACKAGE_libupm-hdxxvxta-python3 is not set +# CONFIG_PACKAGE_libupm-hka5 is not set +# CONFIG_PACKAGE_libupm-hka5-python3 is not set +# CONFIG_PACKAGE_libupm-hlg150h is not set +# CONFIG_PACKAGE_libupm-hlg150h-python3 is not set +# CONFIG_PACKAGE_libupm-hm11 is not set +# CONFIG_PACKAGE_libupm-hm11-python3 is not set +# CONFIG_PACKAGE_libupm-hmc5883l is not set +# CONFIG_PACKAGE_libupm-hmc5883l-python3 is not set +# CONFIG_PACKAGE_libupm-hmtrp is not set +# CONFIG_PACKAGE_libupm-hmtrp-python3 is not set +# CONFIG_PACKAGE_libupm-hp20x is not set +# CONFIG_PACKAGE_libupm-hp20x-python3 is not set +# CONFIG_PACKAGE_libupm-ht9170 is not set +# CONFIG_PACKAGE_libupm-ht9170-python3 is not set +# CONFIG_PACKAGE_libupm-htu21d is not set +# CONFIG_PACKAGE_libupm-htu21d-python3 is not set +# CONFIG_PACKAGE_libupm-hwxpxx is not set +# CONFIG_PACKAGE_libupm-hwxpxx-python3 is not set +# CONFIG_PACKAGE_libupm-hx711 is not set +# CONFIG_PACKAGE_libupm-hx711-python3 is not set +# CONFIG_PACKAGE_libupm-ili9341 is not set +# CONFIG_PACKAGE_libupm-ili9341-python3 is not set +# CONFIG_PACKAGE_libupm-ims is not set +# CONFIG_PACKAGE_libupm-ims-python3 is not set +# CONFIG_PACKAGE_libupm-ina132 is not set +# CONFIG_PACKAGE_libupm-ina132-python3 is not set +# CONFIG_PACKAGE_libupm-interfaces is not set +# CONFIG_PACKAGE_libupm-interfaces-python3 is not set +# CONFIG_PACKAGE_libupm-isd1820 is not set +# CONFIG_PACKAGE_libupm-isd1820-python3 is not set +# CONFIG_PACKAGE_libupm-itg3200 is not set +# CONFIG_PACKAGE_libupm-itg3200-python3 is not set +# CONFIG_PACKAGE_libupm-jhd1313m1 is not set +# CONFIG_PACKAGE_libupm-jhd1313m1-python3 is not set +# CONFIG_PACKAGE_libupm-joystick12 is not set +# CONFIG_PACKAGE_libupm-joystick12-python3 is not set +# CONFIG_PACKAGE_libupm-kx122 is not set +# CONFIG_PACKAGE_libupm-kx122-python3 is not set +# CONFIG_PACKAGE_libupm-kxcjk1013 is not set +# CONFIG_PACKAGE_libupm-kxcjk1013-python3 is not set +# CONFIG_PACKAGE_libupm-kxtj3 is not set +# CONFIG_PACKAGE_libupm-kxtj3-python3 is not set +# CONFIG_PACKAGE_libupm-l298 is not set +# CONFIG_PACKAGE_libupm-l298-python3 is not set +# CONFIG_PACKAGE_libupm-l3gd20 is not set +# CONFIG_PACKAGE_libupm-l3gd20-python3 is not set +# CONFIG_PACKAGE_libupm-lcd is not set +# CONFIG_PACKAGE_libupm-lcd-python3 is not set +# CONFIG_PACKAGE_libupm-lcdks is not set +# CONFIG_PACKAGE_libupm-lcdks-python3 is not set +# CONFIG_PACKAGE_libupm-lcm1602 is not set +# CONFIG_PACKAGE_libupm-lcm1602-python3 is not set +# CONFIG_PACKAGE_libupm-ldt0028 is not set +# CONFIG_PACKAGE_libupm-ldt0028-python3 is not set +# CONFIG_PACKAGE_libupm-led is not set +# CONFIG_PACKAGE_libupm-led-python3 is not set +# CONFIG_PACKAGE_libupm-lidarlitev3 is not set +# CONFIG_PACKAGE_libupm-lidarlitev3-python3 is not set +# CONFIG_PACKAGE_libupm-light is not set +# CONFIG_PACKAGE_libupm-light-python3 is not set +# CONFIG_PACKAGE_libupm-linefinder is not set +# CONFIG_PACKAGE_libupm-linefinder-python3 is not set +# CONFIG_PACKAGE_libupm-lis2ds12 is not set +# CONFIG_PACKAGE_libupm-lis2ds12-python3 is not set +# CONFIG_PACKAGE_libupm-lis3dh is not set +# CONFIG_PACKAGE_libupm-lis3dh-python3 is not set +# CONFIG_PACKAGE_libupm-lm35 is not set +# CONFIG_PACKAGE_libupm-lm35-python3 is not set +# CONFIG_PACKAGE_libupm-lol is not set +# CONFIG_PACKAGE_libupm-lol-python3 is not set +# CONFIG_PACKAGE_libupm-loudness is not set +# CONFIG_PACKAGE_libupm-loudness-python3 is not set +# CONFIG_PACKAGE_libupm-lp8860 is not set +# CONFIG_PACKAGE_libupm-lp8860-python3 is not set +# CONFIG_PACKAGE_libupm-lpd8806 is not set +# CONFIG_PACKAGE_libupm-lpd8806-python3 is not set +# CONFIG_PACKAGE_libupm-lsm303agr is not set +# CONFIG_PACKAGE_libupm-lsm303agr-python3 is not set +# CONFIG_PACKAGE_libupm-lsm303d is not set +# CONFIG_PACKAGE_libupm-lsm303d-python3 is not set +# CONFIG_PACKAGE_libupm-lsm303dlh is not set +# CONFIG_PACKAGE_libupm-lsm303dlh-python3 is not set +# CONFIG_PACKAGE_libupm-lsm6ds3h is not set +# CONFIG_PACKAGE_libupm-lsm6ds3h-python3 is not set +# CONFIG_PACKAGE_libupm-lsm6dsl is not set +# CONFIG_PACKAGE_libupm-lsm6dsl-python3 is not set +# CONFIG_PACKAGE_libupm-lsm9ds0 is not set +# CONFIG_PACKAGE_libupm-lsm9ds0-python3 is not set +# CONFIG_PACKAGE_libupm-m24lr64e is not set +# CONFIG_PACKAGE_libupm-m24lr64e-python3 is not set +# CONFIG_PACKAGE_libupm-mag3110 is not set +# CONFIG_PACKAGE_libupm-mag3110-python3 is not set +# CONFIG_PACKAGE_libupm-max30100 is not set +# CONFIG_PACKAGE_libupm-max30100-python3 is not set +# CONFIG_PACKAGE_libupm-max31723 is not set +# CONFIG_PACKAGE_libupm-max31723-python3 is not set +# CONFIG_PACKAGE_libupm-max31855 is not set +# CONFIG_PACKAGE_libupm-max31855-python3 is not set +# CONFIG_PACKAGE_libupm-max44000 is not set +# CONFIG_PACKAGE_libupm-max44000-python3 is not set +# CONFIG_PACKAGE_libupm-max44009 is not set +# CONFIG_PACKAGE_libupm-max44009-python3 is not set +# CONFIG_PACKAGE_libupm-max5487 is not set +# CONFIG_PACKAGE_libupm-max5487-python3 is not set +# CONFIG_PACKAGE_libupm-maxds3231m is not set +# CONFIG_PACKAGE_libupm-maxds3231m-python3 is not set +# CONFIG_PACKAGE_libupm-maxsonarez is not set +# CONFIG_PACKAGE_libupm-maxsonarez-python3 is not set +# CONFIG_PACKAGE_libupm-mb704x is not set +# CONFIG_PACKAGE_libupm-mb704x-python3 is not set +# CONFIG_PACKAGE_libupm-mcp2515 is not set +# CONFIG_PACKAGE_libupm-mcp2515-python3 is not set +# CONFIG_PACKAGE_libupm-mcp9808 is not set +# CONFIG_PACKAGE_libupm-mcp9808-python3 is not set +# CONFIG_PACKAGE_libupm-md is not set +# CONFIG_PACKAGE_libupm-md-python3 is not set +# CONFIG_PACKAGE_libupm-mg811 is not set +# CONFIG_PACKAGE_libupm-mg811-python3 is not set +# CONFIG_PACKAGE_libupm-mhz16 is not set +# CONFIG_PACKAGE_libupm-mhz16-python3 is not set +# CONFIG_PACKAGE_libupm-mic is not set +# CONFIG_PACKAGE_libupm-mic-python3 is not set +# CONFIG_PACKAGE_libupm-micsv89 is not set +# CONFIG_PACKAGE_libupm-micsv89-python3 is not set +# CONFIG_PACKAGE_libupm-mlx90614 is not set +# CONFIG_PACKAGE_libupm-mlx90614-python3 is not set +# CONFIG_PACKAGE_libupm-mma7361 is not set +# CONFIG_PACKAGE_libupm-mma7361-python3 is not set +# CONFIG_PACKAGE_libupm-mma7455 is not set +# CONFIG_PACKAGE_libupm-mma7455-python3 is not set +# CONFIG_PACKAGE_libupm-mma7660 is not set +# CONFIG_PACKAGE_libupm-mma7660-python3 is not set +# CONFIG_PACKAGE_libupm-mma8x5x is not set +# CONFIG_PACKAGE_libupm-mma8x5x-python3 is not set +# CONFIG_PACKAGE_libupm-mmc35240 is not set +# CONFIG_PACKAGE_libupm-mmc35240-python3 is not set +# CONFIG_PACKAGE_libupm-moisture is not set +# CONFIG_PACKAGE_libupm-moisture-python3 is not set +# CONFIG_PACKAGE_libupm-mpl3115a2 is not set +# CONFIG_PACKAGE_libupm-mpl3115a2-python3 is not set +# CONFIG_PACKAGE_libupm-mpr121 is not set +# CONFIG_PACKAGE_libupm-mpr121-python3 is not set +# CONFIG_PACKAGE_libupm-mpu9150 is not set +# CONFIG_PACKAGE_libupm-mpu9150-python3 is not set +# CONFIG_PACKAGE_libupm-mq303a is not set +# CONFIG_PACKAGE_libupm-mq303a-python3 is not set +# CONFIG_PACKAGE_libupm-ms5611 is not set +# CONFIG_PACKAGE_libupm-ms5611-python3 is not set +# CONFIG_PACKAGE_libupm-ms5803 is not set +# CONFIG_PACKAGE_libupm-ms5803-python3 is not set +# CONFIG_PACKAGE_libupm-my9221 is not set +# CONFIG_PACKAGE_libupm-my9221-python3 is not set +# CONFIG_PACKAGE_libupm-nlgpio16 is not set +# CONFIG_PACKAGE_libupm-nlgpio16-python3 is not set +# CONFIG_PACKAGE_libupm-nmea_gps is not set +# CONFIG_PACKAGE_libupm-nmea_gps-python3 is not set +# CONFIG_PACKAGE_libupm-nrf24l01 is not set +# CONFIG_PACKAGE_libupm-nrf24l01-python3 is not set +# CONFIG_PACKAGE_libupm-nrf8001 is not set +# CONFIG_PACKAGE_libupm-nrf8001-python3 is not set +# CONFIG_PACKAGE_libupm-nunchuck is not set +# CONFIG_PACKAGE_libupm-nunchuck-python3 is not set +# CONFIG_PACKAGE_libupm-o2 is not set +# CONFIG_PACKAGE_libupm-o2-python3 is not set +# CONFIG_PACKAGE_libupm-otp538u is not set +# CONFIG_PACKAGE_libupm-otp538u-python3 is not set +# CONFIG_PACKAGE_libupm-ozw is not set +# CONFIG_PACKAGE_libupm-ozw-python3 is not set +# CONFIG_PACKAGE_libupm-p9813 is not set +# CONFIG_PACKAGE_libupm-p9813-python3 is not set +# CONFIG_PACKAGE_libupm-pca9685 is not set +# CONFIG_PACKAGE_libupm-pca9685-python3 is not set +# CONFIG_PACKAGE_libupm-pn532 is not set +# CONFIG_PACKAGE_libupm-pn532-python3 is not set +# CONFIG_PACKAGE_libupm-ppd42ns is not set +# CONFIG_PACKAGE_libupm-ppd42ns-python3 is not set +# CONFIG_PACKAGE_libupm-pulsensor is not set +# CONFIG_PACKAGE_libupm-pulsensor-python3 is not set +# CONFIG_PACKAGE_libupm-relay is not set +# CONFIG_PACKAGE_libupm-relay-python3 is not set +# CONFIG_PACKAGE_libupm-rf22 is not set +# CONFIG_PACKAGE_libupm-rf22-python3 is not set +# CONFIG_PACKAGE_libupm-rfr359f is not set +# CONFIG_PACKAGE_libupm-rfr359f-python3 is not set +# CONFIG_PACKAGE_libupm-rgbringcoder is not set +# CONFIG_PACKAGE_libupm-rgbringcoder-python3 is not set +# CONFIG_PACKAGE_libupm-rhusb is not set +# CONFIG_PACKAGE_libupm-rhusb-python3 is not set +# CONFIG_PACKAGE_libupm-rn2903 is not set +# CONFIG_PACKAGE_libupm-rn2903-python3 is not set +# CONFIG_PACKAGE_libupm-rotary is not set +# CONFIG_PACKAGE_libupm-rotary-python3 is not set +# CONFIG_PACKAGE_libupm-rotaryencoder is not set +# CONFIG_PACKAGE_libupm-rotaryencoder-python3 is not set +# CONFIG_PACKAGE_libupm-rpr220 is not set +# CONFIG_PACKAGE_libupm-rpr220-python3 is not set +# CONFIG_PACKAGE_libupm-rsc is not set +# CONFIG_PACKAGE_libupm-rsc-python3 is not set +# CONFIG_PACKAGE_libupm-scam is not set +# CONFIG_PACKAGE_libupm-scam-python3 is not set +# CONFIG_PACKAGE_libupm-sensortemplate is not set +# CONFIG_PACKAGE_libupm-sensortemplate-python3 is not set +# CONFIG_PACKAGE_libupm-servo is not set +# CONFIG_PACKAGE_libupm-servo-python3 is not set +# CONFIG_PACKAGE_libupm-sht1x is not set +# CONFIG_PACKAGE_libupm-sht1x-python3 is not set +# CONFIG_PACKAGE_libupm-si1132 is not set +# CONFIG_PACKAGE_libupm-si1132-python3 is not set +# CONFIG_PACKAGE_libupm-si114x is not set +# CONFIG_PACKAGE_libupm-si114x-python3 is not set +# CONFIG_PACKAGE_libupm-si7005 is not set +# CONFIG_PACKAGE_libupm-si7005-python3 is not set +# CONFIG_PACKAGE_libupm-slide is not set +# CONFIG_PACKAGE_libupm-slide-python3 is not set +# CONFIG_PACKAGE_libupm-sm130 is not set +# CONFIG_PACKAGE_libupm-sm130-python3 is not set +# CONFIG_PACKAGE_libupm-smartdrive is not set +# CONFIG_PACKAGE_libupm-smartdrive-python3 is not set +# CONFIG_PACKAGE_libupm-speaker is not set +# CONFIG_PACKAGE_libupm-speaker-python3 is not set +# CONFIG_PACKAGE_libupm-ssd1351 is not set +# CONFIG_PACKAGE_libupm-ssd1351-python3 is not set +# CONFIG_PACKAGE_libupm-st7735 is not set +# CONFIG_PACKAGE_libupm-st7735-python3 is not set +# CONFIG_PACKAGE_libupm-stepmotor is not set +# CONFIG_PACKAGE_libupm-stepmotor-python3 is not set +# CONFIG_PACKAGE_libupm-sx1276 is not set +# CONFIG_PACKAGE_libupm-sx1276-python3 is not set +# CONFIG_PACKAGE_libupm-sx6119 is not set +# CONFIG_PACKAGE_libupm-sx6119-python3 is not set +# CONFIG_PACKAGE_libupm-t3311 is not set +# CONFIG_PACKAGE_libupm-t3311-python3 is not set +# CONFIG_PACKAGE_libupm-t6713 is not set +# CONFIG_PACKAGE_libupm-t6713-python3 is not set +# CONFIG_PACKAGE_libupm-ta12200 is not set +# CONFIG_PACKAGE_libupm-ta12200-python3 is not set +# CONFIG_PACKAGE_libupm-tca9548a is not set +# CONFIG_PACKAGE_libupm-tca9548a-python3 is not set +# CONFIG_PACKAGE_libupm-tcs3414cs is not set +# CONFIG_PACKAGE_libupm-tcs3414cs-python3 is not set +# CONFIG_PACKAGE_libupm-tcs37727 is not set +# CONFIG_PACKAGE_libupm-tcs37727-python3 is not set +# CONFIG_PACKAGE_libupm-teams is not set +# CONFIG_PACKAGE_libupm-teams-python3 is not set +# CONFIG_PACKAGE_libupm-temperature is not set +# CONFIG_PACKAGE_libupm-temperature-python3 is not set +# CONFIG_PACKAGE_libupm-tex00 is not set +# CONFIG_PACKAGE_libupm-tex00-python3 is not set +# CONFIG_PACKAGE_libupm-th02 is not set +# CONFIG_PACKAGE_libupm-th02-python3 is not set +# CONFIG_PACKAGE_libupm-tm1637 is not set +# CONFIG_PACKAGE_libupm-tm1637-python3 is not set +# CONFIG_PACKAGE_libupm-tmp006 is not set +# CONFIG_PACKAGE_libupm-tmp006-python3 is not set +# CONFIG_PACKAGE_libupm-tsl2561 is not set +# CONFIG_PACKAGE_libupm-tsl2561-python3 is not set +# CONFIG_PACKAGE_libupm-ttp223 is not set +# CONFIG_PACKAGE_libupm-ttp223-python3 is not set +# CONFIG_PACKAGE_libupm-uartat is not set +# CONFIG_PACKAGE_libupm-uartat-python3 is not set +# CONFIG_PACKAGE_libupm-uln200xa is not set +# CONFIG_PACKAGE_libupm-uln200xa-python3 is not set +# CONFIG_PACKAGE_libupm-ultrasonic is not set +# CONFIG_PACKAGE_libupm-ultrasonic-python3 is not set +# CONFIG_PACKAGE_libupm-urm37 is not set +# CONFIG_PACKAGE_libupm-urm37-python3 is not set +# CONFIG_PACKAGE_libupm-utilities is not set +# CONFIG_PACKAGE_libupm-utilities-python3 is not set +# CONFIG_PACKAGE_libupm-vcap is not set +# CONFIG_PACKAGE_libupm-vcap-python3 is not set +# CONFIG_PACKAGE_libupm-vdiv is not set +# CONFIG_PACKAGE_libupm-vdiv-python3 is not set +# CONFIG_PACKAGE_libupm-veml6070 is not set +# CONFIG_PACKAGE_libupm-veml6070-python3 is not set +# CONFIG_PACKAGE_libupm-water is not set +# CONFIG_PACKAGE_libupm-water-python3 is not set +# CONFIG_PACKAGE_libupm-waterlevel is not set +# CONFIG_PACKAGE_libupm-waterlevel-python3 is not set +# CONFIG_PACKAGE_libupm-wfs is not set +# CONFIG_PACKAGE_libupm-wfs-python3 is not set +# CONFIG_PACKAGE_libupm-wheelencoder is not set +# CONFIG_PACKAGE_libupm-wheelencoder-python3 is not set +# CONFIG_PACKAGE_libupm-wt5001 is not set +# CONFIG_PACKAGE_libupm-wt5001-python3 is not set +# CONFIG_PACKAGE_libupm-xbee is not set +# CONFIG_PACKAGE_libupm-xbee-python3 is not set +# CONFIG_PACKAGE_libupm-yg1006 is not set +# CONFIG_PACKAGE_libupm-yg1006-python3 is not set +# CONFIG_PACKAGE_libupm-zfm20 is not set +# CONFIG_PACKAGE_libupm-zfm20-python3 is not set +# end of IoT + +# +# Languages +# +# CONFIG_PACKAGE_libyaml is not set +# end of Languages + +# +# LibElektra +# +# CONFIG_PACKAGE_libelektra-boost is not set +# CONFIG_PACKAGE_libelektra-core is not set +# CONFIG_PACKAGE_libelektra-cpp is not set +# CONFIG_PACKAGE_libelektra-crypto is not set +# CONFIG_PACKAGE_libelektra-curlget is not set +# CONFIG_PACKAGE_libelektra-dbus is not set +# CONFIG_PACKAGE_libelektra-extra is not set +# CONFIG_PACKAGE_libelektra-lua is not set +# CONFIG_PACKAGE_libelektra-plugins is not set +# CONFIG_PACKAGE_libelektra-python3 is not set +# CONFIG_PACKAGE_libelektra-resolvers is not set +# CONFIG_PACKAGE_libelektra-xerces is not set +# CONFIG_PACKAGE_libelektra-xml is not set +# CONFIG_PACKAGE_libelektra-yajl is not set +# CONFIG_PACKAGE_libelektra-yamlcpp is not set +# CONFIG_PACKAGE_libelektra-zmq is not set +# end of LibElektra + +# +# Networking +# +# CONFIG_PACKAGE_libdcwproto is not set +# CONFIG_PACKAGE_libdcwsocket is not set +# CONFIG_PACKAGE_libsctp is not set +# CONFIG_PACKAGE_libuhttpd-mbedtls is not set +# CONFIG_PACKAGE_libuhttpd-nossl is not set +# CONFIG_PACKAGE_libuhttpd-openssl is not set +# CONFIG_PACKAGE_libuhttpd-wolfssl is not set +# CONFIG_PACKAGE_libulfius-gnutls is not set +# CONFIG_PACKAGE_libulfius-nossl is not set +# CONFIG_PACKAGE_libunbound is not set +# CONFIG_PACKAGE_libuwsc-mbedtls is not set +# CONFIG_PACKAGE_libuwsc-nossl is not set +# CONFIG_PACKAGE_libuwsc-openssl is not set +# CONFIG_PACKAGE_libuwsc-wolfssl is not set +# end of Networking + +# +# Qt5 +# +# CONFIG_PACKAGE_qt5-core is not set +# CONFIG_PACKAGE_qt5-network is not set +# CONFIG_PACKAGE_qt5-sql is not set +# CONFIG_PACKAGE_qt5-xml is not set +# CONFIG_PACKAGE_qtbase is not set +# CONFIG_QT5_INCLUDE_ATOMIC is not set + +# +# Select Qtbase Libraries +# + +# +# Qtbase Libraries +# +# end of Select Qtbase Libraries +# end of Qt5 + +# +# SSL +# +# CONFIG_PACKAGE_libgnutls is not set +# CONFIG_PACKAGE_libgnutls-dane is not set +CONFIG_PACKAGE_libmbedtls=y +# CONFIG_LIBMBEDTLS_DEBUG_C is not set +# CONFIG_LIBMBEDTLS_HKDF_C is not set +# CONFIG_PACKAGE_libnss is not set +CONFIG_PACKAGE_libopenssl=y + +# +# Build Options +# +CONFIG_OPENSSL_OPTIMIZE_SPEED=y +CONFIG_OPENSSL_WITH_ASM=y +CONFIG_OPENSSL_WITH_DEPRECATED=y +# CONFIG_OPENSSL_NO_DEPRECATED is not set +CONFIG_OPENSSL_WITH_ERROR_MESSAGES=y + +# +# Protocol Support +# +CONFIG_OPENSSL_WITH_TLS13=y +# CONFIG_OPENSSL_WITH_DTLS is not set +# CONFIG_OPENSSL_WITH_NPN is not set +CONFIG_OPENSSL_WITH_SRP=y +CONFIG_OPENSSL_WITH_CMS=y + +# +# Algorithm Selection +# +# CONFIG_OPENSSL_WITH_EC2M is not set +CONFIG_OPENSSL_WITH_CHACHA_POLY1305=y +CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM=y +CONFIG_OPENSSL_WITH_PSK=y + +# +# Less commonly used build options +# +# CONFIG_OPENSSL_WITH_ARIA is not set +# CONFIG_OPENSSL_WITH_CAMELLIA is not set +# CONFIG_OPENSSL_WITH_IDEA is not set +# CONFIG_OPENSSL_WITH_SEED is not set +# CONFIG_OPENSSL_WITH_SM234 is not set +# CONFIG_OPENSSL_WITH_BLAKE2 is not set +# CONFIG_OPENSSL_WITH_MDC2 is not set +# CONFIG_OPENSSL_WITH_WHIRLPOOL is not set +# CONFIG_OPENSSL_WITH_COMPRESSION is not set +# CONFIG_OPENSSL_WITH_RFC3779 is not set + +# +# Engine/Hardware Support +# +CONFIG_OPENSSL_ENGINE=y +CONFIG_OPENSSL_ENGINE_BUILTIN=y +CONFIG_OPENSSL_ENGINE_BUILTIN_AFALG=y +CONFIG_OPENSSL_ENGINE_BUILTIN_DEVCRYPTO=y +CONFIG_PACKAGE_libopenssl-conf=y +# CONFIG_PACKAGE_libopenssl-devcrypto is not set +# CONFIG_PACKAGE_libopenssl-gost_engine is not set +# CONFIG_PACKAGE_libpolarssl is not set +# CONFIG_PACKAGE_libwolfssl is not set +# end of SSL + +# +# Sound +# +# CONFIG_PACKAGE_alsa-ucm-conf is not set +# CONFIG_PACKAGE_liblo is not set +# end of Sound + +# +# Telephony +# +# CONFIG_PACKAGE_bcg729 is not set +# CONFIG_PACKAGE_dahdi-tools-libtonezone is not set +# CONFIG_PACKAGE_gsmlib is not set +# CONFIG_PACKAGE_libctb is not set +# CONFIG_PACKAGE_libfreetdm is not set +# CONFIG_PACKAGE_libiksemel is not set +# CONFIG_PACKAGE_libks is not set +# CONFIG_PACKAGE_libosip2 is not set +# CONFIG_PACKAGE_libpj is not set +# CONFIG_PACKAGE_libpjlib-util is not set +# CONFIG_PACKAGE_libpjmedia is not set +# CONFIG_PACKAGE_libpjnath is not set +# CONFIG_PACKAGE_libpjsip is not set +# CONFIG_PACKAGE_libpjsip-simple is not set +# CONFIG_PACKAGE_libpjsip-ua is not set +# CONFIG_PACKAGE_libpjsua is not set +# CONFIG_PACKAGE_libpjsua2 is not set +# CONFIG_PACKAGE_libre is not set +# CONFIG_PACKAGE_librem is not set +# CONFIG_PACKAGE_libspandsp is not set +# CONFIG_PACKAGE_libspandsp3 is not set +# CONFIG_PACKAGE_libsrtp2 is not set +# CONFIG_PACKAGE_signalwire-client-c is not set +# CONFIG_PACKAGE_sofia-sip is not set +# end of Telephony + +# +# libimobiledevice +# +# CONFIG_PACKAGE_libimobiledevice is not set +# CONFIG_PACKAGE_libirecovery is not set +# CONFIG_PACKAGE_libplist is not set +# CONFIG_PACKAGE_libusbmuxd is not set +# end of libimobiledevice + +# CONFIG_PACKAGE_acsccid is not set +# CONFIG_PACKAGE_alsa-lib is not set +# CONFIG_PACKAGE_argp-standalone is not set +# CONFIG_PACKAGE_bind-libs is not set +# CONFIG_PACKAGE_bluez-libs is not set +# CONFIG_PACKAGE_boost is not set +# CONFIG_boost-context-exclude is not set +# CONFIG_boost-coroutine-exclude is not set +# CONFIG_boost-fiber-exclude is not set +# CONFIG_PACKAGE_cJSON is not set +# CONFIG_PACKAGE_ccid is not set +# CONFIG_PACKAGE_check is not set +# CONFIG_PACKAGE_confuse is not set +# CONFIG_PACKAGE_czmq is not set +# CONFIG_PACKAGE_dtndht is not set +# CONFIG_PACKAGE_getdns is not set +# CONFIG_PACKAGE_giflib is not set +# CONFIG_PACKAGE_glib2 is not set +# CONFIG_PACKAGE_google-authenticator-libpam is not set +# CONFIG_PACKAGE_hidapi is not set +# CONFIG_PACKAGE_ibrcommon is not set +# CONFIG_PACKAGE_ibrdtn is not set +# CONFIG_PACKAGE_icu is not set +# CONFIG_PACKAGE_icu-data-tools is not set +# CONFIG_PACKAGE_icu-full-data is not set +# CONFIG_PACKAGE_jansson is not set +# CONFIG_PACKAGE_json-glib is not set +# CONFIG_PACKAGE_jsoncpp is not set +# CONFIG_PACKAGE_knot-libs is not set +# CONFIG_PACKAGE_knot-libzscanner is not set +# CONFIG_PACKAGE_libaio is not set +# CONFIG_PACKAGE_libantlr3c is not set +# CONFIG_PACKAGE_libao is not set +# CONFIG_PACKAGE_libapparmor is not set +# CONFIG_PACKAGE_libapr is not set +# CONFIG_PACKAGE_libaprutil is not set +# CONFIG_PACKAGE_libarchive is not set +# CONFIG_PACKAGE_libarchive-noopenssl is not set +# CONFIG_PACKAGE_libasm is not set +# CONFIG_PACKAGE_libassuan is not set +# CONFIG_PACKAGE_libatasmart is not set +# CONFIG_PACKAGE_libaudit is not set +# CONFIG_PACKAGE_libauparse is not set +# CONFIG_PACKAGE_libavahi-client is not set +# CONFIG_PACKAGE_libavahi-compat-libdnssd is not set +# CONFIG_PACKAGE_libavahi-dbus-support is not set +# CONFIG_PACKAGE_libavahi-nodbus-support is not set +# CONFIG_PACKAGE_libbfd is not set +# CONFIG_PACKAGE_libblkid is not set +CONFIG_PACKAGE_libblobmsg-json=y +CONFIG_PACKAGE_libbpf=y +# CONFIG_PACKAGE_libbsd is not set +# CONFIG_PACKAGE_libcap is not set +# CONFIG_PACKAGE_libcap-ng is not set +CONFIG_PACKAGE_libcares=y +# CONFIG_PACKAGE_libcbor is not set +# CONFIG_PACKAGE_libcgroup is not set +# CONFIG_PACKAGE_libcharset is not set +# CONFIG_PACKAGE_libcoap is not set +# CONFIG_PACKAGE_libcomerr is not set +# CONFIG_PACKAGE_libconfig is not set +# CONFIG_PACKAGE_libcryptopp is not set +# CONFIG_PACKAGE_libctf is not set +CONFIG_PACKAGE_libcurl=y + +# +# SSL support +# +# CONFIG_LIBCURL_MBEDTLS is not set +# CONFIG_LIBCURL_WOLFSSL is not set +CONFIG_LIBCURL_OPENSSL=y +# CONFIG_LIBCURL_GNUTLS is not set +# CONFIG_LIBCURL_NOSSL is not set + +# +# Supported protocols +# +# CONFIG_LIBCURL_DICT is not set +CONFIG_LIBCURL_FILE=y +CONFIG_LIBCURL_FTP=y +# CONFIG_LIBCURL_GOPHER is not set +CONFIG_LIBCURL_HTTP=y +CONFIG_LIBCURL_COOKIES=y +# CONFIG_LIBCURL_IMAP is not set +# CONFIG_LIBCURL_LDAP is not set +# CONFIG_LIBCURL_POP3 is not set +# CONFIG_LIBCURL_RTSP is not set +# CONFIG_LIBCURL_SSH2 is not set +CONFIG_LIBCURL_NO_SMB="!" +# CONFIG_LIBCURL_SMTP is not set +# CONFIG_LIBCURL_TELNET is not set +# CONFIG_LIBCURL_TFTP is not set +# CONFIG_LIBCURL_NGHTTP2 is not set + +# +# Miscellaneous +# +CONFIG_LIBCURL_PROXY=y +# CONFIG_LIBCURL_CRYPTO_AUTH is not set +# CONFIG_LIBCURL_TLS_SRP is not set +# CONFIG_LIBCURL_LIBIDN2 is not set +# CONFIG_LIBCURL_THREADED_RESOLVER is not set +# CONFIG_LIBCURL_ZLIB is not set +# CONFIG_LIBCURL_ZSTD is not set +# CONFIG_LIBCURL_UNIX_SOCKETS is not set +# CONFIG_LIBCURL_LIBCURL_OPTION is not set +# CONFIG_LIBCURL_VERBOSE is not set +# CONFIG_PACKAGE_libdaemon is not set +# CONFIG_PACKAGE_libdaq is not set +# CONFIG_PACKAGE_libdaq3 is not set +# CONFIG_PACKAGE_libdb47 is not set +# CONFIG_PACKAGE_libdb47xx is not set +# CONFIG_PACKAGE_libdbi is not set +# CONFIG_PACKAGE_libdbus is not set +# CONFIG_PACKAGE_libdevmapper is not set +# CONFIG_PACKAGE_libdevmapper-selinux is not set +# CONFIG_PACKAGE_libdmapsharing is not set +# CONFIG_PACKAGE_libdnet is not set +# CONFIG_PACKAGE_libdouble-conversion is not set +# CONFIG_PACKAGE_libdrm is not set +# CONFIG_PACKAGE_libdw is not set +# CONFIG_PACKAGE_libecdsautil is not set +# CONFIG_PACKAGE_libedit is not set +CONFIG_PACKAGE_libelf=y +# CONFIG_PACKAGE_libesmtp is not set +# CONFIG_PACKAGE_libestr is not set +CONFIG_PACKAGE_libev=y +# CONFIG_PACKAGE_libevdev is not set +# CONFIG_PACKAGE_libevent2 is not set +# CONFIG_PACKAGE_libevent2-core is not set +# CONFIG_PACKAGE_libevent2-extra is not set +# CONFIG_PACKAGE_libevent2-openssl is not set +# CONFIG_PACKAGE_libevent2-pthreads is not set +# CONFIG_PACKAGE_libexif is not set +# CONFIG_PACKAGE_libexpat is not set +# CONFIG_PACKAGE_libexslt is not set +# CONFIG_PACKAGE_libext2fs is not set +# CONFIG_PACKAGE_libextractor is not set +# CONFIG_PACKAGE_libf2fs is not set +# CONFIG_PACKAGE_libf2fs-selinux is not set +# CONFIG_PACKAGE_libfaad2 is not set +# CONFIG_PACKAGE_libfastjson is not set +# CONFIG_PACKAGE_libfdisk is not set +# CONFIG_PACKAGE_libfdt is not set +# CONFIG_PACKAGE_libffi is not set +# CONFIG_PACKAGE_libffmpeg-audio-dec is not set +# CONFIG_PACKAGE_libffmpeg-custom is not set +# CONFIG_PACKAGE_libffmpeg-full is not set +# CONFIG_PACKAGE_libffmpeg-mini is not set +# CONFIG_PACKAGE_libfido2 is not set +# CONFIG_PACKAGE_libflac is not set +# CONFIG_PACKAGE_libfmt is not set +# CONFIG_PACKAGE_libfreetype is not set +# CONFIG_PACKAGE_libfstrm is not set +# CONFIG_PACKAGE_libftdi is not set +# CONFIG_PACKAGE_libftdi1 is not set +# CONFIG_PACKAGE_libgabe is not set +# CONFIG_PACKAGE_libgcrypt is not set +# CONFIG_PACKAGE_libgd is not set +# CONFIG_PACKAGE_libgd-full is not set +# CONFIG_PACKAGE_libgdbm is not set +# CONFIG_PACKAGE_libgee is not set +# CONFIG_PACKAGE_libgmp is not set +# CONFIG_PACKAGE_libgnurl is not set +# CONFIG_PACKAGE_libgpg-error is not set +# CONFIG_PACKAGE_libgpgme is not set +# CONFIG_PACKAGE_libgpgmepp is not set +# CONFIG_PACKAGE_libgphoto2 is not set +# CONFIG_PACKAGE_libgpiod is not set +# CONFIG_PACKAGE_libgps is not set +# CONFIG_PACKAGE_libh2o is not set +# CONFIG_PACKAGE_libh2o-evloop is not set +# CONFIG_PACKAGE_libhamlib is not set +# CONFIG_PACKAGE_libhavege is not set +# CONFIG_PACKAGE_libhiredis is not set +# CONFIG_PACKAGE_libhttp-parser is not set +# CONFIG_PACKAGE_libhwloc is not set +# CONFIG_PACKAGE_libi2c is not set +# CONFIG_PACKAGE_libical is not set +# CONFIG_PACKAGE_libiconv is not set +# CONFIG_PACKAGE_libiconv-full is not set +# CONFIG_PACKAGE_libid3tag is not set +# CONFIG_PACKAGE_libidn is not set +# CONFIG_PACKAGE_libidn2 is not set +# CONFIG_PACKAGE_libiio is not set +# CONFIG_PACKAGE_libinotifytools is not set +# CONFIG_PACKAGE_libinput is not set +# CONFIG_PACKAGE_libintl is not set +# CONFIG_PACKAGE_libintl-full is not set +# CONFIG_PACKAGE_libipfs-http-client is not set +# CONFIG_PACKAGE_libiw is not set +CONFIG_PACKAGE_libiwinfo=y +# CONFIG_PACKAGE_libjpeg-turbo is not set +CONFIG_PACKAGE_libjson-c=y +# CONFIG_PACKAGE_libkeyutils is not set +# CONFIG_PACKAGE_libkmod is not set +# CONFIG_PACKAGE_libksba is not set +# CONFIG_PACKAGE_libldns is not set +# CONFIG_PACKAGE_libleptonica is not set +# CONFIG_PACKAGE_libloragw is not set +# CONFIG_PACKAGE_libltdl is not set +CONFIG_PACKAGE_liblua=y +# CONFIG_PACKAGE_liblua5.3 is not set +# CONFIG_PACKAGE_liblzo is not set +# CONFIG_PACKAGE_libmad is not set +# CONFIG_PACKAGE_libmagic is not set +# CONFIG_PACKAGE_libmaxminddb is not set +# CONFIG_PACKAGE_libmbim is not set +# CONFIG_PACKAGE_libmcrypt is not set +# CONFIG_PACKAGE_libmicrohttpd-no-ssl is not set +# CONFIG_PACKAGE_libmicrohttpd-ssl is not set +# CONFIG_PACKAGE_libmilter-sendmail is not set +# CONFIG_PACKAGE_libminiupnpc is not set +# CONFIG_PACKAGE_libmms is not set +CONFIG_PACKAGE_libmnl=y +# CONFIG_PACKAGE_libmodbus is not set +# CONFIG_PACKAGE_libmosquitto-nossl is not set +# CONFIG_PACKAGE_libmosquitto-ssl is not set +# CONFIG_PACKAGE_libmount is not set +# CONFIG_PACKAGE_libmpdclient is not set +# CONFIG_PACKAGE_libmpeg2 is not set +# CONFIG_PACKAGE_libmpg123 is not set +# CONFIG_PACKAGE_libnatpmp is not set +# CONFIG_PACKAGE_libncurses is not set +# CONFIG_PACKAGE_libndpi is not set +# CONFIG_PACKAGE_libneon is not set +# CONFIG_PACKAGE_libnet-1.2.x is not set +# CONFIG_PACKAGE_libnetconf2 is not set +# CONFIG_PACKAGE_libnetfilter-acct is not set +# CONFIG_PACKAGE_libnetfilter-conntrack is not set +# CONFIG_PACKAGE_libnetfilter-cthelper is not set +# CONFIG_PACKAGE_libnetfilter-cttimeout is not set +# CONFIG_PACKAGE_libnetfilter-log is not set +# CONFIG_PACKAGE_libnetfilter-queue is not set +# CONFIG_PACKAGE_libnetsnmp is not set +# CONFIG_PACKAGE_libnettle is not set +# CONFIG_PACKAGE_libnewt is not set +# CONFIG_PACKAGE_libnfnetlink is not set +# CONFIG_PACKAGE_libnftnl is not set +# CONFIG_PACKAGE_libnghttp2 is not set +# CONFIG_PACKAGE_libnl is not set +# CONFIG_PACKAGE_libnl-core is not set +# CONFIG_PACKAGE_libnl-genl is not set +# CONFIG_PACKAGE_libnl-nf is not set +# CONFIG_PACKAGE_libnl-route is not set +CONFIG_PACKAGE_libnl-tiny=y +# CONFIG_PACKAGE_libnopoll is not set +# CONFIG_PACKAGE_libnpth is not set +# CONFIG_PACKAGE_libnpupnp is not set +# CONFIG_PACKAGE_libogg is not set +# CONFIG_PACKAGE_liboil is not set +# CONFIG_PACKAGE_libopcodes is not set +# CONFIG_PACKAGE_libopendkim is not set +# CONFIG_PACKAGE_libopenobex is not set +# CONFIG_PACKAGE_libopensc is not set +# CONFIG_PACKAGE_libopenzwave is not set +# CONFIG_PACKAGE_liboping is not set +# CONFIG_PACKAGE_libopus is not set +# CONFIG_PACKAGE_libopusenc is not set +# CONFIG_PACKAGE_libopusfile is not set +# CONFIG_PACKAGE_liborcania is not set +# CONFIG_PACKAGE_libout123 is not set +# CONFIG_PACKAGE_libowipcalc is not set +# CONFIG_PACKAGE_libp11 is not set +# CONFIG_PACKAGE_libpagekite is not set +# CONFIG_PACKAGE_libpam is not set +# CONFIG_PACKAGE_libpbc is not set +# CONFIG_PACKAGE_libpcap is not set +# CONFIG_PACKAGE_libpci is not set +# CONFIG_PACKAGE_libpciaccess is not set +CONFIG_PACKAGE_libpcre=y +CONFIG_PCRE_JIT_ENABLED=y +# CONFIG_PACKAGE_libpcre16 is not set +# CONFIG_PACKAGE_libpcre2 is not set +# CONFIG_PACKAGE_libpcre2-16 is not set +# CONFIG_PACKAGE_libpcre2-32 is not set +# CONFIG_PACKAGE_libpcre32 is not set +# CONFIG_PACKAGE_libpcsclite is not set +# CONFIG_PACKAGE_libpfring is not set +# CONFIG_PACKAGE_libpkcs11-spy is not set +# CONFIG_PACKAGE_libpkgconf is not set +# CONFIG_PACKAGE_libpng is not set +# CONFIG_PACKAGE_libpopt is not set +# CONFIG_PACKAGE_libpri is not set +# CONFIG_PACKAGE_libprotobuf-c is not set +# CONFIG_PACKAGE_libpsl is not set +# CONFIG_PACKAGE_libqmi is not set +# CONFIG_PACKAGE_libqrencode is not set +# CONFIG_PACKAGE_libqrtr-glib is not set +# CONFIG_PACKAGE_libradcli is not set +# CONFIG_PACKAGE_libradiotap is not set +# CONFIG_PACKAGE_libreadline is not set +# CONFIG_PACKAGE_libredblack is not set +# CONFIG_PACKAGE_librouteros is not set +# CONFIG_PACKAGE_libroxml is not set +# CONFIG_PACKAGE_librrd1 is not set +# CONFIG_PACKAGE_librtlsdr is not set +# CONFIG_PACKAGE_libruby is not set +# CONFIG_PACKAGE_libsamplerate is not set +# CONFIG_PACKAGE_libsane is not set +# CONFIG_PACKAGE_libsasl2 is not set +# CONFIG_PACKAGE_libsearpc is not set +# CONFIG_PACKAGE_libseccomp is not set +# CONFIG_PACKAGE_libselinux is not set +# CONFIG_PACKAGE_libsemanage is not set +# CONFIG_PACKAGE_libsensors is not set +# CONFIG_PACKAGE_libsepol is not set +# CONFIG_PACKAGE_libshout is not set +# CONFIG_PACKAGE_libshout-full is not set +# CONFIG_PACKAGE_libshout-nossl is not set +# CONFIG_PACKAGE_libsispmctl is not set +# CONFIG_PACKAGE_libslang2 is not set +# CONFIG_PACKAGE_libslang2-mod-base64 is not set +# CONFIG_PACKAGE_libslang2-mod-chksum is not set +# CONFIG_PACKAGE_libslang2-mod-csv is not set +# CONFIG_PACKAGE_libslang2-mod-fcntl is not set +# CONFIG_PACKAGE_libslang2-mod-fork is not set +# CONFIG_PACKAGE_libslang2-mod-histogram is not set +# CONFIG_PACKAGE_libslang2-mod-iconv is not set +# CONFIG_PACKAGE_libslang2-mod-json is not set +# CONFIG_PACKAGE_libslang2-mod-onig is not set +# CONFIG_PACKAGE_libslang2-mod-pcre is not set +# CONFIG_PACKAGE_libslang2-mod-png is not set +# CONFIG_PACKAGE_libslang2-mod-rand is not set +# CONFIG_PACKAGE_libslang2-mod-select is not set +# CONFIG_PACKAGE_libslang2-mod-slsmg is not set +# CONFIG_PACKAGE_libslang2-mod-socket is not set +# CONFIG_PACKAGE_libslang2-mod-stats is not set +# CONFIG_PACKAGE_libslang2-mod-sysconf is not set +# CONFIG_PACKAGE_libslang2-mod-termios is not set +# CONFIG_PACKAGE_libslang2-mod-varray is not set +# CONFIG_PACKAGE_libslang2-mod-zlib is not set +# CONFIG_PACKAGE_libslang2-modules is not set +# CONFIG_PACKAGE_libsmartcols is not set +# CONFIG_PACKAGE_libsndfile is not set +# CONFIG_PACKAGE_libsoc is not set +# CONFIG_PACKAGE_libsocks is not set +CONFIG_PACKAGE_libsodium=y + +# +# Configuration +# +CONFIG_LIBSODIUM_MINIMAL=y +# end of Configuration + +# CONFIG_PACKAGE_libsoup is not set +# CONFIG_PACKAGE_libsoxr is not set +# CONFIG_PACKAGE_libspeex is not set +# CONFIG_PACKAGE_libspeexdsp is not set +# CONFIG_PACKAGE_libspice-server is not set +# CONFIG_PACKAGE_libss is not set +# CONFIG_PACKAGE_libssh is not set +# CONFIG_PACKAGE_libssh2 is not set +# CONFIG_PACKAGE_libstoken is not set +# CONFIG_PACKAGE_libstrophe is not set +# CONFIG_PACKAGE_libsyn123 is not set +# CONFIG_PACKAGE_libsysrepo is not set +# CONFIG_PACKAGE_libtalloc is not set +# CONFIG_PACKAGE_libtasn1 is not set +# CONFIG_PACKAGE_libtheora is not set +# CONFIG_PACKAGE_libtiff is not set +# CONFIG_PACKAGE_libtins is not set +# CONFIG_PACKAGE_libtirpc is not set +# CONFIG_PACKAGE_libtorrent-rasterbar is not set +CONFIG_PACKAGE_libubox=y +# CONFIG_PACKAGE_libubox-lua is not set +CONFIG_PACKAGE_libubus=y +CONFIG_PACKAGE_libubus-lua=y +CONFIG_PACKAGE_libuci=y +CONFIG_PACKAGE_libuci-lua=y +# CONFIG_PACKAGE_libuci2 is not set +CONFIG_PACKAGE_libuclient=y +# CONFIG_PACKAGE_libudev-zero is not set +CONFIG_PACKAGE_libudns=y +# CONFIG_PACKAGE_libuecc is not set +# CONFIG_PACKAGE_libugpio is not set +# CONFIG_PACKAGE_libunistring is not set +# CONFIG_PACKAGE_libunwind is not set +# CONFIG_PACKAGE_libupnp is not set +# CONFIG_PACKAGE_libupnpp is not set +# CONFIG_PACKAGE_liburcu is not set +# CONFIG_PACKAGE_liburing is not set +# CONFIG_PACKAGE_libusb-1.0 is not set +# CONFIG_PACKAGE_libusb-compat is not set +# CONFIG_PACKAGE_libustream-mbedtls is not set +CONFIG_PACKAGE_libustream-openssl=y +# CONFIG_PACKAGE_libustream-wolfssl is not set +CONFIG_PACKAGE_libuuid=y +# CONFIG_PACKAGE_libuv is not set +# CONFIG_PACKAGE_libuwifi is not set +# CONFIG_PACKAGE_libv4l is not set +# CONFIG_PACKAGE_libvorbis is not set +# CONFIG_PACKAGE_libvorbisidec is not set +# CONFIG_PACKAGE_libvpx is not set +# CONFIG_PACKAGE_libwebp is not set +# CONFIG_PACKAGE_libwebsockets-full is not set +# CONFIG_PACKAGE_libwebsockets-mbedtls is not set +# CONFIG_PACKAGE_libwebsockets-openssl is not set +# CONFIG_PACKAGE_libwrap is not set +# CONFIG_PACKAGE_libwxbase is not set +# CONFIG_PACKAGE_libxerces-c is not set +# CONFIG_PACKAGE_libxerces-c-samples is not set +# CONFIG_PACKAGE_libxml2 is not set +# CONFIG_PACKAGE_libxslt is not set +# CONFIG_PACKAGE_libyaml-cpp is not set +# CONFIG_PACKAGE_libyang is not set +# CONFIG_PACKAGE_libyang-cpp is not set +# CONFIG_PACKAGE_libyubikey is not set +# CONFIG_PACKAGE_libzmq-curve is not set +# CONFIG_PACKAGE_libzmq-nc is not set +# CONFIG_PACKAGE_linux-atm is not set +# CONFIG_PACKAGE_lmdb is not set +# CONFIG_PACKAGE_log4cplus is not set +# CONFIG_PACKAGE_loudmouth is not set +# CONFIG_PACKAGE_lttng-ust is not set +# CONFIG_PACKAGE_minizip is not set +# CONFIG_PACKAGE_msgpack-c is not set +# CONFIG_PACKAGE_mtdev is not set +# CONFIG_PACKAGE_musl-fts is not set +# CONFIG_PACKAGE_mxml is not set +# CONFIG_PACKAGE_nspr is not set +# CONFIG_PACKAGE_oniguruma is not set +# CONFIG_PACKAGE_open-isns is not set +# CONFIG_PACKAGE_openpgm is not set +# CONFIG_PACKAGE_p11-kit is not set +# CONFIG_PACKAGE_pixman is not set +# CONFIG_PACKAGE_poco is not set +# CONFIG_PACKAGE_poco-all is not set +# CONFIG_PACKAGE_protobuf is not set +# CONFIG_PACKAGE_protobuf-lite is not set +# CONFIG_PACKAGE_pthsem is not set +# CONFIG_PACKAGE_rblibtorrent is not set +# CONFIG_PACKAGE_re2 is not set +CONFIG_PACKAGE_rpcd-mod-rrdns=y +# CONFIG_PACKAGE_sbc is not set +# CONFIG_PACKAGE_serdisplib is not set +# CONFIG_PACKAGE_taglib is not set +# CONFIG_PACKAGE_terminfo is not set +# CONFIG_PACKAGE_tinycdb is not set +# CONFIG_PACKAGE_uclibcxx is not set +# CONFIG_PACKAGE_uw-imap is not set +# CONFIG_PACKAGE_xmlrpc-c is not set +# CONFIG_PACKAGE_xmlrpc-c-client is not set +# CONFIG_PACKAGE_xmlrpc-c-server is not set +# CONFIG_PACKAGE_yajl is not set +# CONFIG_PACKAGE_yubico-pam is not set +CONFIG_PACKAGE_zlib=y + +# +# Configuration +# +CONFIG_ZLIB_OPTIMIZE_SPEED=y +# end of Configuration +# end of Libraries + +# +# LuCI +# + +# +# 1. Collections +# +CONFIG_PACKAGE_luci=y +# CONFIG_PACKAGE_luci-lib-docker is not set +# CONFIG_PACKAGE_luci-nginx is not set +# CONFIG_PACKAGE_luci-ssl-nginx is not set +# CONFIG_PACKAGE_luci-ssl-openssl is not set +# end of 1. Collections + +# +# 2. Modules +# +CONFIG_PACKAGE_luci-base=y +# CONFIG_LUCI_SRCDIET is not set + +# +# Translations +# +# CONFIG_LUCI_LANG_uk is not set +# CONFIG_LUCI_LANG_hu is not set +# CONFIG_LUCI_LANG_pt is not set +# CONFIG_LUCI_LANG_no is not set +# CONFIG_LUCI_LANG_en is not set +# CONFIG_LUCI_LANG_pl is not set +# CONFIG_LUCI_LANG_sk is not set +# CONFIG_LUCI_LANG_ja is not set +# CONFIG_LUCI_LANG_vi is not set +# CONFIG_LUCI_LANG_de is not set +# CONFIG_LUCI_LANG_ro is not set +# CONFIG_LUCI_LANG_ms is not set +CONFIG_LUCI_LANG_zh-cn=y +# CONFIG_LUCI_LANG_ko is not set +# CONFIG_LUCI_LANG_he is not set +# CONFIG_LUCI_LANG_zh-tw is not set +# CONFIG_LUCI_LANG_tr is not set +# CONFIG_LUCI_LANG_sv is not set +# CONFIG_LUCI_LANG_ru is not set +# CONFIG_LUCI_LANG_el is not set +# CONFIG_LUCI_LANG_ca is not set +# CONFIG_LUCI_LANG_es is not set +# CONFIG_LUCI_LANG_pt-br is not set +# CONFIG_LUCI_LANG_cs is not set +# CONFIG_LUCI_LANG_fr is not set +# CONFIG_LUCI_LANG_it is not set +# end of Translations + +# CONFIG_PACKAGE_luci-compat is not set +CONFIG_PACKAGE_luci-mod-admin-full=y +# CONFIG_PACKAGE_luci-mod-failsafe is not set +# CONFIG_PACKAGE_luci-mod-rpc is not set +CONFIG_PACKAGE_luci-newapi=y +# end of 2. Modules + +# +# 3. Applications +# +CONFIG_PACKAGE_luci-app-accesscontrol=y +# CONFIG_PACKAGE_luci-app-adblock is not set +# CONFIG_PACKAGE_luci-app-adbyby-plus is not set +# CONFIG_PACKAGE_luci-app-advanced-reboot is not set +# CONFIG_PACKAGE_luci-app-ahcp is not set +# CONFIG_PACKAGE_luci-app-airplay2 is not set +# CONFIG_PACKAGE_luci-app-amule is not set +# CONFIG_PACKAGE_luci-app-aria2 is not set +CONFIG_PACKAGE_luci-app-arpbind=y +# CONFIG_PACKAGE_luci-app-asterisk is not set +# CONFIG_PACKAGE_luci-app-attendedsysupgrade is not set +CONFIG_PACKAGE_luci-app-autoreboot=y +# CONFIG_PACKAGE_luci-app-baidupcs-web is not set +# CONFIG_PACKAGE_luci-app-bcp38 is not set +# CONFIG_PACKAGE_luci-app-bird1-ipv4 is not set +# CONFIG_PACKAGE_luci-app-bird1-ipv6 is not set +# CONFIG_PACKAGE_luci-app-bmx6 is not set +# CONFIG_PACKAGE_luci-app-cifs-mount is not set +# CONFIG_PACKAGE_luci-app-cifsd is not set +# CONFIG_PACKAGE_luci-app-cjdns is not set +# CONFIG_PACKAGE_luci-app-clamav is not set +# CONFIG_PACKAGE_luci-app-commands is not set +# CONFIG_PACKAGE_luci-app-cpufreq is not set +# CONFIG_PACKAGE_luci-app-cshark is not set +CONFIG_PACKAGE_luci-app-ddns=y +# CONFIG_PACKAGE_luci-app-diag-core is not set +# CONFIG_PACKAGE_luci-app-diskman is not set +CONFIG_PACKAGE_luci-app-diskman_INCLUDE_btrfs_progs=y +CONFIG_PACKAGE_luci-app-diskman_INCLUDE_lsblk=y +# CONFIG_PACKAGE_luci-app-diskman_INCLUDE_mdadm is not set +# CONFIG_PACKAGE_luci-app-dnscrypt-proxy is not set +# CONFIG_PACKAGE_luci-app-dnsfilter is not set +# CONFIG_PACKAGE_luci-app-dnsforwarder is not set +# CONFIG_PACKAGE_luci-app-docker is not set +# CONFIG_PACKAGE_luci-app-dump1090 is not set +# CONFIG_PACKAGE_luci-app-dynapoint is not set +# CONFIG_PACKAGE_luci-app-e2guardian is not set +# CONFIG_PACKAGE_luci-app-easymesh is not set +# CONFIG_PACKAGE_luci-app-familycloud is not set +CONFIG_PACKAGE_luci-app-filetransfer=y +CONFIG_PACKAGE_luci-app-firewall=y +# CONFIG_PACKAGE_luci-app-frpc is not set +# CONFIG_PACKAGE_luci-app-frps is not set +# CONFIG_PACKAGE_luci-app-fwknopd is not set +# CONFIG_PACKAGE_luci-app-guest-wifi is not set +# CONFIG_PACKAGE_luci-app-haproxy-tcp is not set +# CONFIG_PACKAGE_luci-app-hd-idle is not set +# CONFIG_PACKAGE_luci-app-hnet is not set +# CONFIG_PACKAGE_luci-app-https-dns-proxy is not set +# CONFIG_PACKAGE_luci-app-ipsec-vpnd is not set +# CONFIG_PACKAGE_luci-app-jd-dailybonus is not set +# CONFIG_PACKAGE_luci-app-kodexplorer is not set +# CONFIG_PACKAGE_luci-app-lxc is not set +# CONFIG_PACKAGE_luci-app-minidlna is not set +# CONFIG_PACKAGE_luci-app-mjpg-streamer is not set +# CONFIG_PACKAGE_luci-app-music-remote-center is not set +# CONFIG_PACKAGE_luci-app-mwan3 is not set +# CONFIG_PACKAGE_luci-app-mwan3helper is not set +# CONFIG_PACKAGE_luci-app-n2n_v2 is not set +# CONFIG_PACKAGE_luci-app-netdata is not set +# CONFIG_PACKAGE_luci-app-nfs is not set +# CONFIG_PACKAGE_luci-app-nft-qos is not set +CONFIG_PACKAGE_luci-app-nlbwmon=y +# CONFIG_PACKAGE_luci-app-noddos is not set +# CONFIG_PACKAGE_luci-app-nps is not set +# CONFIG_PACKAGE_luci-app-ntpc is not set +# CONFIG_PACKAGE_luci-app-ocserv is not set +# CONFIG_PACKAGE_luci-app-olsr is not set +# CONFIG_PACKAGE_luci-app-olsr-services is not set +# CONFIG_PACKAGE_luci-app-olsr-viz is not set +# CONFIG_PACKAGE_luci-app-openvpn is not set +# CONFIG_PACKAGE_luci-app-openvpn-server is not set +# CONFIG_PACKAGE_luci-app-p910nd is not set +# CONFIG_PACKAGE_luci-app-pagekitec is not set +# CONFIG_PACKAGE_luci-app-polipo is not set +# CONFIG_PACKAGE_luci-app-pppoe-relay is not set +# CONFIG_PACKAGE_luci-app-privoxy is not set +# CONFIG_PACKAGE_luci-app-ps3netsrv is not set +# CONFIG_PACKAGE_luci-app-qbittorrent is not set +CONFIG_PACKAGE_luci-app-qbittorrent_static=y +# CONFIG_PACKAGE_luci-app-qbittorrent_dynamic is not set +# CONFIG_PACKAGE_luci-app-qos is not set +# CONFIG_PACKAGE_luci-app-radicale is not set +CONFIG_PACKAGE_luci-app-ramfree=y +# CONFIG_PACKAGE_luci-app-rclone is not set +CONFIG_PACKAGE_luci-app-rclone_INCLUDE_rclone-webui=y +CONFIG_PACKAGE_luci-app-rclone_INCLUDE_rclone-ng=y +CONFIG_PACKAGE_luci-app-rclone_INCLUDE_fuse-utils=y +# CONFIG_PACKAGE_luci-app-rp-pppoe-server is not set +# CONFIG_PACKAGE_luci-app-samba is not set +# CONFIG_PACKAGE_luci-app-samba4 is not set +# CONFIG_PACKAGE_luci-app-shadowsocks-libev is not set +# CONFIG_PACKAGE_luci-app-shairplay is not set +# CONFIG_PACKAGE_luci-app-siitwizard is not set +# CONFIG_PACKAGE_luci-app-simple-adblock is not set +# CONFIG_PACKAGE_luci-app-softethervpn is not set +# CONFIG_PACKAGE_luci-app-splash is not set +# CONFIG_PACKAGE_luci-app-sqm is not set +# CONFIG_PACKAGE_luci-app-squid is not set +CONFIG_PACKAGE_luci-app-ssr-plus=y +# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Kcptun is not set +# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_NaiveProxy is not set +# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Redsocks2 is not set +CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Shadowsocks_Libev_Client=y +CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Shadowsocks_Libev_Server=y +# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Shadowsocks_Rust_Client is not set +# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Shadowsocks_Rust_Server is not set +CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_ShadowsocksR_Libev_Client=y +CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_ShadowsocksR_Libev_Server=y +CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Simple_Obfs=y +# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Trojan is not set +# CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_V2ray_Plugin is not set +CONFIG_PACKAGE_luci-app-ssr-plus_INCLUDE_Xray=y +# CONFIG_PACKAGE_luci-app-ssrserver-python is not set +# CONFIG_PACKAGE_luci-app-statistics is not set +# CONFIG_PACKAGE_luci-app-syncdial is not set +# CONFIG_PACKAGE_luci-app-tinyproxy is not set +# CONFIG_PACKAGE_luci-app-transmission is not set +# CONFIG_PACKAGE_luci-app-travelmate is not set +# CONFIG_PACKAGE_luci-app-ttyd is not set +CONFIG_PACKAGE_luci-app-turboacc=y +# CONFIG_PACKAGE_TURBOACC_INCLUDE_OFFLOADING is not set +# CONFIG_PACKAGE_TURBOACC_INCLUDE_SHORTCUT_FE is not set +CONFIG_PACKAGE_TURBOACC_INCLUDE_BBR_CCA=y +# CONFIG_PACKAGE_TURBOACC_INCLUDE_DNSFORWARDER is not set +# CONFIG_PACKAGE_TURBOACC_INCLUDE_DNSPROXY is not set +# CONFIG_PACKAGE_luci-app-udpxy is not set +# CONFIG_PACKAGE_luci-app-uhttpd is not set +CONFIG_PACKAGE_luci-app-unblockmusic=y +CONFIG_UnblockNeteaseMusic_Go=y +# CONFIG_UnblockNeteaseMusic_NodeJS is not set +# CONFIG_PACKAGE_luci-app-unbound is not set +CONFIG_PACKAGE_luci-app-upnp=y +# CONFIG_PACKAGE_luci-app-usb-printer is not set +# CONFIG_PACKAGE_luci-app-uugamebooster is not set +# CONFIG_PACKAGE_luci-app-v2ray-server is not set +# CONFIG_PACKAGE_luci-app-verysync is not set +CONFIG_PACKAGE_luci-app-vlmcsd=y +# CONFIG_PACKAGE_luci-app-vnstat is not set +# CONFIG_PACKAGE_luci-app-vpnbypass is not set +CONFIG_PACKAGE_luci-app-vsftpd=y +# CONFIG_PACKAGE_luci-app-watchcat is not set +# CONFIG_PACKAGE_luci-app-webadmin is not set +# CONFIG_PACKAGE_luci-app-wifischedule is not set +# CONFIG_PACKAGE_luci-app-wireguard is not set +CONFIG_PACKAGE_luci-app-wol=y +# CONFIG_PACKAGE_luci-app-wrtbwmon is not set +# CONFIG_PACKAGE_luci-app-xlnetacc is not set +# CONFIG_PACKAGE_luci-app-zerotier is not set +# end of 3. Applications + +# +# 4. Themes +# +# CONFIG_PACKAGE_luci-theme-argon is not set +CONFIG_PACKAGE_luci-theme-bootstrap=y +# CONFIG_PACKAGE_luci-theme-material is not set +# CONFIG_PACKAGE_luci-theme-netgear is not set +# end of 4. Themes + +# +# 5. Protocols +# +# CONFIG_PACKAGE_luci-proto-3g is not set +# CONFIG_PACKAGE_luci-proto-bonding is not set +# CONFIG_PACKAGE_luci-proto-ipip is not set +# CONFIG_PACKAGE_luci-proto-ipv6 is not set +# CONFIG_PACKAGE_luci-proto-ncm is not set +# CONFIG_PACKAGE_luci-proto-openconnect is not set +CONFIG_PACKAGE_luci-proto-ppp=y +# CONFIG_PACKAGE_luci-proto-qmi is not set +# CONFIG_PACKAGE_luci-proto-relay is not set +# CONFIG_PACKAGE_luci-proto-vpnc is not set +# CONFIG_PACKAGE_luci-proto-wireguard is not set +# end of 5. Protocols + +# +# 6. Libraries +# +# CONFIG_PACKAGE_luci-lib-dracula is not set +# CONFIG_PACKAGE_luci-lib-httpclient is not set +# CONFIG_PACKAGE_luci-lib-httpprotoutils is not set +CONFIG_PACKAGE_luci-lib-ip=y +# CONFIG_PACKAGE_luci-lib-iptparser is not set +# CONFIG_PACKAGE_luci-lib-jquery-1-4 is not set +# CONFIG_PACKAGE_luci-lib-json is not set +CONFIG_PACKAGE_luci-lib-jsonc=y +# CONFIG_PACKAGE_luci-lib-luaneightbl is not set +CONFIG_PACKAGE_luci-lib-nixio=y +# CONFIG_PACKAGE_luci-lib-nixio_notls is not set +# CONFIG_PACKAGE_luci-lib-nixio_axtls is not set +# CONFIG_PACKAGE_luci-lib-nixio_cyassl is not set +CONFIG_PACKAGE_luci-lib-nixio_openssl=y +# CONFIG_PACKAGE_luci-lib-px5g is not set +# end of 6. Libraries + +CONFIG_PACKAGE_default-settings=y +CONFIG_PACKAGE_luci-i18n-accesscontrol-zh-cn=y +CONFIG_PACKAGE_luci-i18n-arpbind-zh-cn=y +CONFIG_PACKAGE_luci-i18n-autoreboot-zh-cn=y +# CONFIG_PACKAGE_luci-i18n-base-ca is not set +# CONFIG_PACKAGE_luci-i18n-base-cs is not set +# CONFIG_PACKAGE_luci-i18n-base-de is not set +# CONFIG_PACKAGE_luci-i18n-base-el is not set +# CONFIG_PACKAGE_luci-i18n-base-en is not set +# CONFIG_PACKAGE_luci-i18n-base-es is not set +# CONFIG_PACKAGE_luci-i18n-base-fr is not set +# CONFIG_PACKAGE_luci-i18n-base-he is not set +# CONFIG_PACKAGE_luci-i18n-base-hu is not set +# CONFIG_PACKAGE_luci-i18n-base-it is not set +# CONFIG_PACKAGE_luci-i18n-base-ja is not set +# CONFIG_PACKAGE_luci-i18n-base-ko is not set +# CONFIG_PACKAGE_luci-i18n-base-ms is not set +# CONFIG_PACKAGE_luci-i18n-base-no is not set +# CONFIG_PACKAGE_luci-i18n-base-pl is not set +# CONFIG_PACKAGE_luci-i18n-base-pt is not set +# CONFIG_PACKAGE_luci-i18n-base-pt-br is not set +# CONFIG_PACKAGE_luci-i18n-base-ro is not set +# CONFIG_PACKAGE_luci-i18n-base-ru is not set +# CONFIG_PACKAGE_luci-i18n-base-sk is not set +# CONFIG_PACKAGE_luci-i18n-base-sv is not set +# CONFIG_PACKAGE_luci-i18n-base-tr is not set +# CONFIG_PACKAGE_luci-i18n-base-uk is not set +# CONFIG_PACKAGE_luci-i18n-base-vi is not set +CONFIG_PACKAGE_luci-i18n-base-zh-cn=y +# CONFIG_PACKAGE_luci-i18n-base-zh-tw is not set +# CONFIG_PACKAGE_luci-i18n-ddns-bg is not set +# CONFIG_PACKAGE_luci-i18n-ddns-ca is not set +# CONFIG_PACKAGE_luci-i18n-ddns-cs is not set +# CONFIG_PACKAGE_luci-i18n-ddns-de is not set +# CONFIG_PACKAGE_luci-i18n-ddns-el is not set +# CONFIG_PACKAGE_luci-i18n-ddns-en is not set +# CONFIG_PACKAGE_luci-i18n-ddns-es is not set +# CONFIG_PACKAGE_luci-i18n-ddns-fr is not set +# CONFIG_PACKAGE_luci-i18n-ddns-he is not set +# CONFIG_PACKAGE_luci-i18n-ddns-hi is not set +# CONFIG_PACKAGE_luci-i18n-ddns-hu is not set +# CONFIG_PACKAGE_luci-i18n-ddns-it is not set +# CONFIG_PACKAGE_luci-i18n-ddns-ja is not set +# CONFIG_PACKAGE_luci-i18n-ddns-ko is not set +# CONFIG_PACKAGE_luci-i18n-ddns-mr is not set +# CONFIG_PACKAGE_luci-i18n-ddns-ms is not set +# CONFIG_PACKAGE_luci-i18n-ddns-no is not set +# CONFIG_PACKAGE_luci-i18n-ddns-pl is not set +# CONFIG_PACKAGE_luci-i18n-ddns-pt is not set +# CONFIG_PACKAGE_luci-i18n-ddns-pt-br is not set +# CONFIG_PACKAGE_luci-i18n-ddns-ro is not set +# CONFIG_PACKAGE_luci-i18n-ddns-ru is not set +# CONFIG_PACKAGE_luci-i18n-ddns-sk is not set +# CONFIG_PACKAGE_luci-i18n-ddns-sv is not set +# CONFIG_PACKAGE_luci-i18n-ddns-tr is not set +# CONFIG_PACKAGE_luci-i18n-ddns-uk is not set +# CONFIG_PACKAGE_luci-i18n-ddns-vi is not set +CONFIG_PACKAGE_luci-i18n-ddns-zh-cn=y +# CONFIG_PACKAGE_luci-i18n-ddns-zh-tw is not set +CONFIG_PACKAGE_luci-i18n-filetransfer-zh-cn=y +# CONFIG_PACKAGE_luci-i18n-firewall-ca is not set +# CONFIG_PACKAGE_luci-i18n-firewall-cs is not set +# CONFIG_PACKAGE_luci-i18n-firewall-de is not set +# CONFIG_PACKAGE_luci-i18n-firewall-el is not set +# CONFIG_PACKAGE_luci-i18n-firewall-en is not set +# CONFIG_PACKAGE_luci-i18n-firewall-es is not set +# CONFIG_PACKAGE_luci-i18n-firewall-fr is not set +# CONFIG_PACKAGE_luci-i18n-firewall-he is not set +# CONFIG_PACKAGE_luci-i18n-firewall-hu is not set +# CONFIG_PACKAGE_luci-i18n-firewall-it is not set +# CONFIG_PACKAGE_luci-i18n-firewall-ja is not set +# CONFIG_PACKAGE_luci-i18n-firewall-ko is not set +# CONFIG_PACKAGE_luci-i18n-firewall-ms is not set +# CONFIG_PACKAGE_luci-i18n-firewall-no is not set +# CONFIG_PACKAGE_luci-i18n-firewall-pl is not set +# CONFIG_PACKAGE_luci-i18n-firewall-pt is not set +# CONFIG_PACKAGE_luci-i18n-firewall-pt-br is not set +# CONFIG_PACKAGE_luci-i18n-firewall-ro is not set +# CONFIG_PACKAGE_luci-i18n-firewall-ru is not set +# CONFIG_PACKAGE_luci-i18n-firewall-sk is not set +# CONFIG_PACKAGE_luci-i18n-firewall-sv is not set +# CONFIG_PACKAGE_luci-i18n-firewall-tr is not set +# CONFIG_PACKAGE_luci-i18n-firewall-uk is not set +# CONFIG_PACKAGE_luci-i18n-firewall-vi is not set +CONFIG_PACKAGE_luci-i18n-firewall-zh-cn=y +# CONFIG_PACKAGE_luci-i18n-firewall-zh-tw is not set +# CONFIG_PACKAGE_luci-i18n-nlbwmon-ja is not set +# CONFIG_PACKAGE_luci-i18n-nlbwmon-ru is not set +CONFIG_PACKAGE_luci-i18n-nlbwmon-zh-cn=y +CONFIG_PACKAGE_luci-i18n-ramfree-zh-cn=y +CONFIG_PACKAGE_luci-i18n-ssr-plus-zh-cn=y +# CONFIG_PACKAGE_luci-i18n-ssr-plus-zh_Hans is not set +CONFIG_PACKAGE_luci-i18n-turboacc-zh-cn=y +CONFIG_PACKAGE_luci-i18n-unblockmusic-zh-cn=y +# CONFIG_PACKAGE_luci-i18n-upnp-ca is not set +# CONFIG_PACKAGE_luci-i18n-upnp-cs is not set +# CONFIG_PACKAGE_luci-i18n-upnp-de is not set +# CONFIG_PACKAGE_luci-i18n-upnp-el is not set +# CONFIG_PACKAGE_luci-i18n-upnp-en is not set +# CONFIG_PACKAGE_luci-i18n-upnp-es is not set +# CONFIG_PACKAGE_luci-i18n-upnp-fr is not set +# CONFIG_PACKAGE_luci-i18n-upnp-he is not set +# CONFIG_PACKAGE_luci-i18n-upnp-hu is not set +# CONFIG_PACKAGE_luci-i18n-upnp-it is not set +# CONFIG_PACKAGE_luci-i18n-upnp-ja is not set +# CONFIG_PACKAGE_luci-i18n-upnp-ms is not set +# CONFIG_PACKAGE_luci-i18n-upnp-no is not set +# CONFIG_PACKAGE_luci-i18n-upnp-pl is not set +# CONFIG_PACKAGE_luci-i18n-upnp-pt is not set +# CONFIG_PACKAGE_luci-i18n-upnp-pt-br is not set +# CONFIG_PACKAGE_luci-i18n-upnp-ro is not set +# CONFIG_PACKAGE_luci-i18n-upnp-ru is not set +# CONFIG_PACKAGE_luci-i18n-upnp-sk is not set +# CONFIG_PACKAGE_luci-i18n-upnp-sv is not set +# CONFIG_PACKAGE_luci-i18n-upnp-tr is not set +# CONFIG_PACKAGE_luci-i18n-upnp-uk is not set +# CONFIG_PACKAGE_luci-i18n-upnp-vi is not set +CONFIG_PACKAGE_luci-i18n-upnp-zh-cn=y +# CONFIG_PACKAGE_luci-i18n-upnp-zh-tw is not set +CONFIG_PACKAGE_luci-i18n-vlmcsd-zh-cn=y +CONFIG_PACKAGE_luci-i18n-vsftpd-zh-cn=y +# CONFIG_PACKAGE_luci-i18n-wol-ca is not set +# CONFIG_PACKAGE_luci-i18n-wol-cs is not set +# CONFIG_PACKAGE_luci-i18n-wol-de is not set +# CONFIG_PACKAGE_luci-i18n-wol-el is not set +# CONFIG_PACKAGE_luci-i18n-wol-en is not set +# CONFIG_PACKAGE_luci-i18n-wol-es is not set +# CONFIG_PACKAGE_luci-i18n-wol-fr is not set +# CONFIG_PACKAGE_luci-i18n-wol-he is not set +# CONFIG_PACKAGE_luci-i18n-wol-hu is not set +# CONFIG_PACKAGE_luci-i18n-wol-it is not set +# CONFIG_PACKAGE_luci-i18n-wol-ja is not set +# CONFIG_PACKAGE_luci-i18n-wol-ms is not set +# CONFIG_PACKAGE_luci-i18n-wol-no is not set +# CONFIG_PACKAGE_luci-i18n-wol-pl is not set +# CONFIG_PACKAGE_luci-i18n-wol-pt is not set +# CONFIG_PACKAGE_luci-i18n-wol-pt-br is not set +# CONFIG_PACKAGE_luci-i18n-wol-ro is not set +# CONFIG_PACKAGE_luci-i18n-wol-ru is not set +# CONFIG_PACKAGE_luci-i18n-wol-sk is not set +# CONFIG_PACKAGE_luci-i18n-wol-sv is not set +# CONFIG_PACKAGE_luci-i18n-wol-tr is not set +# CONFIG_PACKAGE_luci-i18n-wol-uk is not set +# CONFIG_PACKAGE_luci-i18n-wol-vi is not set +CONFIG_PACKAGE_luci-i18n-wol-zh-cn=y +# CONFIG_PACKAGE_luci-i18n-wol-zh-tw is not set +# end of LuCI + +# +# Mail +# +# CONFIG_PACKAGE_alpine is not set +# CONFIG_PACKAGE_bogofilter is not set +# CONFIG_PACKAGE_dovecot is not set +# CONFIG_PACKAGE_dovecot-pigeonhole is not set +# CONFIG_PACKAGE_dovecot-utils is not set +# CONFIG_PACKAGE_emailrelay is not set +# CONFIG_PACKAGE_exim is not set +# CONFIG_PACKAGE_exim-gnutls is not set +# CONFIG_PACKAGE_exim-ldap is not set +# CONFIG_PACKAGE_exim-openssl is not set +# CONFIG_PACKAGE_fdm is not set +# CONFIG_PACKAGE_greyfix is not set +# CONFIG_PACKAGE_mailsend is not set +# CONFIG_PACKAGE_mailsend-nossl is not set +# CONFIG_PACKAGE_msmtp is not set +# CONFIG_PACKAGE_msmtp-mta is not set +# CONFIG_PACKAGE_msmtp-nossl is not set +# CONFIG_PACKAGE_msmtp-queue is not set +# CONFIG_PACKAGE_mutt is not set +# CONFIG_PACKAGE_nail is not set +# CONFIG_PACKAGE_opendkim is not set +# CONFIG_PACKAGE_opendkim-tools is not set +# CONFIG_PACKAGE_postfix is not set + +# +# Select postfix build options +# +CONFIG_POSTFIX_TLS=y +CONFIG_POSTFIX_SASL=y +CONFIG_POSTFIX_LDAP=y +# CONFIG_POSTFIX_DB is not set +CONFIG_POSTFIX_CDB=y +CONFIG_POSTFIX_SQLITE=y +# CONFIG_POSTFIX_MYSQL is not set +# CONFIG_POSTFIX_PGSQL is not set +CONFIG_POSTFIX_PCRE=y +# CONFIG_POSTFIX_EAI is not set +# end of Select postfix build options + +# CONFIG_PACKAGE_spamc is not set +# CONFIG_PACKAGE_spamc-ssl is not set +# end of Mail + +# +# Multimedia +# + +# +# Streaming +# +# CONFIG_PACKAGE_oggfwd is not set +# end of Streaming + +# CONFIG_PACKAGE_UnblockNeteaseMusic is not set +# CONFIG_PACKAGE_ffmpeg is not set +# CONFIG_PACKAGE_ffprobe is not set +# CONFIG_PACKAGE_fswebcam is not set +# CONFIG_PACKAGE_gerbera is not set +# CONFIG_PACKAGE_gmediarender is not set +# CONFIG_PACKAGE_gphoto2 is not set +# CONFIG_PACKAGE_graphicsmagick is not set +# CONFIG_PACKAGE_grilo is not set +# CONFIG_PACKAGE_grilo-plugins is not set +# CONFIG_PACKAGE_gst1-libav is not set +# CONFIG_PACKAGE_gstreamer1-libs is not set +# CONFIG_PACKAGE_gstreamer1-plugins-bad is not set +# CONFIG_PACKAGE_gstreamer1-plugins-base is not set +# CONFIG_PACKAGE_gstreamer1-plugins-good is not set +# CONFIG_PACKAGE_gstreamer1-plugins-ugly is not set +# CONFIG_PACKAGE_gstreamer1-utils is not set +# CONFIG_PACKAGE_icecast is not set +# CONFIG_PACKAGE_imagemagick is not set +# CONFIG_PACKAGE_lcdgrilo is not set +# CONFIG_PACKAGE_minidlna is not set +# CONFIG_PACKAGE_minisatip is not set +# CONFIG_PACKAGE_mjpg-streamer is not set +# CONFIG_PACKAGE_motion is not set +# CONFIG_PACKAGE_tvheadend is not set +# CONFIG_PACKAGE_v4l2rtspserver is not set +# CONFIG_PACKAGE_vips is not set +# CONFIG_PACKAGE_xupnpd is not set +# CONFIG_PACKAGE_youtube-dl is not set +# end of Multimedia + +# +# Network +# + +# +# BitTorrent +# +# CONFIG_PACKAGE_mktorrent is not set +# CONFIG_PACKAGE_opentracker is not set +# CONFIG_PACKAGE_opentracker6 is not set +# CONFIG_PACKAGE_qBittorrent-static is not set +# CONFIG_PACKAGE_qbittorrent is not set +# CONFIG_PACKAGE_rtorrent is not set +# CONFIG_PACKAGE_rtorrent-rpc is not set +# CONFIG_PACKAGE_transmission-cli-openssl is not set +# CONFIG_PACKAGE_transmission-daemon-openssl is not set +# CONFIG_PACKAGE_transmission-remote-openssl is not set +# CONFIG_PACKAGE_transmission-web is not set +# CONFIG_PACKAGE_transmission-web-control is not set +# end of BitTorrent + +# +# Captive Portals +# +# CONFIG_PACKAGE_apfree-wifidog is not set +# CONFIG_PACKAGE_coova-chilli is not set +# CONFIG_PACKAGE_nodogsplash is not set +# CONFIG_PACKAGE_opennds is not set +# CONFIG_PACKAGE_wifidog is not set +# CONFIG_PACKAGE_wifidog-tls is not set +# end of Captive Portals + +# +# Cloud Manager +# +# CONFIG_PACKAGE_rclone-ng is not set +# CONFIG_PACKAGE_rclone-webui-react is not set +# end of Cloud Manager + +# +# Dial-in/up +# +# CONFIG_PACKAGE_rp-pppoe-common is not set +# CONFIG_PACKAGE_rp-pppoe-relay is not set +# CONFIG_PACKAGE_rp-pppoe-server is not set +# end of Dial-in/up + +# +# Download Manager +# +# CONFIG_PACKAGE_ariang is not set +# CONFIG_PACKAGE_ariang-nginx is not set +# CONFIG_PACKAGE_leech is not set +# CONFIG_PACKAGE_webui-aria2 is not set +# end of Download Manager + +# +# File Transfer +# +# CONFIG_PACKAGE_aria2 is not set +# CONFIG_PACKAGE_atftp is not set +# CONFIG_PACKAGE_atftpd is not set +CONFIG_PACKAGE_curl=y +# CONFIG_PACKAGE_gnurl is not set +# CONFIG_PACKAGE_lftp is not set +# CONFIG_PACKAGE_ps3netsrv is not set +# CONFIG_PACKAGE_rosy-file-server is not set +# CONFIG_PACKAGE_rsync is not set +# CONFIG_PACKAGE_rsyncd is not set +# CONFIG_PACKAGE_vsftpd is not set +CONFIG_PACKAGE_vsftpd-alt=y +CONFIG_VSFTPD_USE_UCI_SCRIPTS=y +# CONFIG_PACKAGE_vsftpd-tls is not set +# CONFIG_PACKAGE_wget-nossl is not set +CONFIG_PACKAGE_wget-ssl=y +# end of File Transfer + +# +# Filesystem +# +# CONFIG_PACKAGE_davfs2 is not set +# CONFIG_PACKAGE_ksmbd-avahi-service is not set +# CONFIG_PACKAGE_ksmbd-server is not set +# CONFIG_PACKAGE_ksmbd-utils is not set +# CONFIG_PACKAGE_netatalk is not set +# CONFIG_PACKAGE_nfs-kernel-server is not set +# CONFIG_PACKAGE_owftpd is not set +# CONFIG_PACKAGE_owhttpd is not set +# CONFIG_PACKAGE_owserver is not set +# CONFIG_PACKAGE_sshfs is not set +# end of Filesystem + +# +# Firewall +# +# CONFIG_PACKAGE_arptables is not set +# CONFIG_PACKAGE_conntrack is not set +# CONFIG_PACKAGE_conntrackd is not set +# CONFIG_PACKAGE_ebtables is not set +# CONFIG_PACKAGE_fwknop is not set +# CONFIG_PACKAGE_fwknopd is not set +# CONFIG_PACKAGE_ip6tables is not set +CONFIG_PACKAGE_iptables=y +# CONFIG_IPTABLES_CONNLABEL is not set +# CONFIG_IPTABLES_NFTABLES is not set +# CONFIG_PACKAGE_iptables-mod-account is not set +# CONFIG_PACKAGE_iptables-mod-chaos is not set +# CONFIG_PACKAGE_iptables-mod-checksum is not set +# CONFIG_PACKAGE_iptables-mod-cluster is not set +# CONFIG_PACKAGE_iptables-mod-clusterip is not set +# CONFIG_PACKAGE_iptables-mod-condition is not set +# CONFIG_PACKAGE_iptables-mod-conntrack-extra is not set +# CONFIG_PACKAGE_iptables-mod-delude is not set +# CONFIG_PACKAGE_iptables-mod-dhcpmac is not set +# CONFIG_PACKAGE_iptables-mod-dnetmap is not set +CONFIG_PACKAGE_iptables-mod-extra=y +# CONFIG_PACKAGE_iptables-mod-filter is not set +CONFIG_PACKAGE_iptables-mod-fullconenat=y +# CONFIG_PACKAGE_iptables-mod-fuzzy is not set +# CONFIG_PACKAGE_iptables-mod-geoip is not set +# CONFIG_PACKAGE_iptables-mod-hashlimit is not set +# CONFIG_PACKAGE_iptables-mod-iface is not set +# CONFIG_PACKAGE_iptables-mod-ipmark is not set +# CONFIG_PACKAGE_iptables-mod-ipopt is not set +# CONFIG_PACKAGE_iptables-mod-ipp2p is not set +# CONFIG_PACKAGE_iptables-mod-iprange is not set +# CONFIG_PACKAGE_iptables-mod-ipsec is not set +# CONFIG_PACKAGE_iptables-mod-ipv4options is not set +# CONFIG_PACKAGE_iptables-mod-led is not set +# CONFIG_PACKAGE_iptables-mod-length2 is not set +# CONFIG_PACKAGE_iptables-mod-logmark is not set +# CONFIG_PACKAGE_iptables-mod-lscan is not set +# CONFIG_PACKAGE_iptables-mod-lua is not set +# CONFIG_PACKAGE_iptables-mod-nat-extra is not set +# CONFIG_PACKAGE_iptables-mod-nflog is not set +# CONFIG_PACKAGE_iptables-mod-nfqueue is not set +# CONFIG_PACKAGE_iptables-mod-physdev is not set +# CONFIG_PACKAGE_iptables-mod-proto is not set +# CONFIG_PACKAGE_iptables-mod-psd is not set +# CONFIG_PACKAGE_iptables-mod-quota2 is not set +# CONFIG_PACKAGE_iptables-mod-rpfilter is not set +# CONFIG_PACKAGE_iptables-mod-rtpengine is not set +# CONFIG_PACKAGE_iptables-mod-sysrq is not set +# CONFIG_PACKAGE_iptables-mod-tarpit is not set +# CONFIG_PACKAGE_iptables-mod-tee is not set +CONFIG_PACKAGE_iptables-mod-tproxy=y +# CONFIG_PACKAGE_iptables-mod-trace is not set +# CONFIG_PACKAGE_iptables-mod-u32 is not set +# CONFIG_PACKAGE_iptables-mod-ulog is not set +# CONFIG_PACKAGE_iptaccount is not set +# CONFIG_PACKAGE_iptgeoip is not set + +# +# Select iptgeoip options +# +# CONFIG_IPTGEOIP_PRESERVE is not set +# end of Select iptgeoip options + +# CONFIG_PACKAGE_miniupnpc is not set +CONFIG_PACKAGE_miniupnpd=y +# CONFIG_MINIUPNPD_IGDv2 is not set +# CONFIG_PACKAGE_natpmpc is not set +# CONFIG_PACKAGE_nftables-json is not set +# CONFIG_PACKAGE_nftables-nojson is not set +# CONFIG_PACKAGE_shorewall is not set +# CONFIG_PACKAGE_shorewall-core is not set +# CONFIG_PACKAGE_shorewall-lite is not set +# CONFIG_PACKAGE_shorewall6 is not set +# CONFIG_PACKAGE_shorewall6-lite is not set +# CONFIG_PACKAGE_snort is not set +# CONFIG_PACKAGE_snort3 is not set +# end of Firewall + +# +# Firewall Tunnel +# +# CONFIG_PACKAGE_iodine is not set +# CONFIG_PACKAGE_iodined is not set +# end of Firewall Tunnel + +# +# FreeRADIUS (version 3) +# +# CONFIG_PACKAGE_freeradius3 is not set +# CONFIG_PACKAGE_freeradius3-common is not set +# CONFIG_PACKAGE_freeradius3-utils is not set +# end of FreeRADIUS (version 3) + +# +# IP Addresses and Names +# +# CONFIG_PACKAGE_aggregate is not set +# CONFIG_PACKAGE_announce is not set +# CONFIG_PACKAGE_avahi-autoipd is not set +# CONFIG_PACKAGE_avahi-daemon-service-http is not set +# CONFIG_PACKAGE_avahi-daemon-service-ssh is not set +# CONFIG_PACKAGE_avahi-dbus-daemon is not set +# CONFIG_PACKAGE_avahi-dnsconfd is not set +# CONFIG_PACKAGE_avahi-nodbus-daemon is not set +# CONFIG_PACKAGE_avahi-utils is not set +# CONFIG_PACKAGE_bind-check is not set +# CONFIG_PACKAGE_bind-client is not set +# CONFIG_PACKAGE_bind-dig is not set +# CONFIG_PACKAGE_bind-dnssec is not set +# CONFIG_PACKAGE_bind-host is not set +# CONFIG_PACKAGE_bind-nslookup is not set +# CONFIG_PACKAGE_bind-rndc is not set +# CONFIG_PACKAGE_bind-server is not set +# CONFIG_PACKAGE_bind-tools is not set +CONFIG_PACKAGE_ddns-scripts=y +CONFIG_PACKAGE_ddns-scripts_aliyun=y +# CONFIG_PACKAGE_ddns-scripts_cloudflare.com-v4 is not set +CONFIG_PACKAGE_ddns-scripts_dnspod=y +# CONFIG_PACKAGE_ddns-scripts_freedns_42_pl is not set +# CONFIG_PACKAGE_ddns-scripts_godaddy.com-v1 is not set +# CONFIG_PACKAGE_ddns-scripts_no-ip_com is not set +# CONFIG_PACKAGE_ddns-scripts_nsupdate is not set +# CONFIG_PACKAGE_ddns-scripts_route53-v1 is not set +# CONFIG_PACKAGE_dhcp-forwarder is not set +CONFIG_PACKAGE_dns2socks=y +# CONFIG_PACKAGE_dnscrypt-proxy is not set +# CONFIG_PACKAGE_dnscrypt-proxy-resolvers is not set +# CONFIG_PACKAGE_dnsdist is not set +# CONFIG_PACKAGE_dnsproxy is not set +# CONFIG_DNSPROXY_COMPRESS_GOPROXY is not set +CONFIG_DNSPROXY_COMPRESS_UPX=y +# CONFIG_PACKAGE_drill is not set +# CONFIG_PACKAGE_hostip is not set +# CONFIG_PACKAGE_idn is not set +# CONFIG_PACKAGE_idn2 is not set +# CONFIG_PACKAGE_inadyn is not set +# CONFIG_PACKAGE_isc-dhcp-client-ipv4 is not set +# CONFIG_PACKAGE_isc-dhcp-client-ipv6 is not set +# CONFIG_PACKAGE_isc-dhcp-omshell-ipv4 is not set +# CONFIG_PACKAGE_isc-dhcp-omshell-ipv6 is not set +# CONFIG_PACKAGE_isc-dhcp-relay-ipv4 is not set +# CONFIG_PACKAGE_isc-dhcp-relay-ipv6 is not set +# CONFIG_PACKAGE_isc-dhcp-server-ipv4 is not set +# CONFIG_PACKAGE_isc-dhcp-server-ipv6 is not set +# CONFIG_PACKAGE_kadnode is not set +# CONFIG_PACKAGE_kea-admin is not set +# CONFIG_PACKAGE_kea-ctrl is not set +# CONFIG_PACKAGE_kea-dhcp-ddns is not set +# CONFIG_PACKAGE_kea-dhcp4 is not set +# CONFIG_PACKAGE_kea-dhcp6 is not set +# CONFIG_PACKAGE_kea-lfc is not set +# CONFIG_PACKAGE_kea-libs is not set +# CONFIG_PACKAGE_kea-perfdhcp is not set +# CONFIG_PACKAGE_kea-shell is not set +# CONFIG_PACKAGE_knot is not set +# CONFIG_PACKAGE_knot-dig is not set +# CONFIG_PACKAGE_knot-host is not set +# CONFIG_PACKAGE_knot-keymgr is not set +# CONFIG_PACKAGE_knot-nsupdate is not set +# CONFIG_PACKAGE_knot-resolver is not set + +# +# Configuration +# +# CONFIG_PACKAGE_knot-resolver_dnstap is not set +# end of Configuration + +# CONFIG_PACKAGE_knot-tests is not set +# CONFIG_PACKAGE_knot-zonecheck is not set +# CONFIG_PACKAGE_ldns-examples is not set +# CONFIG_PACKAGE_mdns-utils is not set +# CONFIG_PACKAGE_mdnsd is not set +# CONFIG_PACKAGE_mdnsresponder is not set +# CONFIG_PACKAGE_nsd is not set +# CONFIG_PACKAGE_nsd-control is not set +# CONFIG_PACKAGE_nsd-control-setup is not set +# CONFIG_PACKAGE_nsd-nossl is not set +# CONFIG_PACKAGE_ohybridproxy is not set +# CONFIG_PACKAGE_overture is not set +# CONFIG_PACKAGE_pdns is not set +# CONFIG_PACKAGE_pdns-ixfrdist is not set +# CONFIG_PACKAGE_pdns-recursor is not set +# CONFIG_PACKAGE_pdns-tools is not set +# CONFIG_PACKAGE_stubby is not set +# CONFIG_PACKAGE_tor-hs is not set +# CONFIG_PACKAGE_torsocks is not set +# CONFIG_PACKAGE_unbound-anchor is not set +# CONFIG_PACKAGE_unbound-checkconf is not set +# CONFIG_PACKAGE_unbound-control is not set +# CONFIG_PACKAGE_unbound-control-setup is not set +# CONFIG_PACKAGE_unbound-daemon is not set +# CONFIG_PACKAGE_unbound-host is not set +# CONFIG_PACKAGE_wsdd2 is not set +# CONFIG_PACKAGE_zonestitcher is not set +# end of IP Addresses and Names + +# +# Instant Messaging +# +# CONFIG_PACKAGE_bitlbee is not set +# CONFIG_PACKAGE_irssi is not set +# CONFIG_PACKAGE_ngircd is not set +# CONFIG_PACKAGE_ngircd-nossl is not set +# CONFIG_PACKAGE_prosody is not set +# CONFIG_PACKAGE_quassel-irssi is not set +# CONFIG_PACKAGE_umurmur-mbedtls is not set +# CONFIG_PACKAGE_umurmur-openssl is not set +# CONFIG_PACKAGE_znc is not set +# end of Instant Messaging + +# +# Linux ATM tools +# +# CONFIG_PACKAGE_atm-aread is not set +# CONFIG_PACKAGE_atm-atmaddr is not set +# CONFIG_PACKAGE_atm-atmdiag is not set +# CONFIG_PACKAGE_atm-atmdump is not set +# CONFIG_PACKAGE_atm-atmloop is not set +# CONFIG_PACKAGE_atm-atmsigd is not set +# CONFIG_PACKAGE_atm-atmswitch is not set +# CONFIG_PACKAGE_atm-atmtcp is not set +# CONFIG_PACKAGE_atm-awrite is not set +# CONFIG_PACKAGE_atm-bus is not set +# CONFIG_PACKAGE_atm-debug-tools is not set +# CONFIG_PACKAGE_atm-diagnostics is not set +# CONFIG_PACKAGE_atm-esi is not set +# CONFIG_PACKAGE_atm-ilmid is not set +# CONFIG_PACKAGE_atm-ilmidiag is not set +# CONFIG_PACKAGE_atm-lecs is not set +# CONFIG_PACKAGE_atm-les is not set +# CONFIG_PACKAGE_atm-mpcd is not set +# CONFIG_PACKAGE_atm-saaldump is not set +# CONFIG_PACKAGE_atm-sonetdiag is not set +# CONFIG_PACKAGE_atm-svc_recv is not set +# CONFIG_PACKAGE_atm-svc_send is not set +# CONFIG_PACKAGE_atm-tools is not set +# CONFIG_PACKAGE_atm-ttcp_atm is not set +# CONFIG_PACKAGE_atm-zeppelin is not set +# CONFIG_PACKAGE_br2684ctl is not set +# end of Linux ATM tools + +# +# LoRaWAN +# +# CONFIG_PACKAGE_libloragw-tests is not set +# CONFIG_PACKAGE_libloragw-utils is not set +# end of LoRaWAN + +# +# NMAP Suite +# +# CONFIG_PACKAGE_ncat is not set +# CONFIG_PACKAGE_ncat-full is not set +# CONFIG_PACKAGE_ncat-ssl is not set +# CONFIG_PACKAGE_ndiff is not set +# CONFIG_PACKAGE_nmap is not set +# CONFIG_PACKAGE_nmap-full is not set +# CONFIG_PACKAGE_nmap-ssl is not set +# CONFIG_PACKAGE_nping is not set +# CONFIG_PACKAGE_nping-ssl is not set +# end of NMAP Suite + +# +# NTRIP +# +# CONFIG_PACKAGE_ntripcaster is not set +# CONFIG_PACKAGE_ntripclient is not set +# CONFIG_PACKAGE_ntripserver is not set +# end of NTRIP + +# +# NeteaseMusic +# +CONFIG_PACKAGE_UnblockNeteaseMusicGo=y +CONFIG_UnblockNeteaseMusicGo_INCLUDE_GOPROXY=y +# end of NeteaseMusic + +# +# OLSR.org network framework +# +# CONFIG_PACKAGE_oonf-dlep-proxy is not set +# CONFIG_PACKAGE_oonf-dlep-radio is not set +# CONFIG_PACKAGE_oonf-init-scripts is not set +# CONFIG_PACKAGE_oonf-olsrd2 is not set +# end of OLSR.org network framework + +# +# Open vSwitch +# +# CONFIG_PACKAGE_openvswitch is not set +# CONFIG_PACKAGE_openvswitch-ovn-host is not set +# CONFIG_PACKAGE_openvswitch-ovn-north is not set +# CONFIG_PACKAGE_openvswitch-python3 is not set +# CONFIG_PACKAGE_ovsd is not set +# end of Open vSwitch + +# +# OpenLDAP +# +# CONFIG_PACKAGE_libopenldap is not set +CONFIG_OPENLDAP_DEBUG=y +# CONFIG_OPENLDAP_CRYPT is not set +# CONFIG_OPENLDAP_MONITOR is not set +# CONFIG_OPENLDAP_DB47 is not set +# CONFIG_OPENLDAP_ICU is not set +# CONFIG_PACKAGE_openldap-server is not set +# CONFIG_PACKAGE_openldap-utils is not set +# end of OpenLDAP + +# +# P2P +# +# CONFIG_PACKAGE_amule is not set +# CONFIG_AMULE_CRYPTOPP_STATIC_LINKING is not set +# CONFIG_PACKAGE_antileech is not set +# end of P2P + +# +# Printing +# +# CONFIG_PACKAGE_p910nd is not set +# end of Printing + +# +# Project V +# +# CONFIG_PACKAGE_v2ray-plugin is not set +CONFIG_v2ray-plugin_INCLUDE_GOPROXY=y +# end of Project V + +# +# Routing and Redirection +# +# CONFIG_PACKAGE_babel-pinger is not set +# CONFIG_PACKAGE_babeld is not set +# CONFIG_PACKAGE_batmand is not set +# CONFIG_PACKAGE_bcp38 is not set +# CONFIG_PACKAGE_bfdd is not set +# CONFIG_PACKAGE_bird1-ipv4 is not set +# CONFIG_PACKAGE_bird1-ipv4-uci is not set +# CONFIG_PACKAGE_bird1-ipv6 is not set +# CONFIG_PACKAGE_bird1-ipv6-uci is not set +# CONFIG_PACKAGE_bird1c-ipv4 is not set +# CONFIG_PACKAGE_bird1c-ipv6 is not set +# CONFIG_PACKAGE_bird1cl-ipv4 is not set +# CONFIG_PACKAGE_bird1cl-ipv6 is not set +# CONFIG_PACKAGE_bird2 is not set +# CONFIG_PACKAGE_bird2c is not set +# CONFIG_PACKAGE_bird2cl is not set +# CONFIG_PACKAGE_bmx6 is not set +# CONFIG_PACKAGE_bmx7 is not set +# CONFIG_PACKAGE_cjdns is not set +# CONFIG_PACKAGE_cjdns-tests is not set +# CONFIG_PACKAGE_dcstad is not set +# CONFIG_PACKAGE_dcwapd is not set +# CONFIG_PACKAGE_devlink is not set +# CONFIG_PACKAGE_frr is not set +# CONFIG_PACKAGE_genl is not set +# CONFIG_PACKAGE_igmpproxy is not set +# CONFIG_PACKAGE_ip-bridge is not set +CONFIG_PACKAGE_ip-full=y +# CONFIG_PACKAGE_ip-tiny is not set +# CONFIG_PACKAGE_lldpd is not set +# CONFIG_PACKAGE_mcproxy is not set +# CONFIG_PACKAGE_mrmctl is not set +# CONFIG_PACKAGE_mwan3 is not set +# CONFIG_PACKAGE_nstat is not set +# CONFIG_PACKAGE_olsrd is not set +# CONFIG_PACKAGE_prince is not set +# CONFIG_PACKAGE_quagga is not set +# CONFIG_PACKAGE_rdma is not set +# CONFIG_PACKAGE_relayd is not set +# CONFIG_PACKAGE_smcroute is not set +# CONFIG_PACKAGE_ss is not set +# CONFIG_PACKAGE_sslh is not set +# CONFIG_PACKAGE_tc-full is not set +# CONFIG_PACKAGE_tc-mod-iptables is not set +# CONFIG_PACKAGE_tc-tiny is not set +# CONFIG_PACKAGE_tcpproxy is not set +# CONFIG_PACKAGE_udp-broadcast-relay-redux is not set +# CONFIG_PACKAGE_vis is not set +# CONFIG_PACKAGE_yggdrasil is not set +# end of Routing and Redirection + +# +# SSH +# +# CONFIG_PACKAGE_autossh is not set +# CONFIG_PACKAGE_openssh-client is not set +# CONFIG_PACKAGE_openssh-client-utils is not set +# CONFIG_PACKAGE_openssh-keygen is not set +# CONFIG_PACKAGE_openssh-moduli is not set +# CONFIG_PACKAGE_openssh-server is not set +# CONFIG_PACKAGE_openssh-server-pam is not set +# CONFIG_PACKAGE_openssh-sftp-avahi-service is not set +# CONFIG_PACKAGE_openssh-sftp-client is not set +# CONFIG_PACKAGE_openssh-sftp-server is not set +# CONFIG_PACKAGE_sshtunnel is not set +# CONFIG_PACKAGE_tmate is not set +# end of SSH + +# +# THC-IPv6 attack and analyzing toolkit +# +# CONFIG_PACKAGE_thc-ipv6-address6 is not set +# CONFIG_PACKAGE_thc-ipv6-alive6 is not set +# CONFIG_PACKAGE_thc-ipv6-covert-send6 is not set +# CONFIG_PACKAGE_thc-ipv6-covert-send6d is not set +# CONFIG_PACKAGE_thc-ipv6-denial6 is not set +# CONFIG_PACKAGE_thc-ipv6-detect-new-ip6 is not set +# CONFIG_PACKAGE_thc-ipv6-detect-sniffer6 is not set +# CONFIG_PACKAGE_thc-ipv6-dnsdict6 is not set +# CONFIG_PACKAGE_thc-ipv6-dnsrevenum6 is not set +# CONFIG_PACKAGE_thc-ipv6-dos-new-ip6 is not set +# CONFIG_PACKAGE_thc-ipv6-dump-router6 is not set +# CONFIG_PACKAGE_thc-ipv6-exploit6 is not set +# CONFIG_PACKAGE_thc-ipv6-fake-advertise6 is not set +# CONFIG_PACKAGE_thc-ipv6-fake-dhcps6 is not set +# CONFIG_PACKAGE_thc-ipv6-fake-dns6d is not set +# CONFIG_PACKAGE_thc-ipv6-fake-dnsupdate6 is not set +# CONFIG_PACKAGE_thc-ipv6-fake-mipv6 is not set +# CONFIG_PACKAGE_thc-ipv6-fake-mld26 is not set +# CONFIG_PACKAGE_thc-ipv6-fake-mld6 is not set +# CONFIG_PACKAGE_thc-ipv6-fake-mldrouter6 is not set +# CONFIG_PACKAGE_thc-ipv6-fake-router26 is not set +# CONFIG_PACKAGE_thc-ipv6-fake-router6 is not set +# CONFIG_PACKAGE_thc-ipv6-fake-solicitate6 is not set +# CONFIG_PACKAGE_thc-ipv6-flood-advertise6 is not set +# CONFIG_PACKAGE_thc-ipv6-flood-dhcpc6 is not set +# CONFIG_PACKAGE_thc-ipv6-flood-mld26 is not set +# CONFIG_PACKAGE_thc-ipv6-flood-mld6 is not set +# CONFIG_PACKAGE_thc-ipv6-flood-mldrouter6 is not set +# CONFIG_PACKAGE_thc-ipv6-flood-router26 is not set +# CONFIG_PACKAGE_thc-ipv6-flood-router6 is not set +# CONFIG_PACKAGE_thc-ipv6-flood-solicitate6 is not set +# CONFIG_PACKAGE_thc-ipv6-fragmentation6 is not set +# CONFIG_PACKAGE_thc-ipv6-fuzz-dhcpc6 is not set +# CONFIG_PACKAGE_thc-ipv6-fuzz-dhcps6 is not set +# CONFIG_PACKAGE_thc-ipv6-fuzz-ip6 is not set +# CONFIG_PACKAGE_thc-ipv6-implementation6 is not set +# CONFIG_PACKAGE_thc-ipv6-implementation6d is not set +# CONFIG_PACKAGE_thc-ipv6-inverse-lookup6 is not set +# CONFIG_PACKAGE_thc-ipv6-kill-router6 is not set +# CONFIG_PACKAGE_thc-ipv6-ndpexhaust6 is not set +# CONFIG_PACKAGE_thc-ipv6-node-query6 is not set +# CONFIG_PACKAGE_thc-ipv6-parasite6 is not set +# CONFIG_PACKAGE_thc-ipv6-passive-discovery6 is not set +# CONFIG_PACKAGE_thc-ipv6-randicmp6 is not set +# CONFIG_PACKAGE_thc-ipv6-redir6 is not set +# CONFIG_PACKAGE_thc-ipv6-rsmurf6 is not set +# CONFIG_PACKAGE_thc-ipv6-sendpees6 is not set +# CONFIG_PACKAGE_thc-ipv6-sendpeesmp6 is not set +# CONFIG_PACKAGE_thc-ipv6-smurf6 is not set +# CONFIG_PACKAGE_thc-ipv6-thcping6 is not set +# CONFIG_PACKAGE_thc-ipv6-toobig6 is not set +# CONFIG_PACKAGE_thc-ipv6-trace6 is not set +# end of THC-IPv6 attack and analyzing toolkit + +# +# Tcpreplay +# +# CONFIG_PACKAGE_tcpbridge is not set +# CONFIG_PACKAGE_tcpcapinfo is not set +# CONFIG_PACKAGE_tcpliveplay is not set +# CONFIG_PACKAGE_tcpprep is not set +# CONFIG_PACKAGE_tcpreplay is not set +# CONFIG_PACKAGE_tcpreplay-all is not set +# CONFIG_PACKAGE_tcpreplay-edit is not set +# CONFIG_PACKAGE_tcprewrite is not set +# end of Tcpreplay + +# +# Telephony +# +# CONFIG_PACKAGE_asterisk is not set +# CONFIG_PACKAGE_baresip is not set +# CONFIG_PACKAGE_freeswitch is not set +# CONFIG_PACKAGE_kamailio is not set +# CONFIG_PACKAGE_miax is not set +# CONFIG_PACKAGE_pcapsipdump is not set +# CONFIG_PACKAGE_restund is not set +# CONFIG_PACKAGE_rtpengine is not set +# CONFIG_PACKAGE_rtpengine-no-transcode is not set +# CONFIG_PACKAGE_rtpengine-recording is not set +# CONFIG_PACKAGE_rtpproxy is not set +# CONFIG_PACKAGE_sipp is not set +# CONFIG_PACKAGE_siproxd is not set +# CONFIG_PACKAGE_yate is not set +# end of Telephony + +# +# Telephony Lantiq +# +# end of Telephony Lantiq + +# +# Time Synchronization +# +# CONFIG_PACKAGE_chrony is not set +# CONFIG_PACKAGE_chrony-nts is not set +# CONFIG_PACKAGE_htpdate is not set +# CONFIG_PACKAGE_linuxptp is not set +# CONFIG_PACKAGE_ntp-keygen is not set +# CONFIG_PACKAGE_ntp-utils is not set +# CONFIG_PACKAGE_ntpclient is not set +# CONFIG_PACKAGE_ntpd is not set +# CONFIG_PACKAGE_ntpdate is not set +# end of Time Synchronization + +# +# VPN +# +# CONFIG_PACKAGE_chaosvpn is not set +# CONFIG_PACKAGE_eoip is not set +# CONFIG_PACKAGE_fastd is not set +# CONFIG_PACKAGE_libreswan is not set +# CONFIG_PACKAGE_n2n-edge is not set +# CONFIG_PACKAGE_n2n-supernode is not set +# CONFIG_PACKAGE_ocserv is not set +# CONFIG_PACKAGE_openconnect is not set +# CONFIG_PACKAGE_openfortivpn is not set +# CONFIG_PACKAGE_openvpn-easy-rsa is not set +# CONFIG_PACKAGE_openvpn-mbedtls is not set +# CONFIG_PACKAGE_openvpn-openssl is not set +# CONFIG_PACKAGE_openvpn-wolfssl is not set +# CONFIG_PACKAGE_pptpd is not set +# CONFIG_PACKAGE_softethervpn-base is not set +# CONFIG_PACKAGE_softethervpn-bridge is not set +# CONFIG_PACKAGE_softethervpn-client is not set +# CONFIG_PACKAGE_softethervpn-server is not set +# CONFIG_PACKAGE_softethervpn5-bridge is not set +# CONFIG_PACKAGE_softethervpn5-client is not set +# CONFIG_PACKAGE_softethervpn5-server is not set +# CONFIG_PACKAGE_sstp-client is not set +# CONFIG_PACKAGE_strongswan is not set +# CONFIG_PACKAGE_tailscale is not set +# CONFIG_PACKAGE_tailscaled is not set +# CONFIG_PACKAGE_tinc is not set +# CONFIG_PACKAGE_uanytun is not set +# CONFIG_PACKAGE_uanytun-nettle is not set +# CONFIG_PACKAGE_uanytun-nocrypt is not set +# CONFIG_PACKAGE_uanytun-sslcrypt is not set +# CONFIG_PACKAGE_vpnc is not set +# CONFIG_PACKAGE_vpnc-scripts is not set +# CONFIG_PACKAGE_wireguard-tools is not set +# CONFIG_PACKAGE_xl2tpd is not set +# CONFIG_PACKAGE_zerotier is not set +# end of VPN + +# +# Version Control Systems +# +# CONFIG_PACKAGE_git is not set +# CONFIG_PACKAGE_git-http is not set +# CONFIG_PACKAGE_subversion-client is not set +# CONFIG_PACKAGE_subversion-libs is not set +# CONFIG_PACKAGE_subversion-server is not set +# end of Version Control Systems + +# +# WWAN +# +# CONFIG_PACKAGE_adb-enablemodem is not set +# CONFIG_PACKAGE_comgt is not set +# CONFIG_PACKAGE_comgt-directip is not set +# CONFIG_PACKAGE_comgt-ncm is not set +# CONFIG_PACKAGE_umbim is not set +# CONFIG_PACKAGE_uqmi is not set +# end of WWAN + +# +# Web Servers/Proxies +# +# CONFIG_PACKAGE_apache is not set +# CONFIG_PACKAGE_cgi-io is not set +# CONFIG_PACKAGE_clamav is not set +# CONFIG_PACKAGE_e2guardian is not set +# CONFIG_PACKAGE_etebase is not set +# CONFIG_PACKAGE_freshclam is not set +# CONFIG_PACKAGE_frpc is not set +# CONFIG_PACKAGE_frps is not set +# CONFIG_PACKAGE_gateway-go is not set +# CONFIG_PACKAGE_gunicorn3 is not set +# CONFIG_PACKAGE_haproxy is not set +# CONFIG_PACKAGE_haproxy-nossl is not set +# CONFIG_PACKAGE_kcptun-client is not set +# CONFIG_PACKAGE_kcptun-config is not set +# CONFIG_PACKAGE_kcptun-server is not set +# CONFIG_PACKAGE_lighttpd is not set +CONFIG_PACKAGE_microsocks=y +# CONFIG_PACKAGE_naiveproxy is not set +# CONFIG_PACKAGE_nginx-all-module is not set +# CONFIG_PACKAGE_nginx-mod-luci is not set +# CONFIG_PACKAGE_nginx-ssl is not set +# CONFIG_PACKAGE_nginx-ssl-util is not set +# CONFIG_PACKAGE_nginx-ssl-util-nopcre is not set +CONFIG_PACKAGE_pdnsd-alt=y +# CONFIG_PACKAGE_polipo is not set +# CONFIG_PACKAGE_privoxy is not set +# CONFIG_PACKAGE_python3-gunicorn is not set +# CONFIG_PACKAGE_radicale is not set +# CONFIG_PACKAGE_radicale2 is not set +# CONFIG_PACKAGE_radicale2-examples is not set +# CONFIG_PACKAGE_redsocks2 is not set +CONFIG_PACKAGE_shadowsocks-libev-config=y +CONFIG_PACKAGE_shadowsocks-libev-ss-local=y +CONFIG_PACKAGE_shadowsocks-libev-ss-redir=y +# CONFIG_PACKAGE_shadowsocks-libev-ss-rules is not set +CONFIG_PACKAGE_shadowsocks-libev-ss-server=y +# CONFIG_PACKAGE_shadowsocks-libev-ss-tunnel is not set +# CONFIG_PACKAGE_shadowsocks-rust-sslocal is not set +# CONFIG_PACKAGE_shadowsocks-rust-ssmanager is not set +# CONFIG_PACKAGE_shadowsocks-rust-ssserver is not set +# CONFIG_PACKAGE_shadowsocks-rust-ssurl is not set +CONFIG_PACKAGE_shadowsocksr-libev-ssr-check=y +CONFIG_PACKAGE_shadowsocksr-libev-ssr-local=y +# CONFIG_PACKAGE_shadowsocksr-libev-ssr-nat is not set +CONFIG_PACKAGE_shadowsocksr-libev-ssr-redir=y +CONFIG_PACKAGE_shadowsocksr-libev-ssr-server=y +# CONFIG_PACKAGE_sockd is not set +# CONFIG_PACKAGE_socksify is not set +# CONFIG_PACKAGE_spawn-fcgi is not set +# CONFIG_PACKAGE_squid is not set +# CONFIG_PACKAGE_srelay is not set +# CONFIG_PACKAGE_tinyproxy is not set +# CONFIG_PACKAGE_trojan is not set +CONFIG_PACKAGE_uhttpd=y +# CONFIG_PACKAGE_uhttpd-mod-lua is not set +CONFIG_PACKAGE_uhttpd-mod-ubus=y +# CONFIG_PACKAGE_uwsgi is not set +# end of Web Servers/Proxies + +# +# Wireless +# +# CONFIG_PACKAGE_aircrack-ng is not set +# CONFIG_PACKAGE_airmon-ng is not set +# CONFIG_PACKAGE_dynapoint is not set +# CONFIG_PACKAGE_hcxdumptool is not set +# CONFIG_PACKAGE_hcxtools is not set +# CONFIG_PACKAGE_horst is not set +# CONFIG_PACKAGE_pixiewps is not set +# CONFIG_PACKAGE_reaver is not set +# CONFIG_PACKAGE_wavemon is not set +# CONFIG_PACKAGE_wifischedule is not set +# end of Wireless + +# +# WirelessAPD +# +# CONFIG_PACKAGE_eapol-test is not set +# CONFIG_PACKAGE_eapol-test-openssl is not set +# CONFIG_PACKAGE_eapol-test-wolfssl is not set +# CONFIG_PACKAGE_hostapd is not set +# CONFIG_PACKAGE_hostapd-basic is not set +# CONFIG_PACKAGE_hostapd-basic-openssl is not set +# CONFIG_PACKAGE_hostapd-basic-wolfssl is not set +CONFIG_PACKAGE_hostapd-common=y +# CONFIG_PACKAGE_hostapd-mini is not set +# CONFIG_PACKAGE_hostapd-openssl is not set +# CONFIG_PACKAGE_hostapd-utils is not set +# CONFIG_PACKAGE_hostapd-wolfssl is not set +# CONFIG_PACKAGE_hs20-client is not set +# CONFIG_PACKAGE_hs20-common is not set +# CONFIG_PACKAGE_hs20-server is not set +# CONFIG_PACKAGE_wpa-cli is not set +# CONFIG_PACKAGE_wpa-supplicant is not set +# CONFIG_WPA_RFKILL_SUPPORT is not set +CONFIG_WPA_MSG_MIN_PRIORITY=3 +# CONFIG_WPA_WOLFSSL is not set +# CONFIG_DRIVER_WEXT_SUPPORT is not set +CONFIG_DRIVER_11N_SUPPORT=y +CONFIG_DRIVER_11AC_SUPPORT=y +# CONFIG_DRIVER_11AX_SUPPORT is not set +# CONFIG_WPA_ENABLE_WEP is not set +# CONFIG_PACKAGE_wpa-supplicant-basic is not set +# CONFIG_PACKAGE_wpa-supplicant-mesh-openssl is not set +# CONFIG_PACKAGE_wpa-supplicant-mesh-wolfssl is not set +# CONFIG_PACKAGE_wpa-supplicant-mini is not set +# CONFIG_PACKAGE_wpa-supplicant-openssl is not set +# CONFIG_PACKAGE_wpa-supplicant-p2p is not set +# CONFIG_PACKAGE_wpa-supplicant-wolfssl is not set +# CONFIG_PACKAGE_wpad is not set +# CONFIG_PACKAGE_wpad-basic is not set +# CONFIG_PACKAGE_wpad-basic-openssl is not set +# CONFIG_PACKAGE_wpad-basic-wolfssl is not set +# CONFIG_PACKAGE_wpad-mesh-openssl is not set +# CONFIG_PACKAGE_wpad-mesh-wolfssl is not set +# CONFIG_PACKAGE_wpad-mini is not set +CONFIG_PACKAGE_wpad-openssl=y +# CONFIG_PACKAGE_wpad-wolfssl is not set +# end of WirelessAPD + +# +# arp-scan +# +# CONFIG_PACKAGE_arp-scan is not set +# CONFIG_PACKAGE_arp-scan-database is not set +# end of arp-scan + +# CONFIG_PACKAGE_464xlat is not set +# CONFIG_PACKAGE_6in4 is not set +# CONFIG_PACKAGE_6rd is not set +# CONFIG_PACKAGE_6to4 is not set +# CONFIG_PACKAGE_UDPspeeder is not set +# CONFIG_PACKAGE_acme is not set +# CONFIG_PACKAGE_acme-dnsapi is not set +# CONFIG_PACKAGE_adblock is not set +# CONFIG_PACKAGE_adbyby is not set +# CONFIG_PACKAGE_addrwatch is not set +# CONFIG_PACKAGE_adguardhome is not set +# CONFIG_PACKAGE_ahcpd is not set +# CONFIG_PACKAGE_alfred is not set +# CONFIG_PACKAGE_apcupsd is not set +# CONFIG_PACKAGE_apcupsd-cgi is not set +# CONFIG_PACKAGE_apinger is not set +# CONFIG_PACKAGE_atlas-probe is not set +# CONFIG_PACKAGE_atlas-sw-probe is not set +# CONFIG_PACKAGE_atlas-sw-probe-rpc is not set +# CONFIG_PACKAGE_baidupcs-web is not set +# CONFIG_BAIDUPCS_WEB_COMPRESS_GOPROXY is not set +CONFIG_BAIDUPCS_WEB_COMPRESS_UPX=y +# CONFIG_PACKAGE_banip is not set +# CONFIG_PACKAGE_batctl-default is not set +# CONFIG_PACKAGE_batctl-full is not set +# CONFIG_PACKAGE_batctl-tiny is not set +# CONFIG_PACKAGE_beanstalkd is not set +# CONFIG_PACKAGE_bmon is not set +# CONFIG_PACKAGE_boinc is not set +# CONFIG_PACKAGE_bpftool-full is not set +# CONFIG_PACKAGE_bpftool-minimal is not set +# CONFIG_PACKAGE_bwm-ng is not set +# CONFIG_PACKAGE_bwping is not set +# CONFIG_PACKAGE_chat is not set +# CONFIG_PACKAGE_cifsmount is not set +# CONFIG_PACKAGE_coap-server is not set +# CONFIG_PACKAGE_conserver is not set +# CONFIG_PACKAGE_cshark is not set +# CONFIG_PACKAGE_daemonlogger is not set +# CONFIG_PACKAGE_darkstat is not set +# CONFIG_PACKAGE_dawn is not set +# CONFIG_PACKAGE_dhcpcd is not set +# CONFIG_PACKAGE_dmapd is not set +# CONFIG_PACKAGE_dnscrypt-proxy2 is not set +# CONFIG_PACKAGE_dnsforwarder is not set +# CONFIG_PACKAGE_dnstap is not set +# CONFIG_PACKAGE_dnstop is not set +# CONFIG_PACKAGE_dpdk is not set +# CONFIG_PACKAGE_ds-lite is not set +# CONFIG_PACKAGE_dsmboot is not set +# CONFIG_PACKAGE_esniper is not set +CONFIG_PACKAGE_etherwake=y +# CONFIG_PACKAGE_etherwake-nfqueue is not set +# CONFIG_PACKAGE_ethtool is not set +# CONFIG_PACKAGE_fakeidentd is not set +# CONFIG_PACKAGE_fakepop is not set +# CONFIG_PACKAGE_family-dns is not set +# CONFIG_PACKAGE_foolsm is not set +# CONFIG_PACKAGE_fping is not set +# CONFIG_PACKAGE_generate-ipv6-address is not set +# CONFIG_PACKAGE_geth is not set +# CONFIG_PACKAGE_git-lfs is not set +# CONFIG_PACKAGE_gnunet is not set +# CONFIG_PACKAGE_gre is not set +# CONFIG_PACKAGE_hnet-full is not set +# CONFIG_PACKAGE_hnet-full-l2tp is not set +# CONFIG_PACKAGE_hnet-full-secure is not set +# CONFIG_PACKAGE_hnetd-nossl is not set +# CONFIG_PACKAGE_hnetd-openssl is not set +# CONFIG_PACKAGE_httping is not set +# CONFIG_PACKAGE_httping-nossl is not set +# CONFIG_PACKAGE_https-dns-proxy is not set +# CONFIG_PACKAGE_i2pd is not set +# CONFIG_PACKAGE_ibrdtn-tools is not set +# CONFIG_PACKAGE_ibrdtnd is not set +# CONFIG_PACKAGE_ifstat is not set +# CONFIG_PACKAGE_iftop is not set +# CONFIG_PACKAGE_iiod is not set +# CONFIG_PACKAGE_iperf is not set +# CONFIG_PACKAGE_iperf3 is not set +# CONFIG_PACKAGE_iperf3-ssl is not set +# CONFIG_PACKAGE_ipip is not set +CONFIG_PACKAGE_ipset=y +# CONFIG_PACKAGE_ipset-dns is not set +# CONFIG_PACKAGE_ipt2socks is not set +# CONFIG_PACKAGE_iptraf-ng is not set +# CONFIG_PACKAGE_iputils-arping is not set +# CONFIG_PACKAGE_iputils-clockdiff is not set +# CONFIG_PACKAGE_iputils-ping is not set +# CONFIG_PACKAGE_iputils-tftpd is not set +# CONFIG_PACKAGE_iputils-tracepath is not set +# CONFIG_PACKAGE_ipvsadm is not set +# CONFIG_PACKAGE_irtt is not set +CONFIG_PACKAGE_iw=y +# CONFIG_PACKAGE_iw-full is not set +# CONFIG_PACKAGE_jool-tools is not set +# CONFIG_PACKAGE_keepalived is not set +# CONFIG_PACKAGE_knxd is not set +# CONFIG_PACKAGE_kplex is not set +# CONFIG_PACKAGE_krb5-client is not set +# CONFIG_PACKAGE_krb5-libs is not set +# CONFIG_PACKAGE_krb5-server is not set +# CONFIG_PACKAGE_krb5-server-extras is not set +CONFIG_PACKAGE_libipset=y +# CONFIG_PACKAGE_libndp is not set +# CONFIG_PACKAGE_linknx is not set +# CONFIG_PACKAGE_lynx is not set +# CONFIG_PACKAGE_mac-telnet-client is not set +# CONFIG_PACKAGE_mac-telnet-discover is not set +# CONFIG_PACKAGE_mac-telnet-ping is not set +# CONFIG_PACKAGE_mac-telnet-server is not set +# CONFIG_PACKAGE_map is not set +# CONFIG_PACKAGE_mbusd is not set +# CONFIG_PACKAGE_memcached is not set +# CONFIG_PACKAGE_mii-tool is not set +# CONFIG_PACKAGE_mikrotik-btest is not set +# CONFIG_PACKAGE_mini_snmpd is not set +# CONFIG_PACKAGE_minimalist-pcproxy is not set +# CONFIG_PACKAGE_miredo is not set +# CONFIG_PACKAGE_modemmanager is not set +# CONFIG_PACKAGE_mosquitto-client-nossl is not set +# CONFIG_PACKAGE_mosquitto-client-ssl is not set +# CONFIG_PACKAGE_mosquitto-nossl is not set +# CONFIG_PACKAGE_mosquitto-ssl is not set +# CONFIG_PACKAGE_mrd6 is not set +# CONFIG_PACKAGE_mstpd is not set +# CONFIG_PACKAGE_mtr is not set +# CONFIG_PACKAGE_nbd is not set +# CONFIG_PACKAGE_nbd-server is not set +# CONFIG_PACKAGE_ncp is not set +# CONFIG_PACKAGE_ndppd is not set +# CONFIG_PACKAGE_ndptool is not set +# CONFIG_PACKAGE_nebula is not set +# CONFIG_PACKAGE_nebula-cert is not set +# CONFIG_PACKAGE_net-tools-route is not set +# CONFIG_PACKAGE_netcat is not set +# CONFIG_PACKAGE_netdiscover is not set +# CONFIG_PACKAGE_netifyd is not set +# CONFIG_PACKAGE_netperf is not set +# CONFIG_PACKAGE_netsniff-ng is not set +# CONFIG_PACKAGE_netstinky is not set +# CONFIG_PACKAGE_nextdns is not set +# CONFIG_PACKAGE_nfdump is not set +CONFIG_PACKAGE_nlbwmon=y +# CONFIG_PACKAGE_noddos is not set +# CONFIG_PACKAGE_noping is not set +# CONFIG_PACKAGE_npc is not set +# CONFIG_PACKAGE_nut is not set +# CONFIG_PACKAGE_obfs4proxy is not set +# CONFIG_PACKAGE_odhcp6c is not set +# CONFIG_PACKAGE_odhcpd is not set +# CONFIG_PACKAGE_odhcpd-ipv6only is not set +# CONFIG_PACKAGE_ola is not set +# CONFIG_PACKAGE_omcproxy is not set +# CONFIG_PACKAGE_onionshare-cli is not set +# CONFIG_PACKAGE_ooniprobe is not set +# CONFIG_PACKAGE_oor is not set +# CONFIG_PACKAGE_open-iscsi is not set +# CONFIG_PACKAGE_oping is not set +# CONFIG_PACKAGE_ostiary is not set +# CONFIG_PACKAGE_pagekitec is not set +# CONFIG_PACKAGE_pen is not set +# CONFIG_PACKAGE_phantap is not set +# CONFIG_PACKAGE_pimbd is not set +# CONFIG_PACKAGE_pingcheck is not set +# CONFIG_PACKAGE_port-mirroring is not set +CONFIG_PACKAGE_ppp=y +# CONFIG_PACKAGE_ppp-mod-passwordfd is not set +# CONFIG_PACKAGE_ppp-mod-pppoa is not set +CONFIG_PACKAGE_ppp-mod-pppoe=y +# CONFIG_PACKAGE_ppp-mod-pppol2tp is not set +# CONFIG_PACKAGE_ppp-mod-pptp is not set +# CONFIG_PACKAGE_ppp-mod-radius is not set +# CONFIG_PACKAGE_ppp-multilink is not set +# CONFIG_PACKAGE_pppdump is not set +# CONFIG_PACKAGE_pppoe-discovery is not set +# CONFIG_PACKAGE_pppossh is not set +# CONFIG_PACKAGE_pppstats is not set +# CONFIG_PACKAGE_proto-bonding is not set +# CONFIG_PACKAGE_proxychains-ng is not set +# CONFIG_PACKAGE_ptunnel-ng is not set +# CONFIG_PACKAGE_radsecproxy is not set +# CONFIG_PACKAGE_ratched is not set +# CONFIG_PACKAGE_ratechecker is not set +# CONFIG_PACKAGE_redsocks is not set +# CONFIG_PACKAGE_remserial is not set +# CONFIG_PACKAGE_restic-rest-server is not set +# CONFIG_PACKAGE_rpcbind is not set +# CONFIG_PACKAGE_rssileds is not set +# CONFIG_PACKAGE_rsyslog is not set +# CONFIG_PACKAGE_safe-search is not set +# CONFIG_PACKAGE_samba36-client is not set +# CONFIG_PACKAGE_samba36-net is not set +# CONFIG_PACKAGE_samba36-server is not set +# CONFIG_PACKAGE_samba4-admin is not set +# CONFIG_PACKAGE_samba4-client is not set +# CONFIG_PACKAGE_samba4-libs is not set +# CONFIG_PACKAGE_samba4-server is not set +# CONFIG_PACKAGE_samba4-utils is not set +# CONFIG_PACKAGE_samplicator is not set +# CONFIG_PACKAGE_scapy is not set +# CONFIG_PACKAGE_sctp-tools is not set +# CONFIG_PACKAGE_seafile-ccnet is not set +# CONFIG_PACKAGE_seafile-seahub is not set +# CONFIG_PACKAGE_seafile-server is not set +# CONFIG_PACKAGE_seafile-server-fuse is not set +# CONFIG_PACKAGE_ser2net is not set +# CONFIG_PACKAGE_simple-adblock is not set +CONFIG_PACKAGE_simple-obfs-client=y +# CONFIG_PACKAGE_simple-obfs-server is not set +# CONFIG_PACKAGE_smartdns is not set +# CONFIG_PACKAGE_smbinfo is not set +# CONFIG_PACKAGE_snmp-mibs is not set +# CONFIG_PACKAGE_snmp-utils is not set +# CONFIG_PACKAGE_snmpd is not set +# CONFIG_PACKAGE_snmptrapd is not set +# CONFIG_PACKAGE_socat is not set +# CONFIG_PACKAGE_softflowd is not set +# CONFIG_PACKAGE_soloscli is not set +# CONFIG_PACKAGE_speedtest-netperf is not set +# CONFIG_PACKAGE_spoofer is not set +# CONFIG_PACKAGE_static-neighbor-reports is not set +# CONFIG_PACKAGE_stunnel is not set +# CONFIG_PACKAGE_switchdev-poller is not set +# CONFIG_PACKAGE_tac_plus is not set +# CONFIG_PACKAGE_tac_plus-pam is not set +# CONFIG_PACKAGE_tayga is not set +# CONFIG_PACKAGE_tcpdump is not set +# CONFIG_PACKAGE_tcpdump-mini is not set +CONFIG_PACKAGE_tcping=y +# CONFIG_PACKAGE_tcpping is not set +# CONFIG_PACKAGE_tgt is not set +# CONFIG_PACKAGE_tmate-ssh-server is not set +# CONFIG_PACKAGE_tor is not set +# CONFIG_PACKAGE_tor-basic is not set +# CONFIG_PACKAGE_tor-fw-helper is not set +# CONFIG_PACKAGE_trafficshaper is not set +# CONFIG_PACKAGE_travelmate is not set +# CONFIG_PACKAGE_u2pnpd is not set +# CONFIG_PACKAGE_uacme is not set +CONFIG_PACKAGE_uclient-fetch=y +# CONFIG_PACKAGE_udptunnel is not set +# CONFIG_PACKAGE_udpxy is not set +# CONFIG_PACKAGE_ulogd is not set +# CONFIG_PACKAGE_umdns is not set +# CONFIG_PACKAGE_usbip is not set +# CONFIG_PACKAGE_uugamebooster is not set +# CONFIG_PACKAGE_v2ray-core is not set +# CONFIG_PACKAGE_vallumd is not set +# CONFIG_PACKAGE_verysync is not set +CONFIG_PACKAGE_vlmcsd=y +# CONFIG_PACKAGE_vncrepeater is not set +# CONFIG_PACKAGE_vnstat is not set +# CONFIG_PACKAGE_vnstat2 is not set +# CONFIG_PACKAGE_vpn-policy-routing is not set +# CONFIG_PACKAGE_vpnbypass is not set +# CONFIG_PACKAGE_vti is not set +# CONFIG_PACKAGE_vxlan is not set +# CONFIG_PACKAGE_wakeonlan is not set +# CONFIG_PACKAGE_wg-installer-client is not set +# CONFIG_PACKAGE_wg-installer-server is not set +CONFIG_PACKAGE_wol=y +# CONFIG_PACKAGE_wpan-tools is not set +# CONFIG_PACKAGE_wwan is not set +# CONFIG_PACKAGE_xfrm is not set +# CONFIG_PACKAGE_xinetd is not set +CONFIG_PACKAGE_xray-core=y + +# +# Xray-core Configuration +# +# CONFIG_XRAY_CORE_COMPRESS_GOPROXY is not set +CONFIG_XRAY_CORE_COMPRESS_UPX=y +# end of Xray-core Configuration + +# CONFIG_PACKAGE_xray-geodata is not set +# CONFIG_PACKAGE_xray-plugin is not set +# CONFIG_XRAY_PLUGIN_PROVIDE_V2RAY_PLUGIN is not set +# CONFIG_XRAY_PLUGIN_COMPRESS_GOPROXY is not set +CONFIG_XRAY_PLUGIN_COMPRESS_UPX=y +# end of Network + +# +# Sound +# +# CONFIG_PACKAGE_alsa-utils is not set +# CONFIG_PACKAGE_alsa-utils-seq is not set +# CONFIG_PACKAGE_alsa-utils-tests is not set +# CONFIG_PACKAGE_aserver is not set +# CONFIG_PACKAGE_espeak is not set +# CONFIG_PACKAGE_faad2 is not set +# CONFIG_PACKAGE_fdk-aac is not set +# CONFIG_PACKAGE_forked-daapd is not set +# CONFIG_PACKAGE_ices is not set +# CONFIG_PACKAGE_lame is not set +# CONFIG_PACKAGE_lame-lib is not set +# CONFIG_PACKAGE_liblo-utils is not set +# CONFIG_PACKAGE_madplay is not set +# CONFIG_PACKAGE_moc is not set +# CONFIG_PACKAGE_mpc is not set +# CONFIG_PACKAGE_mpd-avahi-service is not set +# CONFIG_PACKAGE_mpd-full is not set +# CONFIG_PACKAGE_mpd-mini is not set +# CONFIG_PACKAGE_mpg123 is not set +# CONFIG_PACKAGE_opus-tools is not set +# CONFIG_PACKAGE_pianod is not set +# CONFIG_PACKAGE_pianod-client is not set +# CONFIG_PACKAGE_portaudio is not set +# CONFIG_PACKAGE_pulseaudio-daemon is not set +# CONFIG_PACKAGE_pulseaudio-daemon-avahi is not set +# CONFIG_PACKAGE_shairplay is not set +# CONFIG_PACKAGE_shairport-sync-mbedtls is not set +# CONFIG_PACKAGE_shairport-sync-mini is not set +# CONFIG_PACKAGE_shairport-sync-openssl is not set +# CONFIG_PACKAGE_shine is not set +# CONFIG_PACKAGE_sox is not set +# CONFIG_PACKAGE_squeezelite-full is not set +# CONFIG_PACKAGE_squeezelite-mini is not set +# CONFIG_PACKAGE_svox is not set +# CONFIG_PACKAGE_upmpdcli is not set +# end of Sound + +# +# Utilities +# + +# +# AppArmor +# +# CONFIG_PACKAGE_apparmor-profiles is not set +# CONFIG_PACKAGE_apparmor-utils is not set +# end of AppArmor + +# +# BigClown +# +# CONFIG_PACKAGE_bigclown-control-tool is not set +# CONFIG_PACKAGE_bigclown-firmware-tool is not set +# CONFIG_PACKAGE_bigclown-gateway is not set +# CONFIG_PACKAGE_bigclown-mqtt2influxdb is not set +# end of BigClown + +# +# Boot Loaders +# +# CONFIG_PACKAGE_fconfig is not set +CONFIG_PACKAGE_uboot-envtools=y +# end of Boot Loaders + +# +# Compression +# +# CONFIG_PACKAGE_bsdtar is not set +# CONFIG_PACKAGE_bsdtar-noopenssl is not set +# CONFIG_PACKAGE_bzip2 is not set +# CONFIG_PACKAGE_gzip is not set +# CONFIG_PACKAGE_lz4 is not set +# CONFIG_PACKAGE_pigz is not set +# CONFIG_PACKAGE_unrar is not set +# CONFIG_PACKAGE_unzip is not set +# CONFIG_PACKAGE_xz-utils is not set +# CONFIG_PACKAGE_zipcmp is not set +# CONFIG_PACKAGE_zipmerge is not set +# CONFIG_PACKAGE_ziptool is not set +# CONFIG_PACKAGE_zstd is not set +# end of Compression + +# +# Database +# +# CONFIG_PACKAGE_mariadb-common is not set +# CONFIG_PACKAGE_pgsql-cli is not set +# CONFIG_PACKAGE_pgsql-cli-extra is not set +# CONFIG_PACKAGE_pgsql-server is not set +# CONFIG_PACKAGE_rrdcgi1 is not set +# CONFIG_PACKAGE_rrdtool1 is not set +# CONFIG_PACKAGE_sqlite3-cli is not set +# CONFIG_PACKAGE_unixodbc-tools is not set +# end of Database + +# +# Disc +# +# CONFIG_PACKAGE_autopart is not set +# CONFIG_PACKAGE_blkid is not set +# CONFIG_PACKAGE_blockdev is not set +# CONFIG_PACKAGE_cfdisk is not set +# CONFIG_PACKAGE_cgdisk is not set +# CONFIG_PACKAGE_eject is not set +# CONFIG_PACKAGE_fdisk is not set +# CONFIG_PACKAGE_findfs is not set +# CONFIG_PACKAGE_fio is not set +# CONFIG_PACKAGE_fixparts is not set +# CONFIG_PACKAGE_gdisk is not set +# CONFIG_PACKAGE_hd-idle is not set +# CONFIG_PACKAGE_hdparm is not set +# CONFIG_PACKAGE_lsblk is not set +# CONFIG_PACKAGE_lvm2 is not set +# CONFIG_PACKAGE_lvm2-selinux is not set +# CONFIG_PACKAGE_mdadm is not set +# CONFIG_PACKAGE_mtools is not set +# CONFIG_PACKAGE_parted is not set +# CONFIG_PACKAGE_partx-utils is not set +# CONFIG_PACKAGE_sfdisk is not set +# CONFIG_PACKAGE_sgdisk is not set +# CONFIG_PACKAGE_uvol is not set +# CONFIG_PACKAGE_wipefs is not set +# end of Disc + +# +# Editors +# +# CONFIG_PACKAGE_joe is not set +# CONFIG_PACKAGE_joe-extras is not set +# CONFIG_PACKAGE_jupp is not set +# CONFIG_PACKAGE_mg is not set +# CONFIG_PACKAGE_nano is not set +# CONFIG_PACKAGE_vim is not set +# CONFIG_PACKAGE_vim-full is not set +# CONFIG_PACKAGE_vim-fuller is not set +# CONFIG_PACKAGE_vim-help is not set +# CONFIG_PACKAGE_vim-runtime is not set +# CONFIG_PACKAGE_zile is not set +# end of Editors + +# +# Encryption +# +# CONFIG_PACKAGE_ccrypt is not set +# CONFIG_PACKAGE_certtool is not set +# CONFIG_PACKAGE_cryptsetup is not set +# CONFIG_PACKAGE_gnupg is not set +# CONFIG_PACKAGE_gnupg2 is not set +# CONFIG_PACKAGE_gnupg2-dirmngr is not set +# CONFIG_PACKAGE_gnutls-utils is not set +# CONFIG_PACKAGE_gpgv is not set +# CONFIG_PACKAGE_gpgv2 is not set +# CONFIG_PACKAGE_keyctl is not set +# CONFIG_PACKAGE_keyutils is not set +# CONFIG_PACKAGE_px5g-mbedtls is not set +# CONFIG_PACKAGE_px5g-standalone is not set +# CONFIG_PACKAGE_px5g-wolfssl is not set +# CONFIG_PACKAGE_stoken is not set +# end of Encryption + +# +# Filesystem +# +# CONFIG_PACKAGE_acl is not set +# CONFIG_PACKAGE_antfs-mount is not set +# CONFIG_PACKAGE_attr is not set +# CONFIG_PACKAGE_badblocks is not set +# CONFIG_PACKAGE_btrfs-progs is not set +# CONFIG_PACKAGE_chattr is not set +# CONFIG_PACKAGE_debugfs is not set +# CONFIG_PACKAGE_dosfstools is not set +# CONFIG_PACKAGE_dumpe2fs is not set +# CONFIG_PACKAGE_e2freefrag is not set +# CONFIG_PACKAGE_e2fsprogs is not set +# CONFIG_PACKAGE_e4crypt is not set +# CONFIG_PACKAGE_exfat-fsck is not set +# CONFIG_PACKAGE_exfat-mkfs is not set +# CONFIG_PACKAGE_f2fs-tools is not set +# CONFIG_PACKAGE_f2fs-tools-selinux is not set +# CONFIG_PACKAGE_f2fsck is not set +# CONFIG_PACKAGE_f2fsck-selinux is not set +# CONFIG_PACKAGE_filefrag is not set +# CONFIG_PACKAGE_fstrim is not set +# CONFIG_PACKAGE_fuse-utils is not set +# CONFIG_PACKAGE_fuse3-utils is not set +# CONFIG_PACKAGE_hfsfsck is not set +# CONFIG_PACKAGE_lsattr is not set +# CONFIG_PACKAGE_mkf2fs is not set +# CONFIG_PACKAGE_mkf2fs-selinux is not set +# CONFIG_PACKAGE_mkhfs is not set +# CONFIG_PACKAGE_ncdu is not set +# CONFIG_PACKAGE_nfs-utils is not set +# CONFIG_PACKAGE_nfs-utils-libs is not set +# CONFIG_PACKAGE_ntfs-3g is not set +# CONFIG_PACKAGE_ntfs-3g-low is not set +# CONFIG_PACKAGE_ntfs-3g-utils is not set +# CONFIG_PACKAGE_ntfs3-mount is not set +# CONFIG_PACKAGE_owfs is not set +# CONFIG_PACKAGE_owshell is not set +# CONFIG_PACKAGE_resize2fs is not set +# CONFIG_PACKAGE_squashfs-tools-mksquashfs is not set +# CONFIG_PACKAGE_squashfs-tools-unsquashfs is not set +# CONFIG_PACKAGE_swap-utils is not set +# CONFIG_PACKAGE_sysfsutils is not set +# CONFIG_PACKAGE_tune2fs is not set +# CONFIG_PACKAGE_xfs-admin is not set +# CONFIG_PACKAGE_xfs-fsck is not set +# CONFIG_PACKAGE_xfs-growfs is not set +# CONFIG_PACKAGE_xfs-mkfs is not set +# end of Filesystem + +# +# Image Manipulation +# +# CONFIG_PACKAGE_libjpeg-turbo-utils is not set +# CONFIG_PACKAGE_tiff-utils is not set +# end of Image Manipulation + +# +# Microcontroller programming +# +# CONFIG_PACKAGE_avrdude is not set +# CONFIG_PACKAGE_dfu-programmer is not set +# CONFIG_PACKAGE_stm32flash is not set +# end of Microcontroller programming + +# +# RTKLIB Suite +# +# CONFIG_PACKAGE_convbin is not set +# CONFIG_PACKAGE_pos2kml is not set +# CONFIG_PACKAGE_rnx2rtkp is not set +# CONFIG_PACKAGE_rtkrcv is not set +# CONFIG_PACKAGE_str2str is not set +# end of RTKLIB Suite + +# +# Shells +# +# CONFIG_PACKAGE_bash is not set +# CONFIG_PACKAGE_fish is not set +# CONFIG_PACKAGE_klish is not set +# CONFIG_PACKAGE_mksh is not set +# CONFIG_PACKAGE_tcsh is not set +# CONFIG_PACKAGE_zsh is not set +# end of Shells + +# +# Telephony +# +# CONFIG_PACKAGE_dahdi-cfg is not set +# CONFIG_PACKAGE_dahdi-monitor is not set +# CONFIG_PACKAGE_gsm-utils is not set +# CONFIG_PACKAGE_sipgrep is not set +# CONFIG_PACKAGE_sngrep is not set +# end of Telephony + +# +# Terminal +# +# CONFIG_PACKAGE_agetty is not set +# CONFIG_PACKAGE_dvtm is not set +# CONFIG_PACKAGE_minicom is not set +# CONFIG_PACKAGE_picocom is not set +# CONFIG_PACKAGE_rtty-mbedtls is not set +# CONFIG_PACKAGE_rtty-nossl is not set +# CONFIG_PACKAGE_rtty-openssl is not set +# CONFIG_PACKAGE_rtty-wolfssl is not set +# CONFIG_PACKAGE_screen is not set +# CONFIG_PACKAGE_script-utils is not set +# CONFIG_PACKAGE_serialconsole is not set +# CONFIG_PACKAGE_setterm is not set +# CONFIG_PACKAGE_tio is not set +# CONFIG_PACKAGE_tmux is not set +# CONFIG_PACKAGE_ttyd is not set +# CONFIG_PACKAGE_wall is not set +# end of Terminal + +# +# Virtualization +# +# end of Virtualization + +# +# Zoneinfo +# +# CONFIG_PACKAGE_zoneinfo-africa is not set +# CONFIG_PACKAGE_zoneinfo-all is not set +# CONFIG_PACKAGE_zoneinfo-asia is not set +# CONFIG_PACKAGE_zoneinfo-atlantic is not set +# CONFIG_PACKAGE_zoneinfo-australia-nz is not set +# CONFIG_PACKAGE_zoneinfo-core is not set +# CONFIG_PACKAGE_zoneinfo-europe is not set +# CONFIG_PACKAGE_zoneinfo-india is not set +# CONFIG_PACKAGE_zoneinfo-northamerica is not set +# CONFIG_PACKAGE_zoneinfo-pacific is not set +# CONFIG_PACKAGE_zoneinfo-poles is not set +# CONFIG_PACKAGE_zoneinfo-simple is not set +# CONFIG_PACKAGE_zoneinfo-southamerica is not set +# end of Zoneinfo + +# +# libimobiledevice +# +# CONFIG_PACKAGE_idevicerestore is not set +# CONFIG_PACKAGE_irecovery is not set +# CONFIG_PACKAGE_libimobiledevice-utils is not set +# CONFIG_PACKAGE_libusbmuxd-utils is not set +# CONFIG_PACKAGE_plistutil is not set +# CONFIG_PACKAGE_usbmuxd is not set +# end of libimobiledevice + +# +# libselinux tools +# +# CONFIG_PACKAGE_libselinux-avcstat is not set +# CONFIG_PACKAGE_libselinux-compute_av is not set +# CONFIG_PACKAGE_libselinux-compute_create is not set +# CONFIG_PACKAGE_libselinux-compute_member is not set +# CONFIG_PACKAGE_libselinux-compute_relabel is not set +# CONFIG_PACKAGE_libselinux-getconlist is not set +# CONFIG_PACKAGE_libselinux-getdefaultcon is not set +# CONFIG_PACKAGE_libselinux-getenforce is not set +# CONFIG_PACKAGE_libselinux-getfilecon is not set +# CONFIG_PACKAGE_libselinux-getpidcon is not set +# CONFIG_PACKAGE_libselinux-getsebool is not set +# CONFIG_PACKAGE_libselinux-getseuser is not set +# CONFIG_PACKAGE_libselinux-matchpathcon is not set +# CONFIG_PACKAGE_libselinux-policyvers is not set +# CONFIG_PACKAGE_libselinux-sefcontext_compile is not set +# CONFIG_PACKAGE_libselinux-selabel_digest is not set +# CONFIG_PACKAGE_libselinux-selabel_get_digests_all_partial_matches is not set +# CONFIG_PACKAGE_libselinux-selabel_lookup is not set +# CONFIG_PACKAGE_libselinux-selabel_lookup_best_match is not set +# CONFIG_PACKAGE_libselinux-selabel_partial_match is not set +# CONFIG_PACKAGE_libselinux-selinux_check_access is not set +# CONFIG_PACKAGE_libselinux-selinux_check_securetty_context is not set +# CONFIG_PACKAGE_libselinux-selinuxenabled is not set +# CONFIG_PACKAGE_libselinux-selinuxexeccon is not set +# CONFIG_PACKAGE_libselinux-setenforce is not set +# CONFIG_PACKAGE_libselinux-setfilecon is not set +# CONFIG_PACKAGE_libselinux-togglesebool is not set +# CONFIG_PACKAGE_libselinux-validatetrans is not set +# end of libselinux tools + +# CONFIG_PACKAGE_ack is not set +# CONFIG_PACKAGE_acpid is not set +# CONFIG_PACKAGE_adb is not set +# CONFIG_PACKAGE_ap51-flash is not set +# CONFIG_PACKAGE_apk is not set +# CONFIG_PACKAGE_at is not set +# CONFIG_PACKAGE_atheepmgr is not set +# CONFIG_PACKAGE_audit is not set +# CONFIG_PACKAGE_audit-utils is not set +# CONFIG_PACKAGE_augeas is not set +# CONFIG_PACKAGE_augeas-lenses is not set +# CONFIG_PACKAGE_augeas-lenses-tests is not set +# CONFIG_PACKAGE_bandwidthd is not set +# CONFIG_PACKAGE_bandwidthd-pgsql is not set +# CONFIG_PACKAGE_bandwidthd-php is not set +# CONFIG_PACKAGE_bandwidthd-sqlite is not set +# CONFIG_PACKAGE_banhostlist is not set +# CONFIG_PACKAGE_bc is not set +# CONFIG_PACKAGE_bluelog is not set +# CONFIG_PACKAGE_bluez-daemon is not set +# CONFIG_PACKAGE_bluez-utils is not set +# CONFIG_PACKAGE_bluez-utils-extra is not set +# CONFIG_PACKAGE_bluld is not set +# CONFIG_PACKAGE_bonniexx is not set +# CONFIG_PACKAGE_bottlerocket is not set +# CONFIG_PACKAGE_bsdiff is not set +# CONFIG_PACKAGE_bspatch is not set +# CONFIG_PACKAGE_byobu is not set +# CONFIG_PACKAGE_byobu-utils is not set +# CONFIG_PACKAGE_cache-domains-mbedtls is not set +# CONFIG_PACKAGE_cache-domains-openssl is not set +# CONFIG_PACKAGE_cache-domains-wolfssl is not set +# CONFIG_PACKAGE_cal is not set +# CONFIG_PACKAGE_canutils is not set +# CONFIG_PACKAGE_cgroup-tools is not set +# CONFIG_PACKAGE_cgroupfs-mount is not set +# CONFIG_PACKAGE_checkpolicy is not set +# CONFIG_PACKAGE_checksec is not set +# CONFIG_PACKAGE_checksec_automator is not set +# CONFIG_PACKAGE_chkcon is not set +# CONFIG_PACKAGE_cmdpad is not set +# CONFIG_PACKAGE_cni is not set +# CONFIG_PACKAGE_cni-plugins is not set +# CONFIG_PACKAGE_cni-plugins-nft is not set +# CONFIG_PACKAGE_coap-client is not set +# CONFIG_PACKAGE_collectd is not set +# CONFIG_PACKAGE_conmon is not set +# CONFIG_PACKAGE_containerd is not set +CONFIG_PACKAGE_coremark=y +CONFIG_COREMARK_OPTIMIZE_O3=y +CONFIG_COREMARK_ENABLE_MULTITHREADING=y +CONFIG_COREMARK_NUMBER_OF_THREADS=16 +CONFIG_PACKAGE_coreutils=y +# CONFIG_PACKAGE_coreutils-b2sum is not set +# CONFIG_PACKAGE_coreutils-base32 is not set +CONFIG_PACKAGE_coreutils-base64=y +# CONFIG_PACKAGE_coreutils-basename is not set +# CONFIG_PACKAGE_coreutils-basenc is not set +# CONFIG_PACKAGE_coreutils-cat is not set +# CONFIG_PACKAGE_coreutils-chcon is not set +# CONFIG_PACKAGE_coreutils-chgrp is not set +# CONFIG_PACKAGE_coreutils-chmod is not set +# CONFIG_PACKAGE_coreutils-chown is not set +# CONFIG_PACKAGE_coreutils-chroot is not set +# CONFIG_PACKAGE_coreutils-cksum is not set +# CONFIG_PACKAGE_coreutils-comm is not set +# CONFIG_PACKAGE_coreutils-cp is not set +# CONFIG_PACKAGE_coreutils-csplit is not set +# CONFIG_PACKAGE_coreutils-cut is not set +# CONFIG_PACKAGE_coreutils-date is not set +# CONFIG_PACKAGE_coreutils-dd is not set +# CONFIG_PACKAGE_coreutils-df is not set +# CONFIG_PACKAGE_coreutils-dir is not set +# CONFIG_PACKAGE_coreutils-dircolors is not set +# CONFIG_PACKAGE_coreutils-dirname is not set +# CONFIG_PACKAGE_coreutils-du is not set +# CONFIG_PACKAGE_coreutils-echo is not set +# CONFIG_PACKAGE_coreutils-env is not set +# CONFIG_PACKAGE_coreutils-expand is not set +# CONFIG_PACKAGE_coreutils-expr is not set +# CONFIG_PACKAGE_coreutils-factor is not set +# CONFIG_PACKAGE_coreutils-false is not set +# CONFIG_PACKAGE_coreutils-fmt is not set +# CONFIG_PACKAGE_coreutils-fold is not set +# CONFIG_PACKAGE_coreutils-groups is not set +# CONFIG_PACKAGE_coreutils-head is not set +# CONFIG_PACKAGE_coreutils-hostid is not set +# CONFIG_PACKAGE_coreutils-id is not set +# CONFIG_PACKAGE_coreutils-install is not set +# CONFIG_PACKAGE_coreutils-join is not set +# CONFIG_PACKAGE_coreutils-kill is not set +# CONFIG_PACKAGE_coreutils-link is not set +# CONFIG_PACKAGE_coreutils-ln is not set +# CONFIG_PACKAGE_coreutils-logname is not set +# CONFIG_PACKAGE_coreutils-ls is not set +# CONFIG_PACKAGE_coreutils-md5sum is not set +# CONFIG_PACKAGE_coreutils-mkdir is not set +# CONFIG_PACKAGE_coreutils-mkfifo is not set +# CONFIG_PACKAGE_coreutils-mknod is not set +# CONFIG_PACKAGE_coreutils-mktemp is not set +# CONFIG_PACKAGE_coreutils-mv is not set +# CONFIG_PACKAGE_coreutils-nice is not set +# CONFIG_PACKAGE_coreutils-nl is not set +# CONFIG_PACKAGE_coreutils-nohup is not set +# CONFIG_PACKAGE_coreutils-nproc is not set +# CONFIG_PACKAGE_coreutils-numfmt is not set +# CONFIG_PACKAGE_coreutils-od is not set +# CONFIG_PACKAGE_coreutils-paste is not set +# CONFIG_PACKAGE_coreutils-pathchk is not set +# CONFIG_PACKAGE_coreutils-pinky is not set +# CONFIG_PACKAGE_coreutils-pr is not set +# CONFIG_PACKAGE_coreutils-printenv is not set +# CONFIG_PACKAGE_coreutils-printf is not set +# CONFIG_PACKAGE_coreutils-ptx is not set +# CONFIG_PACKAGE_coreutils-pwd is not set +# CONFIG_PACKAGE_coreutils-readlink is not set +# CONFIG_PACKAGE_coreutils-realpath is not set +# CONFIG_PACKAGE_coreutils-rm is not set +# CONFIG_PACKAGE_coreutils-rmdir is not set +# CONFIG_PACKAGE_coreutils-runcon is not set +# CONFIG_PACKAGE_coreutils-seq is not set +# CONFIG_PACKAGE_coreutils-sha1sum is not set +# CONFIG_PACKAGE_coreutils-sha224sum is not set +# CONFIG_PACKAGE_coreutils-sha256sum is not set +# CONFIG_PACKAGE_coreutils-sha384sum is not set +# CONFIG_PACKAGE_coreutils-sha512sum is not set +# CONFIG_PACKAGE_coreutils-shred is not set +# CONFIG_PACKAGE_coreutils-shuf is not set +# CONFIG_PACKAGE_coreutils-sleep is not set +# CONFIG_PACKAGE_coreutils-sort is not set +# CONFIG_PACKAGE_coreutils-split is not set +# CONFIG_PACKAGE_coreutils-stat is not set +# CONFIG_PACKAGE_coreutils-stdbuf is not set +# CONFIG_PACKAGE_coreutils-stty is not set +# CONFIG_PACKAGE_coreutils-sum is not set +# CONFIG_PACKAGE_coreutils-sync is not set +# CONFIG_PACKAGE_coreutils-tac is not set +# CONFIG_PACKAGE_coreutils-tail is not set +# CONFIG_PACKAGE_coreutils-tee is not set +# CONFIG_PACKAGE_coreutils-test is not set +# CONFIG_PACKAGE_coreutils-timeout is not set +# CONFIG_PACKAGE_coreutils-touch is not set +# CONFIG_PACKAGE_coreutils-tr is not set +# CONFIG_PACKAGE_coreutils-true is not set +# CONFIG_PACKAGE_coreutils-truncate is not set +# CONFIG_PACKAGE_coreutils-tsort is not set +# CONFIG_PACKAGE_coreutils-tty is not set +# CONFIG_PACKAGE_coreutils-uname is not set +# CONFIG_PACKAGE_coreutils-unexpand is not set +# CONFIG_PACKAGE_coreutils-uniq is not set +# CONFIG_PACKAGE_coreutils-unlink is not set +# CONFIG_PACKAGE_coreutils-uptime is not set +# CONFIG_PACKAGE_coreutils-users is not set +# CONFIG_PACKAGE_coreutils-vdir is not set +# CONFIG_PACKAGE_coreutils-wc is not set +# CONFIG_PACKAGE_coreutils-who is not set +# CONFIG_PACKAGE_coreutils-whoami is not set +# CONFIG_PACKAGE_coreutils-yes is not set +# CONFIG_PACKAGE_crconf is not set +# CONFIG_PACKAGE_crelay is not set +# CONFIG_PACKAGE_crun is not set +# CONFIG_PACKAGE_csstidy is not set +# CONFIG_PACKAGE_ct-bugcheck is not set +# CONFIG_PACKAGE_ctop is not set +# CONFIG_PACKAGE_dbus is not set +# CONFIG_PACKAGE_dbus-utils is not set +# CONFIG_PACKAGE_device-observatory is not set +# CONFIG_PACKAGE_dfu-util is not set +# CONFIG_PACKAGE_digitemp is not set +# CONFIG_PACKAGE_digitemp-usb is not set +# CONFIG_PACKAGE_dmesg is not set +# CONFIG_PACKAGE_docker is not set +# CONFIG_PACKAGE_docker-compose is not set +# CONFIG_PACKAGE_dockerd is not set +# CONFIG_PACKAGE_dropbearconvert is not set +# CONFIG_PACKAGE_dtc is not set +# CONFIG_PACKAGE_dumb-init is not set +# CONFIG_PACKAGE_dump1090 is not set +# CONFIG_PACKAGE_ecdsautils is not set +# CONFIG_PACKAGE_elektra-kdb is not set +# CONFIG_PACKAGE_evtest is not set +# CONFIG_PACKAGE_extract is not set +# CONFIG_PACKAGE_fdt-utils is not set +# CONFIG_PACKAGE_file is not set +# CONFIG_PACKAGE_findutils is not set +# CONFIG_PACKAGE_findutils-find is not set +# CONFIG_PACKAGE_findutils-locate is not set +# CONFIG_PACKAGE_findutils-xargs is not set +# CONFIG_PACKAGE_flashrom is not set +# CONFIG_PACKAGE_flashrom-pci is not set +# CONFIG_PACKAGE_flashrom-spi is not set +# CONFIG_PACKAGE_flashrom-usb is not set +# CONFIG_PACKAGE_flent-tools is not set +# CONFIG_PACKAGE_flock is not set +# CONFIG_PACKAGE_fritz-caldata is not set +# CONFIG_PACKAGE_fritz-tffs is not set +# CONFIG_PACKAGE_fritz-tffs-nand is not set +# CONFIG_PACKAGE_ftdi_eeprom is not set +# CONFIG_PACKAGE_gammu is not set +# CONFIG_PACKAGE_gawk is not set +# CONFIG_PACKAGE_gddrescue is not set +# CONFIG_PACKAGE_getopt is not set +# CONFIG_PACKAGE_giflib-utils is not set +# CONFIG_PACKAGE_gkermit is not set +# CONFIG_PACKAGE_gnuplot is not set +# CONFIG_PACKAGE_gpioctl-sysfs is not set +# CONFIG_PACKAGE_gpiod-tools is not set +# CONFIG_PACKAGE_gpsd is not set +# CONFIG_PACKAGE_gpsd-clients is not set +# CONFIG_PACKAGE_gpsd-utils is not set +# CONFIG_PACKAGE_grep is not set +# CONFIG_PACKAGE_hamlib is not set +# CONFIG_PACKAGE_haserl is not set +# CONFIG_PACKAGE_hashdeep is not set +# CONFIG_PACKAGE_haveged is not set +# CONFIG_PACKAGE_hplip-common is not set +# CONFIG_PACKAGE_hplip-sane is not set +# CONFIG_PACKAGE_hub-ctrl is not set +# CONFIG_PACKAGE_hwclock is not set +# CONFIG_PACKAGE_hwinfo is not set +# CONFIG_PACKAGE_hwloc-utils is not set +# CONFIG_PACKAGE_i2c-tools is not set +# CONFIG_PACKAGE_iconv is not set +# CONFIG_PACKAGE_iio-utils is not set +# CONFIG_PACKAGE_inotifywait is not set +# CONFIG_PACKAGE_inotifywatch is not set +# CONFIG_PACKAGE_io is not set +# CONFIG_PACKAGE_ipfs-http-client-tests is not set +# CONFIG_PACKAGE_irqbalance is not set +# CONFIG_PACKAGE_iwcap is not set +CONFIG_PACKAGE_iwinfo=y +# CONFIG_PACKAGE_jq is not set +CONFIG_PACKAGE_jshn=y +# CONFIG_PACKAGE_kexec is not set +# CONFIG_PACKAGE_kexec-tools is not set +# CONFIG_PACKAGE_kmod is not set +# CONFIG_PACKAGE_lcd4linux-custom is not set +# CONFIG_PACKAGE_lcdproc-clients is not set +# CONFIG_PACKAGE_lcdproc-drivers is not set +# CONFIG_PACKAGE_lcdproc-server is not set +# CONFIG_PACKAGE_less is not set +# CONFIG_PACKAGE_less-wide is not set +CONFIG_PACKAGE_libjson-script=y +# CONFIG_PACKAGE_libnetwork is not set +# CONFIG_PACKAGE_libxml2-utils is not set +# CONFIG_PACKAGE_lm-sensors is not set +# CONFIG_PACKAGE_lm-sensors-detect is not set +# CONFIG_PACKAGE_logger is not set +# CONFIG_PACKAGE_logrotate is not set +# CONFIG_PACKAGE_look is not set +# CONFIG_PACKAGE_losetup is not set +# CONFIG_PACKAGE_lrzsz is not set +# CONFIG_PACKAGE_lscpu is not set +# CONFIG_PACKAGE_lsof is not set +# CONFIG_PACKAGE_lxc is not set +# CONFIG_PACKAGE_maccalc is not set +# CONFIG_PACKAGE_macchanger is not set +# CONFIG_PACKAGE_mandoc is not set +# CONFIG_PACKAGE_mbedtls-util is not set +# CONFIG_PACKAGE_mbim-utils is not set +# CONFIG_PACKAGE_mbtools is not set +# CONFIG_PACKAGE_mc is not set +# CONFIG_PACKAGE_mcookie is not set +# CONFIG_PACKAGE_micrond is not set +# CONFIG_PACKAGE_mmc-utils is not set +# CONFIG_PACKAGE_more is not set +# CONFIG_PACKAGE_moreutils is not set +# CONFIG_PACKAGE_mosh-client is not set +# CONFIG_PACKAGE_mosh-server is not set +# CONFIG_PACKAGE_mount-utils is not set +# CONFIG_PACKAGE_mpack is not set +# CONFIG_PACKAGE_mt-st is not set +# CONFIG_PACKAGE_namei is not set +# CONFIG_PACKAGE_nand-utils is not set +# CONFIG_PACKAGE_netopeer2-cli is not set +# CONFIG_PACKAGE_netopeer2-server is not set +# CONFIG_PACKAGE_netwhere is not set +# CONFIG_PACKAGE_nnn is not set +# CONFIG_PACKAGE_nsenter is not set +# CONFIG_PACKAGE_nss-utils is not set +# CONFIG_PACKAGE_oath-toolkit is not set +# CONFIG_PACKAGE_oci-runtime-tool is not set +# CONFIG_PACKAGE_open-plc-utils is not set +# CONFIG_PACKAGE_open2300 is not set +# CONFIG_PACKAGE_openobex is not set +# CONFIG_PACKAGE_openobex-apps is not set +# CONFIG_PACKAGE_openocd is not set +# CONFIG_PACKAGE_opensc-utils is not set +CONFIG_PACKAGE_openssl-util=y +# CONFIG_PACKAGE_openzwave is not set +# CONFIG_PACKAGE_openzwave-config is not set +# CONFIG_PACKAGE_owipcalc is not set +# CONFIG_PACKAGE_pciids is not set +# CONFIG_PACKAGE_pciutils is not set +# CONFIG_PACKAGE_pcsc-tools is not set +# CONFIG_PACKAGE_pcscd is not set +# CONFIG_PACKAGE_podman is not set +# CONFIG_PACKAGE_podman-selinux is not set +# CONFIG_PACKAGE_policycoreutils is not set +# CONFIG_PACKAGE_powertop is not set +# CONFIG_PACKAGE_pps-tools is not set +# CONFIG_PACKAGE_prlimit is not set +# CONFIG_PACKAGE_procps-ng is not set +# CONFIG_PACKAGE_progress is not set +# CONFIG_PACKAGE_prometheus is not set +# CONFIG_PACKAGE_prometheus-node-exporter-lua is not set +# CONFIG_PACKAGE_prometheus-statsd-exporter is not set +# CONFIG_PACKAGE_pservice is not set +# CONFIG_PACKAGE_psmisc is not set +# CONFIG_PACKAGE_pv is not set +# CONFIG_PACKAGE_qca-ssdk-shell is not set +# CONFIG_PACKAGE_qmi-utils is not set +# CONFIG_PACKAGE_qrencode is not set +# CONFIG_PACKAGE_quota is not set +# CONFIG_PACKAGE_ravpower-mcu is not set +# CONFIG_PACKAGE_rclone is not set +# CONFIG_PACKAGE_readsb is not set +# CONFIG_PACKAGE_relayctl is not set +# CONFIG_PACKAGE_rename is not set +# CONFIG_PACKAGE_reptyr is not set +# CONFIG_PACKAGE_restic is not set +# CONFIG_PACKAGE_rng-tools is not set +# CONFIG_PACKAGE_rtl-ais is not set +# CONFIG_PACKAGE_rtl-sdr is not set +# CONFIG_PACKAGE_rtl_433 is not set +# CONFIG_PACKAGE_runc is not set +# CONFIG_PACKAGE_sane-backends is not set +# CONFIG_PACKAGE_sane-daemon is not set +# CONFIG_PACKAGE_sane-frontends is not set +# CONFIG_PACKAGE_secilc is not set +# CONFIG_PACKAGE_sed is not set +# CONFIG_PACKAGE_selinux-audit2allow is not set +# CONFIG_PACKAGE_selinux-chcat is not set +# CONFIG_PACKAGE_selinux-semanage is not set +# CONFIG_PACKAGE_semodule-utils is not set +# CONFIG_PACKAGE_serdisplib-tools is not set +# CONFIG_PACKAGE_setools is not set +# CONFIG_PACKAGE_setserial is not set +# CONFIG_PACKAGE_shadow-utils is not set +CONFIG_PACKAGE_shellsync=y +# CONFIG_PACKAGE_sipcalc is not set +# CONFIG_PACKAGE_sispmctl is not set +# CONFIG_PACKAGE_slide-switch is not set +# CONFIG_PACKAGE_smartd is not set +# CONFIG_PACKAGE_smartd-mail is not set +# CONFIG_PACKAGE_smartmontools is not set +# CONFIG_PACKAGE_smartmontools-drivedb is not set +# CONFIG_PACKAGE_smstools3 is not set +# CONFIG_PACKAGE_sockread is not set +# CONFIG_PACKAGE_spi-tools is not set +# CONFIG_PACKAGE_spidev-test is not set +# CONFIG_PACKAGE_ssdeep is not set +# CONFIG_PACKAGE_sshpass is not set +# CONFIG_PACKAGE_strace is not set +CONFIG_STRACE_NONE=y +# CONFIG_STRACE_LIBDW is not set +# CONFIG_STRACE_LIBUNWIND is not set +# CONFIG_PACKAGE_stress is not set +# CONFIG_PACKAGE_stress-ng is not set +# CONFIG_PACKAGE_sumo is not set +# CONFIG_PACKAGE_syncthing is not set +# CONFIG_PACKAGE_sysrepo is not set +# CONFIG_PACKAGE_sysrepocfg is not set +# CONFIG_PACKAGE_sysrepoctl is not set +# CONFIG_PACKAGE_sysstat is not set +# CONFIG_PACKAGE_tar is not set +# CONFIG_PACKAGE_taskwarrior is not set +# CONFIG_PACKAGE_telldus-core is not set +# CONFIG_PACKAGE_temperusb is not set +# CONFIG_PACKAGE_tesseract is not set +# CONFIG_PACKAGE_tini is not set +# CONFIG_PACKAGE_tracertools is not set +# CONFIG_PACKAGE_tree is not set +# CONFIG_PACKAGE_triggerhappy is not set +CONFIG_PACKAGE_ubi-utils=y +# CONFIG_PACKAGE_ucode is not set +# CONFIG_PACKAGE_udns-dnsget is not set +# CONFIG_PACKAGE_udns-ex-rdns is not set +# CONFIG_PACKAGE_udns-rblcheck is not set +# CONFIG_PACKAGE_ugps is not set +# CONFIG_PACKAGE_uhubctl is not set +# CONFIG_PACKAGE_uledd is not set +# CONFIG_PACKAGE_unshare is not set +# CONFIG_PACKAGE_usb-modeswitch is not set +# CONFIG_PACKAGE_usbids is not set +# CONFIG_PACKAGE_usbutils is not set +# CONFIG_PACKAGE_uuidd is not set +# CONFIG_PACKAGE_uuidgen is not set +# CONFIG_PACKAGE_uvcdynctrl is not set +# CONFIG_PACKAGE_v4l-utils is not set +# CONFIG_PACKAGE_view1090 is not set +# CONFIG_PACKAGE_viewadsb is not set +# CONFIG_PACKAGE_watchcat is not set +# CONFIG_PACKAGE_whereis is not set +# CONFIG_PACKAGE_which is not set +# CONFIG_PACKAGE_whiptail is not set +# CONFIG_PACKAGE_whois is not set +# CONFIG_PACKAGE_wifitoggle is not set +# CONFIG_PACKAGE_wipe is not set +# CONFIG_PACKAGE_xsltproc is not set +# CONFIG_PACKAGE_xxd is not set +# CONFIG_PACKAGE_yanglint is not set +# CONFIG_PACKAGE_yara is not set +# CONFIG_PACKAGE_ykclient is not set +# CONFIG_PACKAGE_ykpers is not set +# CONFIG_PACKAGE_yq is not set +# end of Utilities + +# +# Xorg +# + +# +# Font-Utils +# +# CONFIG_PACKAGE_fontconfig is not set +# end of Font-Utils +# end of Xorg diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile index a5cb49cb9..c89c9e0ac 100644 --- a/target/linux/ipq806x/Makefile +++ b/target/linux/ipq806x/Makefile @@ -22,6 +22,7 @@ DEFAULT_PACKAGES += \ kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \ kmod-phy-qcom-ipq806x-usb kmod-usb3 kmod-usb-dwc3-qcom \ kmod-ath10k-ct wpad-openssl uboot-envtools \ - autocore-arm automount autosamba e2fsprogs htop + kmod-shortcut-fe kmod-qca-nss-drv kmod-qca-nss-ecm-standard kmod-qca-nss-gmac kmod-nss-ifb kmod-qca-nss-drv-pppoe \ + autocore-arm automount autosamba $(eval $(call BuildTarget)) diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network b/target/linux/ipq806x/base-files/etc/board.d/02_network index 9523c5168..1a1cec51a 100644 --- a/target/linux/ipq806x/base-files/etc/board.d/02_network +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network @@ -71,13 +71,6 @@ qcom,ipq8064-db149) ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "6u@eth1" "5:wan" "0u@eth0" ;; -ruijie,rg-mtfi-m520) - hw_mac_addr=$(mtd_get_mac_ascii PRODUCTINFO ethaddr) - ucidef_add_switch "switch0" \ - "1:lan" "6@eth1" "5:wan" "0@eth0" - ucidef_set_interface_macaddr "wan" "$hw_mac_addr" - ucidef_set_interface_macaddr "lan" "$(macaddr_add $hw_mac_addr 1)" - ;; tplink,ad7200) ucidef_add_switch "switch0" \ "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "6@eth1" "1:wan" "0@eth0" diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index c2c9c194b..d2bdf034b 100644 --- a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -7,27 +7,9 @@ board=$(board_name) case "$FIRMWARE" in -"ath10k/cal-pci-0000:01:00.0.bin") - case "$board" in - ruijie,rg-mtfi-m520) - caldata_extract "ART" 0x1000 0x844 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii PRODUCTINFO ethaddr) 2) - ;; - esac - ;; -"ath10k/cal-pci-0001:01:00.0.bin") - case "$board" in - ruijie,rg-mtfi-m520) - caldata_extract "ART" 0x5000 0x844 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii PRODUCTINFO ethaddr) 3) - ;; - esac - ;; "ath10k/pre-cal-pci-0000:01:00.0.bin") case $board in - askey,rt4230w-rev6) - caldata_extract "0:ART" 0x1000 0x2f20 - ;; + askey,rt4230w-rev6 |\ asrock,g10) if [ -b "$(find_mtd_part 0:art)" ]; then caldata_extract "0:art" 0x1000 0x2f20 @@ -87,9 +69,7 @@ case "$FIRMWARE" in ;; "ath10k/pre-cal-pci-0001:01:00.0.bin") case $board in - askey,rt4230w-rev6) - caldata_extract "0:ART" 0x5000 0x2f20 - ;; + askey,rt4230w-rev6 |\ asrock,g10) if [ -b "$(find_mtd_part 0:art)" ]; then caldata_extract "0:art" 0x5000 0x2f20 diff --git a/target/linux/ipq806x/base-files/etc/init.d/bootcount b/target/linux/ipq806x/base-files/etc/init.d/bootcount index cb32a4ed3..b1cf13629 100755 --- a/target/linux/ipq806x/base-files/etc/init.d/bootcount +++ b/target/linux/ipq806x/base-files/etc/init.d/bootcount @@ -17,4 +17,12 @@ boot() { mtd resetbc s_env || true ;; esac + + echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq + echo 800000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq + echo 20 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold + echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor + + sysctl -w vm.min_free_kbytes=65536 + sysctl -w net.netfilter.nf_conntrack_max=32768 } diff --git a/target/linux/ipq806x/base-files/etc/init.d/cpu_freq b/target/linux/ipq806x/base-files/etc/init.d/cpufreq similarity index 100% rename from target/linux/ipq806x/base-files/etc/init.d/cpu_freq rename to target/linux/ipq806x/base-files/etc/init.d/cpufreq diff --git a/target/linux/ipq806x/base-files/lib/preinit/05_set_iface_mac_ipq806x.sh b/target/linux/ipq806x/base-files/lib/preinit/05_set_iface_mac_ipq806x.sh index 569a19bac..ca8d0b155 100644 --- a/target/linux/ipq806x/base-files/lib/preinit/05_set_iface_mac_ipq806x.sh +++ b/target/linux/ipq806x/base-files/lib/preinit/05_set_iface_mac_ipq806x.sh @@ -8,11 +8,6 @@ preinit_set_mac_address() { ip link set dev eth0 address "${lan_mac}" ip link set dev eth1 address "${wan_mac}" ;; - ruijie,rg-mtfi-m520) - base_mac=$(mtd_get_mac_ascii PRODUCTINFO ethaddr) - ip link set dev eth0 address $(macaddr_add "$base_mac" 1) - ip link set dev eth1 address $(macaddr_add "$base_mac" 2) - ;; esac } diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh index 29da1606b..a5e18201d 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh @@ -44,9 +44,6 @@ platform_do_upgrade() { linksys,ea8500) platform_do_upgrade_linksys "$1" ;; - ruijie,rg-mtfi-m520) - ruijie_do_upgrade "$1" - ;; tplink,ad7200 |\ tplink,c2600) PART_NAME="os-image:rootfs" diff --git a/target/linux/ipq806x/base-files/lib/upgrade/ruijie.sh b/target/linux/ipq806x/base-files/lib/upgrade/ruijie.sh deleted file mode 100644 index 664462171..000000000 --- a/target/linux/ipq806x/base-files/lib/upgrade/ruijie.sh +++ /dev/null @@ -1,54 +0,0 @@ -# -# Copyright (C) 2016 lede-project.org -# - -ruijie_do_flash() { - local tar_file=$1 - local kernel=$2 - local rootfs=$3 - - # keep sure its unbound - losetup --detach-all || { - echo Failed to detach all loop devices. Skip this try. - reboot -f - } - - # use the first found directory in the tar archive - local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$') - board_dir=${board_dir%/} - - echo "flashing kernel to $kernel" - tar xf $tar_file ${board_dir}/kernel -O > $kernel - - echo "flashing rootfs to $rootfs" - tar xf $tar_file ${board_dir}/root -O > $rootfs - - # Cleanup - losetup -d /dev/loop0 >/dev/null 2>&1 - sync - umount -a - reboot -f -} - -ruijie_do_upgrade() { - local tar_file="$1" - local board=$(board_name) - local kernel= - local rootfs= - - case "$board" in - ruijie,rg-mtfi-m520) - kernel="/dev/mmcblk0p2" - rootfs="/dev/mmcblk0p3" - ;; - *) - return 1 - ;; - esac - - ruijie_do_flash $tar_file $kernel $rootfs - - nand_do_upgrade "$1" - - return 0 -} diff --git a/target/linux/ipq806x/config-5.10 b/target/linux/ipq806x/config-5.10 index ba321dc0b..6b8a418d3 100644 --- a/target/linux/ipq806x/config-5.10 +++ b/target/linux/ipq806x/config-5.10 @@ -174,8 +174,6 @@ CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y -CONFIG_GPIO_PCA953X=y -CONFIG_GPIO_PCA953X_IRQ=y CONFIG_GRO_CELLS=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDEN_BRANCH_PREDICTOR=y diff --git a/target/linux/ipq806x/config-5.4 b/target/linux/ipq806x/config-5.4 index 88fa9c1ca..ea68b8400 100644 --- a/target/linux/ipq806x/config-5.4 +++ b/target/linux/ipq806x/config-5.4 @@ -1,3 +1,7 @@ +# CONFIG_PHY_QCOM_IPQ806X_USB is not set +CONFIG_REGULATOR_NSS_VOLT=y +# CONFIG_SHORTCUT_FE is not set +CONFIG_64BIT_TIME=y CONFIG_ALIGNMENT_TRAP=y # CONFIG_APQ_GCC_8084 is not set # CONFIG_APQ_MMCC_8084 is not set @@ -164,8 +168,6 @@ CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y -CONFIG_GPIO_PCA953X=y -CONFIG_GPIO_PCA953X_IRQ=y CONFIG_GRO_CELLS=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDEN_BRANCH_PREDICTOR=y diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi index af0efb256..2c2505bd2 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi @@ -282,15 +282,29 @@ &gmac1 { status = "okay"; + compatible = "qcom,nss-gmac"; + reg = <0x37200000 0x200000>; + interrupts = ; phy-mode = "rgmii"; qcom,id = <1>; + qcom,pcs-chanid = <0>; + qcom,phy-mdio-addr = <4>; + qcom,poll-required = <0>; + qcom,rgmii-delay = <1>; + qcom,phy_mii_type = <0>; + qcom,emulation = <0>; + qcom,forced-speed = <1000>; + qcom,forced-duplex = <1>; + qcom,socver = <0>; + qcom,irq = <255>; + mdiobus = <&mdio0>; pinctrl-0 = <&rgmii2_pins>; pinctrl-names = "default"; mtd-mac-address = <&defaultmac 0x8>; mtd-mac-address-increment = <1>; - + fixed-link { speed = <1000>; full-duplex; @@ -299,9 +313,23 @@ &gmac2 { status = "okay"; + compatible = "qcom,nss-gmac"; + reg = <0x37400000 0x200000>; + interrupts = ; phy-mode = "sgmii"; qcom,id = <2>; - + qcom,pcs-chanid = <1>; + qcom,phy-mdio-addr = <0>; /* none */ + qcom,poll-required = <0>; /* no polling */ + qcom,rgmii-delay = <0>; + qcom,phy_mii_type = <1>; + qcom,emulation = <0>; + qcom,forced-speed = <1000>; + qcom,forced-duplex = <1>; + qcom,socver = <0>; + qcom,irq = <258>; + mdiobus = <&mdio0>; + mtd-mac-address = <&defaultmac 0x8>; fixed-link { diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts index 82535cc86..45b048e28 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts @@ -291,8 +291,22 @@ &gmac1 { status = "okay"; + compatible = "qcom,nss-gmac"; + reg = <0x37200000 0x200000>; + interrupts = ; phy-mode = "rgmii"; qcom,id = <1>; + qcom,pcs-chanid = <0>; + qcom,phy-mdio-addr = <4>; + qcom,poll-required = <0>; + qcom,rgmii-delay = <1>; + qcom,phy_mii_type = <0>; + qcom,emulation = <0>; + qcom,forced-speed = <1000>; + qcom,forced-duplex = <1>; + qcom,socver = <0>; + qcom,irq = <255>; + mdiobus = <&mdio0>; pinctrl-0 = <&rgmii2_pins>; pinctrl-names = "default"; @@ -307,8 +321,22 @@ &gmac2 { status = "okay"; + compatible = "qcom,nss-gmac"; + reg = <0x37400000 0x200000>; + interrupts = ; phy-mode = "sgmii"; qcom,id = <2>; + qcom,pcs-chanid = <1>; + qcom,phy-mdio-addr = <0>; /* none */ + qcom,poll-required = <0>; /* no polling */ + qcom,rgmii-delay = <0>; + qcom,phy_mii_type = <1>; + qcom,emulation = <0>; + qcom,forced-speed = <1000>; + qcom,forced-duplex = <1>; + qcom,socver = <0>; + qcom,irq = <258>; + mdiobus = <&mdio0>; mtd-mac-address = <&art 0>; diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-eax500.dtsi b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-eax500.dtsi index 98c4b2d29..86c9bee75 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-eax500.dtsi +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-eax500.dtsi @@ -173,13 +173,30 @@ 0x00094 0x4e /* PORT6_STATUS */ >; }; + + phy4: ethernet-phy@4 { + reg = <4>; + }; }; &gmac1 { status = "okay"; - + compatible = "qcom,nss-gmac"; + reg = <0x37200000 0x200000>; + interrupts = ; phy-mode = "rgmii"; qcom,id = <1>; + qcom,pcs-chanid = <0>; + qcom,phy-mdio-addr = <0>; + qcom,poll-required = <0>; + qcom,rgmii-delay = <1>; + qcom,phy_mii_type = <0>; + qcom,emulation = <0>; + qcom,forced-speed = <1000>; + qcom,forced-duplex = <1>; + qcom,socver = <0>; + qcom,irq = <255>; + mdiobus = <&mdio0>; pinctrl-0 = <&rgmii2_pins>; pinctrl-names = "default"; @@ -192,9 +209,22 @@ &gmac2 { status = "okay"; - + compatible = "qcom,nss-gmac"; + reg = <0x37400000 0x200000>; + interrupts = ; phy-mode = "sgmii"; qcom,id = <2>; + qcom,pcs-chanid = <1>; + qcom,phy-mdio-addr = <0>; + qcom,poll-required = <0>; /* no polling */ + qcom,rgmii-delay = <0>; + qcom,phy_mii_type = <1>; + qcom,emulation = <0>; + qcom,forced-speed = <1000>; + qcom,forced-duplex = <1>; + qcom,socver = <0>; + qcom,irq = <258>; + mdiobus = <&mdio0>; fixed-link { speed = <1000>; diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-g10.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-g10.dts index 45efb2b46..d1a3853bc 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-g10.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-g10.dts @@ -122,13 +122,26 @@ &gmac1 { status = "okay"; + compatible = "qcom,nss-gmac"; + reg = <0x37200000 0x200000>; + interrupts = ; + phy-mode = "rgmii"; + qcom,id = <1>; + qcom,pcs-chanid = <0>; + qcom,phy-mdio-addr = <4>; + qcom,poll-required = <0>; + qcom,rgmii-delay = <1>; + qcom,phy_mii_type = <0>; + qcom,emulation = <0>; + qcom,forced-speed = <1000>; + qcom,forced-duplex = <1>; + qcom,socver = <0>; + qcom,irq = <255>; + mdiobus = <&mdio0>; pinctrl-0 = <&rgmii2_pins>; pinctrl-names = "default"; - phy-mode = "rgmii"; - qcom,id = <1>; - fixed-link { speed = <1000>; full-duplex; @@ -137,9 +150,22 @@ &gmac2 { status = "okay"; - + compatible = "qcom,nss-gmac"; + reg = <0x37400000 0x200000>; + interrupts = ; phy-mode = "sgmii"; qcom,id = <2>; + qcom,pcs-chanid = <1>; + qcom,phy-mdio-addr = <0>; + qcom,poll-required = <0>; /* no polling */ + qcom,rgmii-delay = <0>; + qcom,phy_mii_type = <1>; + qcom,emulation = <0>; + qcom,forced-speed = <1000>; + qcom,forced-duplex = <1>; + qcom,socver = <0>; + qcom,irq = <258>; + mdiobus = <&mdio0>; fixed-link { speed = <1000>; @@ -170,6 +196,10 @@ 0x00094 0x4e /* PORT6_STATUS */ >; }; + + ethernet-phy@4 { + reg = <4>; + }; }; &nand_controller { diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500.dts index 1dd456315..66ac4cb77 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500.dts @@ -1,4 +1,4 @@ -#include "qcom-ipq8064-v1.0.dtsi" +#include "qcom-ipq8064-v2.0.dtsi" #include #include @@ -263,8 +263,22 @@ &gmac1 { status = "okay"; + compatible = "qcom,nss-gmac"; + reg = <0x37200000 0x200000>; + interrupts = ; phy-mode = "rgmii"; qcom,id = <1>; + qcom,pcs-chanid = <0>; + qcom,phy-mdio-addr = <4>; + qcom,poll-required = <0>; + qcom,rgmii-delay = <1>; + qcom,phy_mii_type = <0>; + qcom,emulation = <0>; + qcom,forced-speed = <1000>; + qcom,forced-duplex = <1>; + qcom,socver = <0>; + qcom,irq = <255>; + mdiobus = <&mdio0>; pinctrl-0 = <&rgmii2_pins>; pinctrl-names = "default"; @@ -279,8 +293,22 @@ &gmac2 { status = "okay"; + compatible = "qcom,nss-gmac"; + reg = <0x37400000 0x200000>; + interrupts = ; phy-mode = "sgmii"; qcom,id = <2>; + qcom,pcs-chanid = <1>; + qcom,phy-mdio-addr = <0>; /* none */ + qcom,poll-required = <0>; /* no polling */ + qcom,rgmii-delay = <0>; + qcom,phy_mii_type = <1>; + qcom,emulation = <0>; + qcom,forced-speed = <1000>; + qcom,forced-duplex = <1>; + qcom,socver = <0>; + qcom,irq = <258>; + mdiobus = <&mdio0>; mtd-mac-address = <&art 0>; diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts index 71c4c3b1a..5f41b4001 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts @@ -293,8 +293,22 @@ &gmac1 { status = "okay"; + compatible = "qcom,nss-gmac"; + reg = <0x37200000 0x200000>; + interrupts = ; phy-mode = "rgmii"; qcom,id = <1>; + qcom,pcs-chanid = <0>; + qcom,phy-mdio-addr = <4>; + qcom,poll-required = <0>; + qcom,rgmii-delay = <1>; + qcom,phy_mii_type = <0>; + qcom,emulation = <0>; + qcom,forced-speed = <1000>; + qcom,forced-duplex = <1>; + qcom,socver = <0>; + qcom,irq = <255>; + mdiobus = <&mdio0>; pinctrl-0 = <&rgmii2_pins>; pinctrl-names = "default"; @@ -309,8 +323,22 @@ &gmac2 { status = "okay"; + compatible = "qcom,nss-gmac"; + reg = <0x37400000 0x200000>; + interrupts = ; phy-mode = "sgmii"; qcom,id = <2>; + qcom,pcs-chanid = <1>; + qcom,phy-mdio-addr = <0>; /* none */ + qcom,poll-required = <0>; /* no polling */ + qcom,rgmii-delay = <0>; + qcom,phy_mii_type = <1>; + qcom,emulation = <0>; + qcom,forced-speed = <1000>; + qcom,forced-duplex = <1>; + qcom,socver = <0>; + qcom,irq = <258>; + mdiobus = <&mdio0>; mtd-mac-address = <&art 0>; @@ -318,4 +346,4 @@ speed = <1000>; full-duplex; }; -}; \ No newline at end of file +}; diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-rg-mtfi-m520.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-rg-mtfi-m520.dts deleted file mode 100644 index 8d2e35ec7..000000000 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-rg-mtfi-m520.dts +++ /dev/null @@ -1,326 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT - -#include "qcom-ipq8064-v2.0.dtsi" - -#include - -/ { - model = "Ruijie RG-MTFi-M520"; - compatible = "ruijie,rg-mtfi-m520", "qcom,ipq8064"; - - memory@0 { - reg = <0x42000000 0x7e000000>; - device_type = "memory"; - }; - - aliases { - mdio-gpio0 = &mdio0; - sdcc1 = &sdcc1; - - led-boot = &led_sys; - led-failsafe = &led_sys; - led-running = &led_sys; - led-upgrade = &led_sys; - }; - - chosen { - bootargs = "root=/dev/mmcblk0p3 rootfstype=squashfs,ext4 rootwait noinitrd"; - }; - - leds { - compatible = "gpio-leds"; - - led_sys: sys { - label = "green:sys"; - gpios = <&gpio_ext 15 GPIO_ACTIVE_LOW>; - }; - }; - - keys { - compatible = "gpio-keys"; - pinctrl-0 = <&button_pins>; - pinctrl-names = "default"; - - reset { - label = "reset"; - gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; -}; - -&qcom_pinmux { - button_pins: button_pins { - mux { - pins = "gpio54"; - function = "gpio"; - drive-strength = <2>; - bias-pull-up; - }; - }; - - mdio0_pins: mdio0_pins { - clk { - pins = "gpio1"; - input-disable; - }; - }; - - rgmii2_pins: rgmii2_pins { - tx { - pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32"; - input-disable; - }; - }; - - sdcc1_pins: sdcc1_pinmux { - mux { - pins = "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", - "gpio43", "gpio44", "gpio45", "gpio46", "gpio47"; - function = "sdc1"; - }; - - cmd { - pins = "gpio45"; - drive-strength = <10>; - bias-pull-up; - }; - - data { - pins = "gpio38", "gpio39", "gpio40", "gpio41", - "gpio43", "gpio44", "gpio46", "gpio47"; - drive-strength = <10>; - bias-pull-up; - }; - - clk { - pins = "gpio42"; - drive-strength = <16>; - bias-disable; - }; - }; - - spi_pins: spi_pins { - cs { - pins = "gpio20"; - drive-strength = <12>; - }; - }; -}; - -&gsbi2 { - qcom,mode = ; - status = "okay"; - - i2c@124a0000 { - status = "okay"; - - lm75@48 { - compatible = "lm75"; - reg = <0x48>; - }; - - pcf8563: rtc@51 { - compatible = "nxp,pcf8563"; - reg = <0x51>; - }; - - gpio_ext: tca9539@74 { - compatible = "ti,tca9539"; - reg = <0x74>; - - gpio-controller; - #gpio-cells = <2>; - }; - }; -}; - -&gsbi5 { - qcom,mode = ; - status = "okay"; - - spi4: spi@1a280000 { - status = "okay"; - - pinctrl-0 = <&spi_pins>; - pinctrl-names = "default"; - - cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>; - - m25p80@0 { - compatible = "s25fl256s1"; - #address-cells = <1>; - #size-cells = <1>; - spi-max-frequency = <50000000>; - reg = <0>; - - SBL1@0 { - label = "SBL1"; - reg = <0x0 0x10000>; - read-only; - }; - - MIBIB@10000 { - label = "MIBIB"; - reg = <0x10000 0x10000>; - read-only; - }; - - SBL2@20000 { - label = "SBL2"; - reg = <0x20000 0x20000>; - read-only; - }; - - SBL3@40000 { - label = "SBL3"; - reg = <0x40000 0x30000>; - read-only; - }; - - DDRCONFIG@70000 { - label = "DDRCONFIG"; - reg = <0x70000 0x10000>; - read-only; - }; - - PRODUCTINFO@80000 { - label = "PRODUCTINFO"; - reg = <0x80000 0x10000>; - read-only; - }; - - TZ@90000 { - label = "TZ"; - reg = <0x90000 0x30000>; - read-only; - }; - - RPM@c0000 { - label = "RPM"; - reg = <0xc0000 0x20000>; - read-only; - }; - - APPSBL@e0000 { - label = "APPSBL"; - reg = <0xe0000 0x80000>; - read-only; - }; - - APPSBLENV@160000 { - label = "APPSBLENV"; - reg = <0x160000 0x10000>; - read-only; - }; - - BOOTCONFIG@170000 { - label = "BOOTCONFIG"; - reg = <0x170000 0x10000>; - read-only; - }; - - ART@180000 { - label = "ART"; - reg = <0x180000 0x40000>; - read-only; - }; - }; - }; -}; - -&sata_phy { - status = "okay"; -}; - -&sata { - status = "okay"; -}; - -&usb3_0 { - status = "okay"; -}; - -&usb3_1 { - status = "okay"; -}; - -&pcie0 { - status = "okay"; - reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_HIGH>; - pinctrl-0 = <&pcie0_pins>; - pinctrl-names = "default"; -}; - -&pcie1 { - status = "okay"; - reset-gpio = <&qcom_pinmux 48 GPIO_ACTIVE_HIGH>; - pinctrl-0 = <&pcie1_pins>; - pinctrl-names = "default"; - max-link-speed = <1>; -}; - -&mdio0 { - status = "okay"; - - pinctrl-0 = <&mdio0_pins>; - pinctrl-names = "default"; - - phy0: ethernet-phy@0 { - reg = <0>; - qca,ar8327-initvals = < - 0x00004 0x7600000 /* PAD0_MODE */ - 0x00008 0x1000000 /* PAD5_MODE */ - 0x0000c 0x80 /* PAD6_MODE */ - 0x000e4 0x6a545 /* MAC_POWER_SEL */ - 0x000e0 0xc74164de /* SGMII_CTRL */ - 0x0007c 0x4e /* PORT0_STATUS */ - 0x00094 0x4e /* PORT6_STATUS */ - >; - }; - - phy4: ethernet-phy@4 { - reg = <4>; - }; -}; - -&gmac1 { - status = "okay"; - phy-mode = "rgmii"; - qcom,id = <1>; - - pinctrl-0 = <&rgmii2_pins>; - pinctrl-names = "default"; - - fixed-link { - speed = <1000>; - full-duplex; - }; -}; - -&gmac2 { - status = "okay"; - phy-mode = "sgmii"; - qcom,id = <2>; - - fixed-link { - speed = <1000>; - full-duplex; - }; -}; - -&amba { - sdcc1: sdcc@12400000 { - status = "okay"; - pinctrl-0 = <&sdcc1_pins>; - pinctrl-names = "default"; - }; -}; - -&adm_dma { - status = "okay"; -}; - -&CPU_SPC { - status = "disabled"; -}; diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts index 969ca724e..3eae01aa7 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts @@ -268,13 +268,20 @@ &gmac1 { status = "okay"; + compatible = "qcom,nss-gmac"; + reg = <0x37200000 0x200000>; + interrupts = ; phy-mode = "rgmii"; qcom,id = <1>; - qcom,phy_mdio_addr = <4>; - qcom,poll_required = <0>; - qcom,rgmii_delay = <1>; + qcom,pcs-chanid = <0>; + qcom,phy-mdio-addr = <4>; + qcom,poll-required = <0>; + qcom,rgmii-delay = <1>; qcom,phy_mii_type = <0>; qcom,emulation = <0>; + qcom,forced-speed = <1000>; + qcom,forced-duplex = <1>; + qcom,socver = <0>; qcom,irq = <255>; mdiobus = <&mdio0>; @@ -289,13 +296,20 @@ &gmac2 { status = "okay"; + compatible = "qcom,nss-gmac"; + reg = <0x37400000 0x200000>; + interrupts = ; phy-mode = "sgmii"; qcom,id = <2>; - qcom,phy_mdio_addr = <0>; /* none */ - qcom,poll_required = <0>; /* no polling */ - qcom,rgmii_delay = <0>; + qcom,pcs-chanid = <1>; + qcom,phy-mdio-addr = <0>; /* none */ + qcom,poll-required = <0>; /* no polling */ + qcom,rgmii-delay = <0>; qcom,phy_mii_type = <1>; qcom,emulation = <0>; + qcom,forced-speed = <1000>; + qcom,forced-duplex = <1>; + qcom,socver = <0>; qcom,irq = <258>; mdiobus = <&mdio0>; diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts index 55291cd53..5d5c44fcc 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts @@ -345,13 +345,20 @@ &gmac1 { status = "okay"; + compatible = "qcom,nss-gmac"; + reg = <0x37200000 0x200000>; + interrupts = ; phy-mode = "rgmii"; qcom,id = <1>; - qcom,phy_mdio_addr = <4>; - qcom,poll_required = <0>; - qcom,rgmii_delay = <1>; + qcom,pcs-chanid = <0>; + qcom,phy-mdio-addr = <4>; + qcom,poll-required = <0>; + qcom,rgmii-delay = <1>; qcom,phy_mii_type = <0>; qcom,emulation = <0>; + qcom,forced-speed = <1000>; + qcom,forced-duplex = <1>; + qcom,socver = <0>; qcom,irq = <255>; mdiobus = <&mdio0>; @@ -368,13 +375,20 @@ &gmac2 { status = "okay"; + compatible = "qcom,nss-gmac"; + reg = <0x37400000 0x200000>; + interrupts = ; phy-mode = "sgmii"; qcom,id = <2>; - qcom,phy_mdio_addr = <0>; /* none */ - qcom,poll_required = <0>; /* no polling */ - qcom,rgmii_delay = <0>; + qcom,pcs-chanid = <1>; + qcom,phy-mdio-addr = <0>; /* none */ + qcom,poll-required = <0>; /* no polling */ + qcom,rgmii-delay = <0>; qcom,phy_mii_type = <1>; qcom,emulation = <0>; + qcom,forced-speed = <1000>; + qcom,forced-duplex = <1>; + qcom,socver = <0>; qcom,irq = <258>; mdiobus = <&mdio0>; diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065.dtsi b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065.dtsi index a0312686a..bc9ec11e2 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065.dtsi +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065.dtsi @@ -162,3 +162,15 @@ opp-level = <2>; }; }; + +&nss0 { + qcom,low-frequency = <800000000>; + qcom,mid-frequency = <800000000>; + qcom,max-frequency = <800000000>; +}; + +&nss1 { + qcom,low-frequency = <800000000>; + qcom,mid-frequency = <800000000>; + qcom,max-frequency = <800000000>; +}; diff --git a/target/linux/ipq806x/files/include/linux/regulator/nss-volt-ipq806x.h b/target/linux/ipq806x/files/include/linux/regulator/nss-volt-ipq806x.h new file mode 100644 index 000000000..648160f06 --- /dev/null +++ b/target/linux/ipq806x/files/include/linux/regulator/nss-volt-ipq806x.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef __QCOM_NSS_VOL_SCALING_H +#define __QCOM_NSS_VOL_SCALING_H + +#include + +int nss_ramp_voltage(unsigned long rate, bool ramp_up); + +#endif diff --git a/target/linux/ipq806x/files/include/net/netfilter/nf_conntrack_dscpremark_ext.h b/target/linux/ipq806x/files/include/net/netfilter/nf_conntrack_dscpremark_ext.h new file mode 100644 index 000000000..f37e1ac84 --- /dev/null +++ b/target/linux/ipq806x/files/include/net/netfilter/nf_conntrack_dscpremark_ext.h @@ -0,0 +1,101 @@ +/* + ************************************************************************** + * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all copies. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + ************************************************************************** + */ + +/* DSCP remark conntrack extension APIs. */ + +#ifndef _NF_CONNTRACK_DSCPREMARK_H +#define _NF_CONNTRACK_DSCPREMARK_H +#include +#include + +/* Rule flags */ +#define NF_CT_DSCPREMARK_EXT_DSCP_RULE_VALID 0x1 + +/* Rule validity */ +#define NF_CT_DSCPREMARK_EXT_RULE_VALID 0x1 +#define NF_CT_DSCPREMARK_EXT_RULE_NOT_VALID 0x0 + +/* + * DSCP remark conntrack extension structure. + */ +struct nf_ct_dscpremark_ext { + __u32 flow_priority; /* Original direction packet priority */ + __u32 reply_priority; /* Reply direction packet priority */ + __u16 igs_flow_qos_tag; /* Original direction ingress packet priority */ + __u16 igs_reply_qos_tag; /* Reply direction ingress packet priority */ + __u8 flow_dscp; /* IP DSCP value for original direction */ + __u8 reply_dscp; /* IP DSCP value for reply direction */ + __u16 rule_flags; /* Rule Validity flags */ +}; + +/* + * nf_ct_dscpremark_ext_find() + * Finds the extension data of the conntrack entry if it exists. + */ +static inline struct nf_ct_dscpremark_ext * +nf_ct_dscpremark_ext_find(const struct nf_conn *ct) +{ +#ifdef CONFIG_NF_CONNTRACK_DSCPREMARK_EXT + return nf_ct_ext_find(ct, NF_CT_EXT_DSCPREMARK); +#else + return NULL; +#endif +} + +/* + * nf_ct_dscpremark_ext_add() + * Adds the extension data to the conntrack entry. + */ +static inline +struct nf_ct_dscpremark_ext *nf_ct_dscpremark_ext_add(struct nf_conn *ct, + gfp_t gfp) +{ +#ifdef CONFIG_NF_CONNTRACK_DSCPREMARK_EXT + struct nf_ct_dscpremark_ext *ncde; + + ncde = nf_ct_ext_add(ct, NF_CT_EXT_DSCPREMARK, gfp); + if (!ncde) + return NULL; + + return ncde; +#else + return NULL; +#endif +}; + +#ifdef CONFIG_NF_CONNTRACK_DSCPREMARK_EXT +extern int nf_conntrack_dscpremark_ext_init(void); +extern void nf_conntrack_dscpremark_ext_fini(void); +extern int nf_conntrack_dscpremark_ext_set_dscp_rule_valid(struct nf_conn *ct); +extern int +nf_conntrack_dscpremark_ext_get_dscp_rule_validity(struct nf_conn *ct); +#else +/* + * nf_conntrack_dscpremark_ext_init() + */ +static inline int nf_conntrack_dscpremark_ext_init(void) +{ + return 0; +} + +/* + * nf_conntrack_dscpremark_ext_fini() + */ +static inline void nf_conntrack_dscpremark_ext_fini(void) +{ +} +#endif /* CONFIG_NF_CONNTRACK_DSCPREMARK_EXT */ +#endif /* _NF_CONNTRACK_DSCPREMARK_H */ diff --git a/target/linux/ipq806x/files/include/uapi/linux/tc_act/tc_nss_mirred.h b/target/linux/ipq806x/files/include/uapi/linux/tc_act/tc_nss_mirred.h new file mode 100644 index 000000000..3a368fcc8 --- /dev/null +++ b/target/linux/ipq806x/files/include/uapi/linux/tc_act/tc_nss_mirred.h @@ -0,0 +1,36 @@ +#ifndef __LINUX_TC_NSS_MIRRED_H +#define __LINUX_TC_NSS_MIRRED_H + +#include + +/* + * Type of nss mirred action. + */ +#define TCA_ACT_MIRRED_NSS 17 + +/* + * Types of parameters for nss mirred action. + */ +enum { + TC_NSS_MIRRED_UNSPEC, + TC_NSS_MIRRED_TM, + TC_NSS_MIRRED_PARMS, + __TC_NSS_MIRRED_MAX +}; +#define TC_NSS_MIRRED_MAX (__TC_NSS_MIRRED_MAX - 1) + +/* + * tc_nss_mirred + * tc command structure for nss mirred action. + */ +struct tc_nss_mirred { + tc_gen; /* General tc structure. */ + __u32 from_ifindex; /* ifindex of the port from which traffic + * will be redirected. + */ + __u32 to_ifindex; /* ifindex of the port to which traffic + * will be redirected. + */ +}; + +#endif /* __LINUX_TC_NSS_MIRRED_H */ diff --git a/target/linux/ipq806x/files/net/netfilter/nf_conntrack_dscpremark_ext.c b/target/linux/ipq806x/files/net/netfilter/nf_conntrack_dscpremark_ext.c new file mode 100644 index 000000000..ded6d0290 --- /dev/null +++ b/target/linux/ipq806x/files/net/netfilter/nf_conntrack_dscpremark_ext.c @@ -0,0 +1,92 @@ +/* + ************************************************************************** + * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all copies. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + ************************************************************************** + */ + +/* DSCP remark handling conntrack extension registration. */ + +#include +#include +#include +#include +#include + +#include +#include +#include + +/* DSCP remark conntrack extension type declaration */ +static struct nf_ct_ext_type dscpremark_extend __read_mostly = { + .len = sizeof(struct nf_ct_dscpremark_ext), + .align = __alignof__(struct nf_ct_dscpremark_ext), + .id = NF_CT_EXT_DSCPREMARK, +}; + +/* nf_conntrack_dscpremark_ext_init() + * Initializes the DSCP remark conntrack extension. + */ +int nf_conntrack_dscpremark_ext_init(void) +{ + int ret; + + ret = nf_ct_extend_register(&dscpremark_extend); + if (ret < 0) { + pr_warn("nf_conntrack_dscpremark: Unable to register extension\n"); + return ret; + } + + return 0; +} + +/* nf_conntrack_dscpremark_ext_set_dscp_rule_valid() + * Set DSCP rule validity flag in the extension + */ +int nf_conntrack_dscpremark_ext_set_dscp_rule_valid(struct nf_conn *ct) +{ + struct nf_ct_dscpremark_ext *ncde; + + ncde = nf_ct_dscpremark_ext_find(ct); + if (!ncde) + return -1; + + ncde->rule_flags = NF_CT_DSCPREMARK_EXT_DSCP_RULE_VALID; + return 0; +} +EXPORT_SYMBOL(nf_conntrack_dscpremark_ext_set_dscp_rule_valid); + +/* nf_conntrack_dscpremark_ext_get_dscp_rule_validity() + * Check if the DSCP rule flag is valid from the extension + */ +int nf_conntrack_dscpremark_ext_get_dscp_rule_validity(struct nf_conn *ct) +{ + struct nf_ct_dscpremark_ext *ncde; + + ncde = nf_ct_dscpremark_ext_find(ct); + if (!ncde) + return NF_CT_DSCPREMARK_EXT_RULE_NOT_VALID; + + if (ncde->rule_flags & NF_CT_DSCPREMARK_EXT_DSCP_RULE_VALID) + return NF_CT_DSCPREMARK_EXT_RULE_VALID; + + return NF_CT_DSCPREMARK_EXT_RULE_NOT_VALID; +} +EXPORT_SYMBOL(nf_conntrack_dscpremark_ext_get_dscp_rule_validity); + +/* nf_conntrack_dscpremark_ext_fini() + * De-initializes the DSCP remark conntrack extension. + */ +void nf_conntrack_dscpremark_ext_fini(void) +{ + nf_ct_extend_unregister(&dscpremark_extend); +} diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile index 235459f74..e53fba1e1 100644 --- a/target/linux/ipq806x/image/Makefile +++ b/target/linux/ipq806x/image/Makefile @@ -344,23 +344,6 @@ define Device/qcom_ipq8064-db149 endef TARGET_DEVICES += qcom_ipq8064-db149 -define Device/ruijie_rg-mtfi-m520 - DEVICE_VENDOR := Ruijie - DEVICE_MODEL := RG-MTFi-M520 - SOC := qcom-ipq8064 - BLOCKSIZE := 64k - KERNEL_SIZE := 4096k - KERNEL_SUFFIX := -uImage - KERNEL = kernel-bin | append-dtb | uImage none | pad-to $$(KERNEL_SIZE) - KERNEL_NAME := zImage - IMAGES += factory.bin - IMAGE/factory.bin := qsdk-ipq-factory-mmc - IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to $$$$(BLOCKSIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata - DEVICE_PACKAGES := ath10k-firmware-qca988x-ct e2fsprogs kmod-hwmon-lm75 \ - kmod-fs-ext4 kmod-fs-f2fs kmod-rtc-pcf8563 losetup mkf2fs -endef -TARGET_DEVICES += ruijie_rg-mtfi-m520 - define Device/tplink_ad7200 $(call Device/TpSafeImage) DEVICE_VENDOR := TP-Link diff --git a/target/linux/ipq806x/patches-5.10/0069-arm-boot-add-dts-files.patch b/target/linux/ipq806x/patches-5.10/0069-arm-boot-add-dts-files.patch index 573ced9d9..87d6b6569 100644 --- a/target/linux/ipq806x/patches-5.10/0069-arm-boot-add-dts-files.patch +++ b/target/linux/ipq806x/patches-5.10/0069-arm-boot-add-dts-files.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -907,8 +907,27 @@ dtb-$(CONFIG_ARCH_QCOM) += \ +@@ -907,8 +907,26 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-ipq4019-ap.dk04.1-c3.dtb \ qcom-ipq4019-ap.dk07.1-c1.dtb \ qcom-ipq4019-ap.dk07.1-c2.dtb \ @@ -26,7 +26,6 @@ Signed-off-by: John Crispin + qcom-ipq8064-g10.dtb \ + qcom-ipq8064-r7500.dtb \ + qcom-ipq8064-r7500v2.dtb \ -+ qcom-ipq8064-rg-mtfi-m520.dtb \ + qcom-ipq8064-unifi-ac-hd.dtb \ + qcom-ipq8064-wg2600hp.dtb \ + qcom-ipq8064-wpq864.dtb \ diff --git a/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch b/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch index 41827443d..b97d36fd7 100644 --- a/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch +++ b/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -842,7 +842,26 @@ dtb-$(CONFIG_ARCH_QCOM) += \ +@@ -842,7 +842,25 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-ipq4019-ap.dk04.1-c3.dtb \ qcom-ipq4019-ap.dk07.1-c1.dtb \ qcom-ipq4019-ap.dk07.1-c2.dtb \ @@ -25,7 +25,6 @@ Signed-off-by: John Crispin + qcom-ipq8064-g10.dtb \ + qcom-ipq8064-r7500.dtb \ + qcom-ipq8064-r7500v2.dtb \ -+ qcom-ipq8064-rg-mtfi-m520.dtb \ + qcom-ipq8064-unifi-ac-hd.dtb \ + qcom-ipq8064-wg2600hp.dtb \ + qcom-ipq8064-wpq864.dtb \ diff --git a/target/linux/ipq806x/patches-5.4/990-00-Add-required-entries-in-dts-files-for-NSS-support.patch.patch b/target/linux/ipq806x/patches-5.4/990-00-Add-required-entries-in-dts-files-for-NSS-support.patch.patch new file mode 100644 index 000000000..83d4ecf44 --- /dev/null +++ b/target/linux/ipq806x/patches-5.4/990-00-Add-required-entries-in-dts-files-for-NSS-support.patch.patch @@ -0,0 +1,170 @@ +--- b/arch/arm/boot/dts/qcom-ipq8064.dtsi ++++ a/arch/arm/boot/dts/qcom-ipq8064.dtsi +@@ -1392,6 +1392,12 @@ + status = "disabled"; + }; + ++ nss-gmac-common { ++ compatible = "qcom,nss-gmac-common"; ++ reg = <0x03000000 0x0000FFFF 0x1bb00000 0x0000FFFF 0x00900000 0x00004000>; ++ reg-names = "nss_reg_base", "qsgmii_reg_base", "clk_ctl_base"; ++ }; ++ + gmac0: ethernet@37000000 { + device_type = "network"; + compatible = "qcom,ipq806x-gmac"; +@@ -1492,7 +1498,132 @@ + regulator-always-on; + }; + +- sdcc1bam:dma@12402000 { ++ nss0: nss@40000000 { ++ compatible = "qcom,nss"; ++ qcom,low-frequency = <733000000>; /* orig value 110000000 */ ++ qcom,mid-frequency = <733000000>; /* orig value 550000000 */ ++ qcom,max-frequency = <733000000>; ++ ++ interrupts = , ++ ; ++ reg = <0x36000000 0x1000 0x39000000 0x10000>; ++ reg-names = "nphys", "vphys"; ++ clocks = <&gcc NSS_CORE_CLK>, <&gcc NSSTCM_CLK_SRC>, ++ <&gcc NSSTCM_CLK>, <&rpmcc RPM_NSS_FABRIC_0_CLK>, ++ <&rpmcc RPM_NSS_FABRIC_1_CLK>; ++ clock-names = "nss-core-clk", "nss-tcm-src", ++ "nss-tcm-clk", "nss-fab0-clk", ++ "nss-fab1-clk"; ++ resets = <&gcc UBI32_CORE1_CLKRST_CLAMP_RESET>, ++ <&gcc UBI32_CORE1_CLAMP_RESET>, ++ <&gcc UBI32_CORE1_AHB_RESET>, ++ <&gcc UBI32_CORE1_AXI_RESET>; ++ reset-names = "clkrst-clamp", "clamp", "ahb", "axi"; ++ ++ qcom,id = <0>; ++ qcom,num-irq = <2>; ++ qcom,num-queue = <2>; ++ qcom,load-addr = <0x40000000>; ++ qcom,turbo-frequency; ++ ++ qcom,bridge-enabled; ++ qcom,gre-enabled; ++ qcom,gre-redir-enabled; ++ qcom,gre_tunnel_enabled; ++ qcom,ipv4-enabled; ++ qcom,ipv4-reasm-enabled; ++ qcom,ipv6-enabled; ++ qcom,ipv6-reasm-enabled; ++ qcom,l2tpv2-enabled; ++ qcom,map-t-enabled; ++ qcom,pppoe-enabled; ++ qcom,pptp-enabled; ++ qcom,portid-enabled; ++ qcom,shaping-enabled; ++ qcom,tun6rd-enabled; ++ qcom,tunipip6-enabled; ++ qcom,vlan-enabled; ++ qcom,wlan-dataplane-offload-enabled; ++ qcom,wlanredirect-enabled; ++ qcom,pxvlan-enabled; ++ qcom,vxlan-enabled; ++ qcom,match-enabled; ++ qcom,mirror-enabled; ++ qcom,rmnet-enabled; ++ qcom,clmap-enabled; ++ }; ++ ++ nss1: nss@40800000 { ++ compatible = "qcom,nss"; ++ qcom,low-frequency = <733000000>; /* orig value 110000000 */ ++ qcom,mid-frequency = <733000000>; /* orig value 550000000 */ ++ qcom,max-frequency = <733000000>; ++ ++ interrupts = , ++ ; ++ reg = <0x36400000 0x1000 0x39010000 0x10000>; ++ reg-names = "nphys", "vphys"; ++ resets = <&gcc UBI32_CORE2_CLKRST_CLAMP_RESET>, ++ <&gcc UBI32_CORE2_CLAMP_RESET>, ++ <&gcc UBI32_CORE2_AHB_RESET>, ++ <&gcc UBI32_CORE2_AXI_RESET>; ++ reset-names = "clkrst-clamp", "clamp", "ahb", "axi"; ++ ++ qcom,id = <1>; ++ qcom,num-irq = <2>; ++ qcom,load-addr = <0x40800000>; ++ qcom,num-queue = <2>; ++ qcom,turbo-frequency; ++ ++ qcom,capwap-enabled; ++ qcom,crypto-enabled; ++ qcom,dtls-enabled; ++ qcom,ipsec-enabled; ++ }; ++ ++ crypto1: crypto@38000000 { ++ compatible = "qcom,nss-crypto"; ++ reg = <0x38000000 0x20000>, <0x38004000 0x22000>; ++ reg-names = "crypto_pbase", "bam_base"; ++ clocks = <&gcc CE5_CORE_CLK>, <&gcc CE5_A_CLK>, <&gcc CE5_H_CLK>; ++ clock-names = "ce5_core", "ce5_aclk", "ce5_hclk"; ++ resets = <&gcc CRYPTO_ENG1_RESET>, <&gcc CRYPTO_AHB_RESET>; ++ reset-names = "rst_eng", "rst_ahb"; ++ qcom,id = <0>; ++ qcom,ee = <0>; ++ }; ++ ++ crypto2: crypto@38400000 { ++ compatible = "qcom,nss-crypto"; ++ reg = <0x38400000 0x20000>, <0x38404000 0x22000>; ++ reg-names = "crypto_pbase", "bam_base"; ++ resets = <&gcc CRYPTO_ENG2_RESET>; ++ reset-names = "rst_eng"; ++ qcom,id = <1>; ++ qcom,ee = <0>; ++ }; ++ ++ crypto3: crypto@38800000 { ++ compatible = "qcom,nss-crypto"; ++ reg = <0x38800000 0x20000>, <0x38804000 0x22000>; ++ reg-names = "crypto_pbase", "bam_base"; ++ resets = <&gcc CRYPTO_ENG3_RESET>; ++ reset-names = "rst_eng"; ++ qcom,id = <2>; ++ qcom,ee = <0>; ++ }; ++ ++ crypto4: crypto@38c00000 { ++ compatible = "qcom,nss-crypto"; ++ reg = <0x38c00000 0x20000>, <0x38c04000 0x22000>; ++ reg-names = "crypto_pbase", "bam_base"; ++ resets = <&gcc CRYPTO_ENG4_RESET>; ++ reset-names = "rst_eng"; ++ qcom,id = <3>; ++ qcom,ee = <0>; ++ }; ++ ++ sdcc1bam: dma@12402000 { + compatible = "qcom,bam-v1.3.0"; + reg = <0x12402000 0x8000>; + interrupts = ; +@@ -1558,6 +1689,20 @@ + dma-names = "tx", "rx"; + }; + }; ++ ++ nss-common { ++ compatible = "qcom,nss-common"; ++ reg = <0x03000000 0x00001000>; ++ reg-names = "nss_fpb_base"; ++ clocks = <&gcc NSS_CORE_CLK>, <&gcc NSSTCM_CLK>, ++ <&rpmcc RPM_NSS_FABRIC_0_CLK>, <&rpmcc RPM_NSS_FABRIC_1_CLK>; ++ clock-names = "nss_core_clk", "nss_tcm_clk", ++ "nss-fab0-clk", "nss-fab1-clk"; ++ nss_core-supply = <&smb208_s1b>; ++ nss_core_vdd_nominal = <1100000>; ++ nss_core_vdd_high = <1150000>; ++ nss_core_threshold_freq = <733000000>; ++ }; + }; + + sfpb_mutex: sfpb-mutex { diff --git a/target/linux/ipq806x/patches-5.4/999-00-Regulator-Add-NSS-VOLT.patch b/target/linux/ipq806x/patches-5.4/999-00-Regulator-Add-NSS-VOLT.patch new file mode 100644 index 000000000..ebe3e8340 --- /dev/null +++ b/target/linux/ipq806x/patches-5.4/999-00-Regulator-Add-NSS-VOLT.patch @@ -0,0 +1,212 @@ +From c70758d96b22e4421a6afd824cb59e350c6a8040 Mon Sep 17 00:00:00 2001 +From: Robert Marko +Date: Tue, 2 Jun 2020 22:09:15 +0200 +Subject: [PATCH] Regulator: Add NSS VOLT + +Signed-off-by: Robert Marko +--- + drivers/regulator/Kconfig | 7 +++++++ + drivers/regulator/Makefile | 1 + + 2 files changed, 8 insertions(+) + +--- a/drivers/regulator/Kconfig ++++ b/drivers/regulator/Kconfig +@@ -1105,5 +1105,12 @@ config REGULATOR_WM8994 + This driver provides support for the voltage regulators on the + WM8994 CODEC. + ++config REGULATOR_NSS_VOLT ++ bool "Qualcomm IPQ806X NSS Voltage regulator" ++ depends on ARCH_QCOM || COMPILE_TEST ++ help ++ This driver provides support for the Qualcomm IPQ806X NSS Voltage ++ regulator. ++ + endif + +--- a/drivers/regulator/Makefile ++++ b/drivers/regulator/Makefile +@@ -138,5 +138,6 @@ obj-$(CONFIG_REGULATOR_WM831X) += wm831x + obj-$(CONFIG_REGULATOR_WM8350) += wm8350-regulator.o + obj-$(CONFIG_REGULATOR_WM8400) += wm8400-regulator.o + obj-$(CONFIG_REGULATOR_WM8994) += wm8994-regulator.o ++obj-$(CONFIG_REGULATOR_NSS_VOLT) += nss-volt-ipq806x.o + + ccflags-$(CONFIG_REGULATOR_DEBUG) += -DDEBUG +--- a/dev/null +--- b/drivers/regulator/nss-volt-ipq806x.c +@@ -0,0 +1,146 @@ ++/* ++ * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. ++ * ++ * Permission to use, copy, modify, and/or distribute this software for any ++ * purpose with or without fee is hereby granted, provided that the above ++ * copyright notice and this permission notice appear in all copies. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++struct nss_data { ++ struct regulator *nss_reg; ++ u32 nss_core_vdd_nominal; ++ u32 nss_core_vdd_high; ++ u32 nss_core_threshold_freq; ++}; ++ ++static struct nss_data *data; ++ ++int nss_ramp_voltage(unsigned long rate, bool ramp_up) ++{ ++ int ret; ++ int curr_uV, uV; ++ struct regulator *reg; ++ ++ if (!data) { ++ pr_err("NSS core regulator not init.\n"); ++ return -ENODEV; ++ } ++ ++ reg = data->nss_reg; ++ ++ if (!reg) { ++ pr_err("NSS core regulator not found.\n"); ++ return -EINVAL; ++ } ++ ++ uV = data->nss_core_vdd_nominal; ++ if (rate >= data->nss_core_threshold_freq) ++ return data->nss_core_vdd_high; ++ ++ curr_uV = regulator_get_voltage(reg); ++ ++ if (ramp_up) { ++ if (uV <= curr_uV) ++ return 0; ++ } else { ++ if (uV >= curr_uV) ++ return 0; ++ } ++ ++ ret = regulator_set_voltage(reg, uV, data->nss_core_vdd_high); ++ if (ret) ++ pr_err("NSS volt scaling failed (%d)\n", uV); ++ ++ return ret; ++} ++ ++static const struct of_device_id nss_ipq806x_match_table[] = { ++ { .compatible = "qcom,nss-common" }, ++ {} ++}; ++ ++static int nss_volt_ipq806x_probe(struct platform_device *pdev) ++{ ++ struct device_node *np = pdev->dev.of_node; ++ int ret; ++ ++ if (!np) ++ return -ENODEV; ++ ++ data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); ++ if (!data) ++ return -ENOMEM; ++ ++ data->nss_reg = devm_regulator_get(&pdev->dev, "nss_core"); ++ ret = PTR_ERR_OR_ZERO(data->nss_reg); ++ if (ret) { ++ if (ret == -EPROBE_DEFER) ++ dev_dbg(&pdev->dev, ++ "nss_core regulator not ready, retry\n"); ++ else ++ dev_err(&pdev->dev, "no regulator for nss_core: %d\n", ++ ret); ++ ++ return ret; ++ } ++ ++ if (of_property_read_u32(np, "nss_core_vdd_nominal", ++ &data->nss_core_vdd_nominal)) { ++ pr_warn("NSS core vdd nominal not found. Using defaults...\n"); ++ data->nss_core_vdd_nominal = 1100000; ++ } ++ ++ if (of_property_read_u32(np, "nss_core_vdd_high", ++ &data->nss_core_vdd_high)) { ++ pr_warn("NSS core vdd high not found. Using defaults...\n"); ++ data->nss_core_vdd_high = 1150000; ++ } ++ ++ if (of_property_read_u32(np, "nss_core_threshold_freq", ++ &data->nss_core_threshold_freq)) { ++ pr_warn("NSS core thres freq not found. Using defaults...\n"); ++ data->nss_core_threshold_freq = 733000000; ++ } ++ ++ platform_set_drvdata(pdev, data); ++ ++ return 0; ++} ++ ++static struct platform_driver nss_ipq806x_driver = { ++ .probe = nss_volt_ipq806x_probe, ++ .driver = { ++ .name = "nss-volt-ipq806x", ++ .owner = THIS_MODULE, ++ .of_match_table = nss_ipq806x_match_table, ++ }, ++}; ++ ++static int __init nss_ipq806x_init(void) ++{ ++ return platform_driver_register(&nss_ipq806x_driver); ++} ++late_initcall(nss_ipq806x_init); ++ ++static void __exit nss_ipq806x_exit(void) ++{ ++ platform_driver_unregister(&nss_ipq806x_driver); ++} ++module_exit(nss_ipq806x_exit); ++ +--- a/dev/null +--- b/include/linux/regulator/nss-volt-ipq806x.h +@@ -0,0 +1,25 @@ ++/* ++ * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. ++ * ++ * Permission to use, copy, modify, and/or distribute this software for any ++ * purpose with or without fee is hereby granted, provided that the above ++ * copyright notice and this permission notice appear in all copies. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ */ ++ ++#ifndef __QCOM_NSS_VOL_SCALING_H ++#define __QCOM_NSS_VOL_SCALING_H ++ ++#include ++ ++int nss_ramp_voltage(unsigned long rate, bool ramp_up); ++ ++#endif ++ diff --git a/target/linux/ipq806x/patches-5.4/999-01-Revert-ARM-dma-mapping-remove-dmac_clean_range-and-d.patch b/target/linux/ipq806x/patches-5.4/999-01-Revert-ARM-dma-mapping-remove-dmac_clean_range-and-d.patch new file mode 100644 index 000000000..7e6d9b88e --- /dev/null +++ b/target/linux/ipq806x/patches-5.4/999-01-Revert-ARM-dma-mapping-remove-dmac_clean_range-and-d.patch @@ -0,0 +1,144 @@ +From 733a75729c1fbb478caaed875dd9c09a878a553d Mon Sep 17 00:00:00 2001 +From: Robert Marko +Date: Fri, 5 Jun 2020 11:44:27 +0200 +Subject: [PATCH] Revert "ARM: dma-mapping: remove dmac_clean_range and + dmac_inv_range" + +This partially reverts 'commit 702b94bff3c505 ("ARM: dma-mapping: +remove dmac_clean_range and dmac_inv_range")' + +Some MSM drivers still use the dmac_clean and dmac_inv_range APIs. +Bring back the defines and exports for v7 CPUs. + +Signed-off-by: Rohit Vaswani +Signed-off-by: Abhimanyu Kapur +[sramana: resolved minor merge conflicts] +Signed-off-by: Srinivas Ramana +(cherry picked from commit d6118c0a9f7ab2b131ca36dd3dbd5634603d14fe) + +Change-Id: Ib2ddb4452711c5c2013bf29f0b5d8a3572b10357 +Signed-off-by: Manoharan Vijaya Raghavan + +Signed-off-by: Robert Marko +--- + arch/arm/include/asm/cacheflush.h | 21 +++++++++++++++++++++ + arch/arm/include/asm/glue-cache.h | 2 ++ + arch/arm/mm/cache-v7.S | 6 ++++-- + arch/arm/mm/proc-macros.S | 2 ++ + arch/arm/mm/proc-syms.c | 3 +++ + 5 files changed, 32 insertions(+), 2 deletions(-) + +--- a/arch/arm/include/asm/cacheflush.h ++++ b/arch/arm/include/asm/cacheflush.h +@@ -91,6 +91,21 @@ + * DMA Cache Coherency + * =================== + * ++ * dma_inv_range(start, end) ++ * ++ * Invalidate (discard) the specified virtual address range. ++ * May not write back any entries. If 'start' or 'end' ++ * are not cache line aligned, those lines must be written ++ * back. ++ * - start - virtual start address ++ * - end - virtual end address ++ * ++ * dma_clean_range(start, end) ++ * ++ * Clean (write back) the specified virtual address range. ++ * - start - virtual start address ++ * - end - virtual end address ++ * + * dma_flush_range(start, end) + * + * Clean and invalidate the specified virtual address range. +@@ -112,6 +127,8 @@ struct cpu_cache_fns { + void (*dma_map_area)(const void *, size_t, int); + void (*dma_unmap_area)(const void *, size_t, int); + ++ void (*dma_inv_range)(const void *, const void *); ++ void (*dma_clean_range)(const void *, const void *); + void (*dma_flush_range)(const void *, const void *); + } __no_randomize_layout; + +@@ -137,6 +154,8 @@ extern struct cpu_cache_fns cpu_cache; + * is visible to DMA, or data written by DMA to system memory is + * visible to the CPU. + */ ++#define dmac_inv_range cpu_cache.dma_inv_range ++#define dmac_clean_range cpu_cache.dma_clean_range + #define dmac_flush_range cpu_cache.dma_flush_range + + #else +@@ -156,6 +175,8 @@ extern void __cpuc_flush_dcache_area(voi + * is visible to DMA, or data written by DMA to system memory is + * visible to the CPU. + */ ++extern void dmac_inv_range(const void *, const void *); ++extern void dmac_clean_range(const void *, const void *); + extern void dmac_flush_range(const void *, const void *); + + #endif +--- a/arch/arm/include/asm/glue-cache.h ++++ b/arch/arm/include/asm/glue-cache.h +@@ -156,6 +156,8 @@ static inline void nop_dma_unmap_area(co + #define __cpuc_flush_dcache_area __glue(_CACHE,_flush_kern_dcache_area) + + #define dmac_flush_range __glue(_CACHE,_dma_flush_range) ++#define dmac_inv_range __glue(_CACHE, _dma_inv_range) ++#define dmac_clean_range __glue(_CACHE, _dma_clean_range) + #endif + + #endif +--- a/arch/arm/mm/cache-v7.S ++++ b/arch/arm/mm/cache-v7.S +@@ -363,7 +363,7 @@ ENDPROC(v7_flush_kern_dcache_area) + * - start - virtual start address of region + * - end - virtual end address of region + */ +-v7_dma_inv_range: ++ENTRY(v7_dma_inv_range) + dcache_line_size r2, r3 + sub r3, r2, #1 + tst r0, r3 +@@ -393,7 +393,7 @@ ENDPROC(v7_dma_inv_range) + * - start - virtual start address of region + * - end - virtual end address of region + */ +-v7_dma_clean_range: ++ENTRY(v7_dma_clean_range) + dcache_line_size r2, r3 + sub r3, r2, #1 + bic r0, r0, r3 +@@ -479,6 +479,8 @@ ENDPROC(v7_dma_unmap_area) + + globl_equ b15_dma_map_area, v7_dma_map_area + globl_equ b15_dma_unmap_area, v7_dma_unmap_area ++ globl_equ b15_dma_inv_range, v7_dma_inv_range ++ globl_equ b15_dma_clean_range, v7_dma_clean_range + globl_equ b15_dma_flush_range, v7_dma_flush_range + + define_cache_functions b15 +--- a/arch/arm/mm/proc-macros.S ++++ b/arch/arm/mm/proc-macros.S +@@ -335,6 +335,8 @@ ENTRY(\name\()_cache_fns) + .long \name\()_flush_kern_dcache_area + .long \name\()_dma_map_area + .long \name\()_dma_unmap_area ++ .long \name\()_dma_inv_range ++ .long \name\()_dma_clean_range + .long \name\()_dma_flush_range + .size \name\()_cache_fns, . - \name\()_cache_fns + .endm +--- a/arch/arm/mm/proc-syms.c ++++ b/arch/arm/mm/proc-syms.c +@@ -27,6 +27,9 @@ EXPORT_SYMBOL(__cpuc_flush_user_all); + EXPORT_SYMBOL(__cpuc_flush_user_range); + EXPORT_SYMBOL(__cpuc_coherent_kern_range); + EXPORT_SYMBOL(__cpuc_flush_dcache_area); ++EXPORT_SYMBOL(dmac_inv_range); ++EXPORT_SYMBOL(dmac_clean_range); ++EXPORT_SYMBOL(dmac_flush_range); + #else + EXPORT_SYMBOL(cpu_cache); + #endif diff --git a/target/linux/ipq806x/patches-5.4/999-02-nss-core-and-crypto-clocks.patch b/target/linux/ipq806x/patches-5.4/999-02-nss-core-and-crypto-clocks.patch new file mode 100644 index 000000000..3706c1369 --- /dev/null +++ b/target/linux/ipq806x/patches-5.4/999-02-nss-core-and-crypto-clocks.patch @@ -0,0 +1,535 @@ +--- a/include/dt-bindings/clock/qcom,gcc-ipq806x.h ++++ b/include/dt-bindings/clock/qcom,gcc-ipq806x.h +@@ -240,7 +240,7 @@ + #define PLL14 232 + #define PLL14_VOTE 233 + #define PLL18 234 +-#define CE5_SRC 235 ++#define CE5_A_CLK 235 + #define CE5_H_CLK 236 + #define CE5_CORE_CLK 237 + #define CE3_SLEEP_CLK 238 +@@ -283,5 +283,9 @@ + #define EBI2_AON_CLK 281 + #define NSSTCM_CLK_SRC 282 + #define NSSTCM_CLK 283 ++#define NSS_CORE_CLK 284 /* Virtual */ ++#define CE5_A_CLK_SRC 285 ++#define CE5_H_CLK_SRC 286 ++#define CE5_CORE_CLK_SRC 287 + + #endif +--- a/include/dt-bindings/reset/qcom,gcc-ipq806x.h ++++ b/include/dt-bindings/reset/qcom,gcc-ipq806x.h +@@ -163,5 +163,10 @@ + #define NSS_CAL_PRBS_RST_N_RESET 154 + #define NSS_LCKDT_RST_N_RESET 155 + #define NSS_SRDS_N_RESET 156 ++#define CRYPTO_ENG1_RESET 157 ++#define CRYPTO_ENG2_RESET 158 ++#define CRYPTO_ENG3_RESET 159 ++#define CRYPTO_ENG4_RESET 160 ++#define CRYPTO_AHB_RESET 161 + + #endif +--- a/drivers/clk/qcom/gcc-ipq806x.c ++++ b/drivers/clk/qcom/gcc-ipq806x.c +@@ -24,6 +24,10 @@ + #include "clk-branch.h" + #include "clk-hfpll.h" + #include "reset.h" ++#include ++ ++/* NSS safe parent index which will be used during NSS PLL rate change */ ++static int gcc_ipq806x_nss_safe_parent; + + static struct clk_pll pll0 = { + .l_reg = 0x30c4, +@@ -222,7 +226,9 @@ static struct clk_regmap pll14_vote = { + + static struct pll_freq_tbl pll18_freq_tbl[] = { + NSS_PLL_RATE(550000000, 44, 0, 1, 0x01495625), ++ NSS_PLL_RATE(600000000, 48, 0, 1, 0x01495625), + NSS_PLL_RATE(733000000, 58, 16, 25, 0x014b5625), ++ NSS_PLL_RATE(800000000, 64, 0, 1, 0x01495625), + }; + + static struct clk_pll pll18 = { +@@ -244,6 +250,22 @@ static struct clk_pll pll18 = { + }, + }; + ++static struct clk_pll pll11 = { ++ .l_reg = 0x3184, ++ .m_reg = 0x3188, ++ .n_reg = 0x318c, ++ .config_reg = 0x3194, ++ .mode_reg = 0x3180, ++ .status_reg = 0x3198, ++ .status_bit = 16, ++ .clkr.hw.init = &(struct clk_init_data){ ++ .name = "pll11", ++ .parent_names = (const char *[]){ "pxo" }, ++ .num_parents = 1, ++ .ops = &clk_pll_ops, ++ }, ++}; ++ + enum { + P_PXO, + P_PLL8, +@@ -252,6 +274,7 @@ enum { + P_CXO, + P_PLL14, + P_PLL18, ++ P_PLL11, + }; + + static const struct parent_map gcc_pxo_pll8_map[] = { +@@ -319,6 +342,42 @@ static const char * const gcc_pxo_pll8_p + "pll18", + }; + ++static const struct parent_map gcc_pxo_pll8_pll0_pll14_pll18_pll11_map[] = { ++ { P_PXO, 0 }, ++ { P_PLL8, 4 }, ++ { P_PLL0, 2 }, ++ { P_PLL14, 5 }, ++ { P_PLL18, 1 }, ++ { P_PLL11, 3 }, ++}; ++ ++static const char *gcc_pxo_pll8_pll0_pll14_pll18_pll11[] = { ++ "pxo", ++ "pll8_vote", ++ "pll0_vote", ++ "pll14", ++ "pll18", ++ "pll11" ++}; ++ ++static const struct parent_map gcc_pxo_pll3_pll0_pll14_pll18_pll11_map[] = { ++ { P_PXO, 0 }, ++ { P_PLL3, 6 }, ++ { P_PLL0, 2 }, ++ { P_PLL14, 5 }, ++ { P_PLL18, 1 }, ++ { P_PLL11, 3 }, ++}; ++ ++static const char *gcc_pxo_pll3_pll0_pll14_pll18_pll11[] = { ++ "pxo", ++ "pll3", ++ "pll0_vote", ++ "pll14", ++ "pll18", ++ "pll11" ++}; ++ + static struct freq_tbl clk_tbl_gsbi_uart[] = { + { 1843200, P_PLL8, 2, 6, 625 }, + { 3686400, P_PLL8, 2, 12, 625 }, +@@ -2643,7 +2702,9 @@ static const struct freq_tbl clk_tbl_nss + { 110000000, P_PLL18, 1, 1, 5 }, + { 275000000, P_PLL18, 2, 0, 0 }, + { 550000000, P_PLL18, 1, 0, 0 }, ++ { 600000000, P_PLL18, 1, 0, 0 }, + { 733000000, P_PLL18, 1, 0, 0 }, ++ { 800000000, P_PLL18, 1, 0, 0 }, + { } + }; + +@@ -2753,6 +2814,319 @@ static struct clk_dyn_rcg ubi32_core2_sr + }, + }; + ++static const struct freq_tbl clk_tbl_ce5_core[] = { ++ { 150000000, P_PLL3, 8, 1, 1 }, ++ { 213200000, P_PLL11, 5, 1, 1 }, ++ { } ++}; ++ ++static struct clk_dyn_rcg ce5_core_src = { ++ .ns_reg[0] = 0x36C4, ++ .ns_reg[1] = 0x36C8, ++ .bank_reg = 0x36C0, ++ .s[0] = { ++ .src_sel_shift = 0, ++ .parent_map = gcc_pxo_pll3_pll0_pll14_pll18_pll11_map, ++ }, ++ .s[1] = { ++ .src_sel_shift = 0, ++ .parent_map = gcc_pxo_pll3_pll0_pll14_pll18_pll11_map, ++ }, ++ .p[0] = { ++ .pre_div_shift = 3, ++ .pre_div_width = 4, ++ }, ++ .p[1] = { ++ .pre_div_shift = 3, ++ .pre_div_width = 4, ++ }, ++ .mux_sel_bit = 0, ++ .freq_tbl = clk_tbl_ce5_core, ++ .clkr = { ++ .enable_reg = 0x36C0, ++ .enable_mask = BIT(1), ++ .hw.init = &(struct clk_init_data){ ++ .name = "ce5_core_src", ++ .parent_names = gcc_pxo_pll3_pll0_pll14_pll18_pll11, ++ .num_parents = 6, ++ .ops = &clk_dyn_rcg_ops, ++ }, ++ }, ++}; ++ ++static struct clk_branch ce5_core_clk = { ++ .halt_reg = 0x2FDC, ++ .halt_bit = 5, ++ .hwcg_reg = 0x36CC, ++ .hwcg_bit = 6, ++ .clkr = { ++ .enable_reg = 0x36CC, ++ .enable_mask = BIT(4), ++ .hw.init = &(struct clk_init_data){ ++ .name = "ce5_core_clk", ++ .parent_names = (const char *[]){ ++ "ce5_core_src", ++ }, ++ .num_parents = 1, ++ .ops = &clk_branch_ops, ++ .flags = CLK_SET_RATE_PARENT, ++ }, ++ }, ++}; ++ ++static const struct freq_tbl clk_tbl_ce5_a_clk[] = { ++ { 160000000, P_PLL0, 5, 1, 1 }, ++ { 213200000, P_PLL11, 5, 1, 1 }, ++ { } ++}; ++ ++static struct clk_dyn_rcg ce5_a_clk_src = { ++ .ns_reg[0] = 0x3d84, ++ .ns_reg[1] = 0x3d88, ++ .bank_reg = 0x3d80, ++ .s[0] = { ++ .src_sel_shift = 0, ++ .parent_map = gcc_pxo_pll8_pll0_pll14_pll18_pll11_map, ++ }, ++ .s[1] = { ++ .src_sel_shift = 0, ++ .parent_map = gcc_pxo_pll8_pll0_pll14_pll18_pll11_map, ++ }, ++ .p[0] = { ++ .pre_div_shift = 3, ++ .pre_div_width = 4, ++ }, ++ .p[1] = { ++ .pre_div_shift = 3, ++ .pre_div_width = 4, ++ }, ++ .mux_sel_bit = 0, ++ .freq_tbl = clk_tbl_ce5_a_clk, ++ .clkr = { ++ .enable_reg = 0x3d80, ++ .enable_mask = BIT(1), ++ .hw.init = &(struct clk_init_data){ ++ .name = "ce5_a_clk_src", ++ .parent_names = gcc_pxo_pll8_pll0_pll14_pll18_pll11, ++ .num_parents = 6, ++ .ops = &clk_dyn_rcg_ops, ++ }, ++ }, ++}; ++ ++static struct clk_branch ce5_a_clk = { ++ .halt_reg = 0x3c20, ++ .halt_bit = 12, ++ .hwcg_reg = 0x3d8c, ++ .hwcg_bit = 6, ++ .clkr = { ++ .enable_reg = 0x3d8c, ++ .enable_mask = BIT(4), ++ .hw.init = &(struct clk_init_data){ ++ .name = "ce5_a_clk", ++ .parent_names = (const char *[]){ ++ "ce5_a_clk_src", ++ }, ++ .num_parents = 1, ++ .ops = &clk_branch_ops, ++ .flags = CLK_SET_RATE_PARENT, ++ }, ++ }, ++}; ++ ++static const struct freq_tbl clk_tbl_ce5_h_clk[] = { ++ { 160000000, P_PLL0, 5, 1, 1 }, ++ { 213200000, P_PLL11, 5, 1, 1 }, ++ { } ++}; ++ ++static struct clk_dyn_rcg ce5_h_clk_src = { ++ .ns_reg[0] = 0x3c64, ++ .ns_reg[1] = 0x3c68, ++ .bank_reg = 0x3c60, ++ .s[0] = { ++ .src_sel_shift = 0, ++ .parent_map = gcc_pxo_pll8_pll0_pll14_pll18_pll11_map, ++ }, ++ .s[1] = { ++ .src_sel_shift = 0, ++ .parent_map = gcc_pxo_pll8_pll0_pll14_pll18_pll11_map, ++ }, ++ .p[0] = { ++ .pre_div_shift = 3, ++ .pre_div_width = 4, ++ }, ++ .p[1] = { ++ .pre_div_shift = 3, ++ .pre_div_width = 4, ++ }, ++ .mux_sel_bit = 0, ++ .freq_tbl = clk_tbl_ce5_h_clk, ++ .clkr = { ++ .enable_reg = 0x3c60, ++ .enable_mask = BIT(1), ++ .hw.init = &(struct clk_init_data){ ++ .name = "ce5_h_clk_src", ++ .parent_names = gcc_pxo_pll8_pll0_pll14_pll18_pll11, ++ .num_parents = 6, ++ .ops = &clk_dyn_rcg_ops, ++ }, ++ }, ++}; ++ ++static struct clk_branch ce5_h_clk = { ++ .halt_reg = 0x3c20, ++ .halt_bit = 11, ++ .hwcg_reg = 0x3c6c, ++ .hwcg_bit = 6, ++ .clkr = { ++ .enable_reg = 0x3c6c, ++ .enable_mask = BIT(4), ++ .hw.init = &(struct clk_init_data){ ++ .name = "ce5_h_clk", ++ .parent_names = (const char *[]){ ++ "ce5_h_clk_src", ++ }, ++ .num_parents = 1, ++ .ops = &clk_branch_ops, ++ .flags = CLK_SET_RATE_PARENT, ++ }, ++ }, ++}; ++ ++static int nss_core_clk_set_rate(struct clk_hw *hw, unsigned long rate, ++ unsigned long parent_rate) ++{ ++ int ret; ++ ++ /* ++ * When ramping up voltage, it needs to be done first. This ensures that ++ * the volt required will be available when you step up the frequency. ++ */ ++ ret = nss_ramp_voltage(rate, true); ++ if (ret) ++ return ret; ++ ++ ret = clk_dyn_rcg_ops.set_rate(&ubi32_core1_src_clk.clkr.hw, rate, ++ parent_rate); ++ if (ret) ++ return ret; ++ ++ ret = clk_dyn_rcg_ops.set_rate(&ubi32_core2_src_clk.clkr.hw, rate, ++ parent_rate); ++ ++ if (ret) ++ return ret; ++ ++ /* ++ * When ramping down voltage, it needs to be set first. This ensures ++ * that the volt required will be available until you step down the ++ * frequency. ++ */ ++ ret = nss_ramp_voltage(rate, false); ++ ++ return ret; ++} ++ ++static int ++nss_core_clk_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, ++ unsigned long parent_rate, u8 index) ++{ ++ int ret; ++ ++ /* ++ * When ramping up voltage needs to be done first. This ensures that ++ * the voltage required will be available when you step up the ++ * frequency. ++ */ ++ ret = nss_ramp_voltage(rate, true); ++ if (ret) ++ return ret; ++ ++ ret = clk_dyn_rcg_ops.set_rate_and_parent( ++ &ubi32_core1_src_clk.clkr.hw, rate, parent_rate, index); ++ if (ret) ++ return ret; ++ ++ ret = clk_dyn_rcg_ops.set_rate_and_parent( ++ &ubi32_core2_src_clk.clkr.hw, rate, parent_rate, index); ++ ++ if (ret) ++ return ret; ++ ++ /* ++ * When ramping down voltage needs to be done last. This ensures that ++ * the voltage required will be available when you step down the ++ * frequency. ++ */ ++ ret = nss_ramp_voltage(rate, false); ++ ++ return ret; ++} ++ ++static int nss_core_clk_determine_rate(struct clk_hw *hw, ++ struct clk_rate_request *req) ++{ ++ return clk_dyn_rcg_ops.determine_rate(&ubi32_core1_src_clk.clkr.hw, ++ req); ++} ++ ++static unsigned long ++nss_core_clk_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) ++{ ++ return clk_dyn_rcg_ops.recalc_rate(&ubi32_core1_src_clk.clkr.hw, ++ parent_rate); ++} ++ ++static u8 nss_core_clk_get_parent(struct clk_hw *hw) ++{ ++ return clk_dyn_rcg_ops.get_parent(&ubi32_core1_src_clk.clkr.hw); ++} ++ ++static int nss_core_clk_set_parent(struct clk_hw *hw, u8 i) ++{ ++ int ret; ++ struct clk_dyn_rcg *rcg; ++ struct freq_tbl f = { 200000000, P_PLL0, 2, 1, 2 }; ++ ++ /* P_PLL0 is 800 Mhz which needs to be divided for 200 Mhz */ ++ if (i == gcc_ipq806x_nss_safe_parent) { ++ rcg = to_clk_dyn_rcg(&ubi32_core1_src_clk.clkr.hw); ++ clk_dyn_configure_bank(rcg, &f); ++ ++ rcg = to_clk_dyn_rcg(&ubi32_core2_src_clk.clkr.hw); ++ clk_dyn_configure_bank(rcg, &f); ++ ++ return 0; ++ } ++ ++ ret = clk_dyn_rcg_ops.set_parent(&ubi32_core1_src_clk.clkr.hw, i); ++ if (ret) ++ return ret; ++ ++ return clk_dyn_rcg_ops.set_parent(&ubi32_core2_src_clk.clkr.hw, i); ++} ++ ++static const struct clk_ops clk_ops_nss_core = { ++ .set_rate = nss_core_clk_set_rate, ++ .set_rate_and_parent = nss_core_clk_set_rate_and_parent, ++ .determine_rate = nss_core_clk_determine_rate, ++ .recalc_rate = nss_core_clk_recalc_rate, ++ .get_parent = nss_core_clk_get_parent, ++ .set_parent = nss_core_clk_set_parent, ++}; ++ ++/* Virtual clock for nss core clocks */ ++static struct clk_regmap nss_core_clk = { ++ .hw.init = &(struct clk_init_data){ ++ .name = "nss_core_clk", ++ .ops = &clk_ops_nss_core, ++ .parent_names = gcc_pxo_pll8_pll14_pll18_pll0, ++ .num_parents = 5, ++ .flags = CLK_SET_RATE_PARENT, ++ }, ++}; ++ + static struct clk_regmap *gcc_ipq806x_clks[] = { + [PLL0] = &pll0.clkr, + [PLL0_VOTE] = &pll0_vote, +@@ -2760,6 +3134,7 @@ static struct clk_regmap *gcc_ipq806x_cl + [PLL4_VOTE] = &pll4_vote, + [PLL8] = &pll8.clkr, + [PLL8_VOTE] = &pll8_vote, ++ [PLL11] = &pll11.clkr, + [PLL14] = &pll14.clkr, + [PLL14_VOTE] = &pll14_vote, + [PLL18] = &pll18.clkr, +@@ -2871,9 +3246,16 @@ static struct clk_regmap *gcc_ipq806x_cl + [UBI32_CORE2_CLK_SRC] = &ubi32_core2_src_clk.clkr, + [NSSTCM_CLK_SRC] = &nss_tcm_src.clkr, + [NSSTCM_CLK] = &nss_tcm_clk.clkr, ++ [NSS_CORE_CLK] = &nss_core_clk, + [PLL9] = &hfpll0.clkr, + [PLL10] = &hfpll1.clkr, + [PLL12] = &hfpll_l2.clkr, ++ [CE5_A_CLK_SRC] = &ce5_a_clk_src.clkr, ++ [CE5_A_CLK] = &ce5_a_clk.clkr, ++ [CE5_H_CLK_SRC] = &ce5_h_clk_src.clkr, ++ [CE5_H_CLK] = &ce5_h_clk.clkr, ++ [CE5_CORE_CLK_SRC] = &ce5_core_src.clkr, ++ [CE5_CORE_CLK] = &ce5_core_clk.clkr, + }; + + static const struct qcom_reset_map gcc_ipq806x_resets[] = { +@@ -3005,6 +3387,11 @@ static const struct qcom_reset_map gcc_i + [GMAC_CORE3_RESET] = { 0x3cfc, 0 }, + [GMAC_CORE4_RESET] = { 0x3d1c, 0 }, + [GMAC_AHB_RESET] = { 0x3e24, 0 }, ++ [CRYPTO_ENG1_RESET] = { 0x3e00, 0}, ++ [CRYPTO_ENG2_RESET] = { 0x3e04, 0}, ++ [CRYPTO_ENG3_RESET] = { 0x3e08, 0}, ++ [CRYPTO_ENG4_RESET] = { 0x3e0c, 0}, ++ [CRYPTO_AHB_RESET] = { 0x3e10, 0}, + [NSS_CH0_RST_RX_CLK_N_RESET] = { 0x3b60, 0 }, + [NSS_CH0_RST_TX_CLK_N_RESET] = { 0x3b60, 1 }, + [NSS_CH0_RST_RX_125M_N_RESET] = { 0x3b60, 2 }, +@@ -3080,6 +3467,12 @@ static int gcc_ipq806x_probe(struct plat + if (!regmap) + return -ENODEV; + ++ gcc_ipq806x_nss_safe_parent = qcom_find_src_index(&nss_core_clk.hw, ++ gcc_pxo_pll8_pll14_pll18_pll0_map, ++ P_PLL0); ++ if (gcc_ipq806x_nss_safe_parent < 0) ++ return gcc_ipq806x_nss_safe_parent; ++ + /* Setup PLL18 static bits */ + regmap_update_bits(regmap, 0x31a4, 0xffffffc0, 0x40000400); + regmap_write(regmap, 0x31b0, 0x3080); +--- a/drivers/clk/qcom/clk-rcg.c ++++ b/drivers/clk/qcom/clk-rcg.c +@@ -805,6 +805,11 @@ static int clk_dyn_rcg_set_rate_and_pare + return __clk_dyn_rcg_set_rate(hw, rate); + } + ++void clk_dyn_configure_bank(struct clk_dyn_rcg *rcg, const struct freq_tbl *f) ++{ ++ configure_bank(rcg, f); ++} ++ + const struct clk_ops clk_rcg_ops = { + .enable = clk_enable_regmap, + .disable = clk_disable_regmap, +--- a/drivers/clk/qcom/clk-rcg.h ++++ b/drivers/clk/qcom/clk-rcg.h +@@ -173,4 +173,7 @@ struct clk_rcg_dfs_data { + extern int qcom_cc_register_rcg_dfs(struct regmap *regmap, + const struct clk_rcg_dfs_data *rcgs, + size_t len); ++ ++extern void clk_dyn_configure_bank(struct clk_dyn_rcg *rcg, ++ const struct freq_tbl *f); + #endif diff --git a/target/linux/ipq806x/patches-5.4/999-03a-qca-nss-ecm-support.patch b/target/linux/ipq806x/patches-5.4/999-03a-qca-nss-ecm-support.patch new file mode 100644 index 000000000..0d6df44c4 --- /dev/null +++ b/target/linux/ipq806x/patches-5.4/999-03a-qca-nss-ecm-support.patch @@ -0,0 +1,1586 @@ +--- a/include/linux/if_bridge.h ++++ b/include/linux/if_bridge.h +@@ -148,4 +148,39 @@ br_port_flag_is_set(const struct net_dev + } + #endif + ++/* QCA NSS ECM support - Start */ ++extern struct net_device *br_port_dev_get(struct net_device *dev, ++ unsigned char *addr, ++ struct sk_buff *skb, ++ unsigned int cookie); ++extern void br_refresh_fdb_entry(struct net_device *dev, const char *addr); ++extern struct net_bridge_fdb_entry *br_fdb_has_entry(struct net_device *dev, ++ const char *addr, ++ __u16 vid); ++extern void br_fdb_update_register_notify(struct notifier_block *nb); ++extern void br_fdb_update_unregister_notify(struct notifier_block *nb); ++ ++typedef struct net_bridge_port *br_port_dev_get_hook_t(struct net_device *dev, ++ struct sk_buff *skb, ++ unsigned char *addr, ++ unsigned int cookie); ++extern br_port_dev_get_hook_t __rcu *br_port_dev_get_hook; ++ ++#define BR_FDB_EVENT_ADD 0x01 ++#define BR_FDB_EVENT_DEL 0x02 ++ ++struct br_fdb_event { ++ struct net_device *dev; ++ unsigned char addr[6]; ++ unsigned char is_local; ++}; ++extern void br_fdb_register_notify(struct notifier_block *nb); ++extern void br_fdb_unregister_notify(struct notifier_block *nb); ++ ++typedef struct net_bridge_port *br_get_dst_hook_t( ++ const struct net_bridge_port *src, ++ struct sk_buff **skb); ++extern br_get_dst_hook_t __rcu *br_get_dst_hook; ++/* QCA NSS ECM support - End */ ++ + #endif +--- a/include/linux/if_pppol2tp.h ++++ b/include/linux/if_pppol2tp.h +@@ -14,4 +14,30 @@ + #include + #include + ++/* QCA NSS ECM support - Start */ ++/* ++ * Holds L2TP channel info ++ */ ++struct pppol2tp_common_addr { ++ int tunnel_version; /* v2 or v3 */ ++ __u32 local_tunnel_id, remote_tunnel_id; /* tunnel id */ ++ __u32 local_session_id, remote_session_id; /* session id */ ++ struct sockaddr_in local_addr, remote_addr; /* ip address and port */ ++}; ++ ++/* ++ * L2TP channel operations ++ */ ++struct pppol2tp_channel_ops { ++ struct ppp_channel_ops ops; /* ppp channel ops */ ++}; ++ ++/* ++ * exported function which calls pppol2tp channel's get addressing ++ * function ++ */ ++extern int pppol2tp_channel_addressing_get(struct ppp_channel *, ++ struct pppol2tp_common_addr *); ++/* QCA NSS ECM support - End */ ++ + #endif +--- a/include/linux/if_vlan.h ++++ b/include/linux/if_vlan.h +@@ -220,7 +220,28 @@ extern void vlan_vids_del_by_dev(struct + + extern bool vlan_uses_dev(const struct net_device *dev); + ++/* QCA NSS ECM support - Start */ ++extern void __vlan_dev_update_accel_stats(struct net_device *dev, ++ struct rtnl_link_stats64 *stats); ++extern u16 vlan_dev_get_egress_prio(struct net_device *dev, u32 skb_prio); ++extern struct net_device *vlan_dev_next_dev(const struct net_device *dev); ++/* QCA NSS ECM support - End */ ++ + #else ++/* QCA NSS ECM support - Start */ ++static inline void __vlan_dev_update_accel_stats(struct net_device *dev, ++ struct rtnl_link_stats64 *stats) ++{ ++ ++} ++ ++static inline u16 vlan_dev_get_egress_prio(struct net_device *dev, ++ u32 skb_prio) ++{ ++ return 0; ++} ++/* QCA NSS ECM support - End */ ++ + static inline struct net_device * + __vlan_find_dev_deep_rcu(struct net_device *real_dev, + __be16 vlan_proto, u16 vlan_id) +--- a/include/linux/netdevice.h ++++ b/include/linux/netdevice.h +@@ -1581,6 +1581,20 @@ enum netdev_priv_flags { + #define IFF_LIVE_RENAME_OK IFF_LIVE_RENAME_OK + #define IFF_NO_IP_ALIGN IFF_NO_IP_ALIGN + ++/* QCA NSS ECM support - Start */ ++enum netdev_priv_qca_ecm_flags { ++ IFF_QCA_ECM_TUN_TAP = 1<<0, ++ IFF_QCA_ECM_PPP_L2TPV2 = 1<<1, ++ IFF_QCA_ECM_PPP_L2TPV3 = 1<<2, ++ IFF_QCA_ECM_PPP_PPTP = 1<<3, ++}; ++ ++#define IFF_QCA_ECM_TUN_TAP IFF_QCA_ECM_TUN_TAP ++#define IFF_QCA_ECM_PPP_L2TPV2 IFF_QCA_ECM_PPP_L2TPV2 ++#define IFF_QCA_ECM_PPP_L2TPV3 IFF_QCA_ECM_PPP_L2TPV3 ++#define IFF_QCA_ECM_PPP_PPTP IFF_QCA_ECM_PPP_PPTP ++/* QCA NSS ECM support - End */ ++ + /** + * struct net_device - The DEVICE structure. + * +@@ -1890,6 +1904,7 @@ struct net_device { + + unsigned int flags; + unsigned int priv_flags; ++ unsigned int priv_flags_qca_ecm; /* QCA NSS ECM support */ + + unsigned short gflags; + unsigned short padded; +@@ -2526,6 +2541,10 @@ enum netdev_cmd { + NETDEV_CVLAN_FILTER_DROP_INFO, + NETDEV_SVLAN_FILTER_PUSH_INFO, + NETDEV_SVLAN_FILTER_DROP_INFO, ++ /* QCA NSS ECM Support - Start */ ++ NETDEV_BR_JOIN, ++ NETDEV_BR_LEAVE, ++ /* QCA NSS ECM Support - End */ + }; + const char *netdev_cmd_to_name(enum netdev_cmd cmd); + +--- a/include/net/bond_3ad.h ++++ b/include/net/bond_3ad.h +@@ -307,5 +307,13 @@ void bond_3ad_update_lacp_rate(struct bo + void bond_3ad_update_ad_actor_settings(struct bonding *bond); + int bond_3ad_stats_fill(struct sk_buff *skb, struct bond_3ad_stats *stats); + size_t bond_3ad_stats_size(void); ++ ++/* QCA NSS ECM support - Start */ ++struct net_device *bond_3ad_get_tx_dev(struct sk_buff *skb, uint8_t *src_mac, ++ uint8_t *dst_mac, void *src, ++ void *dst, uint16_t protocol, ++ struct net_device *bond_dev, ++ __be16 *layer4hdr); ++/* QCA NSS ECM support - End */ + #endif /* _NET_BOND_3AD_H */ + +--- a/include/net/bonding.h ++++ b/include/net/bonding.h +@@ -238,6 +238,7 @@ struct bonding { + #endif /* CONFIG_DEBUG_FS */ + struct rtnl_link_stats64 bond_stats; + struct lock_class_key stats_lock_key; ++ u32 id; /* QCA NSS ECM support */ + }; + + #define bond_slave_get_rcu(dev) \ +@@ -749,4 +749,12 @@ static inline void bond_tx_drop(struct n + dev_kfree_skb_any(skb); + } + ++/* QCA NSS ECM support - Start */ ++extern struct bond_cb __rcu *bond_cb; ++ ++uint32_t bond_xmit_hash_without_skb(uint8_t *src_mac, uint8_t *dst_mac, ++ void *psrc, void *pdst, uint16_t protocol, ++ struct net_device *bond_dev, ++ __be16 *layer4hdr); ++/* QCA NSS ECM support - End */ + #endif /* _NET_BONDING_H */ +--- a/include/net/ip6_route.h ++++ b/include/net/ip6_route.h +@@ -209,6 +209,11 @@ void rt6_multipath_rebalance(struct fib6 + void rt6_uncached_list_add(struct rt6_info *rt); + void rt6_uncached_list_del(struct rt6_info *rt); + ++/* QCA NSS ECM support - Start */ ++int rt6_register_notifier(struct notifier_block *nb); ++int rt6_unregister_notifier(struct notifier_block *nb); ++/* QCA NSS ECM support - End */ ++ + static inline const struct rt6_info *skb_rt6_info(const struct sk_buff *skb) + { + const struct dst_entry *dst = skb_dst(skb); +--- a/include/net/neighbour.h ++++ b/include/net/neighbour.h +@@ -568,4 +568,15 @@ static inline void neigh_update_is_route + *notify = 1; + } + } ++ ++/* QCA NSS ECM support - Start */ ++struct neigh_mac_update { ++ unsigned char old_mac[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))]; ++ unsigned char update_mac[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))]; ++}; ++ ++extern void neigh_mac_update_register_notify(struct notifier_block *nb); ++extern void neigh_mac_update_unregister_notify(struct notifier_block *nb); ++/* QCA NSS ECM support - End */ ++ + #endif +--- a/include/net/netfilter/nf_conntrack_extend.h ++++ b/include/net/netfilter/nf_conntrack_extend.h +@@ -28,6 +28,10 @@ enum nf_ct_ext_id { + #if IS_ENABLED(CONFIG_NETFILTER_SYNPROXY) + NF_CT_EXT_SYNPROXY, + #endif ++#ifdef CONFIG_NF_CONNTRACK_DSCPREMARK_EXT ++ NF_CT_EXT_DSCPREMARK, /* QCA NSS ECM support */ ++#endif ++ + NF_CT_EXT_NUM, + }; + +@@ -40,6 +44,9 @@ enum nf_ct_ext_id { + #define NF_CT_EXT_TIMEOUT_TYPE struct nf_conn_timeout + #define NF_CT_EXT_LABELS_TYPE struct nf_conn_labels + #define NF_CT_EXT_SYNPROXY_TYPE struct nf_conn_synproxy ++/* QCA NSS ECM support - Start */ ++#define NF_CT_EXT_DSCPREMARK_TYPE struct nf_ct_dscpremark_ext ++/* QCA NSS ECM support - End */ + + /* Extensions: optional stuff which isn't permanently in struct. */ + struct nf_ct_ext { +--- a/include/net/route.h ++++ b/include/net/route.h +@@ -224,6 +224,11 @@ struct rtable *rt_dst_alloc(struct net_d + bool nopolicy, bool noxfrm, bool will_cache); + struct rtable *rt_dst_clone(struct net_device *dev, struct rtable *rt); + ++/* QCA NSS ECM support - Start */ ++int ip_rt_register_notifier(struct notifier_block *nb); ++int ip_rt_unregister_notifier(struct notifier_block *nb); ++/* QCA NSS ECM support - End */ ++ + struct in_ifaddr; + void fib_add_ifaddr(struct in_ifaddr *); + void fib_del_ifaddr(struct in_ifaddr *, struct in_ifaddr *); +--- a/include/uapi/linux/if_bonding.h ++++ b/include/uapi/linux/if_bonding.h +@@ -141,6 +141,23 @@ enum { + }; + #define BOND_3AD_STAT_MAX (__BOND_3AD_STAT_MAX - 1) + ++/* QCA NSS ECM support - Start */ ++#ifdef __KERNEL__ ++struct bond_cb { ++ void (*bond_cb_link_up)(struct net_device *slave); ++ void (*bond_cb_link_down)(struct net_device *slave); ++ void (*bond_cb_enslave)(struct net_device *slave); ++ void (*bond_cb_release)(struct net_device *slave); ++ void (*bond_cb_delete_by_slave)(struct net_device *slave); ++ void (*bond_cb_delete_by_mac)(uint8_t *mac_addr); ++}; ++ ++extern int bond_register_cb(struct bond_cb *cb); ++extern void bond_unregister_cb(void); ++extern int bond_get_id(struct net_device *bond_dev); ++#endif /* __KERNEL__ */ ++/* QCA NSS ECM support - End */ ++ + #endif /* _LINUX_IF_BONDING_H */ + + /* +--- a/drivers/net/bonding/bond_3ad.c ++++ b/drivers/net/bonding/bond_3ad.c +@@ -121,6 +121,39 @@ static void ad_marker_response_received( + struct port *port); + static void ad_update_actor_keys(struct port *port, bool reset); + ++/* QCA NSS ECM support - Start */ ++struct bond_cb __rcu *bond_cb; ++ ++int bond_register_cb(struct bond_cb *cb) ++{ ++ struct bond_cb *lag_cb; ++ ++ rcu_read_lock(); ++ lag_cb = kzalloc(sizeof(*lag_cb), GFP_ATOMIC | __GFP_NOWARN); ++ if (!lag_cb) { ++ rcu_read_unlock(); ++ return -1; ++ } ++ ++ memcpy((void *)lag_cb, (void *)cb, sizeof(*cb)); ++ rcu_assign_pointer(bond_cb, lag_cb); ++ rcu_read_unlock(); ++ return 0; ++} ++EXPORT_SYMBOL(bond_register_cb); ++ ++void bond_unregister_cb(void) ++{ ++ struct bond_cb *lag_cb_main; ++ ++ rcu_read_lock(); ++ lag_cb_main = rcu_dereference(bond_cb); ++ kfree(lag_cb_main); ++ rcu_assign_pointer(bond_cb, NULL); ++ rcu_read_unlock(); ++} ++EXPORT_SYMBOL(bond_unregister_cb); ++/* QCA NSS ECM support - Start */ + + /* ================= api to bonding and kernel code ================== */ + +@@ -998,6 +1031,29 @@ static void ad_mux_machine(struct port * + port->actor_oper_port_state |= + AD_STATE_SYNCHRONIZATION; + } ++ ++ /* QCA NSS ECM support - Start */ ++ /* Send a notificaton about change in state of this ++ * port. We only want to handle case where port moves ++ * from AD_MUX_COLLECTING_DISTRIBUTING -> ++ * AD_MUX_ATTACHED. ++ */ ++ if (bond_slave_is_up(port->slave) && ++ (last_state == AD_MUX_COLLECTING_DISTRIBUTING)) { ++ struct bond_cb *lag_cb_main; ++ ++ rcu_read_lock(); ++ lag_cb_main = rcu_dereference(bond_cb); ++ if (lag_cb_main && ++ lag_cb_main->bond_cb_link_down) { ++ struct net_device *dev; ++ ++ dev = port->slave->dev; ++ lag_cb_main->bond_cb_link_down(dev); ++ } ++ rcu_read_unlock(); ++ } ++ /* QCA NSS ECM support - End */ + break; + case AD_MUX_COLLECTING_DISTRIBUTING: + if (!(port->sm_vars & AD_PORT_SELECTED) || +@@ -1895,6 +1951,8 @@ static void ad_enable_collecting_distrib + bool *update_slave_arr) + { + if (port->aggregator->is_active) { ++ struct bond_cb *lag_cb_main; /* QCA NSS ECM support */ ++ + slave_dbg(port->slave->bond->dev, port->slave->dev, + "Enabling port %d (LAG %d)\n", + port->actor_port_number, +@@ -1902,6 +1960,16 @@ static void ad_enable_collecting_distrib + __enable_port(port); + /* Slave array needs update */ + *update_slave_arr = true; ++ ++ /* QCA NSS ECM support - Start */ ++ rcu_read_lock(); ++ lag_cb_main = rcu_dereference(bond_cb); ++ ++ if (lag_cb_main && lag_cb_main->bond_cb_link_up) ++ lag_cb_main->bond_cb_link_up(port->slave->dev); ++ ++ rcu_read_unlock(); ++ /* QCA NSS ECM support - End */ + } + } + +@@ -2759,3 +2827,101 @@ int bond_3ad_stats_fill(struct sk_buff * + + return 0; + } ++ ++/* QCA NSS ECM support - Start */ ++/* bond_3ad_get_tx_dev - Calculate egress interface for a given packet, ++ * for a LAG that is configured in 802.3AD mode ++ * @skb: pointer to skb to be egressed ++ * @src_mac: pointer to source L2 address ++ * @dst_mac: pointer to destination L2 address ++ * @src: pointer to source L3 address ++ * @dst: pointer to destination L3 address ++ * @protocol: L3 protocol id from L2 header ++ * @bond_dev: pointer to bond master device ++ * ++ * If @skb is NULL, bond_xmit_hash is used to calculate hash using L2/L3 ++ * addresses. ++ * ++ * Returns: Either valid slave device, or NULL otherwise ++ */ ++struct net_device *bond_3ad_get_tx_dev(struct sk_buff *skb, u8 *src_mac, ++ u8 *dst_mac, void *src, ++ void *dst, u16 protocol, ++ struct net_device *bond_dev, ++ __be16 *layer4hdr) ++{ ++ struct bonding *bond = netdev_priv(bond_dev); ++ struct aggregator *agg; ++ struct ad_info ad_info; ++ struct list_head *iter; ++ struct slave *slave; ++ struct slave *first_ok_slave = NULL; ++ u32 hash = 0; ++ int slaves_in_agg; ++ int slave_agg_no = 0; ++ int agg_id; ++ ++ if (__bond_3ad_get_active_agg_info(bond, &ad_info)) { ++ pr_debug("%s: Error: __bond_3ad_get_active_agg_info failed\n", ++ bond_dev->name); ++ return NULL; ++ } ++ ++ slaves_in_agg = ad_info.ports; ++ agg_id = ad_info.aggregator_id; ++ ++ if (slaves_in_agg == 0) { ++ pr_debug("%s: Error: active aggregator is empty\n", ++ bond_dev->name); ++ return NULL; ++ } ++ ++ if (skb) { ++ hash = bond_xmit_hash(bond, skb); ++ slave_agg_no = hash % slaves_in_agg; ++ } else { ++ if (bond->params.xmit_policy != BOND_XMIT_POLICY_LAYER23 && ++ bond->params.xmit_policy != BOND_XMIT_POLICY_LAYER2 && ++ bond->params.xmit_policy != BOND_XMIT_POLICY_LAYER34) { ++ pr_debug("%s: Error: Unsupported hash policy for 802.3AD fast path\n", ++ bond_dev->name); ++ return NULL; ++ } ++ ++ hash = bond_xmit_hash_without_skb(src_mac, dst_mac, ++ src, dst, protocol, ++ bond_dev, layer4hdr); ++ slave_agg_no = hash % slaves_in_agg; ++ } ++ ++ bond_for_each_slave_rcu(bond, slave, iter) { ++ agg = SLAVE_AD_INFO(slave)->port.aggregator; ++ if (!agg || agg->aggregator_identifier != agg_id) ++ continue; ++ ++ if (slave_agg_no >= 0) { ++ if (!first_ok_slave && bond_slave_can_tx(slave)) ++ first_ok_slave = slave; ++ slave_agg_no--; ++ continue; ++ } ++ ++ if (bond_slave_can_tx(slave)) ++ return slave->dev; ++ } ++ ++ if (slave_agg_no >= 0) { ++ pr_err("%s: Error: Couldn't find a slave to tx on for aggregator ID %d\n", ++ bond_dev->name, agg_id); ++ return NULL; ++ } ++ ++ /* we couldn't find any suitable slave after the agg_no, so use the ++ * first suitable found, if found. ++ */ ++ if (first_ok_slave) ++ return first_ok_slave->dev; ++ ++ return NULL; ++} ++/* QCA NSS ECM support - End */ +--- a/drivers/net/bonding/bond_main.c ++++ b/drivers/net/bonding/bond_main.c +@@ -199,6 +199,7 @@ atomic_t netpoll_block_tx = ATOMIC_INIT( + #endif + + unsigned int bond_net_id __read_mostly; ++static unsigned long bond_id_mask = 0xFFFFFFF0; /* QCA NSS ECM Support */ + + /*-------------------------- Forward declarations ---------------------------*/ + +@@ -847,6 +847,23 @@ void bond_change_active_slave(struct bon + if (BOND_MODE(bond) == BOND_MODE_8023AD) + bond_3ad_handle_link_change(new_active, BOND_LINK_UP); + ++ /* QCA NSS ECM support - Start */ ++ if (bond->params.mode == BOND_MODE_XOR) { ++ struct bond_cb *lag_cb_main; ++ ++ rcu_read_lock(); ++ lag_cb_main = rcu_dereference(bond_cb); ++ if (lag_cb_main && ++ lag_cb_main->bond_cb_link_up) { ++ struct net_device *dev; ++ ++ dev = new_active->dev; ++ lag_cb_main->bond_cb_link_up(dev); ++ } ++ rcu_read_unlock(); ++ } ++ /* QCA NSS ECM support - End */ ++ + if (bond_is_lb(bond)) + bond_alb_handle_link_change(bond, new_active, BOND_LINK_UP); + } else { +@@ -1379,6 +1396,7 @@ int bond_enslave(struct net_device *bond + const struct net_device_ops *slave_ops = slave_dev->netdev_ops; + struct slave *new_slave = NULL, *prev_slave; + struct sockaddr_storage ss; ++ struct bond_cb *lag_cb_main; /* QCA NSS ECM support */ + int link_reporting; + int res = 0, i; + +@@ -1780,6 +1798,13 @@ int bond_enslave(struct net_device *bond + if (bond_mode_can_use_xmit_hash(bond)) + bond_update_slave_arr(bond, NULL); + ++ /* QCA NSS ECM support - Start */ ++ rcu_read_lock(); ++ lag_cb_main = rcu_dereference(bond_cb); ++ if (lag_cb_main && lag_cb_main->bond_cb_enslave) ++ lag_cb_main->bond_cb_enslave(slave_dev); ++ rcu_read_unlock(); ++ /* QCA NSS ECM support - End */ + + slave_info(bond_dev, slave_dev, "Enslaving as %s interface with %s link\n", + bond_is_active_slave(new_slave) ? "an active" : "a backup", +@@ -1852,6 +1877,14 @@ err_undo_flags: + } + } + ++ /* QCA NSS ECM support - Start */ ++ rcu_read_lock(); ++ lag_cb_main = rcu_dereference(bond_cb); ++ if (lag_cb_main && lag_cb_main->bond_cb_enslave) ++ lag_cb_main->bond_cb_enslave(slave_dev); ++ rcu_read_unlock(); ++ /* QCA NSS ECM support - End */ ++ + return res; + } + +@@ -1873,6 +1906,7 @@ static int __bond_release_one(struct net + struct bonding *bond = netdev_priv(bond_dev); + struct slave *slave, *oldcurrent; + struct sockaddr_storage ss; ++ struct bond_cb *lag_cb_main; /* QCA NSS ECM support */ + int old_flags = bond_dev->flags; + netdev_features_t old_features = bond_dev->features; + +@@ -1895,6 +1929,14 @@ static int __bond_release_one(struct net + + bond_set_slave_inactive_flags(slave, BOND_SLAVE_NOTIFY_NOW); + ++ /* QCA NSS ECM support - Start */ ++ rcu_read_lock(); ++ lag_cb_main = rcu_dereference(bond_cb); ++ if (lag_cb_main && lag_cb_main->bond_cb_release) ++ lag_cb_main->bond_cb_release(slave_dev); ++ rcu_read_unlock(); ++ /* QCA NSS ECM support - End */ ++ + bond_sysfs_slave_del(slave); + + /* recompute stats just before removing the slave */ +@@ -2190,6 +2232,10 @@ static void bond_miimon_commit(struct bo + { + struct list_head *iter; + struct slave *slave, *primary; ++ /* QCA NSS ECM support - Start */ ++ struct net_device *slave_dev = NULL; ++ struct bond_cb *lag_cb_main; ++ /* QCA NSS ECM support - End */ + + bond_for_each_slave(bond, slave, iter) { + switch (slave->link_new_state) { +@@ -2233,6 +2279,12 @@ static void bond_miimon_commit(struct bo + + bond_miimon_link_change(bond, slave, BOND_LINK_UP); + ++ /* QCA NSS ECM support - Start */ ++ if ((bond->params.mode == BOND_MODE_XOR) && ++ (!slave_dev)) ++ slave_dev = slave->dev; ++ /* QCA NSS ECM support - End */ ++ + if (!bond->curr_active_slave || slave == primary) + goto do_failover; + +@@ -2274,6 +2326,15 @@ do_failover: + } + + bond_set_carrier(bond); ++ ++ /* QCA NSS ECM support - Start */ ++ rcu_read_lock(); ++ lag_cb_main = rcu_dereference(bond_cb); ++ ++ if (slave_dev && lag_cb_main && lag_cb_main->bond_cb_link_up) ++ lag_cb_main->bond_cb_link_up(slave_dev); ++ rcu_read_unlock(); ++ /* QCA NSS ECM support - End */ + } + + /* bond_mii_monitor +@@ -4327,6 +4389,11 @@ static void bond_destructor(struct net_d + struct bonding *bond = netdev_priv(bond_dev); + if (bond->wq) + destroy_workqueue(bond->wq); ++ ++ /* QCA NSS ECM Support - Start */ ++ if (bond->id != (~0U)) ++ clear_bit(bond->id, &bond_id_mask); ++ /* QCA NSS ECM Support - End */ + } + + void bond_setup(struct net_device *bond_dev) +@@ -4872,6 +4939,16 @@ int bond_create(struct net *net, const c + bond_work_init_all(bond); + + rtnl_unlock(); ++ ++ /* QCA NSS ECM Support - Start */ ++ bond = netdev_priv(bond_dev); ++ bond->id = ~0U; ++ if (bond_id_mask != (~0UL)) { ++ bond->id = (u32)ffz(bond_id_mask); ++ set_bit(bond->id, &bond_id_mask); ++ } ++ /* QCA NSS ECM Support - End */ ++ + return 0; + } + +@@ -4967,6 +5028,203 @@ static void __exit bonding_exit(void) + #endif + } + ++/* QCA NSS ECM support - Start */ ++static bool bond_flow_dissect_without_skb(struct bonding *bond, ++ u8 *src_mac, u8 *dst_mac, ++ void *psrc, void *pdst, ++ u16 protocol, __be16 *layer4hdr, ++ struct flow_keys *fk) ++{ ++ u32 *src = NULL; ++ u32 *dst = NULL; ++ ++ fk->ports.ports = 0; ++ src = (uint32_t *)psrc; ++ dst = (uint32_t *)pdst; ++ ++ if (protocol == htons(ETH_P_IP)) { ++ /* V4 addresses and address type*/ ++ fk->addrs.v4addrs.src = src[0]; ++ fk->addrs.v4addrs.dst = dst[0]; ++ fk->control.addr_type = FLOW_DISSECTOR_KEY_IPV4_ADDRS; ++ } else if (protocol == htons(ETH_P_IPV6)) { ++ /* V6 addresses and address type*/ ++ memcpy(&fk->addrs.v6addrs.src, src, sizeof(struct in6_addr)); ++ memcpy(&fk->addrs.v6addrs.dst, dst, sizeof(struct in6_addr)); ++ fk->control.addr_type = FLOW_DISSECTOR_KEY_IPV6_ADDRS; ++ } else { ++ return false; ++ } ++ if ((bond->params.xmit_policy == BOND_XMIT_POLICY_LAYER34) && ++ (layer4hdr)) ++ fk->ports.ports = *layer4hdr; ++ ++ return true; ++} ++ ++/* Extract the appropriate headers based on bond's xmit policy */ ++ ++/* bond_xmit_hash_without_skb - Applies load balancing algorithm for a packet, ++ * to calculate hash for a given set of L2/L3 addresses. Does not ++ * calculate egress interface. ++ */ ++uint32_t bond_xmit_hash_without_skb(u8 *src_mac, u8 *dst_mac, ++ void *psrc, void *pdst, u16 protocol, ++ struct net_device *bond_dev, ++ __be16 *layer4hdr) ++{ ++ struct bonding *bond = netdev_priv(bond_dev); ++ struct flow_keys flow; ++ u32 hash = 0; ++ ++ if (bond->params.xmit_policy == BOND_XMIT_POLICY_LAYER2 || ++ !bond_flow_dissect_without_skb(bond, src_mac, dst_mac, psrc, ++ pdst, protocol, layer4hdr, &flow)) ++ return (dst_mac[5] ^ src_mac[5]); ++ ++ if (bond->params.xmit_policy == BOND_XMIT_POLICY_LAYER23) ++ hash = dst_mac[5] ^ src_mac[5]; ++ else if (layer4hdr) ++ hash = (__force u32)flow.ports.ports; ++ ++ hash ^= (__force u32)flow_get_u32_dst(&flow) ^ ++ (__force u32)flow_get_u32_src(&flow); ++ hash ^= (hash >> 16); ++ hash ^= (hash >> 8); ++ ++ return hash; ++} ++ ++/* bond_xor_get_tx_dev - Calculate egress interface for a given packet for a LAG ++ * that is configured in balance-xor mode ++ * @skb: pointer to skb to be egressed ++ * @src_mac: pointer to source L2 address ++ * @dst_mac: pointer to destination L2 address ++ * @src: pointer to source L3 address in network order ++ * @dst: pointer to destination L3 address in network order ++ * @protocol: L3 protocol ++ * @bond_dev: pointer to bond master device ++ * ++ * If @skb is NULL, bond_xmit_hash_without_skb is used to calculate hash using ++ * L2/L3 addresses. ++ * ++ * Returns: Either valid slave device, or NULL otherwise ++ */ ++static struct net_device *bond_xor_get_tx_dev(struct sk_buff *skb, ++ u8 *src_mac, u8 *dst_mac, ++ void *src, void *dst, ++ u16 protocol, ++ struct net_device *bond_dev, ++ __be16 *layer4hdr) ++{ ++ struct bonding *bond = netdev_priv(bond_dev); ++ int slave_cnt = READ_ONCE(bond->slave_cnt); ++ int slave_id = 0, i = 0; ++ u32 hash; ++ struct list_head *iter; ++ struct slave *slave; ++ ++ if (slave_cnt == 0) { ++ pr_debug("%s: Error: No slave is attached to the interface\n", ++ bond_dev->name); ++ return NULL; ++ } ++ ++ if (skb) { ++ hash = bond_xmit_hash(bond, skb); ++ slave_id = hash % slave_cnt; ++ } else { ++ if (bond->params.xmit_policy != BOND_XMIT_POLICY_LAYER23 && ++ bond->params.xmit_policy != BOND_XMIT_POLICY_LAYER2 && ++ bond->params.xmit_policy != BOND_XMIT_POLICY_LAYER34) { ++ pr_debug("%s: Error: Unsupported hash policy for balance-XOR fast path\n", ++ bond_dev->name); ++ return NULL; ++ } ++ ++ hash = bond_xmit_hash_without_skb(src_mac, dst_mac, src, ++ dst, protocol, bond_dev, ++ layer4hdr); ++ slave_id = hash % slave_cnt; ++ } ++ ++ i = slave_id; ++ ++ /* Here we start from the slave with slave_id */ ++ bond_for_each_slave_rcu(bond, slave, iter) { ++ if (--i < 0) { ++ if (bond_slave_can_tx(slave)) ++ return slave->dev; ++ } ++ } ++ ++ /* Here we start from the first slave up to slave_id */ ++ i = slave_id; ++ bond_for_each_slave_rcu(bond, slave, iter) { ++ if (--i < 0) ++ break; ++ if (bond_slave_can_tx(slave)) ++ return slave->dev; ++ } ++ ++ return NULL; ++} ++ ++/* bond_get_tx_dev - Calculate egress interface for a given packet. ++ * ++ * Supports 802.3AD and balance-xor modes ++ * ++ * @skb: pointer to skb to be egressed, if valid ++ * @src_mac: pointer to source L2 address ++ * @dst_mac: pointer to destination L2 address ++ * @src: pointer to source L3 address in network order ++ * @dst: pointer to destination L3 address in network order ++ * @protocol: L3 protocol id from L2 header ++ * @bond_dev: pointer to bond master device ++ * ++ * Returns: Either valid slave device, or NULL for un-supported LAG modes ++ */ ++struct net_device *bond_get_tx_dev(struct sk_buff *skb, uint8_t *src_mac, ++ u8 *dst_mac, void *src, ++ void *dst, u16 protocol, ++ struct net_device *bond_dev, ++ __be16 *layer4hdr) ++{ ++ struct bonding *bond = netdev_priv(bond_dev); ++ ++ if (!bond) ++ return NULL; ++ ++ switch (bond->params.mode) { ++ case BOND_MODE_XOR: ++ return bond_xor_get_tx_dev(skb, src_mac, dst_mac, ++ src, dst, protocol, ++ bond_dev, layer4hdr); ++ case BOND_MODE_8023AD: ++ return bond_3ad_get_tx_dev(skb, src_mac, dst_mac, ++ src, dst, protocol, ++ bond_dev, layer4hdr); ++ default: ++ return NULL; ++ } ++} ++EXPORT_SYMBOL(bond_get_tx_dev); ++ ++int bond_get_id(struct net_device *bond_dev) ++{ ++ struct bonding *bond; ++ ++ if (!((bond_dev->priv_flags & IFF_BONDING) && ++ (bond_dev->flags & IFF_MASTER))) ++ return -EINVAL; ++ ++ bond = netdev_priv(bond_dev); ++ ++ return bond->id; ++} ++EXPORT_SYMBOL(bond_get_id); ++/* QCA NSS ECM support - End */ ++ + module_init(bonding_init); + module_exit(bonding_exit); + MODULE_LICENSE("GPL"); +--- a/net/8021q/vlan_core.c ++++ b/net/8021q/vlan_core.c +@@ -551,4 +551,52 @@ static int __init vlan_offload_init(void + return 0; + } + ++/* QCA NSS ECM support - Start */ ++/* Update the VLAN device with statistics from network offload engines */ ++void __vlan_dev_update_accel_stats(struct net_device *dev, ++ struct rtnl_link_stats64 *nlstats) ++{ ++ struct vlan_pcpu_stats *stats; ++ ++ if (!is_vlan_dev(dev)) ++ return; ++ ++ stats = per_cpu_ptr(vlan_dev_priv(dev)->vlan_pcpu_stats, 0); ++ ++ u64_stats_update_begin(&stats->syncp); ++ stats->rx_packets += nlstats->rx_packets; ++ stats->rx_bytes += nlstats->rx_bytes; ++ stats->tx_packets += nlstats->tx_packets; ++ stats->tx_bytes += nlstats->tx_bytes; ++ u64_stats_update_end(&stats->syncp); ++} ++EXPORT_SYMBOL(__vlan_dev_update_accel_stats); ++ ++/* Lookup the 802.1p egress_map table and return the 802.1p value */ ++u16 vlan_dev_get_egress_prio(struct net_device *dev, u32 skb_prio) ++{ ++ struct vlan_priority_tci_mapping *mp; ++ ++ mp = vlan_dev_priv(dev)->egress_priority_map[(skb_prio & 0xf)]; ++ while (mp) { ++ if (mp->priority == skb_prio) { ++ /* This should already be shifted ++ * to mask correctly with the ++ * VLAN's TCI ++ */ ++ return mp->vlan_qos; ++ } ++ mp = mp->next; ++ } ++ return 0; ++} ++EXPORT_SYMBOL(vlan_dev_get_egress_prio); ++ ++struct net_device *vlan_dev_next_dev(const struct net_device *dev) ++{ ++ return vlan_dev_priv(dev)->real_dev; ++} ++EXPORT_SYMBOL(vlan_dev_next_dev); ++/* QCA NSS ECM support - End */ ++ + fs_initcall(vlan_offload_init); +--- a/net/bridge/br_fdb.c ++++ b/net/bridge/br_fdb.c +@@ -37,6 +37,35 @@ static int fdb_insert(struct net_bridge + static void fdb_notify(struct net_bridge *br, + const struct net_bridge_fdb_entry *, int, bool); + ++/* QCA NSS ECM support - Start */ ++ATOMIC_NOTIFIER_HEAD(br_fdb_notifier_list); ++ATOMIC_NOTIFIER_HEAD(br_fdb_update_notifier_list); ++ ++void br_fdb_register_notify(struct notifier_block *nb) ++{ ++ atomic_notifier_chain_register(&br_fdb_notifier_list, nb); ++} ++EXPORT_SYMBOL_GPL(br_fdb_register_notify); ++ ++void br_fdb_unregister_notify(struct notifier_block *nb) ++{ ++ atomic_notifier_chain_unregister(&br_fdb_notifier_list, nb); ++} ++EXPORT_SYMBOL_GPL(br_fdb_unregister_notify); ++ ++void br_fdb_update_register_notify(struct notifier_block *nb) ++{ ++ atomic_notifier_chain_register(&br_fdb_update_notifier_list, nb); ++} ++EXPORT_SYMBOL_GPL(br_fdb_update_register_notify); ++ ++void br_fdb_update_unregister_notify(struct notifier_block *nb) ++{ ++ atomic_notifier_chain_unregister(&br_fdb_update_notifier_list, nb); ++} ++EXPORT_SYMBOL_GPL(br_fdb_update_unregister_notify); ++/* QCA NSS ECM support - End */ ++ + int __init br_fdb_init(void) + { + br_fdb_cache = kmem_cache_create("bridge_fdb_cache", +@@ -337,6 +366,7 @@ void br_fdb_cleanup(struct work_struct * + unsigned long delay = hold_time(br); + unsigned long work_delay = delay; + unsigned long now = jiffies; ++ u8 mac_addr[6]; /* QCA NSS ECM support */ + + /* this part is tricky, in order to avoid blocking learning and + * consequently forwarding, we rely on rcu to delete objects with +@@ -353,8 +383,15 @@ void br_fdb_cleanup(struct work_struct * + work_delay = min(work_delay, this_timer - now); + } else { + spin_lock_bh(&br->hash_lock); +- if (!hlist_unhashed(&f->fdb_node)) ++ if (!hlist_unhashed(&f->fdb_node)) { ++ ether_addr_copy(mac_addr, f->key.addr.addr); + fdb_delete(br, f, true); ++ /* QCA NSS ECM support - Start */ ++ atomic_notifier_call_chain( ++ &br_fdb_update_notifier_list, 0, ++ (void *)mac_addr); ++ /* QCA NSS ECM support - End */ ++ } + spin_unlock_bh(&br->hash_lock); + } + } +@@ -586,6 +623,12 @@ void br_fdb_update(struct net_bridge *br + /* Take over HW learned entry */ + if (unlikely(fdb->added_by_external_learn)) + fdb->added_by_external_learn = 0; ++ ++ /* QCA NSS ECM support - Start */ ++ atomic_notifier_call_chain( ++ &br_fdb_update_notifier_list, ++ 0, (void *)addr); ++ /* QCA NSS ECM support - End */ + } + if (now != fdb->updated) + fdb->updated = now; +@@ -695,6 +738,25 @@ static void fdb_notify(struct net_bridge + struct sk_buff *skb; + int err = -ENOBUFS; + ++ /* QCA NSS ECM support - Start */ ++ if (fdb->dst) { ++ int event; ++ struct br_fdb_event fdb_event; ++ ++ if (type == RTM_NEWNEIGH) ++ event = BR_FDB_EVENT_ADD; ++ else ++ event = BR_FDB_EVENT_DEL; ++ ++ fdb_event.dev = fdb->dst->dev; ++ ether_addr_copy(fdb_event.addr, fdb->key.addr.addr); ++ fdb_event.is_local = fdb->is_local; ++ atomic_notifier_call_chain(&br_fdb_notifier_list, ++ event, ++ (void *)&fdb_event); ++ } ++ /* QCA NSS ECM support - End */ ++ + if (swdev_notify) + br_switchdev_fdb_notify(fdb, type); + +@@ -1211,3 +1273,44 @@ void br_fdb_clear_offload(const struct n + spin_unlock_bh(&p->br->hash_lock); + } + EXPORT_SYMBOL_GPL(br_fdb_clear_offload); ++ ++/* QCA NSS ECM support - Start */ ++/* Refresh FDB entries for bridge packets being forwarded by offload engines */ ++void br_refresh_fdb_entry(struct net_device *dev, const char *addr) ++{ ++ struct net_bridge_port *p = br_port_get_rcu(dev); ++ ++ if (!p || p->state == BR_STATE_DISABLED) ++ return; ++ ++ if (!is_valid_ether_addr(addr)) { ++ pr_info("bridge: Attempt to refresh with invalid ether address %pM\n", ++ addr); ++ return; ++ } ++ ++ rcu_read_lock(); ++ br_fdb_update(p->br, p, addr, 0, true); ++ rcu_read_unlock(); ++} ++EXPORT_SYMBOL_GPL(br_refresh_fdb_entry); ++ ++/* Look up the MAC address in the device's bridge fdb table */ ++struct net_bridge_fdb_entry *br_fdb_has_entry(struct net_device *dev, ++ const char *addr, __u16 vid) ++{ ++ struct net_bridge_port *p = br_port_get_rcu(dev); ++ struct net_bridge_fdb_entry *fdb; ++ ++ if (!p || p->state == BR_STATE_DISABLED) ++ return NULL; ++ ++ rcu_read_lock(); ++ fdb = fdb_find_rcu(&p->br->fdb_hash_tbl, addr, vid); ++ rcu_read_unlock(); ++ ++ return fdb; ++} ++EXPORT_SYMBOL_GPL(br_fdb_has_entry); ++/* QCA NSS ECM support - End */ ++ +--- a/net/bridge/br_if.c ++++ b/net/bridge/br_if.c +@@ -26,6 +26,12 @@ + + #include "br_private.h" + ++/* QCA NSS ECM support - Start */ ++/* Hook for external forwarding logic */ ++br_port_dev_get_hook_t __rcu *br_port_dev_get_hook __read_mostly; ++EXPORT_SYMBOL_GPL(br_port_dev_get_hook); ++/* QCA NSS ECM support - End */ ++ + /* + * Determine initial path cost based on speed. + * using recommendations from 802.1d standard +@@ -681,6 +687,8 @@ + + kobject_uevent(&p->kobj, KOBJ_ADD); + ++ call_netdevice_notifiers(NETDEV_BR_JOIN, dev); /* QCA NSS ECM support */ ++ + return 0; + + err7: +@@ -713,6 +721,8 @@ + p = br_port_get_rtnl(dev); + if (!p || p->br != br) + return -EINVAL; ++ ++ call_netdevice_notifiers(NETDEV_BR_LEAVE, dev); /* QCA NSS ECM support */ + + /* Since more than one interface can be attached to a bridge, + * there still maybe an alternate path for netconsole to use; +@@ -768,6 +778,67 @@ + } + EXPORT_SYMBOL_GPL(br_dev_update_stats); + ++/* QCA NSS ECM support - Start */ ++/* br_port_dev_get() ++ * If a skb is provided, and the br_port_dev_get_hook_t hook exists, ++ * use that to try and determine the egress port for that skb. ++ * If not, or no egress port could be determined, use the given addr ++ * to identify the port to which it is reachable, ++ * returing a reference to the net device associated with that port. ++ * ++ * NOTE: Return NULL if given dev is not a bridge or the mac has no ++ * associated port. ++ */ ++struct net_device *br_port_dev_get(struct net_device *dev, unsigned char *addr, ++ struct sk_buff *skb, ++ unsigned int cookie) ++{ ++ struct net_bridge_fdb_entry *fdbe; ++ struct net_bridge *br; ++ struct net_device *netdev = NULL; ++ ++ /* Is this a bridge? */ ++ if (!(dev->priv_flags & IFF_EBRIDGE)) ++ return NULL; ++ ++ rcu_read_lock(); ++ ++ /* If the hook exists and the skb isn't NULL, try and get the port */ ++ if (skb) { ++ br_port_dev_get_hook_t *port_dev_get_hook; ++ ++ port_dev_get_hook = rcu_dereference(br_port_dev_get_hook); ++ if (port_dev_get_hook) { ++ struct net_bridge_port *pdst = ++ __br_get(port_dev_get_hook, NULL, dev, skb, ++ addr, cookie); ++ if (pdst) { ++ dev_hold(pdst->dev); ++ netdev = pdst->dev; ++ goto out; ++ } ++ } ++ } ++ ++ /* Either there is no hook, or can't ++ * determine the port to use - fall back to using FDB ++ */ ++ ++ br = netdev_priv(dev); ++ ++ /* Lookup the fdb entry and get reference to the port dev */ ++ fdbe = br_fdb_find_rcu(br, addr, 0); ++ if (fdbe && fdbe->dst) { ++ netdev = fdbe->dst->dev; /* port device */ ++ dev_hold(netdev); ++ } ++out: ++ rcu_read_unlock(); ++ return netdev; ++} ++EXPORT_SYMBOL_GPL(br_port_dev_get); ++/* QCA NSS ECM support - End */ ++ + bool br_port_flag_is_set(const struct net_device *dev, unsigned long flag) + { + struct net_bridge_port *p; + +--- a/net/bridge/br_private.h ++++ b/net/bridge/br_private.h +@@ -1258,4 +1258,9 @@ void br_do_proxy_suppress_arp(struct sk_ + void br_do_suppress_nd(struct sk_buff *skb, struct net_bridge *br, + u16 vid, struct net_bridge_port *p, struct nd_msg *msg); + struct nd_msg *br_is_nd_neigh_msg(struct sk_buff *skb, struct nd_msg *m); ++ ++/* QCA NSS ECM support - Start */ ++#define __br_get(__hook, __default, __args ...) \ ++ (__hook ? (__hook(__args)) : (__default)) ++/* QCA NSS ECM support - End */ + #endif +--- a/net/core/neighbour.c ++++ b/net/core/neighbour.c +@@ -1202,7 +1202,21 @@ static void neigh_update_hhs(struct neig + } + } + ++/* QCA NSS ECM support - start */ ++ATOMIC_NOTIFIER_HEAD(neigh_mac_update_notifier_list); ++ ++void neigh_mac_update_register_notify(struct notifier_block *nb) ++{ ++ atomic_notifier_chain_register(&neigh_mac_update_notifier_list, nb); ++} ++EXPORT_SYMBOL_GPL(neigh_mac_update_register_notify); + ++void neigh_mac_update_unregister_notify(struct notifier_block *nb) ++{ ++ atomic_notifier_chain_unregister(&neigh_mac_update_notifier_list, nb); ++} ++EXPORT_SYMBOL_GPL(neigh_mac_update_unregister_notify); ++/* QCA NSS ECM support - End */ + + /* Generic update routine. + -- lladdr is new lladdr or NULL, if it is not supplied. +@@ -1233,6 +1247,7 @@ static int __neigh_update(struct neighbo + int notify = 0; + struct net_device *dev; + int update_isrouter = 0; ++ struct neigh_mac_update nmu; /* QCA NSS ECM support */ + + trace_neigh_update(neigh, lladdr, new, flags, nlmsg_pid); + +@@ -1259,6 +1259,8 @@ static int __neigh_update(struct neighbo + old = neigh->nud_state; + err = -EPERM; + ++ memset(&nmu, 0, sizeof(struct neigh_mac_update)); /* QCA NSS ECM support */ ++ + if (neigh->dead) { + NL_SET_ERR_MSG(extack, "Neighbor entry is now dead"); + new = old; +@@ -1277,6 +1294,11 @@ static int __neigh_update(struct neighbo + - compare new & old + - if they are different, check override flag + */ ++ /* QCA NSS ECM update - Start */ ++ memcpy(nmu.old_mac, neigh->ha, dev->addr_len); ++ memcpy(nmu.update_mac, lladdr, dev->addr_len); ++ /* QCA NSS ECM update - End */ ++ + if ((old & NUD_VALID) && + !memcmp(lladdr, neigh->ha, dev->addr_len)) + lladdr = neigh->ha; +@@ -1399,8 +1421,11 @@ out: + if (((new ^ old) & NUD_PERMANENT) || ext_learn_change) + neigh_update_gc_list(neigh); + +- if (notify) ++ if (notify) { + neigh_update_notify(neigh, nlmsg_pid); ++ atomic_notifier_call_chain(&neigh_mac_update_notifier_list, 0, ++ (struct neigh_mac_update *)&nmu); /* QCA NSS ECM support */ ++ } + + trace_neigh_update_done(neigh, err); + +--- a/net/ipv4/fib_trie.c ++++ b/net/ipv4/fib_trie.c +@@ -1116,6 +1116,9 @@ static bool fib_valid_key_len(u32 key, u + return true; + } + ++/* Define route change notification chain. */ ++static BLOCKING_NOTIFIER_HEAD(iproute_chain); /* QCA NSS ECM support */ ++ + /* Caller must hold RTNL. */ + int fib_table_insert(struct net *net, struct fib_table *tb, + struct fib_config *cfg, struct netlink_ext_ack *extack) +@@ -1283,6 +1286,9 @@ int fib_table_insert(struct net *net, st + rtmsg_fib(RTM_NEWROUTE, htonl(key), new_fa, plen, new_fa->tb_id, + &cfg->fc_nlinfo, nlflags); + succeeded: ++ blocking_notifier_call_chain(&iproute_chain, ++ RTM_NEWROUTE, fi); ++ + return 0; + + out_fib_notif: +@@ -1609,6 +1615,9 @@ int fib_table_delete(struct net *net, st + if (fa_to_delete->fa_state & FA_S_ACCESSED) + rt_cache_flush(cfg->fc_nlinfo.nl_net); + ++ blocking_notifier_call_chain(&iproute_chain, ++ RTM_DELROUTE, fa_to_delete->fa_info); ++ + fib_release_info(fa_to_delete->fa_info); + alias_free_mem_rcu(fa_to_delete); + return 0; +@@ -2219,6 +2228,20 @@ void __init fib_trie_init(void) + 0, SLAB_PANIC, NULL); + } + ++/* QCA NSS ECM support - Start */ ++int ip_rt_register_notifier(struct notifier_block *nb) ++{ ++ return blocking_notifier_chain_register(&iproute_chain, nb); ++} ++EXPORT_SYMBOL(ip_rt_register_notifier); ++ ++int ip_rt_unregister_notifier(struct notifier_block *nb) ++{ ++ return blocking_notifier_chain_unregister(&iproute_chain, nb); ++} ++EXPORT_SYMBOL(ip_rt_unregister_notifier); ++/* QCA NSS ECM support - End */ ++ + struct fib_table *fib_trie_table(u32 id, struct fib_table *alias) + { + struct fib_table *tb; +--- a/net/ipv6/addrconf.c ++++ b/net/ipv6/addrconf.c +@@ -7173,3 +7173,35 @@ void addrconf_cleanup(void) + + destroy_workqueue(addrconf_wq); + } ++ ++/* QCA NSS ECM support - Start */ ++/* ipv6_dev_find() ++ * Find (and hold) net device that has the given address. ++ * Or NULL on failure. ++ */ ++struct net_device *ipv6_dev_find(struct net *net, struct in6_addr *addr, ++ int strict) ++{ ++ struct inet6_ifaddr *ifp; ++ struct net_device *dev; ++ ++ ifp = ipv6_get_ifaddr(net, addr, NULL, strict); ++ if (!ifp) ++ return NULL; ++ ++ if (!ifp->idev) { ++ in6_ifa_put(ifp); ++ return NULL; ++ } ++ ++ dev = ifp->idev->dev; ++ if (dev) ++ dev_hold(dev); ++ ++ in6_ifa_put(ifp); ++ ++ return dev; ++} ++EXPORT_SYMBOL(ipv6_dev_find); ++/* QCA NSS ECM support - End */ ++ +--- a/net/ipv6/ndisc.c ++++ b/net/ipv6/ndisc.c +@@ -646,6 +646,7 @@ void ndisc_send_ns(struct net_device *de + + ndisc_send_skb(skb, daddr, saddr); + } ++EXPORT_SYMBOL(ndisc_send_ns); + + void ndisc_send_rs(struct net_device *dev, const struct in6_addr *saddr, + const struct in6_addr *daddr) +--- a/net/ipv6/route.c ++++ b/net/ipv6/route.c +@@ -3747,6 +3747,9 @@ out: + return ERR_PTR(err); + } + ++/* Define route change notification chain. */ ++ATOMIC_NOTIFIER_HEAD(ip6route_chain); /* QCA NSS ECM support */ ++ + int ip6_route_add(struct fib6_config *cfg, gfp_t gfp_flags, + struct netlink_ext_ack *extack) + { +@@ -3758,6 +3761,10 @@ int ip6_route_add(struct fib6_config *cf + return PTR_ERR(rt); + + err = __ip6_ins_rt(rt, &cfg->fc_nlinfo, extack); ++ if (!err) ++ atomic_notifier_call_chain(&ip6route_chain, ++ RTM_NEWROUTE, rt); ++ + fib6_info_release(rt); + + return err; +@@ -3779,6 +3786,9 @@ static int __ip6_del_rt(struct fib6_info + err = fib6_del(rt, info); + spin_unlock_bh(&table->tb6_lock); + ++ if (!err) ++ atomic_notifier_call_chain(&ip6route_chain, ++ RTM_DELROUTE, rt); + out: + fib6_info_release(rt); + return err; +@@ -6068,6 +6078,20 @@ static int ip6_route_dev_notify(struct n + return NOTIFY_OK; + } + ++/* QCA NSS ECM support - Start */ ++int rt6_register_notifier(struct notifier_block *nb) ++{ ++ return atomic_notifier_chain_register(&ip6route_chain, nb); ++} ++EXPORT_SYMBOL(rt6_register_notifier); ++ ++int rt6_unregister_notifier(struct notifier_block *nb) ++{ ++ return atomic_notifier_chain_unregister(&ip6route_chain, nb); ++} ++EXPORT_SYMBOL(rt6_unregister_notifier); ++/* QCA NSS ECM support - End */ ++ + /* + * /proc + */ +--- a/net/l2tp/l2tp_ppp.c ++++ b/net/l2tp/l2tp_ppp.c +@@ -92,6 +92,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -125,9 +126,19 @@ struct pppol2tp_session { + + static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb); + +-static const struct ppp_channel_ops pppol2tp_chan_ops = { +- .start_xmit = pppol2tp_xmit, ++/* QCA NSS ECM support - Start */ ++static int pppol2tp_get_channel_protocol(struct ppp_channel *); ++static int pppol2tp_get_channel_protocol_ver(struct ppp_channel *); ++static void pppol2tp_hold_chan(struct ppp_channel *); ++static void pppol2tp_release_chan(struct ppp_channel *); ++static const struct pppol2tp_channel_ops pppol2tp_chan_ops = { ++ .ops.start_xmit = pppol2tp_xmit, ++ .ops.get_channel_protocol = pppol2tp_get_channel_protocol, ++ .ops.get_channel_protocol_ver = pppol2tp_get_channel_protocol_ver, ++ .ops.hold = pppol2tp_hold_chan, ++ .ops.release = pppol2tp_release_chan, + }; ++/* QCA NSS ECM support - End */ + + static const struct proto_ops pppol2tp_ops; + +@@ -240,6 +251,7 @@ static void pppol2tp_recv(struct l2tp_se + session->name, data_len); + + po = pppox_sk(sk); ++ skb->skb_iif = ppp_dev_index(&po->chan); /* QCA NSS ECM support */ + ppp_input(&po->chan, skb); + } else { + l2tp_dbg(session, L2TP_MSG_DATA, +@@ -380,6 +392,13 @@ static int pppol2tp_xmit(struct ppp_chan + skb->data[0] = PPP_ALLSTATIONS; + skb->data[1] = PPP_UI; + ++ /* QCA NSS ECM support - start */ ++ /* set incoming interface as the ppp interface */ ++ if ((skb->protocol == htons(ETH_P_IP)) || ++ (skb->protocol == htons(ETH_P_IPV6))) ++ skb->skb_iif = ppp_dev_index(chan); ++ /* QCA NSS ECM support - End */ ++ + local_bh_disable(); + l2tp_xmit_skb(session, skb, session->hdr_len); + local_bh_enable(); +@@ -816,7 +835,7 @@ static int pppol2tp_connect(struct socke + po->chan.hdrlen = PPPOL2TP_L2TP_HDR_SIZE_NOSEQ; + + po->chan.private = sk; +- po->chan.ops = &pppol2tp_chan_ops; ++ po->chan.ops = &pppol2tp_chan_ops.ops; /* QCA NSS ECM support */ + po->chan.mtu = pppol2tp_tunnel_mtu(tunnel); + + error = ppp_register_net_channel(sock_net(sk), &po->chan); +@@ -1749,6 +1768,109 @@ static void __exit pppol2tp_exit(void) + unregister_pernet_device(&pppol2tp_net_ops); + } + ++/* QCA NSS ECM support - Start */ ++/* pppol2tp_hold_chan() */ ++static void pppol2tp_hold_chan(struct ppp_channel *chan) ++{ ++ struct sock *sk = (struct sock *)chan->private; ++ ++ sock_hold(sk); ++} ++ ++/* pppol2tp_release_chan() */ ++static void pppol2tp_release_chan(struct ppp_channel *chan) ++{ ++ struct sock *sk = (struct sock *)chan->private; ++ ++ sock_put(sk); ++} ++ ++/* pppol2tp_get_channel_protocol() ++ * Return the protocol type of the L2TP over PPP protocol ++ */ ++static int pppol2tp_get_channel_protocol(struct ppp_channel *chan) ++{ ++ return PX_PROTO_OL2TP; ++} ++ ++/* pppol2tp_get_channel_protocol_ver() ++ * Return the protocol version of the L2TP over PPP protocol ++ */ ++static int pppol2tp_get_channel_protocol_ver(struct ppp_channel *chan) ++{ ++ struct sock *sk; ++ struct l2tp_session *session; ++ struct l2tp_tunnel *tunnel; ++ int version = 0; ++ ++ if (chan && chan->private) ++ sk = (struct sock *)chan->private; ++ else ++ return -1; ++ ++ /* Get session and tunnel contexts from the socket */ ++ session = pppol2tp_sock_to_session(sk); ++ if (!session) ++ return -1; ++ ++ tunnel = session->tunnel; ++ if (!tunnel) { ++ sock_put(sk); ++ return -1; ++ } ++ ++ version = tunnel->version; ++ ++ sock_put(sk); ++ ++ return version; ++} ++ ++/* pppol2tp_get_addressing() */ ++static int pppol2tp_get_addressing(struct ppp_channel *chan, ++ struct pppol2tp_common_addr *addr) ++{ ++ struct sock *sk = (struct sock *)chan->private; ++ struct l2tp_session *session; ++ struct l2tp_tunnel *tunnel; ++ struct inet_sock *isk = NULL; ++ int err = -ENXIO; ++ ++ /* Get session and tunnel contexts from the socket */ ++ session = pppol2tp_sock_to_session(sk); ++ if (!session) ++ return err; ++ ++ tunnel = session->tunnel; ++ if (!tunnel) { ++ sock_put(sk); ++ return err; ++ } ++ isk = inet_sk(tunnel->sock); ++ ++ addr->local_tunnel_id = tunnel->tunnel_id; ++ addr->remote_tunnel_id = tunnel->peer_tunnel_id; ++ addr->local_session_id = session->session_id; ++ addr->remote_session_id = session->peer_session_id; ++ ++ addr->local_addr.sin_port = isk->inet_sport; ++ addr->remote_addr.sin_port = isk->inet_dport; ++ addr->local_addr.sin_addr.s_addr = isk->inet_saddr; ++ addr->remote_addr.sin_addr.s_addr = isk->inet_daddr; ++ ++ sock_put(sk); ++ return 0; ++} ++ ++/* pppol2tp_channel_addressing_get() */ ++int pppol2tp_channel_addressing_get(struct ppp_channel *chan, ++ struct pppol2tp_common_addr *addr) ++{ ++ return pppol2tp_get_addressing(chan, addr); ++} ++EXPORT_SYMBOL(pppol2tp_channel_addressing_get); ++/* QCA NSS ECM support - End */ ++ + module_init(pppol2tp_init); + module_exit(pppol2tp_exit); + +--- a/net/netfilter/Kconfig ++++ b/net/netfilter/Kconfig +@@ -158,6 +158,13 @@ config NF_CONNTRACK_TIMEOUT + + If unsure, say `N'. + ++config NF_CONNTRACK_DSCPREMARK_EXT ++ bool 'Connection tracking extension for dscp remark target' ++ depends on NETFILTER_ADVANCED ++ help ++ This option enables support for connection tracking extension ++ for dscp remark. ++ + config NF_CONNTRACK_CHAIN_EVENTS + bool "Register multiple callbacks to ct events" + depends on NF_CONNTRACK_EVENTS +--- a/net/netfilter/Makefile ++++ b/net/netfilter/Makefile +@@ -14,6 +14,7 @@ nf_conntrack-$(CONFIG_NF_CONNTRACK_LABEL + nf_conntrack-$(CONFIG_NF_CT_PROTO_DCCP) += nf_conntrack_proto_dccp.o + nf_conntrack-$(CONFIG_NF_CT_PROTO_SCTP) += nf_conntrack_proto_sctp.o + nf_conntrack-$(CONFIG_NF_CT_PROTO_GRE) += nf_conntrack_proto_gre.o ++nf_conntrack-$(CONFIG_NF_CONNTRACK_DSCPREMARK_EXT) += nf_conntrack_dscpremark_ext.o + + obj-$(CONFIG_NETFILTER) = netfilter.o + + diff --git a/target/linux/ipq806x/patches-5.4/999-03b-qca-nss-ecm-support.patch b/target/linux/ipq806x/patches-5.4/999-03b-qca-nss-ecm-support.patch new file mode 100644 index 000000000..3fe582c44 --- /dev/null +++ b/target/linux/ipq806x/patches-5.4/999-03b-qca-nss-ecm-support.patch @@ -0,0 +1,143 @@ +--- a/include/linux/if_bridge.h ++++ b/include/linux/if_bridge.h +@@ -173,6 +173,8 @@ struct br_fdb_event { + struct net_device *dev; + unsigned char addr[6]; + unsigned char is_local; ++ struct net_bridge *br; ++ struct net_device *orig_dev; + }; + extern void br_fdb_register_notify(struct notifier_block *nb); + extern void br_fdb_unregister_notify(struct notifier_block *nb); +--- a/include/linux/netdevice.h ++++ b/include/linux/netdevice.h +@@ -1587,12 +1587,18 @@ enum netdev_priv_qca_ecm_flags { + IFF_QCA_ECM_PPP_L2TPV2 = 1<<1, + IFF_QCA_ECM_PPP_L2TPV3 = 1<<2, + IFF_QCA_ECM_PPP_PPTP = 1<<3, ++ IFF_QCA_ECM_GRE_V4_TAP = 1<<4, ++ IFF_QCA_ECM_GRE_V6_TAP = 1<<5, ++ IFF_QCA_ECM_IFB = 1<<6, + }; + + #define IFF_QCA_ECM_TUN_TAP IFF_QCA_ECM_TUN_TAP + #define IFF_QCA_ECM_PPP_L2TPV2 IFF_QCA_ECM_PPP_L2TPV2 + #define IFF_QCA_ECM_PPP_L2TPV3 IFF_QCA_ECM_PPP_L2TPV3 + #define IFF_QCA_ECM_PPP_PPTP IFF_QCA_ECM_PPP_PPTP ++#define IFF_QCA_ECM_GRE_V4_TAP IFF_QCA_ECM_GRE_V4_TAP ++#define IFF_QCA_ECM_GRE_V6_TAP IFF_QCA_ECM_GRE_V6_TAP ++#define IFF_QCA_ECM_IFB IFF_QCA_ECM_IFB + /* QCA NSS ECM support - End */ + + /** +--- a/include/linux/netfilter/nf_conntrack_proto_gre.h ++++ b/include/linux/netfilter/nf_conntrack_proto_gre.h +@@ -31,4 +31,35 @@ void nf_ct_gre_keymap_destroy(struct nf_ + + bool gre_pkt_to_tuple(const struct sk_buff *skb, unsigned int dataoff, + struct net *net, struct nf_conntrack_tuple *tuple); ++ ++/* QCA NSS ECM Support - Start */ ++/* GRE is a mess: Four different standards */ ++struct gre_hdr { ++#if defined(__LITTLE_ENDIAN_BITFIELD) ++ __u16 rec:3, ++ srr:1, ++ seq:1, ++ key:1, ++ routing:1, ++ csum:1, ++ version:3, ++ reserved:4, ++ ack:1; ++#elif defined(__BIG_ENDIAN_BITFIELD) ++ __u16 csum:1, ++ routing:1, ++ key:1, ++ seq:1, ++ srr:1, ++ rec:3, ++ ack:1, ++ reserved:4, ++ version:3; ++#else ++#error "Adjust your defines" ++#endif ++ __be16 protocol; ++}; ++/* QCA NSS ECM Support - End */ ++ + #endif /* _CONNTRACK_PROTO_GRE_H */ +--- a/include/net/addrconf.h ++++ b/include/net/addrconf.h +@@ -497,4 +497,9 @@ int if6_proc_init(void); + void if6_proc_exit(void); + #endif + ++/* QCA NSS ECM support - Start */ ++struct net_device *ipv6_dev_find(struct net *net, struct in6_addr *addr, ++ int strict); ++/* QCA NSS ECM support - End */ ++ + #endif +--- a/drivers/net/tun.c ++++ b/drivers/net/tun.c +@@ -2833,6 +2833,8 @@ static int tun_set_iff(struct net *net, + ~(NETIF_F_HW_VLAN_CTAG_TX | + NETIF_F_HW_VLAN_STAG_TX); + ++ dev->priv_flags_qca_ecm |= IFF_QCA_ECM_TUN_TAP; /* QCA NSS ECM Support */ ++ + tun->flags = (tun->flags & ~TUN_FEATURES) | + (ifr->ifr_flags & TUN_FEATURES); + +--- a/net/ipv4/ip_gre.c ++++ b/net/ipv4/ip_gre.c +@@ -1287,6 +1287,7 @@ static void ipgre_tap_setup(struct net_d + dev->netdev_ops = &gre_tap_netdev_ops; + dev->priv_flags &= ~IFF_TX_SKB_SHARING; + dev->priv_flags |= IFF_LIVE_ADDR_CHANGE; ++ dev->priv_flags_qca_ecm |= IFF_QCA_ECM_GRE_V4_TAP; /* QCA NSS ECM Support */ + ip_tunnel_setup(dev, gre_tap_net_id); + } + +--- a/net/ipv6/ip6_gre.c ++++ b/net/ipv6/ip6_gre.c +@@ -1895,6 +1895,7 @@ static void ip6gre_tap_setup(struct net_ + + dev->priv_flags &= ~IFF_TX_SKB_SHARING; + dev->priv_flags |= IFF_LIVE_ADDR_CHANGE; ++ dev->priv_flags_qca_ecm |= IFF_QCA_ECM_GRE_V6_TAP; /* QCA NSS ECM Support */ + netif_keep_dst(dev); + } + +--- a/include/linux/if_bridge.h ++++ b/include/linux/if_bridge.h +@@ -68,6 +68,7 @@ extern void br_fdb_update_unregister_notify(struct notifier_block *nb); + extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *)); + extern void br_dev_update_stats(struct net_device *dev, + struct rtnl_link_stats64 *nlstats); ++extern bool br_is_hairpin_enabled(struct net_device *dev); + + #if IS_ENABLED(CONFIG_BRIDGE) && IS_ENABLED(CONFIG_BRIDGE_IGMP_SNOOPING) + int br_multicast_list_adjacent(struct net_device *dev, +--- a/net/bridge/br_if.c ++++ b/net/bridge/br_if.c +@@ -684,6 +684,17 @@ void br_dev_update_stats(struct net_device *dev, + EXPORT_SYMBOL_GPL(br_dev_update_stats); + + /* QCA NSS ECM support - Start */ ++/* API to know if hairpin feature is enabled/disabled on this bridge port */ ++bool br_is_hairpin_enabled(struct net_device *dev) ++{ ++ struct net_bridge_port *port = br_port_get_check_rcu(dev); ++ ++ if (likely(port)) ++ return port->flags & BR_HAIRPIN_MODE; ++ return false; ++} ++EXPORT_SYMBOL_GPL(br_is_hairpin_enabled); ++ + /* br_port_dev_get() + * If a skb is provided, and the br_port_dev_get_hook_t hook exists, + * use that to try and determine the egress port for that skb. diff --git a/target/linux/ipq806x/patches-5.4/999-03c-qca-nss-pppoe-offload-support.patch b/target/linux/ipq806x/patches-5.4/999-03c-qca-nss-pppoe-offload-support.patch new file mode 100644 index 000000000..519953118 --- /dev/null +++ b/target/linux/ipq806x/patches-5.4/999-03c-qca-nss-pppoe-offload-support.patch @@ -0,0 +1,447 @@ +From 5f3ab2b6d1a6cadc1b7c231cefdf91b14972e436 Mon Sep 17 00:00:00 2001 +From: Murat Sezgin +Date: Fri, 16 Jan 2015 15:28:47 -0800 +Subject: ppp: PPPoE acceleration support. + +Added some new APIs to the PPP/PPPoE kernel modules +for using from the hardware acceleration connection managers. + +Change-Id: I2c16c6d6ccba8ffa14aec077c8dad1681535ae0b +Signed-off-by: Murat Sezgin +--- + drivers/net/ppp/ppp_generic.c | 190 ++++++++++++++++++++++++++++++++++++++++++ + drivers/net/ppp/pppoe.c | 79 ++++++++++++++++-- + include/linux/if_pppox.h | 16 +++- + include/linux/ppp_channel.h | 38 +++++++++ + 4 files changed, 317 insertions(+), 6 deletions(-) + +diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c +index 56af90b..58b889e 100644 +--- a/drivers/net/ppp/ppp_generic.c ++++ b/drivers/net/ppp/ppp_generic.c +@@ -1,5 +1,21 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + /* ++ ************************************************************************** ++ * Copyright (c) 2016, The Linux Foundation. All rights reserved. ++ * Permission to use, copy, modify, and/or distribute this software for ++ * any purpose with or without fee is hereby granted, provided that the ++ * above copyright notice and this permission notice appear in all copies. ++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT ++ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ ************************************************************************** ++ */ ++ ++/* + * Generic PPP layer for Linux. + * + * Copyright 1999-2002 Paul Mackerras. +@@ -3341,6 +3357,178 @@ static void *unit_find(struct idr *p, int n) + return idr_find(p, n); + } + ++/* Updates the PPP interface statistics. */ ++void ppp_update_stats(struct net_device *dev, unsigned long rx_packets, ++ unsigned long rx_bytes, unsigned long tx_packets, ++ unsigned long tx_bytes) ++{ ++ struct ppp *ppp; ++ ++ if (!dev) ++ return; ++ ++ if (dev->type != ARPHRD_PPP) ++ return; ++ ++ ppp = netdev_priv(dev); ++ ++ ppp_xmit_lock(ppp); ++ ppp->stats64.tx_packets += tx_packets; ++ ppp->stats64.tx_bytes += tx_bytes; ++ ppp_xmit_unlock(ppp); ++ ++ ppp_recv_lock(ppp); ++ ppp->stats64.rx_packets += rx_packets; ++ ppp->stats64.rx_bytes += rx_bytes; ++ ppp_recv_unlock(ppp); ++} ++ ++/* Returns >0 if the device is a multilink PPP netdevice, 0 if not or < 0 if ++ * the device is not PPP. ++ */ ++int ppp_is_multilink(struct net_device *dev) ++{ ++ struct ppp *ppp; ++ unsigned int flags; ++ ++ if (!dev) ++ return -1; ++ ++ if (dev->type != ARPHRD_PPP) ++ return -1; ++ ++ ppp = netdev_priv(dev); ++ ppp_lock(ppp); ++ flags = ppp->flags; ++ ppp_unlock(ppp); ++ ++ if (flags & SC_MULTILINK) ++ return 1; ++ ++ return 0; ++} ++EXPORT_SYMBOL(ppp_is_multilink); ++ ++/* ppp_channel_get_protocol() ++ * Call this to obtain the underlying protocol of the PPP channel, ++ * e.g. PX_PROTO_OE ++ * ++ * NOTE: Some channels do not use PX sockets so the protocol value may be very ++ * different for them. ++ * NOTE: -1 indicates failure. ++ * NOTE: Once you know the channel protocol you may then either cast 'chan' to ++ * its sub-class or use the channel protocol specific API's as provided by that ++ * channel sub type. ++ */ ++int ppp_channel_get_protocol(struct ppp_channel *chan) ++{ ++ if (!chan->ops->get_channel_protocol) ++ return -1; ++ ++ return chan->ops->get_channel_protocol(chan); ++} ++EXPORT_SYMBOL(ppp_channel_get_protocol); ++ ++/* ppp_channel_hold() ++ * Call this to hold a channel. ++ * ++ * Returns true on success or false if the hold could not happen. ++ * ++ * NOTE: chan must be protected against destruction during this call - ++ * either by correct locking etc. or because you already have an implicit ++ * or explicit hold to the channel already and this is an additional hold. ++ */ ++bool ppp_channel_hold(struct ppp_channel *chan) ++{ ++ if (!chan->ops->hold) ++ return false; ++ ++ chan->ops->hold(chan); ++ return true; ++} ++EXPORT_SYMBOL(ppp_channel_hold); ++ ++/* ppp_channel_release() ++ * Call this to release a hold you have upon a channel ++ */ ++void ppp_channel_release(struct ppp_channel *chan) ++{ ++ chan->ops->release(chan); ++} ++EXPORT_SYMBOL(ppp_channel_release); ++ ++/* ppp_hold_channels() ++ * Returns the PPP channels of the PPP device, storing each one into ++ * channels[]. ++ * ++ * channels[] has chan_sz elements. ++ * This function returns the number of channels stored, up to chan_sz. ++ * It will return < 0 if the device is not PPP. ++ * ++ * You MUST release the channels using ppp_release_channels(). ++ */ ++int ppp_hold_channels(struct net_device *dev, struct ppp_channel *channels[], ++ unsigned int chan_sz) ++{ ++ struct ppp *ppp; ++ int c; ++ struct channel *pch; ++ ++ if (!dev) ++ return -1; ++ ++ if (dev->type != ARPHRD_PPP) ++ return -1; ++ ++ ppp = netdev_priv(dev); ++ ++ c = 0; ++ ppp_lock(ppp); ++ list_for_each_entry(pch, &ppp->channels, clist) { ++ struct ppp_channel *chan; ++ ++ if (!pch->chan) { ++ /* Channel is going / gone away */ ++ continue; ++ } ++ ++ if (c == chan_sz) { ++ /* No space to record channel */ ++ ppp_unlock(ppp); ++ return c; ++ } ++ ++ /* Hold the channel, if supported */ ++ chan = pch->chan; ++ if (!chan->ops->hold) ++ continue; ++ ++ chan->ops->hold(chan); ++ ++ /* Record the channel */ ++ channels[c++] = chan; ++ } ++ ppp_unlock(ppp); ++ return c; ++} ++EXPORT_SYMBOL(ppp_hold_channels); ++ ++/* ppp_release_channels() ++ * Releases channels ++ */ ++void ppp_release_channels(struct ppp_channel *channels[], unsigned int chan_sz) ++{ ++ unsigned int c; ++ ++ for (c = 0; c < chan_sz; ++c) { ++ struct ppp_channel *chan; ++ ++ chan = channels[c]; ++ chan->ops->release(chan); ++ } ++} ++EXPORT_SYMBOL(ppp_release_channels); ++ + /* Module/initialization stuff */ + + module_init(ppp_init); +@@ -3357,6 +3545,8 @@ EXPORT_SYMBOL(ppp_input_error); + EXPORT_SYMBOL(ppp_output_wakeup); + EXPORT_SYMBOL(ppp_register_compressor); + EXPORT_SYMBOL(ppp_unregister_compressor); ++EXPORT_SYMBOL(ppp_update_stats); ++ + MODULE_LICENSE("GPL"); + MODULE_ALIAS_CHARDEV(PPP_MAJOR, 0); + MODULE_ALIAS_RTNL_LINK("ppp"); +diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c +index df5d418..23590dd 100644 +--- a/drivers/net/ppp/pppoe.c ++++ b/drivers/net/ppp/pppoe.c +@@ -62,6 +62,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -92,7 +93,7 @@ + static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb); + + static const struct proto_ops pppoe_ops; +-static const struct ppp_channel_ops pppoe_chan_ops; ++static const struct pppoe_channel_ops pppoe_chan_ops; + + /* per-net private data for this module */ + static unsigned int pppoe_net_id __read_mostly; +@@ -649,6 +650,7 @@ static int pppoe_connect(struct socket *sock, struct sockaddr *uservaddr, + if (stage_session(po->pppoe_pa.sid)) { + pppox_unbind_sock(sk); + pn = pppoe_pernet(sock_net(sk)); ++ + delete_item(pn, po->pppoe_pa.sid, + po->pppoe_pa.remote, po->pppoe_ifindex); + if (po->pppoe_dev) { +@@ -696,7 +698,7 @@ static int pppoe_connect(struct socket *sock, struct sockaddr *uservaddr, + + po->chan.mtu = dev->mtu - sizeof(struct pppoe_hdr) - 2; + po->chan.private = sk; +- po->chan.ops = &pppoe_chan_ops; ++ po->chan.ops = (struct ppp_channel_ops *)&pppoe_chan_ops; + + error = ppp_register_net_channel(dev_net(dev), &po->chan); + if (error) { +@@ -1001,11 +1003,78 @@ static int pppoe_flow_offload_check(struct ppp_channel *chan, + } + #endif /* CONFIG_NF_FLOW_TABLE */ + +-static const struct ppp_channel_ops pppoe_chan_ops = { +- .start_xmit = pppoe_xmit, ++/************************************************************************ ++ * ++ * function called by generic PPP driver to hold channel ++ * ++ ***********************************************************************/ ++static void pppoe_hold_chan(struct ppp_channel *chan) ++{ ++ struct sock *sk = (struct sock *)chan->private; ++ ++ sock_hold(sk); ++} ++ ++/************************************************************************ ++ * ++ * function called by generic PPP driver to release channel ++ * ++ ***********************************************************************/ ++static void pppoe_release_chan(struct ppp_channel *chan) ++{ ++ struct sock *sk = (struct sock *)chan->private; ++ ++ sock_put(sk); ++} ++ ++/************************************************************************ ++ * ++ * function called to get the channel protocol type ++ * ++ ***********************************************************************/ ++static int pppoe_get_channel_protocol(struct ppp_channel *chan) ++{ ++ return PX_PROTO_OE; ++} ++ ++/************************************************************************ ++ * ++ * function called to get the PPPoE channel addressing ++ * NOTE: This function returns a HOLD to the netdevice ++ * ++ ***********************************************************************/ ++static void pppoe_get_addressing(struct ppp_channel *chan, ++ struct pppoe_opt *addressing) ++{ ++ struct sock *sk = (struct sock *)chan->private; ++ struct pppox_sock *po = pppox_sk(sk); ++ ++ *addressing = po->proto.pppoe; ++ if (addressing->dev) ++ dev_hold(addressing->dev); ++} ++ ++/* pppoe_channel_addressing_get() ++ * Return PPPoE channel specific addressing information. ++ */ ++void pppoe_channel_addressing_get(struct ppp_channel *chan, ++ struct pppoe_opt *addressing) ++{ ++ pppoe_get_addressing(chan, addressing); ++} ++EXPORT_SYMBOL(pppoe_channel_addressing_get); ++ ++static const struct pppoe_channel_ops pppoe_chan_ops = { ++ /* PPPoE specific channel ops */ ++ .get_addressing = pppoe_get_addressing, ++ /* General ppp channel ops */ ++ .ops.start_xmit = pppoe_xmit, + #if IS_ENABLED(CONFIG_NF_FLOW_TABLE) +- .flow_offload_check = pppoe_flow_offload_check, ++ .ops.flow_offload_check = pppoe_flow_offload_check, + #endif ++ .ops.get_channel_protocol = pppoe_get_channel_protocol, ++ .ops.hold = pppoe_hold_chan, ++ .ops.release = pppoe_release_chan, + }; + + static int pppoe_recvmsg(struct socket *sock, struct msghdr *m, +diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h +index 69e813b..98131ea 100644 +--- a/include/linux/if_pppox.h ++++ b/include/linux/if_pppox.h +@@ -1,13 +1,14 @@ + /* SPDX-License-Identifier: GPL-2.0-or-later */ + /*************************************************************************** + * Linux PPP over X - Generic PPP transport layer sockets +- * Linux PPP over Ethernet (PPPoE) Socket Implementation (RFC 2516) ++ * Linux PPP over Ethernet (PPPoE) Socket Implementation (RFC 2516) + * + * This file supplies definitions required by the PPP over Ethernet driver + * (pppox.c). All version information wrt this file is located in pppox.c + * + * License: + */ ++ + #ifndef __LINUX_IF_PPPOX_H + #define __LINUX_IF_PPPOX_H + +@@ -93,4 +94,17 @@ enum { + PPPOX_DEAD = 16 /* dead, useless, please clean me up!*/ + }; + ++/* ++ * PPPoE Channel specific operations ++ */ ++struct pppoe_channel_ops { ++ /* Must be first - general to all PPP channels */ ++ struct ppp_channel_ops ops; ++ void (*get_addressing)(struct ppp_channel *, struct pppoe_opt *); ++}; ++ ++/* Return PPPoE channel specific addressing information */ ++extern void pppoe_channel_addressing_get(struct ppp_channel *chan, ++ struct pppoe_opt *addressing); ++ + #endif /* !(__LINUX_IF_PPPOX_H) */ +diff --git a/include/linux/ppp_channel.h b/include/linux/ppp_channel.h +index 326a6fa..db352ff 100644 +--- a/include/linux/ppp_channel.h ++++ b/include/linux/ppp_channel.h +@@ -32,6 +32,14 @@ struct ppp_channel_ops { + #if IS_ENABLED(CONFIG_NF_FLOW_TABLE) + int (*flow_offload_check)(struct ppp_channel *, struct flow_offload_hw_path *); + #endif ++ /* Get channel protocol type, one of PX_PROTO_XYZ or specific to ++ * the channel subtype ++ */ ++ int (*get_channel_protocol)(struct ppp_channel *); ++ /* Hold the channel from being destroyed */ ++ void (*hold)(struct ppp_channel *); ++ /* Release hold on the channel */ ++ void (*release)(struct ppp_channel *); + }; + + struct ppp_channel { +@@ -46,6 +54,36 @@ struct ppp_channel { + }; + + #ifdef __KERNEL__ ++/* Call this to obtain the underlying protocol of the PPP channel, ++ * e.g. PX_PROTO_OE ++ */ ++extern int ppp_channel_get_protocol(struct ppp_channel *); ++ ++/* Call this to hold a channel */ ++extern bool ppp_channel_hold(struct ppp_channel *); ++ ++/* Call this to release a hold you have upon a channel */ ++extern void ppp_channel_release(struct ppp_channel *); ++ ++/* Release hold on PPP channels */ ++extern void ppp_release_channels(struct ppp_channel *channels[], ++ unsigned int chan_sz); ++ ++/* Hold PPP channels for the PPP device */ ++extern int ppp_hold_channels(struct net_device *dev, ++ struct ppp_channel *channels[], ++ unsigned int chan_sz); ++ ++/* Test if the ppp device is a multi-link ppp device */ ++extern int ppp_is_multilink(struct net_device *dev); ++ ++/* Update statistics of the PPP net_device by incrementing related ++ * statistics field value with corresponding parameter ++ */ ++extern void ppp_update_stats(struct net_device *dev, unsigned long rx_packets, ++ unsigned long rx_bytes, unsigned long tx_packets, ++ unsigned long tx_bytes); ++ + /* Called by the channel when it can send some more data. */ + extern void ppp_output_wakeup(struct ppp_channel *); + +-- +cgit v1.1 diff --git a/target/linux/ipq806x/patches-5.4/999-03d-qca-nss-pppoe-offload-support.patch b/target/linux/ipq806x/patches-5.4/999-03d-qca-nss-pppoe-offload-support.patch new file mode 100644 index 000000000..c086e1d75 --- /dev/null +++ b/target/linux/ipq806x/patches-5.4/999-03d-qca-nss-pppoe-offload-support.patch @@ -0,0 +1,115 @@ +From 4df2e1c28e8e3baadd50bdafa40fb35ea99cc52f Mon Sep 17 00:00:00 2001 +From: Murat Sezgin +Date: Fri, 26 Feb 2016 14:59:20 -0800 +Subject: net: ppp: rx/tx error and dropped pkt stats support + +ppp_update_stats functions accepts rx/tx errors and dropped +pkt stats args. + +Change-Id: Iba2f6ea2114d8a4678254332fec0ef7bc35bed2c +Signed-off-by: ratheesh kannoth +Signed-off-by: Murat Sezgin +--- + drivers/net/ppp/ppp_generic.c | 8 +++++++- + include/linux/ppp_channel.h | 4 +++- + net/l2tp/l2tp_core.c | 24 ++++++++++++++++++++++++ + net/l2tp/l2tp_core.h | 2 ++ + 4 files changed, 36 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c +index 58b889e..9cf7fe3 100644 +--- a/drivers/net/ppp/ppp_generic.c ++++ b/drivers/net/ppp/ppp_generic.c +@@ -3360,7 +3360,9 @@ static void *unit_find(struct idr *p, int n) + /* Updates the PPP interface statistics. */ + void ppp_update_stats(struct net_device *dev, unsigned long rx_packets, + unsigned long rx_bytes, unsigned long tx_packets, +- unsigned long tx_bytes) ++ unsigned long tx_bytes, unsigned long rx_errors, ++ unsigned long tx_errors, unsigned long rx_dropped, ++ unsigned long tx_dropped) + { + struct ppp *ppp; + +@@ -3375,11 +3377,15 @@ void ppp_update_stats(struct net_device *dev, unsigned long rx_packets, + ppp_xmit_lock(ppp); + ppp->stats64.tx_packets += tx_packets; + ppp->stats64.tx_bytes += tx_bytes; ++ ppp->dev->stats.tx_errors += tx_errors; ++ ppp->dev->stats.tx_dropped += tx_dropped; + ppp_xmit_unlock(ppp); + + ppp_recv_lock(ppp); + ppp->stats64.rx_packets += rx_packets; + ppp->stats64.rx_bytes += rx_bytes; ++ ppp->dev->stats.rx_errors += rx_errors; ++ ppp->dev->stats.rx_dropped += rx_dropped; + ppp_recv_unlock(ppp); + } + +diff --git a/include/linux/ppp_channel.h b/include/linux/ppp_channel.h +index db352ff..82d51537 100644 +--- a/include/linux/ppp_channel.h ++++ b/include/linux/ppp_channel.h +@@ -82,7 +82,9 @@ extern int ppp_is_multilink(struct net_device *dev); + */ + extern void ppp_update_stats(struct net_device *dev, unsigned long rx_packets, + unsigned long rx_bytes, unsigned long tx_packets, +- unsigned long tx_bytes); ++ unsigned long tx_bytes, unsigned long rx_errors, ++ unsigned long tx_errors, unsigned long rx_dropped, ++ unsigned long tx_dropped); + + /* Called by the channel when it can send some more data. */ + extern void ppp_output_wakeup(struct ppp_channel *); +diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c +index 425b95e..b098099 100644 +--- a/net/l2tp/l2tp_core.c ++++ b/net/l2tp/l2tp_core.c +@@ -355,6 +355,30 @@ err_tlock: + } + EXPORT_SYMBOL_GPL(l2tp_session_register); + ++void l2tp_stats_update(struct l2tp_tunnel *tunnel, ++ struct l2tp_session *session, ++ struct l2tp_stats *stats) ++{ ++ atomic_long_add(atomic_long_read(&stats->rx_packets), ++ &tunnel->stats.rx_packets); ++ atomic_long_add(atomic_long_read(&stats->rx_bytes), ++ &tunnel->stats.rx_bytes); ++ atomic_long_add(atomic_long_read(&stats->tx_packets), ++ &tunnel->stats.tx_packets); ++ atomic_long_add(atomic_long_read(&stats->tx_bytes), ++ &tunnel->stats.tx_bytes); ++ ++ atomic_long_add(atomic_long_read(&stats->rx_packets), ++ &session->stats.rx_packets); ++ atomic_long_add(atomic_long_read(&stats->rx_bytes), ++ &session->stats.rx_bytes); ++ atomic_long_add(atomic_long_read(&stats->tx_packets), ++ &session->stats.tx_packets); ++ atomic_long_add(atomic_long_read(&stats->tx_bytes), ++ &session->stats.tx_bytes); ++} ++EXPORT_SYMBOL_GPL(l2tp_stats_update); ++ + /***************************************************************************** + * Receive data handling + *****************************************************************************/ +diff --git a/net/l2tp/l2tp_core.h b/net/l2tp/l2tp_core.h +index 2db3d50..5cc42a4 100644 +--- a/net/l2tp/l2tp_core.h ++++ b/net/l2tp/l2tp_core.h +@@ -200,6 +200,8 @@ struct l2tp_session *l2tp_session_get(const struct net *net, u32 session_id); + struct l2tp_session *l2tp_session_get_nth(struct l2tp_tunnel *tunnel, int nth); + struct l2tp_session *l2tp_session_get_by_ifname(const struct net *net, + const char *ifname); ++void l2tp_stats_update(struct l2tp_tunnel *tunnel, struct l2tp_session *session, ++ struct l2tp_stats *stats); + + int l2tp_tunnel_create(struct net *net, int fd, int version, u32 tunnel_id, + u32 peer_tunnel_id, struct l2tp_tunnel_cfg *cfg, +-- +cgit v1.1 + diff --git a/target/linux/ipq806x/patches-5.4/999-03e-qca-nss-pppoe-offload-support.patch b/target/linux/ipq806x/patches-5.4/999-03e-qca-nss-pppoe-offload-support.patch new file mode 100644 index 000000000..09b931119 --- /dev/null +++ b/target/linux/ipq806x/patches-5.4/999-03e-qca-nss-pppoe-offload-support.patch @@ -0,0 +1,38 @@ +From 0ebfa720350a5fde3efb45872f867ac30074a43c Mon Sep 17 00:00:00 2001 +From: Murat Sezgin +Date: Tue, 13 Oct 2015 22:40:25 -0700 +Subject: ppp: Update the last_recv and last_xmit times. + +These need to be updated for accelerated connections, so that +on demand mode will recognize the active traffic. + +Change-Id: I3c0ee4e8f4c3bc4c7ce221e6109bfd82046d11b4 +Signed-off-by: Murat Sezgin +--- + drivers/net/ppp/ppp_generic.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c +index 9cf7fe3..b7bab8e 100644 +--- a/drivers/net/ppp/ppp_generic.c ++++ b/drivers/net/ppp/ppp_generic.c +@@ -3379,6 +3379,8 @@ void ppp_update_stats(struct net_device *dev, unsigned long rx_packets, + ppp->stats64.tx_bytes += tx_bytes; + ppp->dev->stats.tx_errors += tx_errors; + ppp->dev->stats.tx_dropped += tx_dropped; ++ if (tx_packets) ++ ppp->last_xmit = jiffies; + ppp_xmit_unlock(ppp); + + ppp_recv_lock(ppp); +@@ -3386,6 +3388,8 @@ void ppp_update_stats(struct net_device *dev, unsigned long rx_packets, + ppp->stats64.rx_bytes += rx_bytes; + ppp->dev->stats.rx_errors += rx_errors; + ppp->dev->stats.rx_dropped += rx_dropped; ++ if (rx_packets) ++ ppp->last_recv = jiffies; + ppp_recv_unlock(ppp); + } + +-- +cgit v1.1 diff --git a/target/linux/ipq806x/patches-5.4/999-04-qca-nss-cfi-support.patch b/target/linux/ipq806x/patches-5.4/999-04-qca-nss-cfi-support.patch new file mode 100644 index 000000000..649621c7e --- /dev/null +++ b/target/linux/ipq806x/patches-5.4/999-04-qca-nss-cfi-support.patch @@ -0,0 +1,119 @@ +diff --git a/crypto/authenc.c b/crypto/authenc.c +index 3f0ed9402..17ce66bba 100644 +--- a/crypto/authenc.c ++++ b/crypto/authenc.c +@@ -449,6 +449,8 @@ static int crypto_authenc_create(struct crypto_template *tmpl, + + inst->alg.base.cra_flags = (auth_base->cra_flags | + enc->base.cra_flags) & CRYPTO_ALG_ASYNC; ++ inst->alg.base.cra_flags |= (auth_base->cra_flags | ++ enc->base.cra_flags) & CRYPTO_ALG_NOSUPP_SG; + inst->alg.base.cra_priority = enc->base.cra_priority * 10 + + auth_base->cra_priority; + inst->alg.base.cra_blocksize = enc->base.cra_blocksize; +diff --git a/include/linux/crypto.h b/include/linux/crypto.h +index 19ea3a371..1463e824c 100644 +--- a/include/linux/crypto.h ++++ b/include/linux/crypto.h +@@ -104,6 +104,11 @@ + */ + #define CRYPTO_NOLOAD 0x00008000 + ++/* ++ * Set this flag if algorithm does not support SG list transforms ++ */ ++#define CRYPTO_ALG_NOSUPP_SG 0x0000c000 ++ + /* + * Transform masks and values (for crt_flags). + */ +diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c +index 5c9677640..23b3a9e91 100644 +--- a/net/ipv4/esp4.c ++++ b/net/ipv4/esp4.c +@@ -488,6 +488,7 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb) + struct ip_esp_hdr *esph; + struct crypto_aead *aead; + struct esp_info esp; ++ bool nosupp_sg; + + esp.inplace = true; + +@@ -499,6 +500,11 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb) + aead = x->data; + alen = crypto_aead_authsize(aead); + ++ nosupp_sg = crypto_tfm_alg_type(&aead->base) & CRYPTO_ALG_NOSUPP_SG; ++ if (nosupp_sg && skb_linearize(skb)) { ++ return -ENOMEM; ++ } ++ + esp.tfclen = 0; + if (x->tfcpad) { + struct xfrm_dst *dst = (struct xfrm_dst *)skb_dst(skb); +@@ -708,6 +714,7 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb) + u8 *iv; + struct scatterlist *sg; + int err = -EINVAL; ++ bool nosupp_sg; + + if (!pskb_may_pull(skb, sizeof(struct ip_esp_hdr) + ivlen)) + goto out; +@@ -715,6 +722,12 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb) + if (elen <= 0) + goto out; + ++ nosupp_sg = crypto_tfm_alg_type(&aead->base) & CRYPTO_ALG_NOSUPP_SG; ++ if (nosupp_sg && skb_linearize(skb)) { ++ err = -ENOMEM; ++ goto out; ++ } ++ + assoclen = sizeof(struct ip_esp_hdr); + seqhilen = 0; + +diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c +index a3b403ba8..019bea284 100644 +--- a/net/ipv6/esp6.c ++++ b/net/ipv6/esp6.c +@@ -429,6 +429,7 @@ static int esp6_output(struct xfrm_state *x, struct sk_buff *skb) + struct ip_esp_hdr *esph; + struct crypto_aead *aead; + struct esp_info esp; ++ bool nosupp_sg; + + esp.inplace = true; + +@@ -440,6 +441,11 @@ static int esp6_output(struct xfrm_state *x, struct sk_buff *skb) + aead = x->data; + alen = crypto_aead_authsize(aead); + ++ nosupp_sg = crypto_tfm_alg_type(&aead->base) & CRYPTO_ALG_NOSUPP_SG; ++ if (nosupp_sg && skb_linearize(skb)) { ++ return -ENOMEM; ++ } ++ + esp.tfclen = 0; + if (x->tfcpad) { + struct xfrm_dst *dst = (struct xfrm_dst *)skb_dst(skb); +@@ -603,6 +609,7 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb) + __be32 *seqhi; + u8 *iv; + struct scatterlist *sg; ++ bool nosupp_sg; + + if (!pskb_may_pull(skb, sizeof(struct ip_esp_hdr) + ivlen)) { + ret = -EINVAL; +@@ -614,6 +621,12 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb) + goto out; + } + ++ nosupp_sg = crypto_tfm_alg_type(&aead->base) & CRYPTO_ALG_NOSUPP_SG; ++ if (nosupp_sg && skb_linearize(skb)) { ++ ret = -ENOMEM; ++ goto out; ++ } ++ + assoclen = sizeof(struct ip_esp_hdr); + seqhilen = 0; + diff --git a/target/linux/ipq806x/patches-5.4/999-07a-qca-nss-drv-qdisc-support.patch b/target/linux/ipq806x/patches-5.4/999-07a-qca-nss-drv-qdisc-support.patch new file mode 100644 index 000000000..e7d451246 --- /dev/null +++ b/target/linux/ipq806x/patches-5.4/999-07a-qca-nss-drv-qdisc-support.patch @@ -0,0 +1,28 @@ +--- a/include/linux/skbuff.h ++++ b/include/linux/skbuff.h +@@ -816,6 +816,8 @@ struct sk_buff { + #ifdef CONFIG_NET_CLS_ACT + __u8 tc_skip_classify:1; + __u8 tc_at_ingress:1; ++ ++ __u16 tc_verd_qca_nss; /* QCA NSS Qdisc Support */ + #endif + #ifdef CONFIG_NET_REDIRECT + __u8 redirected:1; +--- a/include/uapi/linux/pkt_cls.h ++++ b/include/uapi/linux/pkt_cls.h +@@ -687,4 +687,14 @@ enum { + TCF_EM_OPND_LT + }; + ++/* QCA NSS Qdisc Support - Start */ ++#define _TC_MAKE32(x) ((x)) ++#define _TC_MAKEMASK1(n) (_TC_MAKE32(1) << _TC_MAKE32(n)) ++ ++#define TC_NCLS _TC_MAKEMASK1(8) ++#define TC_NCLS_NSS _TC_MAKEMASK1(12) ++#define SET_TC_NCLS_NSS(v) ( TC_NCLS_NSS | ((v) & ~TC_NCLS_NSS)) ++#define CLR_TC_NCLS_NSS(v) ( (v) & ~TC_NCLS_NSS) ++/* QCA NSS Qdisc Support - End */ ++ + #endif diff --git a/target/linux/ipq806x/patches-5.4/999-07b-qca-nss-clients-qdisc-support.patch b/target/linux/ipq806x/patches-5.4/999-07b-qca-nss-clients-qdisc-support.patch new file mode 100644 index 000000000..13a8588ad --- /dev/null +++ b/target/linux/ipq806x/patches-5.4/999-07b-qca-nss-clients-qdisc-support.patch @@ -0,0 +1,319 @@ +--- a/include/net/sch_generic.h ++++ b/include/net/sch_generic.h +@@ -79,6 +79,7 @@ struct Qdisc { + #define TCQ_F_INVISIBLE 0x80 /* invisible by default in dump */ + #define TCQ_F_NOLOCK 0x100 /* qdisc does not require locking */ + #define TCQ_F_OFFLOADED 0x200 /* qdisc is offloaded to HW */ ++#define TCQ_F_NSS 0x1000 /* NSS qdisc flag. */ + u32 limit; + const struct Qdisc_ops *ops; + struct qdisc_size_table __rcu *stab; +@@ -1295,4 +1296,9 @@ static inline void skb_tc_reinsert(struc + qstats_overlimit_inc(res->qstats); + } + ++/* QCA NSS Qdisc Support - Start */ ++void qdisc_destroy(struct Qdisc *qdisc); ++void tcf_destroy_chain(struct tcf_proto __rcu **fl); ++/* QCA NSS Qdisc Support - End */ ++ + #endif +--- a/include/uapi/linux/pkt_sched.h ++++ b/include/uapi/linux/pkt_sched.h +@@ -1181,4 +1181,248 @@ enum { + + #define TCA_TAPRIO_ATTR_MAX (__TCA_TAPRIO_ATTR_MAX - 1) + ++/* QCA NSS Clients Support - Start */ ++enum { ++ TCA_NSS_ACCEL_MODE_NSS_FW, ++ TCA_NSS_ACCEL_MODE_PPE, ++ TCA_NSS_ACCEL_MODE_MAX ++}; ++ ++/* NSSFIFO section */ ++ ++enum { ++ TCA_NSSFIFO_UNSPEC, ++ TCA_NSSFIFO_PARMS, ++ __TCA_NSSFIFO_MAX ++}; ++ ++#define TCA_NSSFIFO_MAX (__TCA_NSSFIFO_MAX - 1) ++ ++struct tc_nssfifo_qopt { ++ __u32 limit; /* Queue length: bytes for bfifo, packets for pfifo */ ++ __u8 set_default; /* Sets qdisc to be the default qdisc for enqueue */ ++ __u8 accel_mode; /* Dictates which data plane offloads the qdisc */ ++}; ++ ++/* NSSWRED section */ ++ ++enum { ++ TCA_NSSWRED_UNSPEC, ++ TCA_NSSWRED_PARMS, ++ __TCA_NSSWRED_MAX ++}; ++ ++#define TCA_NSSWRED_MAX (__TCA_NSSWRED_MAX - 1) ++#define NSSWRED_CLASS_MAX 6 ++struct tc_red_alg_parameter { ++ __u32 min; /* qlen_avg < min: pkts are all enqueued */ ++ __u32 max; /* qlen_avg > max: pkts are all dropped */ ++ __u32 probability;/* Drop probability at qlen_avg = max */ ++ __u32 exp_weight_factor;/* exp_weight_factor for calculate qlen_avg */ ++}; ++ ++struct tc_nsswred_traffic_class { ++ __u32 limit; /* Queue length */ ++ __u32 weight_mode_value; /* Weight mode value */ ++ struct tc_red_alg_parameter rap;/* Parameters for RED alg */ ++}; ++ ++/* ++ * Weight modes for WRED ++ */ ++enum tc_nsswred_weight_modes { ++ TC_NSSWRED_WEIGHT_MODE_DSCP = 0,/* Weight mode is DSCP */ ++ TC_NSSWRED_WEIGHT_MODES, /* Must be last */ ++}; ++ ++struct tc_nsswred_qopt { ++ __u32 limit; /* Queue length */ ++ enum tc_nsswred_weight_modes weight_mode; ++ /* Weight mode */ ++ __u32 traffic_classes; /* How many traffic classes: DPs */ ++ __u32 def_traffic_class; /* Default traffic if no match: def_DP */ ++ __u32 traffic_id; /* The traffic id to be configured: DP */ ++ __u32 weight_mode_value; /* Weight mode value */ ++ struct tc_red_alg_parameter rap;/* RED algorithm parameters */ ++ struct tc_nsswred_traffic_class tntc[NSSWRED_CLASS_MAX]; ++ /* Traffic settings for dumpping */ ++ __u8 ecn; /* Setting ECN bit or dropping */ ++ __u8 set_default; /* Sets qdisc to be the default for enqueue */ ++ __u8 accel_mode; /* Dictates which data plane offloads the qdisc */ ++}; ++ ++/* NSSCODEL section */ ++ ++enum { ++ TCA_NSSCODEL_UNSPEC, ++ TCA_NSSCODEL_PARMS, ++ __TCA_NSSCODEL_MAX ++}; ++ ++#define TCA_NSSCODEL_MAX (__TCA_NSSCODEL_MAX - 1) ++ ++struct tc_nsscodel_qopt { ++ __u32 target; /* Acceptable queueing delay */ ++ __u32 limit; /* Max number of packets that can be held in the queue */ ++ __u32 interval; /* Monitoring interval */ ++ __u32 flows; /* Number of flow buckets */ ++ __u32 quantum; /* Weight (in bytes) used for DRR of flow buckets */ ++ __u8 ecn; /* 0 - disable ECN, 1 - enable ECN */ ++ __u8 set_default; /* Sets qdisc to be the default qdisc for enqueue */ ++ __u8 accel_mode; /* Dictates which data plane offloads the qdisc */ ++}; ++ ++struct tc_nsscodel_xstats { ++ __u32 peak_queue_delay; /* Peak delay experienced by a dequeued packet */ ++ __u32 peak_drop_delay; /* Peak delay experienced by a dropped packet */ ++}; ++ ++/* NSSFQ_CODEL section */ ++ ++struct tc_nssfq_codel_xstats { ++ __u32 new_flow_count; /* Total number of new flows seen */ ++ __u32 new_flows_len; /* Current number of new flows */ ++ __u32 old_flows_len; /* Current number of old flows */ ++ __u32 ecn_mark; /* Number of packets marked with ECN */ ++ __u32 drop_overlimit; /* Number of packets dropped due to overlimit */ ++ __u32 maxpacket; /* The largest packet seen so far in the queue */ ++}; ++ ++/* NSSTBL section */ ++ ++enum { ++ TCA_NSSTBL_UNSPEC, ++ TCA_NSSTBL_PARMS, ++ __TCA_NSSTBL_MAX ++}; ++ ++#define TCA_NSSTBL_MAX (__TCA_NSSTBL_MAX - 1) ++ ++struct tc_nsstbl_qopt { ++ __u32 burst; /* Maximum burst size */ ++ __u32 rate; /* Limiting rate of TBF */ ++ __u32 peakrate; /* Maximum rate at which TBF is allowed to send */ ++ __u32 mtu; /* Max size of packet, or minumim burst size */ ++ __u8 accel_mode; /* Dictates which data plane offloads the qdisc */ ++}; ++ ++/* NSSPRIO section */ ++ ++#define TCA_NSSPRIO_MAX_BANDS 256 ++ ++enum { ++ TCA_NSSPRIO_UNSPEC, ++ TCA_NSSPRIO_PARMS, ++ __TCA_NSSPRIO_MAX ++}; ++ ++#define TCA_NSSPRIO_MAX (__TCA_NSSPRIO_MAX - 1) ++ ++struct tc_nssprio_qopt { ++ __u32 bands; /* Number of bands */ ++ __u8 accel_mode; /* Dictates which data plane offloads the qdisc */ ++}; ++ ++/* NSSBF section */ ++ ++enum { ++ TCA_NSSBF_UNSPEC, ++ TCA_NSSBF_CLASS_PARMS, ++ TCA_NSSBF_QDISC_PARMS, ++ __TCA_NSSBF_MAX ++}; ++ ++#define TCA_NSSBF_MAX (__TCA_NSSBF_MAX - 1) ++ ++struct tc_nssbf_class_qopt { ++ __u32 burst; /* Maximum burst size */ ++ __u32 rate; /* Allowed bandwidth for this class */ ++ __u32 mtu; /* MTU of the associated interface */ ++ __u32 quantum; /* Quantum allocation for DRR */ ++}; ++ ++struct tc_nssbf_qopt { ++ __u16 defcls; /* Default class value */ ++ __u8 accel_mode; /* Dictates which data plane offloads the qdisc */ ++}; ++ ++/* NSSWRR section */ ++ ++enum { ++ TCA_NSSWRR_UNSPEC, ++ TCA_NSSWRR_CLASS_PARMS, ++ TCA_NSSWRR_QDISC_PARMS, ++ __TCA_NSSWRR_MAX ++}; ++ ++#define TCA_NSSWRR_MAX (__TCA_NSSWRR_MAX - 1) ++ ++struct tc_nsswrr_class_qopt { ++ __u32 quantum; /* Weight associated to this class */ ++}; ++ ++struct tc_nsswrr_qopt { ++ __u8 accel_mode; /* Dictates which data plane offloads the qdisc */ ++}; ++ ++/* NSSWFQ section */ ++ ++enum { ++ TCA_NSSWFQ_UNSPEC, ++ TCA_NSSWFQ_CLASS_PARMS, ++ TCA_NSSWFQ_QDISC_PARMS, ++ __TCA_NSSWFQ_MAX ++}; ++ ++#define TCA_NSSWFQ_MAX (__TCA_NSSWFQ_MAX - 1) ++ ++struct tc_nsswfq_class_qopt { ++ __u32 quantum; /* Weight associated to this class */ ++}; ++ ++struct tc_nsswfq_qopt { ++ __u8 accel_mode; /* Dictates which data plane offloads the qdisc */ ++}; ++ ++/* NSSHTB section */ ++ ++enum { ++ TCA_NSSHTB_UNSPEC, ++ TCA_NSSHTB_CLASS_PARMS, ++ TCA_NSSHTB_QDISC_PARMS, ++ __TCA_NSSHTB_MAX ++}; ++ ++#define TCA_NSSHTB_MAX (__TCA_NSSHTB_MAX - 1) ++ ++struct tc_nsshtb_class_qopt { ++ __u32 burst; /* Allowed burst size */ ++ __u32 rate; /* Allowed bandwidth for this class */ ++ __u32 cburst; /* Maximum burst size */ ++ __u32 crate; /* Maximum bandwidth for this class */ ++ __u32 quantum; /* Quantum allocation for DRR */ ++ __u32 priority; /* Priority value associated with this class */ ++ __u32 overhead; /* Overhead in bytes per packet */ ++}; ++ ++struct tc_nsshtb_qopt { ++ __u32 r2q; /* Rate to quantum ratio */ ++ __u8 accel_mode; /* Dictates which data plane offloads the qdisc */ ++}; ++ ++/* NSSBLACKHOLE section */ ++ ++enum { ++ TCA_NSSBLACKHOLE_UNSPEC, ++ TCA_NSSBLACKHOLE_PARMS, ++ __TCA_NSSBLACKHOLE_MAX ++}; ++ ++#define TCA_NSSBLACKHOLE_MAX (__TCA_NSSBLACKHOLE_MAX - 1) ++ ++struct tc_nssblackhole_qopt { ++ __u8 set_default; /* Sets qdisc to be the default qdisc for enqueue */ ++ __u8 accel_mode; /* Dictates which data plane offloads the qdisc */ ++}; ++/* QCA NSS Clients Support - End */ + #endif +--- a/net/sched/sch_api.c ++++ b/net/sched/sch_api.c +@@ -2290,4 +2290,26 @@ static int __init pktsched_init(void) + return 0; + } + ++/* QCA NSS Qdisc Support - Start */ ++bool tcf_destroy(struct tcf_proto *tp, bool force) ++{ ++ tp->ops->destroy(tp, force, NULL); ++ module_put(tp->ops->owner); ++ kfree_rcu(tp, rcu); ++ ++ return true; ++} ++ ++void tcf_destroy_chain(struct tcf_proto __rcu **fl) ++{ ++ struct tcf_proto *tp; ++ ++ while ((tp = rtnl_dereference(*fl)) != NULL) { ++ RCU_INIT_POINTER(*fl, tp->next); ++ tcf_destroy(tp, true); ++ } ++} ++EXPORT_SYMBOL(tcf_destroy_chain); ++/* QCA NSS Qdisc Support - End */ ++ + subsys_initcall(pktsched_init); +--- a/net/sched/sch_generic.c ++++ b/net/sched/sch_generic.c +@@ -741,7 +741,7 @@ static void qdisc_free_cb(struct rcu_hea + qdisc_free(q); + } + +-static void qdisc_destroy(struct Qdisc *qdisc) ++void qdisc_destroy(struct Qdisc *qdisc) + { + const struct Qdisc_ops *ops = qdisc->ops; + struct sk_buff *skb, *tmp; +@@ -772,6 +772,7 @@ static void qdisc_destroy(struct Qdisc * + + call_rcu(&qdisc->rcu, qdisc_free_cb); + } ++EXPORT_SYMBOL(qdisc_destroy); + + void qdisc_put(struct Qdisc *qdisc) + { diff --git a/target/linux/ipq806x/patches-5.4/999-07c-qca-nss-clients-ppp-support.patch b/target/linux/ipq806x/patches-5.4/999-07c-qca-nss-clients-ppp-support.patch new file mode 100644 index 000000000..3fd3ce297 --- /dev/null +++ b/target/linux/ipq806x/patches-5.4/999-07c-qca-nss-clients-ppp-support.patch @@ -0,0 +1,132 @@ +--- a/drivers/net/ppp/ppp_generic.c ++++ b/drivers/net/ppp/ppp_generic.c +@@ -48,6 +48,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -3207,6 +3208,10 @@ ppp_connect_channel(struct channel *pch, + struct ppp_net *pn; + int ret = -ENXIO; + int hdrlen; ++ /* QCA NSS ECM Support - Start */ ++ int ppp_proto; ++ int version; ++ /* QCA NSS ECM Support - End */ + + pn = ppp_pernet(pch->chan_net); + +@@ -3238,6 +3243,26 @@ ppp_connect_channel(struct channel *pch, + ++ppp->n_channels; + pch->ppp = ppp; + refcount_inc(&ppp->file.refcnt); ++ ++ /* QCA NSS ECM support - Start */ ++ /* Set the netdev priv flag if the prototype ++ * is L2TP or PPTP. Return success in all cases ++ */ ++ if (!pch->chan) ++ goto out2; ++ ++ ppp_proto = ppp_channel_get_protocol(pch->chan); ++ if (ppp_proto == PX_PROTO_PPTP) { ++ ppp->dev->priv_flags_qca_ecm |= IFF_QCA_ECM_PPP_PPTP; ++ } else if (ppp_proto == PX_PROTO_OL2TP) { ++ version = ppp_channel_get_proto_version(pch->chan); ++ if (version == 2) ++ ppp->dev->priv_flags_qca_ecm |= IFF_QCA_ECM_PPP_L2TPV2; ++ else if (version == 3) ++ ppp->dev->priv_flags_qca_ecm |= IFF_QCA_ECM_PPP_L2TPV3; ++ } ++ /* QCA NSS ECM support - End */ ++ out2: + ppp_unlock(ppp); + ret = 0; + +@@ -3341,6 +3366,56 @@ + } + EXPORT_SYMBOL(ppp_release_channels); + ++/* Return the PPP net device index */ ++int ppp_dev_index(struct ppp_channel *chan) ++{ ++ struct channel *pch = chan->ppp; ++ int ifindex = 0; ++ ++ if (pch) { ++ read_lock_bh(&pch->upl); ++ if (pch->ppp && pch->ppp->dev) ++ ifindex = pch->ppp->dev->ifindex; ++ read_unlock_bh(&pch->upl); ++ } ++ return ifindex; ++} ++EXPORT_SYMBOL(ppp_dev_index); ++ ++/* ppp_channel_get_proto_version() ++ * Call this to get channel protocol version ++ */ ++int ppp_channel_get_proto_version(struct ppp_channel *chan) ++{ ++ if (!chan->ops->get_channel_protocol_ver) ++ return -1; ++ ++ return chan->ops->get_channel_protocol_ver(chan); ++} ++EXPORT_SYMBOL(ppp_channel_get_proto_version); ++ ++/* Check if ppp xmit lock is on hold */ ++bool ppp_is_xmit_locked(struct net_device *dev) ++{ ++ struct ppp *ppp; ++ ++ if (!dev) ++ return false; ++ ++ if (dev->type != ARPHRD_PPP) ++ return false; ++ ++ ppp = netdev_priv(dev); ++ if (!ppp) ++ return false; ++ ++ if (spin_is_locked(&(ppp)->wlock)) ++ return true; ++ ++ return false; ++} ++EXPORT_SYMBOL(ppp_is_xmit_locked); ++ + /* Module/initialization stuff */ + + module_init(ppp_init); +--- a/include/linux/ppp_channel.h ++++ b/include/linux/ppp_channel.h +@@ -32,6 +32,8 @@ struct ppp_channel_ops { + * the channel subtype + */ + int (*get_channel_protocol)(struct ppp_channel *); ++ /* Get channel protocol version */ ++ int (*get_channel_protocol_ver)(struct ppp_channel *); + /* Hold the channel from being destroyed */ + void (*hold)(struct ppp_channel *); + /* Release hold on the channel */ +@@ -84,6 +96,15 @@ + /* Test if ppp xmit lock is locked */ + extern bool ppp_is_xmit_locked(struct net_device *dev); + ++/* Test if ppp xmit lock is locked */ ++extern bool ppp_is_xmit_locked(struct net_device *dev); ++ ++/* Call this get protocol version */ ++extern int ppp_channel_get_proto_version(struct ppp_channel *); ++ ++/* Get the device index associated with a channel, or 0, if none */ ++extern int ppp_dev_index(struct ppp_channel *); ++ + /* Hold PPP channels for the PPP device */ + extern int __ppp_hold_channels(struct net_device *dev, + struct ppp_channel *channels[], diff --git a/target/linux/ipq806x/patches-5.4/999-07d-qca-nss-clients-ppp-support.patch b/target/linux/ipq806x/patches-5.4/999-07d-qca-nss-clients-ppp-support.patch new file mode 100644 index 000000000..5c743902f --- /dev/null +++ b/target/linux/ipq806x/patches-5.4/999-07d-qca-nss-clients-ppp-support.patch @@ -0,0 +1,99 @@ +--- a/include/linux/ppp_channel.h ++++ b/include/linux/ppp_channel.h +@@ -146,5 +146,17 @@ extern void ppp_update_stats(struct net_ + extern int ppp_dev_index(struct ppp_channel *); + /* QCA NSS ECM Support - End */ + ++/* QCA NSS Clients Support - Start */ ++/* PPP channel connection event types */ ++#define PPP_CHANNEL_DISCONNECT 0 ++#define PPP_CHANNEL_CONNECT 1 ++ ++/* Register the PPP channel connect notifier */ ++extern void ppp_channel_connection_register_notify(struct notifier_block *nb); ++ ++/* Unregister the PPP channel connect notifier */ ++extern void ppp_channel_connection_unregister_notify(struct notifier_block *nb); ++/* QCA NSS Clients Support - End */ ++ + #endif /* __KERNEL__ */ + #endif +--- a/drivers/net/ppp/ppp_generic.c ++++ b/drivers/net/ppp/ppp_generic.c +@@ -256,6 +256,26 @@ struct ppp_net { + #define seq_before(a, b) ((s32)((a) - (b)) < 0) + #define seq_after(a, b) ((s32)((a) - (b)) > 0) + ++/* QCA NSS Client Support - Start */ ++/* ++ * Registration/Unregistration methods ++ * for PPP channel connect and disconnect event notifications. ++ */ ++RAW_NOTIFIER_HEAD(ppp_channel_connection_notifier_list); ++ ++void ppp_channel_connection_register_notify(struct notifier_block *nb) ++{ ++ raw_notifier_chain_register(&ppp_channel_connection_notifier_list, nb); ++} ++EXPORT_SYMBOL_GPL(ppp_channel_connection_register_notify); ++ ++void ppp_channel_connection_unregister_notify(struct notifier_block *nb) ++{ ++ raw_notifier_chain_unregister(&ppp_channel_connection_notifier_list, nb); ++} ++EXPORT_SYMBOL_GPL(ppp_channel_connection_unregister_notify); ++/* QCA NSS Client Support - End */ ++ + /* Prototypes. */ + static int ppp_unattached_ioctl(struct net *net, struct ppp_file *pf, + struct file *file, unsigned int cmd, unsigned long arg); +@@ -3212,6 +3232,7 @@ ppp_connect_channel(struct channel *pch, + int ppp_proto; + int version; + /* QCA NSS ECM Support - End */ ++ int notify = 0; /* QCA NSS Client Support */ + + pn = ppp_pernet(pch->chan_net); + +@@ -3262,6 +3283,8 @@ ppp_connect_channel(struct channel *pch, + ppp->dev->priv_flags_qca_ecm |= IFF_QCA_ECM_PPP_L2TPV3; + } + /* QCA NSS ECM support - End */ ++ ++ notify = 1; /* QCA NSS Clients Support */ + out2: + ppp_unlock(ppp); + ret = 0; +@@ -3270,6 +3293,16 @@ ppp_connect_channel(struct channel *pch, + write_unlock_bh(&pch->upl); + out: + mutex_unlock(&pn->all_ppp_mutex); ++ ++ /* QCA NSS Clients Support - Start */ ++ if (notify && ppp && ppp->dev) { ++ dev_hold(ppp->dev); ++ raw_notifier_call_chain(&ppp_channel_connection_notifier_list, ++ PPP_CHANNEL_CONNECT, ppp->dev); ++ dev_put(ppp->dev); ++ } ++ /* QCA NSS Clients Support - End */ ++ + return ret; + } + +@@ -3287,6 +3320,15 @@ ppp_disconnect_channel(struct channel *p + pch->ppp = NULL; + write_unlock_bh(&pch->upl); + if (ppp) { ++ /* QCA NSS Clients Support - Start */ ++ if (ppp->dev) { ++ dev_hold(ppp->dev); ++ raw_notifier_call_chain(&ppp_channel_connection_notifier_list, ++ PPP_CHANNEL_DISCONNECT, ppp->dev); ++ dev_put(ppp->dev); ++ } ++ /* QCA NSS Clients Support - Start */ ++ + /* remove it from the ppp unit's list */ + ppp_lock(ppp); + list_del(&pch->clist); \ No newline at end of file diff --git a/target/linux/ipq806x/patches-5.4/999-07e-qca-nss-clients-iptunnel-support.patch b/target/linux/ipq806x/patches-5.4/999-07e-qca-nss-clients-iptunnel-support.patch new file mode 100644 index 000000000..7422ba419 --- /dev/null +++ b/target/linux/ipq806x/patches-5.4/999-07e-qca-nss-clients-iptunnel-support.patch @@ -0,0 +1,77 @@ +--- a/include/net/ip6_tunnel.h ++++ b/include/net/ip6_tunnel.h +@@ -36,6 +36,7 @@ struct __ip6_tnl_parm { + __u8 proto; /* tunnel protocol */ + __u8 encap_limit; /* encapsulation limit for tunnel */ + __u8 hop_limit; /* hop limit for tunnel */ ++ __u8 draft03; /* FMR using draft03 of map-e - QCA NSS Clients Support */ + bool collect_md; + __be32 flowinfo; /* traffic class and flowlabel for tunnel */ + __u32 flags; /* tunnel flags */ +--- a/include/net/ip_tunnels.h ++++ b/include/net/ip_tunnels.h +@@ -525,4 +525,9 @@ static inline void ip_tunnel_info_opts_s + + #endif /* CONFIG_INET */ + ++/* QCA NSS Clients Support - Start */ ++void ipip6_update_offload_stats(struct net_device *dev, void *ptr); ++void ip6_update_offload_stats(struct net_device *dev, void *ptr); ++/* QCA NSS Clients Support - End */ ++ + #endif /* __NET_IP_TUNNELS_H */ +--- a/net/ipv6/ip6_tunnel.c ++++ b/net/ipv6/ip6_tunnel.c +@@ -2392,6 +2392,26 @@ nla_put_failure: + return -EMSGSIZE; + } + ++/* QCA NSS Client Support - Start */ ++/* ++ * Update offload stats ++ */ ++void ip6_update_offload_stats(struct net_device *dev, void *ptr) ++{ ++ struct pcpu_sw_netstats *tstats = per_cpu_ptr(dev->tstats, 0); ++ const struct pcpu_sw_netstats *offload_stats = ++ (struct pcpu_sw_netstats *)ptr; ++ ++ u64_stats_update_begin(&tstats->syncp); ++ tstats->tx_packets += offload_stats->tx_packets; ++ tstats->tx_bytes += offload_stats->tx_bytes; ++ tstats->rx_packets += offload_stats->rx_packets; ++ tstats->rx_bytes += offload_stats->rx_bytes; ++ u64_stats_update_end(&tstats->syncp); ++} ++EXPORT_SYMBOL(ip6_update_offload_stats); ++/* QCA NSS Client Support - End */ ++ + struct net *ip6_tnl_get_link_net(const struct net_device *dev) + { + struct ip6_tnl *tunnel = netdev_priv(dev); +--- a/net/ipv6/sit.c ++++ b/net/ipv6/sit.c +@@ -1741,6 +1741,23 @@ nla_put_failure: + return -EMSGSIZE; + } + ++/* QCA NSS Clients Support - Start */ ++void ipip6_update_offload_stats(struct net_device *dev, void *ptr) ++{ ++ struct pcpu_sw_netstats *tstats = per_cpu_ptr(dev->tstats, 0); ++ const struct pcpu_sw_netstats *offload_stats = ++ (struct pcpu_sw_netstats *)ptr; ++ ++ u64_stats_update_begin(&tstats->syncp); ++ tstats->tx_packets += offload_stats->tx_packets; ++ tstats->tx_bytes += offload_stats->tx_bytes; ++ tstats->rx_packets += offload_stats->rx_packets; ++ tstats->rx_bytes += offload_stats->rx_bytes; ++ u64_stats_update_end(&tstats->syncp); ++} ++EXPORT_SYMBOL(ipip6_update_offload_stats); ++/* QCA NSS Clients Support - End */ ++ + static const struct nla_policy ipip6_policy[IFLA_IPTUN_MAX + 1] = { + [IFLA_IPTUN_LINK] = { .type = NLA_U32 }, + [IFLA_IPTUN_LOCAL] = { .type = NLA_U32 },