Skip to content

Commit

Permalink
santoni: Update data-ipa-cfg-mgr from LA.UM.9.6.2.r1-02500-89xx.0
Browse files Browse the repository at this point in the history
Signed-off-by: Jabiyeff <[email protected]>
  • Loading branch information
Jabiyeff authored and bikramdmbd committed Nov 18, 2020
1 parent 0dc6f5c commit 53eb9cc
Show file tree
Hide file tree
Showing 24 changed files with 1,208 additions and 1,203 deletions.
26 changes: 26 additions & 0 deletions data-ipa-cfg-mgr/hal/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
cc_library_shared {
name: "liboffloadhal",
srcs: [
"src/CtUpdateAmbassador.cpp",
"src/HAL.cpp",
"src/IpaEventRelay.cpp",
"src/LocalLogBuffer.cpp",
"src/OffloadStatistics.cpp",
"src/PrefixParser.cpp",
],

shared_libs: [
"libhidlbase",
"liblog",
"libcutils",
"libdl",
"libbase",
"libutils",
"libhardware_legacy",
"libhardware",
"[email protected]",
"[email protected]",
],
export_include_dirs: ["inc"],
vendor: true,
}
29 changes: 0 additions & 29 deletions data-ipa-cfg-mgr/hal/Android.mk

This file was deleted.

72 changes: 72 additions & 0 deletions data-ipa-cfg-mgr/ipacm/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@

cc_binary {
name: "ipacm",

local_include_dirs: ["src"] + ["inc"],
header_libs: ["generated_kernel_headers"],

cflags: ["-v"] + ["-DFEATURE_IPA_ANDROID"] + ["-DFEATURE_IPACM_RESTART"] + [
"-DFEATURE_IPACM_HAL",
"-DDEBUG",
"-Wall",
"-Werror",
"-Wno-error=macro-redefined",
],

srcs: [
"src/IPACM_Main.cpp",
"src/IPACM_EvtDispatcher.cpp",
"src/IPACM_Config.cpp",
"src/IPACM_CmdQueue.cpp",
"src/IPACM_Filtering.cpp",
"src/IPACM_Routing.cpp",
"src/IPACM_Header.cpp",
"src/IPACM_Lan.cpp",
"src/IPACM_Iface.cpp",
"src/IPACM_Wlan.cpp",
"src/IPACM_Wan.cpp",
"src/IPACM_IfaceManager.cpp",
"src/IPACM_Neighbor.cpp",
"src/IPACM_Netlink.cpp",
"src/IPACM_Xml.cpp",
"src/IPACM_Conntrack_NATApp.cpp",
"src/IPACM_ConntrackClient.cpp",
"src/IPACM_ConntrackListener.cpp",
"src/IPACM_Log.cpp",
"src/IPACM_OffloadManager.cpp",
"src/IPACM_LanToLan.cpp",
],

init_rc: ["src/ipacm.rc"],
clang: true,
vendor: true,

shared_libs: [
"liboffloadhal",
"libipanat",
"libxml2",
"libnfnetlink",
"libnetfilter_conntrack",
"libhidlbase",
"liblog",
"libcutils",
"libdl",
"libbase",
"libutils",
"libhardware_legacy",
"libhardware",
"[email protected]",
"[email protected]",
],
}

//###############################################################################

prebuilt_etc {
name: "IPACM_cfg.xml",

vendor: true,
owner: "ipacm",
src: "src/IPACM_cfg.xml",

}
4 changes: 4 additions & 0 deletions data-ipa-cfg-mgr/ipacm/inc/IPACM_Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ class IPACM_Config

enum ipa_hw_type GetIPAVer(bool get = false);

bool isEthBridgingSupported();

bool isIPAv3Supported();

int Init(void);

inline bool isPrivateSubnet(uint32_t ip_addr)
Expand Down
2 changes: 1 addition & 1 deletion data-ipa-cfg-mgr/ipacm/inc/IPACM_ConntrackListener.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class IPACM_ConntrackListener : public IPACM_Listener
void HandleSTAClientAddEvt(uint32_t);
void HandleSTAClientDelEvt(uint32_t);
int CreateConnTrackThreads(void);
void readConntrack(void);
void readConntrack(int fd);
void processConntrack(void);
};

Expand Down
4 changes: 0 additions & 4 deletions data-ipa-cfg-mgr/ipacm/inc/IPACM_Defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,7 @@ extern "C"
#define IPA_DEVICE_NAME "/dev/ipa"
#define MAX_NUM_PROP 2

#ifndef FEATURE_IPA_V3
#define IPA_MAX_FLT_RULE 50
#else
#define IPA_MAX_FLT_RULE 100
#endif

#define TCP_FIN_SHIFT 16
#define TCP_SYN_SHIFT 17
Expand Down
145 changes: 0 additions & 145 deletions data-ipa-cfg-mgr/ipacm/src/Android.mk

This file was deleted.

23 changes: 23 additions & 0 deletions data-ipa-cfg-mgr/ipacm/src/IPACM_Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -905,3 +905,26 @@ enum ipa_hw_type IPACM_Config::GetIPAVer(bool get)
IPACMDBG_H("IPA version is %d.\n", ver);
return ver;
}

bool IPACM_Config::isEthBridgingSupported()
{
enum ipa_hw_type hw_type;

hw_type = GetIPAVer();

#ifdef IPA_HW_v4_7
return ((hw_type >= IPA_HW_v4_5) &&
(hw_type != IPA_HW_v4_7));
#else
return (hw_type >= IPA_HW_v4_5);
#endif
}

bool IPACM_Config::isIPAv3Supported()
{
enum ipa_hw_type hw_type;

hw_type = GetIPAVer();

return (hw_type >= IPA_HW_v3_0);
}
11 changes: 0 additions & 11 deletions data-ipa-cfg-mgr/ipacm/src/IPACM_ConntrackClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,17 +421,6 @@ void* IPACM_ConntrackClient::TCPRegisterWithConnTrack(void *)
unsigned subscrips = 0;

IPACMDBG("\n");
/* In Android we get conntrack handles once after tethering is enabled but we
loose connections info for embedded traffic if running before. So no NAT
entries are added for embedded traffic due to which we see NAT exception and
data takes S/W path which results in less throughput. Hence for embedded
traffic info, framework sends conntrack dump before providing handles. Here
reading ct entries before creating filter on Fd in order to have NAT entries
for both TCP/UDP embedded traffic. */
if(CtList != NULL && !CtList->isReadCTDone)
{
CtList->readConntrack();
}

pClient = IPACM_ConntrackClient::GetInstance();
if(pClient == NULL)
Expand Down
Loading

0 comments on commit 53eb9cc

Please sign in to comment.