Ben Menchaca | 84f3663 | 2014-02-28 20:57:38 +0000 | [diff] [blame] | 1 | ########################################################################## |
Murat Sezgin | 6d8361e | 2015-01-21 11:32:06 -0800 | [diff] [blame] | 2 | # Copyright (c) 2014-2015, 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 | |
Hai Shalom | 81f4e20 | 2014-06-04 09:30:27 -0700 | [diff] [blame] | 21 | ecm-y := \ |
Nicolas Costa | f46c33b | 2014-05-15 10:02:00 -0500 | [diff] [blame] | 22 | ecm_tracker_udp.o \ |
| 23 | ecm_tracker_tcp.o \ |
| 24 | ecm_tracker_datagram.o \ |
| 25 | ecm_tracker.o \ |
Murat Sezgin | 8d916a1 | 2015-03-18 15:56:50 -0700 | [diff] [blame] | 26 | frontends/nss/ecm_nss_ipv4.o \ |
| 27 | frontends/nss/ecm_nss_ported_ipv4.o \ |
Nicolas Costa | f46c33b | 2014-05-15 10:02:00 -0500 | [diff] [blame] | 28 | ecm_db.o \ |
| 29 | ecm_classifier_default.o \ |
| 30 | ecm_conntrack_notifier.o \ |
| 31 | ecm_interface.o \ |
Nicolas Costa | f46c33b | 2014-05-15 10:02:00 -0500 | [diff] [blame] | 32 | ecm_init.o |
Ben Menchaca | 84f3663 | 2014-02-28 20:57:38 +0000 | [diff] [blame] | 33 | |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 34 | # ############################################################################# |
| 35 | # Define ECM_INTERFACE_BOND_ENABLE=y in order to enable |
| 36 | # Bonding / Link Aggregation support. |
| 37 | # ############################################################################# |
Murat Sezgin | 2a0b243 | 2014-11-26 14:53:57 -0800 | [diff] [blame] | 38 | ifneq ($(findstring 3.4, $(KERNELVERSION)),) |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 39 | ECM_INTERFACE_BOND_ENABLE=y |
| 40 | endif |
| 41 | ecm-$(ECM_INTERFACE_BOND_ENABLE) += ecm_bond_notifier.o |
| 42 | ccflags-$(ECM_INTERFACE_BOND_ENABLE) += -DECM_INTERFACE_BOND_ENABLE |
Hai Shalom | 81f4e20 | 2014-06-04 09:30:27 -0700 | [diff] [blame] | 43 | |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 44 | # ############################################################################# |
Gareth Williams | 141d238 | 2014-11-25 11:35:19 -0800 | [diff] [blame] | 45 | # Define ECM_INTERFACE_PPP_ENABLE=y in order |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 46 | # to enable support for PPP and, specifically, PPPoE acceleration. |
| 47 | # ############################################################################# |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 48 | ECM_INTERFACE_PPP_ENABLE=y |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 49 | ccflags-$(ECM_INTERFACE_PPP_ENABLE) += -DECM_INTERFACE_PPP_ENABLE |
| 50 | |
| 51 | # ############################################################################# |
Murat Sezgin | b3731e8 | 2014-11-26 12:20:59 -0800 | [diff] [blame] | 52 | # Define ECM_INTERFACE_SIT_ENABLE=y in order |
| 53 | # to enable support for SIT interface. |
| 54 | # ############################################################################# |
Murat Sezgin | 2a0b243 | 2014-11-26 14:53:57 -0800 | [diff] [blame] | 55 | ifneq ($(findstring 3.4, $(KERNELVERSION)),) |
Murat Sezgin | b3731e8 | 2014-11-26 12:20:59 -0800 | [diff] [blame] | 56 | ECM_INTERFACE_SIT_ENABLE=y |
| 57 | endif |
| 58 | ccflags-$(ECM_INTERFACE_SIT_ENABLE) += -DECM_INTERFACE_SIT_ENABLE |
| 59 | |
| 60 | # ############################################################################# |
Murat Sezgin | c140256 | 2015-03-12 12:32:20 -0700 | [diff] [blame] | 61 | # Define ECM_INTERFACE_TUNIPIP6_ENABLE=y in order |
| 62 | # to enable support for TUNIPIP6 interface. |
| 63 | # ############################################################################# |
| 64 | ifneq ($(findstring 3.4, $(KERNELVERSION)),) |
| 65 | ECM_INTERFACE_TUNIPIP6_ENABLE=y |
| 66 | endif |
| 67 | ccflags-$(ECM_INTERFACE_TUNIPIP6_ENABLE) += -DECM_INTERFACE_TUNIPIP6_ENABLE |
| 68 | |
| 69 | # ############################################################################# |
Gareth Williams | 141d238 | 2014-11-25 11:35:19 -0800 | [diff] [blame] | 70 | # Define ECM_INTERFACE_VLAN_ENABLE=y in order to enable support for VLAN |
| 71 | # ############################################################################# |
Gareth Williams | 141d238 | 2014-11-25 11:35:19 -0800 | [diff] [blame] | 72 | ECM_INTERFACE_VLAN_ENABLE=y |
Gareth Williams | 141d238 | 2014-11-25 11:35:19 -0800 | [diff] [blame] | 73 | ccflags-$(ECM_INTERFACE_VLAN_ENABLE) += -DECM_INTERFACE_VLAN_ENABLE |
| 74 | |
| 75 | # ############################################################################# |
Murat Sezgin | 69a2753 | 2015-03-12 14:09:40 -0700 | [diff] [blame] | 76 | # Define ECM_INTERFACE_IPSEC_ENABLE=y in order to enable support for IPSEC |
| 77 | # ############################################################################# |
| 78 | ECM_INTERFACE_IPSEC_ENABLE=y |
| 79 | ccflags-$(ECM_INTERFACE_IPSEC_ENABLE) += -DECM_INTERFACE_IPSEC_ENABLE |
| 80 | |
| 81 | # ############################################################################# |
Gareth Williams | 8ac3429 | 2015-03-17 14:06:58 +0000 | [diff] [blame^] | 82 | # 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] | 83 | # ############################################################################# |
Gareth Williams | 8ac3429 | 2015-03-17 14:06:58 +0000 | [diff] [blame^] | 84 | ECM_IPV6_ENABLE=y |
| 85 | ecm-$(ECM_IPV6_ENABLE) += frontends/nss/ecm_front_end_ipv6.o |
| 86 | ccflags-$(ECM_IPV6_ENABLE) += -DECM_IPV6_ENABLE |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 87 | |
| 88 | # ############################################################################# |
| 89 | # Define ECM_CLASSIFIER_NL_ENABLE=y in order to enable NL classifier. |
| 90 | # ############################################################################# |
Murat Sezgin | 2a0b243 | 2014-11-26 14:53:57 -0800 | [diff] [blame] | 91 | ifneq ($(findstring 3.4, $(KERNELVERSION)),) |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 92 | ECM_CLASSIFIER_NL_ENABLE=y |
| 93 | endif |
| 94 | ecm-$(ECM_CLASSIFIER_NL_ENABLE) += ecm_classifier_nl.o |
| 95 | ccflags-$(ECM_CLASSIFIER_NL_ENABLE) += -DECM_CLASSIFIER_NL_ENABLE |
| 96 | |
| 97 | # ############################################################################# |
| 98 | # Define ECM_CLASSIFIER_DSCP_ENABLE=y in order to enable DSCP classifier. |
| 99 | # ############################################################################# |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 100 | ECM_CLASSIFIER_DSCP_ENABLE=y |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 101 | ecm-$(ECM_CLASSIFIER_DSCP_ENABLE) += ecm_classifier_dscp.o |
| 102 | ccflags-$(ECM_CLASSIFIER_DSCP_ENABLE) += -DECM_CLASSIFIER_DSCP_ENABLE |
| 103 | |
| 104 | # ############################################################################# |
| 105 | # Define ECM_CLASSIFIER_HYFI_ENABLE=y in order to enable |
| 106 | # the Hy-Fi classifier in ECM. Currently disabled until the integration |
| 107 | # with Hy-Fi is completed. |
| 108 | # ############################################################################# |
| 109 | ecm-$(ECM_CLASSIFIER_HYFI_ENABLE) += ecm_classifier_hyfi.o |
| 110 | ccflags-$(ECM_CLASSIFIER_HYFI_ENABLE) += -DECM_CLASSIFIER_HYFI_ENABLE |
| 111 | |
| 112 | # ############################################################################# |
Murat Sezgin | 8d916a1 | 2015-03-18 15:56:50 -0700 | [diff] [blame] | 113 | # Define ECM_NON_PORTED_SUPPORT_ENABLE=y in order to enable non-ported protocol. |
| 114 | # ############################################################################# |
| 115 | ECM_NON_PORTED_SUPPORT_ENABLE=y |
| 116 | ecm-$(ECM_NON_PORTED_SUPPORT_ENABLE) += frontends/nss/ecm_nss_non_ported_ipv4.o |
| 117 | ccflags-$(ECM_NON_PORTED_SUPPORT_ENABLE) += -DECM_NON_PORTED_SUPPORT_ENABLE |
| 118 | |
Gareth Williams | f98d419 | 2015-03-11 16:55:41 +0000 | [diff] [blame] | 119 | # ############################################################################# |
| 120 | # Define ECM_STATE_OUTPUT_ENABLE=y to support XML state output |
| 121 | # ############################################################################# |
| 122 | ECM_STATE_OUTPUT_ENABLE=y |
| 123 | ecm-$(ECM_STATE_OUTPUT_ENABLE) += ecm_state.o |
| 124 | ccflags-$(ECM_STATE_OUTPUT_ENABLE) += -DECM_STATE_OUTPUT_ENABLE |
Murat Sezgin | 8d916a1 | 2015-03-18 15:56:50 -0700 | [diff] [blame] | 125 | |
| 126 | # ############################################################################# |
Gareth Williams | 85331c9 | 2015-03-11 20:39:18 +0000 | [diff] [blame] | 127 | # Define ECM_DB_ADVANCED_STATS_ENABLE to support XML state output |
| 128 | # ############################################################################# |
| 129 | ECM_DB_ADVANCED_STATS_ENABLE=y |
| 130 | ccflags-$(ECM_DB_ADVANCED_STATS_ENABLE) += -DECM_DB_ADVANCED_STATS_ENABLE |
| 131 | |
| 132 | # ############################################################################# |
Gareth Williams | dbb2bfd | 2014-11-20 16:42:09 -0800 | [diff] [blame] | 133 | # Debug flags, set these to = 0 if you want to disable all debugging for that |
| 134 | # file. |
| 135 | # By turning off debugs you gain maximum ECM performance. |
| 136 | # ############################################################################# |
Gareth Williams | 8932a91 | 2014-06-11 18:06:25 -0700 | [diff] [blame] | 137 | ccflags-y += -DECM_CLASSIFIER_DSCP_DEBUG_LEVEL=1 |
Ben Menchaca | 84f3663 | 2014-02-28 20:57:38 +0000 | [diff] [blame] | 138 | ccflags-y += -DECM_CLASSIFIER_HYFI_DEBUG_LEVEL=1 |
| 139 | ccflags-y += -DECM_CLASSIFIER_NL_DEBUG_LEVEL=1 |
| 140 | ccflags-y += -DECM_CLASSIFIER_DEFAULT_DEBUG_LEVEL=1 |
| 141 | ccflags-y += -DECM_DB_DEBUG_LEVEL=1 |
| 142 | ccflags-y += -DECM_FRONT_END_IPV4_DEBUG_LEVEL=1 |
| 143 | ccflags-y += -DECM_FRONT_END_IPV6_DEBUG_LEVEL=1 |
| 144 | ccflags-y += -DECM_CONNTRACK_NOTIFIER_DEBUG_LEVEL=1 |
| 145 | ccflags-y += -DECM_TRACKER_DEBUG_LEVEL=1 |
| 146 | ccflags-y += -DECM_TRACKER_DATAGRAM_DEBUG_LEVEL=1 |
| 147 | ccflags-y += -DECM_TRACKER_TCP_DEBUG_LEVEL=1 |
| 148 | ccflags-y += -DECM_TRACKER_UDP_DEBUG_LEVEL=1 |
| 149 | ccflags-y += -DECM_BOND_NOTIFIER_DEBUG_LEVEL=1 |
| 150 | ccflags-y += -DECM_INTERFACE_DEBUG_LEVEL=1 |
Gareth Williams | f98d419 | 2015-03-11 16:55:41 +0000 | [diff] [blame] | 151 | ccflags-y += -DECM_STATE_DEBUG_LEVEL=1 |
Ben Menchaca | 84f3663 | 2014-02-28 20:57:38 +0000 | [diff] [blame] | 152 | |
Gareth Williams | 85331c9 | 2015-03-11 20:39:18 +0000 | [diff] [blame] | 153 | ccflags-y += -DECM_NSS |
| 154 | |
Murat Sezgin | 8d916a1 | 2015-03-18 15:56:50 -0700 | [diff] [blame] | 155 | ccflags-y += -I$(obj)/ -I$(obj)/frontends/include -I$(obj)/frontends/nss |
Murat Sezgin | 7c12aba | 2015-03-16 12:01:57 -0700 | [diff] [blame] | 156 | |
Ben Menchaca | 84f3663 | 2014-02-28 20:57:38 +0000 | [diff] [blame] | 157 | obj ?= . |
| 158 | |