summaryrefslogtreecommitdiff
path: root/ipacm/inc
diff options
context:
space:
mode:
authorAshok Vuyyuru <avuyyuru@codeaurora.org>2018-11-13 01:33:58 -0800
committerAshok Vuyyuru <avuyyuru@codeaurora.org>2019-07-18 12:26:19 +0530
commit11f32918f835c65b4b084a161a5e1e65abca201c (patch)
tree08b6507db32f1f6c79b0ba9736801c6279e41720 /ipacm/inc
parentf71934d3123837969e04fa199c6b089be67f4496 (diff)
downloadipacfg-mgr-11f32918f835c65b4b084a161a5e1e65abca201c.tar.gz
ipacm: add dynamic support for ipa coalesce
For each modem PDN, add dynamic IPA coalesce enable/disable support on TCP/UDP connections. Change-Id: Icb75be29e250468ded7a8b36170f4732206e8d85
Diffstat (limited to 'ipacm/inc')
-rw-r--r--ipacm/inc/IPACM_Defs.h4
-rw-r--r--ipacm/inc/IPACM_Wan.h39
2 files changed, 42 insertions, 1 deletions
diff --git a/ipacm/inc/IPACM_Defs.h b/ipacm/inc/IPACM_Defs.h
index 6157d1f..65d5ce4 100644
--- a/ipacm/inc/IPACM_Defs.h
+++ b/ipacm/inc/IPACM_Defs.h
@@ -122,6 +122,7 @@ extern "C"
#define IPA_MAX_NUM_ETH_CLIENTS 15
#define IPA_MAX_NUM_AMPDU_RULE 15
#define IPA_MAC_ADDR_SIZE 6
+#define IPA_MAX_NUM_SW_PDNS 15
/*===========================================================================
GLOBAL DEFINITIONS AND DECLARATIONS
@@ -186,7 +187,8 @@ typedef enum
IPA_ETH_BRIDGE_CLIENT_ADD, /* ipacm_event_eth_bridge */
IPA_ETH_BRIDGE_CLIENT_DEL, /* ipacm_event_eth_bridge*/
IPA_ETH_BRIDGE_WLAN_SCC_MCC_SWITCH, /* ipacm_event_eth_bridge*/
- IPA_SSR_NOTICE, /* NULL*/
+ IPA_SSR_NOTICE, /* NULL*/
+ IPA_COALESCE_NOTICE, /* NULL*/
#ifdef FEATURE_L2TP
IPA_ADD_VLAN_IFACE, /* ipa_ioc_vlan_iface_info */
IPA_DEL_VLAN_IFACE, /* ipa_ioc_vlan_iface_info */
diff --git a/ipacm/inc/IPACM_Wan.h b/ipacm/inc/IPACM_Wan.h
index b9456c1..d66224a 100644
--- a/ipacm/inc/IPACM_Wan.h
+++ b/ipacm/inc/IPACM_Wan.h
@@ -89,6 +89,12 @@ typedef struct _ipa_wan_client
wan_client_rt_hdl wan_rt_hdl[0]; /* depends on number of tx properties */
}ipa_wan_client;
+typedef struct
+{
+ bool coalesce_tcp_enable;
+ bool coalesce_udp_enable;
+}ipacm_coalesce;
+
/* wan iface */
class IPACM_Wan : public IPACM_Iface
{
@@ -215,6 +221,32 @@ public:
return IPACM_SUCCESS;
}
#endif
+ static void coalesce_config(uint8_t qmap_id, bool tcp_enable, bool udp_enable)
+ {
+ if (qmap_id >= IPA_MAX_NUM_SW_PDNS)
+ {
+ IPACMERR("qmap_id (%d) beyond the Max range (%d), abort\n",
+ qmap_id, IPA_MAX_NUM_SW_PDNS);
+ return ;
+ }
+
+ IPACM_Wan::coalesce_enable_info[qmap_id].coalesce_tcp_enable = tcp_enable;
+ IPACM_Wan::coalesce_enable_info[qmap_id].coalesce_udp_enable = udp_enable;
+ IPACMDBG_H(" Updated qmap(%d) coalesce enable TCP:%d UDP:%d\n",
+ qmap_id,
+ IPACM_Wan::coalesce_enable_info[qmap_id].coalesce_tcp_enable,
+ IPACM_Wan::coalesce_enable_info[qmap_id].coalesce_udp_enable);
+ return ;
+ }
+
+ static void coalesce_config_reset()
+ {
+ int i;
+ /* reset coalesce settings on all modem interfaces */
+ for (i = 0; i < IPA_MAX_NUM_SW_PDNS; i++)
+ IPACM_Wan::coalesce_config(i, false, false);
+ return ;
+ }
static uint32_t getWANIP()
{
@@ -268,6 +300,9 @@ public:
}
#endif
+ /* indicate coalesce support on tcp or udp*/
+ static ipacm_coalesce coalesce_enable_info[IPA_MAX_NUM_SW_PDNS];
+
private:
bool is_ipv6_frag_firewall_flt_rule_installed;
@@ -298,6 +333,8 @@ private:
bool header_partial_default_wan_v6;
uint8_t ext_router_mac_addr[IPA_MAC_ADDR_SIZE];
uint8_t netdev_mac[IPA_MAC_ADDR_SIZE];
+ /* create additional set of v4 Coalesce RT-rules: tcp udp */
+ uint32_t dft_coalesce_rt_rule_hdl[2*MAX_DEFAULT_v4_ROUTE_RULES+ 2*MAX_DEFAULT_v6_ROUTE_RULES];
static int num_ipv4_modem_pdn;
@@ -583,6 +620,8 @@ private:
/* construct dummy ethernet header */
int add_dummy_rx_hdr();
+
+ int handle_coalesce_evt();
};
#endif /* IPACM_WAN_H */