Ben Menchaca | 84f3663 | 2014-02-28 20:57:38 +0000 | [diff] [blame] | 1 | ########################################################################## |
ratheesh kannoth | 91d6e15 | 2018-06-18 14:23:35 +0530 | [diff] [blame] | 2 | # Copyright (c) 2014-2016, 2018-2019, The Linux Foundation. All rights reserved. |
Ben Menchaca | 84f3663 | 2014-02-28 20:57:38 +0000 | [diff] [blame] | 3 | # Permission to use, copy, modify, and/or distribute this software for |
| 4 | # any purpose with or without fee is hereby granted, provided that the |
| 5 | # above copyright notice and this permission notice appear in all copies. |
| 6 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 7 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 8 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 9 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 10 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 11 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |
| 12 | # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 13 | ########################################################################## |
| 14 | |
| 15 | # ################################################### |
| 16 | # Makefile for the QCA NSS ECM |
| 17 | # ################################################### |
| 18 | |
Nicolas Costa | f46c33b | 2014-05-15 10:02:00 -0500 | [diff] [blame] | 19 | obj-m += ecm.o |
| 20 | |
Murat Sezgin | 1957a98 | 2015-05-21 22:22:25 +0100 | [diff] [blame] | 21 | # ##################################################### |
| 22 | # Example builds. |
| 23 | # Enable example build by using the menuconfig options. |
| 24 | # ##################################################### |
| 25 | ifeq ($(EXAMPLES_BUILD_PCC),y) |
| 26 | obj-m += examples/ecm_pcc_test.o |
| 27 | endif |
Murat Sezgin | 4ef6914 | 2018-10-16 13:12:08 -0700 | [diff] [blame] | 28 | ifeq ($(EXAMPLES_BUILD_MARK),y) |
| 29 | obj-m += examples/ecm_mark_test.o |
| 30 | endif |
Murat Sezgin | 1957a98 | 2015-05-21 22:22:25 +0100 | [diff] [blame] | 31 | |
Hai Shalom | 81f4e20 | 2014-06-04 09:30:27 -0700 | [diff] [blame] | 32 | ecm-y := \ |
Nicolas Costa | f46c33b | 2014-05-15 10:02:00 -0500 | [diff] [blame] | 33 | ecm_tracker_udp.o \ |
| 34 | ecm_tracker_tcp.o \ |
| 35 | ecm_tracker_datagram.o \ |
| 36 | ecm_tracker.o \ |
Murat Sezgin | 3ab259d | 2015-06-11 14:15:35 -0700 | [diff] [blame] | 37 | frontends/ecm_front_end_ipv4.o \ |
| 38 | frontends/ecm_front_end_ipv6.o \ |
Murat Sezgin | 5f13849 | 2015-06-11 15:18:27 -0700 | [diff] [blame] | 39 | frontends/ecm_front_end_common.o \ |
Murat Sezgin | 7585058 | 2018-05-02 18:37:56 -0700 | [diff] [blame] | 40 | ecm_db/ecm_db.o \ |
| 41 | ecm_db/ecm_db_connection.o \ |
| 42 | ecm_db/ecm_db_mapping.o \ |
| 43 | ecm_db/ecm_db_host.o \ |
| 44 | ecm_db/ecm_db_node.o \ |
| 45 | ecm_db/ecm_db_iface.o \ |
| 46 | ecm_db/ecm_db_listener.o \ |
| 47 | ecm_db/ecm_db_timer.o \ |
Murat Sezgin | c725ad8 | 2016-04-13 17:12:50 -0700 | [diff] [blame] | 48 | ecm_classifier.o \ |
Nicolas Costa | f46c33b | 2014-05-15 10:02:00 -0500 | [diff] [blame] | 49 | ecm_classifier_default.o \ |
Nicolas Costa | f46c33b | 2014-05-15 10:02:00 -0500 | [diff] [blame] | 50 | ecm_interface.o \ |
Murat Sezgin | df98fce | 2016-08-26 17:56:39 -0700 | [diff] [blame] | 51 | ecm_conntrack_notifier.o \ |
Hardik S. Panchal | 475a270 | 2019-03-29 11:52:31 +0530 | [diff] [blame] | 52 | ecm_init.o \ |
| 53 | ecm_notifier.o |
Ben Menchaca | 84f3663 | 2014-02-28 20:57:38 +0000 | [diff] [blame] | 54 | |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 55 | # ############################################################################# |
Xiaoping Fan | b939054 | 2015-07-20 18:15:21 -0700 | [diff] [blame] | 56 | # Define ECM_FRONT_END_NSS_ENABLE=y in order to select |
| 57 | # nss as ECM's front end. |
| 58 | # ############################################################################# |
Suman Ghosh | f79452b | 2018-08-17 20:46:15 +0530 | [diff] [blame] | 59 | ifeq ($(SoC),$(filter $(SoC),ipq806x ipq807x ipq807x_64 ipq60xx ipq60xx_64)) |
Xiaoping Fan | b939054 | 2015-07-20 18:15:21 -0700 | [diff] [blame] | 60 | ECM_FRONT_END_NSS_ENABLE=y |
Xiaoping Fan | b939054 | 2015-07-20 18:15:21 -0700 | [diff] [blame] | 61 | ecm-$(ECM_FRONT_END_NSS_ENABLE) += frontends/nss/ecm_nss_ipv4.o |
| 62 | ecm-$(ECM_FRONT_END_NSS_ENABLE) += frontends/nss/ecm_nss_ported_ipv4.o |
Xiaoping Fan | b939054 | 2015-07-20 18:15:21 -0700 | [diff] [blame] | 63 | ccflags-$(ECM_FRONT_END_NSS_ENABLE) += -DECM_FRONT_END_NSS_ENABLE |
Murat Sezgin | 828aa09 | 2017-04-27 13:27:39 -0700 | [diff] [blame] | 64 | endif |
Xiaoping Fan | b939054 | 2015-07-20 18:15:21 -0700 | [diff] [blame] | 65 | |
| 66 | # ############################################################################# |
| 67 | # Define ECM_FRONT_END_SFE_ENABLE=y in order to select |
| 68 | # sfe as ECM's front end. |
| 69 | # ############################################################################# |
Murat Sezgin | 828aa09 | 2017-04-27 13:27:39 -0700 | [diff] [blame] | 70 | ifeq ($(SoC),$(filter $(SoC),ipq806x ipq40xx)) |
Xiaoping Fan | b939054 | 2015-07-20 18:15:21 -0700 | [diff] [blame] | 71 | ECM_FRONT_END_SFE_ENABLE=y |
Xiaoping Fan | b939054 | 2015-07-20 18:15:21 -0700 | [diff] [blame] | 72 | ecm-$(ECM_FRONT_END_SFE_ENABLE) += frontends/sfe/ecm_sfe_ipv4.o |
| 73 | ecm-$(ECM_FRONT_END_SFE_ENABLE) += frontends/sfe/ecm_sfe_ported_ipv4.o |
Xiaoping Fan | b939054 | 2015-07-20 18:15:21 -0700 | [diff] [blame] | 74 | ccflags-$(ECM_FRONT_END_SFE_ENABLE) += -DECM_FRONT_END_SFE_ENABLE |
Murat Sezgin | 828aa09 | 2017-04-27 13:27:39 -0700 | [diff] [blame] | 75 | endif |
Xiaoping Fan | b939054 | 2015-07-20 18:15:21 -0700 | [diff] [blame] | 76 | |
| 77 | # ############################################################################# |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 78 | # Define ECM_INTERFACE_BOND_ENABLE=y in order to enable |
| 79 | # Bonding / Link Aggregation support. |
| 80 | # ############################################################################# |
Murat Sezgin | 8e10a7c | 2015-06-11 15:49:24 -0700 | [diff] [blame] | 81 | ecm-$(ECM_INTERFACE_BOND_ENABLE) += frontends/nss/ecm_nss_bond_notifier.o |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 82 | ccflags-$(ECM_INTERFACE_BOND_ENABLE) += -DECM_INTERFACE_BOND_ENABLE |
Hai Shalom | 81f4e20 | 2014-06-04 09:30:27 -0700 | [diff] [blame] | 83 | |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 84 | # ############################################################################# |
ratheesh kannoth | a32fdd1 | 2015-09-09 08:02:58 +0530 | [diff] [blame] | 85 | # Define ECM_INTERFACE_PPPOE_ENABLE=y in order |
| 86 | # to enable support for PPPoE acceleration. |
| 87 | # ############################################################################# |
| 88 | ECM_INTERFACE_PPPOE_ENABLE=y |
| 89 | ccflags-$(ECM_INTERFACE_PPPOE_ENABLE) += -DECM_INTERFACE_PPPOE_ENABLE |
| 90 | |
| 91 | # ############################################################################# |
| 92 | # Define ECM_INTERFACE_L2TPV2_ENABLE=y in order |
| 93 | # to enable support for l2tpv2 acceleration. |
| 94 | # ############################################################################# |
ratheesh kannoth | a32fdd1 | 2015-09-09 08:02:58 +0530 | [diff] [blame] | 95 | ccflags-$(ECM_INTERFACE_L2TPV2_ENABLE) += -DECM_INTERFACE_L2TPV2_ENABLE |
| 96 | |
| 97 | # ############################################################################# |
Shyam Sunder | 23f2e54 | 2015-09-28 14:56:49 +0530 | [diff] [blame] | 98 | # Define ECM_INTERFACE_PPTP_ENABLE=y in order |
| 99 | # to enable support for pptp acceleration. |
| 100 | # ############################################################################# |
Shyam Sunder | 23f2e54 | 2015-09-28 14:56:49 +0530 | [diff] [blame] | 101 | ccflags-$(ECM_INTERFACE_PPTP_ENABLE) += -DECM_INTERFACE_PPTP_ENABLE |
| 102 | |
| 103 | # ############################################################################# |
| 104 | # if pppoe, l2tpv2, pptp acceleration is enabled, ppp should |
ratheesh kannoth | a32fdd1 | 2015-09-09 08:02:58 +0530 | [diff] [blame] | 105 | # be enabled automatically |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 106 | # ############################################################################# |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 107 | ECM_INTERFACE_PPP_ENABLE=y |
ratheesh kannoth | a32fdd1 | 2015-09-09 08:02:58 +0530 | [diff] [blame] | 108 | ifeq "$(ECM_INTERFACE_PPPOE_ENABLE)" "n" |
| 109 | ifeq "$(ECM_INTERFACE_L2TPV2_ENABLE)" "n" |
Shyam Sunder | 23f2e54 | 2015-09-28 14:56:49 +0530 | [diff] [blame] | 110 | ifeq "$(ECM_INTERFACE_PPTP_ENABLE)" "n" |
ratheesh kannoth | a32fdd1 | 2015-09-09 08:02:58 +0530 | [diff] [blame] | 111 | ECM_INTERFACE_PPP_ENABLE=n |
| 112 | endif |
| 113 | endif |
Shyam Sunder | 23f2e54 | 2015-09-28 14:56:49 +0530 | [diff] [blame] | 114 | endif |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 115 | ccflags-$(ECM_INTERFACE_PPP_ENABLE) += -DECM_INTERFACE_PPP_ENABLE |
| 116 | |
| 117 | # ############################################################################# |
ratheesh kannoth | cfdcb33 | 2015-12-24 07:19:18 +0530 | [diff] [blame] | 118 | # Define ECM_INTERFACE_MAP_T_ENABLE=y in order |
| 119 | # to enable support for MAP-T interface. |
| 120 | # ############################################################################# |
ratheesh kannoth | cfdcb33 | 2015-12-24 07:19:18 +0530 | [diff] [blame] | 121 | ccflags-$(ECM_INTERFACE_MAP_T_ENABLE) += -DECM_INTERFACE_MAP_T_ENABLE |
| 122 | |
| 123 | # ############################################################################# |
Suman Ghosh | 9e4245f | 2018-04-11 01:11:41 +0530 | [diff] [blame] | 124 | # Define ECM_INTERFACE_GRE_TAP_ENABLE=y in order |
| 125 | # to enable support for GRE TAP interface. |
Murat Sezgin | 31effef | 2017-11-13 15:09:34 -0800 | [diff] [blame] | 126 | # ############################################################################# |
Suman Ghosh | 9e4245f | 2018-04-11 01:11:41 +0530 | [diff] [blame] | 127 | ccflags-$(ECM_INTERFACE_GRE_TAP_ENABLE) += -DECM_INTERFACE_GRE_TAP_ENABLE |
| 128 | |
| 129 | # ############################################################################# |
| 130 | # Define ECM_INTERFACE_GRE_TUN_ENABLE=y in order |
| 131 | # to enable support for GRE TUN interface. |
| 132 | # ############################################################################# |
Suman Ghosh | 9e4245f | 2018-04-11 01:11:41 +0530 | [diff] [blame] | 133 | ccflags-$(ECM_INTERFACE_GRE_TUN_ENABLE) += -DECM_INTERFACE_GRE_TUN_ENABLE |
Murat Sezgin | 31effef | 2017-11-13 15:09:34 -0800 | [diff] [blame] | 134 | |
| 135 | # ############################################################################# |
Murat Sezgin | b3731e8 | 2014-11-26 12:20:59 -0800 | [diff] [blame] | 136 | # Define ECM_INTERFACE_SIT_ENABLE=y in order |
| 137 | # to enable support for SIT interface. |
| 138 | # ############################################################################# |
Murat Sezgin | b3731e8 | 2014-11-26 12:20:59 -0800 | [diff] [blame] | 139 | ccflags-$(ECM_INTERFACE_SIT_ENABLE) += -DECM_INTERFACE_SIT_ENABLE |
| 140 | |
| 141 | # ############################################################################# |
Murat Sezgin | c140256 | 2015-03-12 12:32:20 -0700 | [diff] [blame] | 142 | # Define ECM_INTERFACE_TUNIPIP6_ENABLE=y in order |
| 143 | # to enable support for TUNIPIP6 interface. |
| 144 | # ############################################################################# |
Murat Sezgin | c140256 | 2015-03-12 12:32:20 -0700 | [diff] [blame] | 145 | ccflags-$(ECM_INTERFACE_TUNIPIP6_ENABLE) += -DECM_INTERFACE_TUNIPIP6_ENABLE |
| 146 | |
| 147 | # ############################################################################# |
Murat Sezgin | 27921eb | 2018-11-30 16:17:37 -0800 | [diff] [blame] | 148 | # Define ECM_INTERFACE_RAWIP_ENABLE=y in order |
| 149 | # to enable support for RAWIP interface. |
| 150 | # ############################################################################# |
| 151 | ccflags-$(ECM_INTERFACE_RAWIP_ENABLE) += -DECM_INTERFACE_RAWIP_ENABLE |
| 152 | |
| 153 | # ############################################################################# |
Shyam Sunder | 1f03726 | 2015-05-18 20:04:13 +0530 | [diff] [blame] | 154 | # Define ECM_MULTICAST_ENABLE=y in order to enable support for ECM Multicast |
| 155 | # ############################################################################# |
Xiaoping Fan | b939054 | 2015-07-20 18:15:21 -0700 | [diff] [blame] | 156 | ifeq ($(ECM_FRONT_END_NSS_ENABLE), y) |
Murat Sezgin | 34f45c1 | 2015-11-19 13:25:22 -0800 | [diff] [blame] | 157 | # |
| 158 | # TODO: This is a workaround for external builds in which the qca-mcs source |
| 159 | # code is not available. This will be fixed later by breaking the dependency from ECM |
| 160 | # to qca-mcs |
| 161 | # |
| 162 | MCS_CONFIG:=$(shell grep "CONFIG_PACKAGE_kmod-qca-mcs=y" $(TOPDIR)/.config) |
| 163 | MCS_ENABLED:=CONFIG_PACKAGE_kmod-qca-mcs=y |
| 164 | ifeq ($(MCS_CONFIG),$(MCS_ENABLED)) |
Shyam Sunder | be633de | 2016-10-06 17:02:31 +0530 | [diff] [blame] | 165 | ECM_MULTICAST_ENABLE=y |
Shyam Sunder | dd68269 | 2015-05-04 18:15:18 +0530 | [diff] [blame] | 166 | ecm-$(ECM_MULTICAST_ENABLE) += frontends/nss/ecm_nss_multicast_ipv4.o |
Murat Sezgin | 3ab259d | 2015-06-11 14:15:35 -0700 | [diff] [blame] | 167 | ecm-$(ECM_MULTICAST_ENABLE) += frontends/nss/ecm_nss_multicast_ipv6.o |
Murat Sezgin | 7585058 | 2018-05-02 18:37:56 -0700 | [diff] [blame] | 168 | ecm-$(ECM_MULTICAST_ENABLE) += ecm_db/ecm_db_multicast.o |
Shyam Sunder | 1f03726 | 2015-05-18 20:04:13 +0530 | [diff] [blame] | 169 | ccflags-$(ECM_MULTICAST_ENABLE) += -DECM_MULTICAST_ENABLE |
Karthik Hariharan | 3e964a3 | 2015-09-22 21:40:52 +0530 | [diff] [blame] | 170 | endif |
Murat Sezgin | 34f45c1 | 2015-11-19 13:25:22 -0800 | [diff] [blame] | 171 | endif |
Shyam Sunder | 1f03726 | 2015-05-18 20:04:13 +0530 | [diff] [blame] | 172 | |
| 173 | # ############################################################################# |
Gareth Williams | 141d238 | 2014-11-25 11:35:19 -0800 | [diff] [blame] | 174 | # Define ECM_INTERFACE_VLAN_ENABLE=y in order to enable support for VLAN |
| 175 | # ############################################################################# |
Gareth Williams | 141d238 | 2014-11-25 11:35:19 -0800 | [diff] [blame] | 176 | ECM_INTERFACE_VLAN_ENABLE=y |
Gareth Williams | 141d238 | 2014-11-25 11:35:19 -0800 | [diff] [blame] | 177 | ccflags-$(ECM_INTERFACE_VLAN_ENABLE) += -DECM_INTERFACE_VLAN_ENABLE |
| 178 | |
| 179 | # ############################################################################# |
Murat Sezgin | 69a2753 | 2015-03-12 14:09:40 -0700 | [diff] [blame] | 180 | # Define ECM_INTERFACE_IPSEC_ENABLE=y in order to enable support for IPSEC |
| 181 | # ############################################################################# |
Murat Sezgin | 69a2753 | 2015-03-12 14:09:40 -0700 | [diff] [blame] | 182 | ccflags-$(ECM_INTERFACE_IPSEC_ENABLE) += -DECM_INTERFACE_IPSEC_ENABLE |
| 183 | |
ratheesh kannoth | 91d6e15 | 2018-06-18 14:23:35 +0530 | [diff] [blame] | 184 | ECM_INTERFACE_IPSEC_GLUE_LAYER_SUPPORT_ENABLE=n |
| 185 | ifeq ($(SoC),$(filter $(SoC), ipq807x ipq807x_64 ipq60xx ipq60xx_64)) |
| 186 | ECM_INTERFACE_IPSEC_GLUE_LAYER_SUPPORT_ENABLE=$(ECM_INTERFACE_IPSEC_ENABLE) |
| 187 | ccflags-$(ECM_INTERFACE_IPSEC_GLUE_LAYER_SUPPORT_ENABLE) += -DECM_INTERFACE_IPSEC_GLUE_LAYER_SUPPORT_ENABLE |
| 188 | endif |
| 189 | |
Murat Sezgin | 69a2753 | 2015-03-12 14:09:40 -0700 | [diff] [blame] | 190 | # ############################################################################# |
Gareth Williams | 8ac3429 | 2015-03-17 14:06:58 +0000 | [diff] [blame] | 191 | # Define ECM_IPV6_ENABLE=y in order to enable IPv6 support in the ECM. |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 192 | # ############################################################################# |
Gareth Williams | 8ac3429 | 2015-03-17 14:06:58 +0000 | [diff] [blame] | 193 | ECM_IPV6_ENABLE=y |
Xiaoping Fan | b939054 | 2015-07-20 18:15:21 -0700 | [diff] [blame] | 194 | ifeq ($(ECM_FRONT_END_NSS_ENABLE), y) |
Murat Sezgin | 3ab259d | 2015-06-11 14:15:35 -0700 | [diff] [blame] | 195 | ecm-$(ECM_IPV6_ENABLE) += frontends/nss/ecm_nss_ipv6.o |
| 196 | ecm-$(ECM_IPV6_ENABLE) += frontends/nss/ecm_nss_ported_ipv6.o |
Xiaoping Fan | b939054 | 2015-07-20 18:15:21 -0700 | [diff] [blame] | 197 | endif |
| 198 | ifeq ($(ECM_FRONT_END_SFE_ENABLE), y) |
| 199 | ecm-$(ECM_IPV6_ENABLE) += frontends/sfe/ecm_sfe_ipv6.o |
| 200 | ecm-$(ECM_IPV6_ENABLE) += frontends/sfe/ecm_sfe_ported_ipv6.o |
| 201 | endif |
Gareth Williams | 8ac3429 | 2015-03-17 14:06:58 +0000 | [diff] [blame] | 202 | ccflags-$(ECM_IPV6_ENABLE) += -DECM_IPV6_ENABLE |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 203 | |
| 204 | # ############################################################################# |
Murat Sezgin | f4f7ab4 | 2018-10-12 17:01:46 -0700 | [diff] [blame] | 205 | # Define ECM_CLASSIFIER_MARK_ENABLE=y in order to enable mark classifier. |
| 206 | # ############################################################################# |
| 207 | ECM_CLASSIFIER_MARK_ENABLE=y |
| 208 | ecm-$(ECM_CLASSIFIER_MARK_ENABLE) += ecm_classifier_mark.o |
| 209 | ccflags-$(ECM_CLASSIFIER_MARK_ENABLE) += -DECM_CLASSIFIER_MARK_ENABLE |
| 210 | |
| 211 | # ############################################################################# |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 212 | # Define ECM_CLASSIFIER_NL_ENABLE=y in order to enable NL classifier. |
| 213 | # ############################################################################# |
Murat Sezgin | e1c51d8 | 2016-02-10 16:42:58 -0800 | [diff] [blame] | 214 | ifeq ($(findstring 4.4., $(KERNELVERSION)),) |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 215 | ECM_CLASSIFIER_NL_ENABLE=y |
Murat Sezgin | e1c51d8 | 2016-02-10 16:42:58 -0800 | [diff] [blame] | 216 | endif |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 217 | ecm-$(ECM_CLASSIFIER_NL_ENABLE) += ecm_classifier_nl.o |
| 218 | ccflags-$(ECM_CLASSIFIER_NL_ENABLE) += -DECM_CLASSIFIER_NL_ENABLE |
| 219 | |
| 220 | # ############################################################################# |
| 221 | # Define ECM_CLASSIFIER_DSCP_ENABLE=y in order to enable DSCP classifier. |
| 222 | # ############################################################################# |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 223 | ECM_CLASSIFIER_DSCP_ENABLE=y |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 224 | ecm-$(ECM_CLASSIFIER_DSCP_ENABLE) += ecm_classifier_dscp.o |
| 225 | ccflags-$(ECM_CLASSIFIER_DSCP_ENABLE) += -DECM_CLASSIFIER_DSCP_ENABLE |
| 226 | |
| 227 | # ############################################################################# |
| 228 | # Define ECM_CLASSIFIER_HYFI_ENABLE=y in order to enable |
| 229 | # the Hy-Fi classifier in ECM. Currently disabled until the integration |
| 230 | # with Hy-Fi is completed. |
| 231 | # ############################################################################# |
Murat Sezgin | 34f45c1 | 2015-11-19 13:25:22 -0800 | [diff] [blame] | 232 | # |
| 233 | # TODO: This is a workaround for external builds in which the qca-hyfi-bridge source |
| 234 | # code is not available. This will be fixed later by breaking the dependency from ECM |
| 235 | # to qca-hyfi-bridge |
| 236 | # |
| 237 | HYFI_BRIDGE_CONFIG:=$(shell grep "CONFIG_PACKAGE_kmod-qca-hyfi-bridge=y" $(TOPDIR)/.config) |
| 238 | HYFI_BRIDGE_ENABLED:=CONFIG_PACKAGE_kmod-qca-hyfi-bridge=y |
| 239 | ifeq ($(HYFI_BRIDGE_CONFIG),$(HYFI_BRIDGE_ENABLED)) |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 240 | ecm-$(ECM_CLASSIFIER_HYFI_ENABLE) += ecm_classifier_hyfi.o |
| 241 | ccflags-$(ECM_CLASSIFIER_HYFI_ENABLE) += -DECM_CLASSIFIER_HYFI_ENABLE |
Murat Sezgin | 34f45c1 | 2015-11-19 13:25:22 -0800 | [diff] [blame] | 242 | endif |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 243 | |
| 244 | # ############################################################################# |
Gareth Williams | dcda9b9 | 2015-05-13 10:08:15 +0100 | [diff] [blame] | 245 | # Define ECM_CLASSIFIER_PCC_ENABLE=y in order to enable |
| 246 | # the Parental Controls subsystem classifier in ECM. Currently disabled until |
| 247 | # customers require it / if they need to integrate their Parental Controls with it. |
| 248 | # ############################################################################# |
| 249 | ECM_CLASSIFIER_PCC_ENABLE=y |
| 250 | ecm-$(ECM_CLASSIFIER_PCC_ENABLE) += ecm_classifier_pcc.o |
| 251 | ccflags-$(ECM_CLASSIFIER_PCC_ENABLE) += -DECM_CLASSIFIER_PCC_ENABLE |
| 252 | |
| 253 | # ############################################################################# |
Murat Sezgin | 8d916a1 | 2015-03-18 15:56:50 -0700 | [diff] [blame] | 254 | # Define ECM_NON_PORTED_SUPPORT_ENABLE=y in order to enable non-ported protocol. |
| 255 | # ############################################################################# |
| 256 | ECM_NON_PORTED_SUPPORT_ENABLE=y |
Xiaoping Fan | b939054 | 2015-07-20 18:15:21 -0700 | [diff] [blame] | 257 | ifeq ($(ECM_FRONT_END_NSS_ENABLE), y) |
Murat Sezgin | 8d916a1 | 2015-03-18 15:56:50 -0700 | [diff] [blame] | 258 | ecm-$(ECM_NON_PORTED_SUPPORT_ENABLE) += frontends/nss/ecm_nss_non_ported_ipv4.o |
Murat Sezgin | 3ab259d | 2015-06-11 14:15:35 -0700 | [diff] [blame] | 259 | ecm-$(ECM_NON_PORTED_SUPPORT_ENABLE) += frontends/nss/ecm_nss_non_ported_ipv6.o |
Xiaoping Fan | b939054 | 2015-07-20 18:15:21 -0700 | [diff] [blame] | 260 | endif |
| 261 | ifeq ($(ECM_FRONT_END_SFE_ENABLE), y) |
| 262 | ecm-$(ECM_NON_PORTED_SUPPORT_ENABLE) += frontends/sfe/ecm_sfe_non_ported_ipv4.o |
| 263 | ecm-$(ECM_NON_PORTED_SUPPORT_ENABLE) += frontends/sfe/ecm_sfe_non_ported_ipv6.o |
| 264 | endif |
Murat Sezgin | 8d916a1 | 2015-03-18 15:56:50 -0700 | [diff] [blame] | 265 | ccflags-$(ECM_NON_PORTED_SUPPORT_ENABLE) += -DECM_NON_PORTED_SUPPORT_ENABLE |
| 266 | |
Gareth Williams | f98d419 | 2015-03-11 16:55:41 +0000 | [diff] [blame] | 267 | # ############################################################################# |
| 268 | # Define ECM_STATE_OUTPUT_ENABLE=y to support XML state output |
| 269 | # ############################################################################# |
| 270 | ECM_STATE_OUTPUT_ENABLE=y |
| 271 | ecm-$(ECM_STATE_OUTPUT_ENABLE) += ecm_state.o |
| 272 | ccflags-$(ECM_STATE_OUTPUT_ENABLE) += -DECM_STATE_OUTPUT_ENABLE |
Murat Sezgin | 8d916a1 | 2015-03-18 15:56:50 -0700 | [diff] [blame] | 273 | |
| 274 | # ############################################################################# |
Gareth Williams | 85331c9 | 2015-03-11 20:39:18 +0000 | [diff] [blame] | 275 | # Define ECM_DB_ADVANCED_STATS_ENABLE to support XML state output |
| 276 | # ############################################################################# |
| 277 | ECM_DB_ADVANCED_STATS_ENABLE=y |
| 278 | ccflags-$(ECM_DB_ADVANCED_STATS_ENABLE) += -DECM_DB_ADVANCED_STATS_ENABLE |
| 279 | |
| 280 | # ############################################################################# |
Gareth Williams | b590389 | 2015-03-20 15:13:07 +0000 | [diff] [blame] | 281 | # Define ECM_DB_CONNECTION_CROSS_REFERENCING_ENABLE=y in order to enable |
| 282 | # the database to track relationships between objects. |
| 283 | # ############################################################################# |
| 284 | ECM_DB_CONNECTION_CROSS_REFERENCING_ENABLE=y |
| 285 | ccflags-$(ECM_DB_CONNECTION_CROSS_REFERENCING_ENABLE) += -DECM_DB_XREF_ENABLE |
| 286 | |
| 287 | # ############################################################################# |
Gareth Williams | 88be372 | 2015-03-23 19:51:01 +0000 | [diff] [blame] | 288 | # Define ECM_TRACKER_DPI_SUPPORT_ENABLE=y in order to enable support for |
| 289 | # deep packet inspection and tracking of data with the trackers. |
| 290 | # ############################################################################# |
| 291 | ECM_TRACKER_DPI_SUPPORT_ENABLE=y |
| 292 | ccflags-$(ECM_TRACKER_DPI_SUPPORT_ENABLE) += -DECM_TRACKER_DPI_SUPPORT_ENABLE |
| 293 | |
| 294 | # ############################################################################# |
Gareth Williams | b39e7c2 | 2015-03-25 10:15:33 +0000 | [diff] [blame] | 295 | # Define ECM_DB_CLASSIFIER_TYPE_ASSIGNMENTS_TRACK_ENABLE=y in order to enable |
| 296 | # support for the database keeping lists of connections that are assigned |
| 297 | # on a per TYPE of classifier basis. |
| 298 | # ############################################################################# |
| 299 | ECM_DB_CLASSIFIER_TYPE_ASSIGNMENTS_TRACK_ENABLE=y |
| 300 | ccflags-$(ECM_DB_CLASSIFIER_TYPE_ASSIGNMENTS_TRACK_ENABLE) += -DECM_DB_CTA_TRACK_ENABLE |
| 301 | |
| 302 | # ############################################################################# |
Murat Sezgin | 8c34582 | 2015-05-27 15:35:38 -0700 | [diff] [blame] | 303 | # Define ECM_BAND_STEERING_ENABLE=y in order to enable |
| 304 | # band steering feature. |
| 305 | # ############################################################################# |
| 306 | ECM_BAND_STEERING_ENABLE=y |
| 307 | ccflags-$(ECM_BAND_STEERING_ENABLE) += -DECM_BAND_STEERING_ENABLE |
| 308 | |
| 309 | # ############################################################################# |
Bhaskar Valaboju | 5120ad5 | 2018-01-05 13:56:12 +0530 | [diff] [blame] | 310 | # Define ECM_INTERFACE_OVPN_ENABLE=y in order |
| 311 | # to enable support for OVPN acceleration. |
| 312 | # ############################################################################# |
| 313 | ccflags-$(ECM_INTERFACE_OVPN_ENABLE) += -DECM_INTERFACE_OVPN_ENABLE |
| 314 | |
| 315 | # ############################################################################# |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 316 | # Debug flags, set these to = 0 if you want to disable all debugging for that |
| 317 | # file. |
| 318 | # By turning off debugs you gain maximum ECM performance. |
| 319 | # ############################################################################# |
Murat Sezgin | c725ad8 | 2016-04-13 17:12:50 -0700 | [diff] [blame] | 320 | ccflags-y += -DECM_CLASSIFIER_DEBUG_LEVEL=1 |
Murat Sezgin | f4f7ab4 | 2018-10-12 17:01:46 -0700 | [diff] [blame] | 321 | ccflags-y += -DECM_CLASSIFIER_MARK_DEBUG_LEVEL=1 |
Gareth Williams | 8932a91 | 2014-06-11 18:06:25 -0700 | [diff] [blame] | 322 | ccflags-y += -DECM_CLASSIFIER_DSCP_DEBUG_LEVEL=1 |
Ben Menchaca | 84f3663 | 2014-02-28 20:57:38 +0000 | [diff] [blame] | 323 | ccflags-y += -DECM_CLASSIFIER_HYFI_DEBUG_LEVEL=1 |
Gareth Williams | dcda9b9 | 2015-05-13 10:08:15 +0100 | [diff] [blame] | 324 | ccflags-y += -DECM_CLASSIFIER_PCC_DEBUG_LEVEL=1 |
Ben Menchaca | 84f3663 | 2014-02-28 20:57:38 +0000 | [diff] [blame] | 325 | ccflags-y += -DECM_CLASSIFIER_NL_DEBUG_LEVEL=1 |
| 326 | ccflags-y += -DECM_CLASSIFIER_DEFAULT_DEBUG_LEVEL=1 |
| 327 | ccflags-y += -DECM_DB_DEBUG_LEVEL=1 |
Murat Sezgin | 3ab259d | 2015-06-11 14:15:35 -0700 | [diff] [blame] | 328 | ccflags-y += -DECM_INIT_DEBUG_LEVEL=3 |
Ben Menchaca | 84f3663 | 2014-02-28 20:57:38 +0000 | [diff] [blame] | 329 | ccflags-y += -DECM_FRONT_END_IPV4_DEBUG_LEVEL=1 |
| 330 | ccflags-y += -DECM_FRONT_END_IPV6_DEBUG_LEVEL=1 |
Murat Sezgin | 5f13849 | 2015-06-11 15:18:27 -0700 | [diff] [blame] | 331 | ccflags-y += -DECM_FRONT_END_COMMON_DEBUG_LEVEL=1 |
Murat Sezgin | 3ab259d | 2015-06-11 14:15:35 -0700 | [diff] [blame] | 332 | ccflags-y += -DECM_NSS_IPV4_DEBUG_LEVEL=1 |
| 333 | ccflags-y += -DECM_NSS_PORTED_IPV4_DEBUG_LEVEL=1 |
| 334 | ccflags-y += -DECM_NSS_NON_PORTED_IPV4_DEBUG_LEVEL=1 |
| 335 | ccflags-y += -DECM_NSS_MULTICAST_IPV4_DEBUG_LEVEL=1 |
| 336 | ccflags-y += -DECM_NSS_IPV6_DEBUG_LEVEL=1 |
| 337 | ccflags-y += -DECM_NSS_PORTED_IPV6_DEBUG_LEVEL=1 |
| 338 | ccflags-y += -DECM_NSS_NON_PORTED_IPV6_DEBUG_LEVEL=1 |
| 339 | ccflags-y += -DECM_NSS_MULTICAST_IPV6_DEBUG_LEVEL=1 |
Xiaoping Fan | b939054 | 2015-07-20 18:15:21 -0700 | [diff] [blame] | 340 | ccflags-y += -DECM_SFE_IPV4_DEBUG_LEVEL=1 |
| 341 | ccflags-y += -DECM_SFE_PORTED_IPV4_DEBUG_LEVEL=1 |
| 342 | ccflags-y += -DECM_SFE_NON_PORTED_IPV4_DEBUG_LEVEL=1 |
| 343 | ccflags-y += -DECM_SFE_IPV6_DEBUG_LEVEL=1 |
| 344 | ccflags-y += -DECM_SFE_PORTED_IPV6_DEBUG_LEVEL=1 |
| 345 | ccflags-y += -DECM_SFE_NON_PORTED_IPV6_DEBUG_LEVEL=1 |
Ben Menchaca | 84f3663 | 2014-02-28 20:57:38 +0000 | [diff] [blame] | 346 | ccflags-y += -DECM_CONNTRACK_NOTIFIER_DEBUG_LEVEL=1 |
| 347 | ccflags-y += -DECM_TRACKER_DEBUG_LEVEL=1 |
| 348 | ccflags-y += -DECM_TRACKER_DATAGRAM_DEBUG_LEVEL=1 |
| 349 | ccflags-y += -DECM_TRACKER_TCP_DEBUG_LEVEL=1 |
| 350 | ccflags-y += -DECM_TRACKER_UDP_DEBUG_LEVEL=1 |
| 351 | ccflags-y += -DECM_BOND_NOTIFIER_DEBUG_LEVEL=1 |
| 352 | ccflags-y += -DECM_INTERFACE_DEBUG_LEVEL=1 |
Gareth Williams | f98d419 | 2015-03-11 16:55:41 +0000 | [diff] [blame] | 353 | ccflags-y += -DECM_STATE_DEBUG_LEVEL=1 |
Stephen Wang | aa7e5f7 | 2015-05-12 15:25:12 -0700 | [diff] [blame] | 354 | ccflags-y += -DECM_OPENWRT_SUPPORT=1 |
Hardik S. Panchal | 475a270 | 2019-03-29 11:52:31 +0530 | [diff] [blame] | 355 | ccflags-y += -DECM_NOTIFIER_DEBUG_LEVEL=1 |
Ben Menchaca | 84f3663 | 2014-02-28 20:57:38 +0000 | [diff] [blame] | 356 | |
Bhaskar Valaboju | 5120ad5 | 2018-01-05 13:56:12 +0530 | [diff] [blame] | 357 | ccflags-y += -I$(obj)/ -I$(obj)/ecm_db -I$(obj)/frontends/include -I$(obj)/frontends/nss -I$(obj)/frontends/sfe -I$(obj)/exports |
Gaurao Chaudhari | 57ce879 | 2019-01-28 13:34:26 -0800 | [diff] [blame] | 358 | ccflags-y += -Werror |
Murat Sezgin | 7c12aba | 2015-03-16 12:01:57 -0700 | [diff] [blame] | 359 | |
Ben Menchaca | 84f3663 | 2014-02-28 20:57:38 +0000 | [diff] [blame] | 360 | obj ?= . |