From 4b950525189ab8972dc7c7374f4b0a1ee09d3b4b Mon Sep 17 00:00:00 2001
From: Lionel Gauthier <lionel.gauthier@eurecom.fr>
Date: Fri, 5 Jun 2015 14:49:14 +0000
Subject: [PATCH] change USE_PDCP_NETLINK_QUEUES to  PDCP_USE_NETLINK_QUEUES

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7539 818b1a75-f10b-46b9-bf7c-635c3b92a50f
---
 cmake_targets/CMakeLists.txt                  | 32 ++-----------------
 .../epc_build_oai/CMakeLists.template         |  1 -
 .../lte_noS1_build_oai/CMakeLists.txt         |  3 +-
 .../oaisim_mme_build_oai/CMakeLists.template  |  1 -
 .../SIMULATION/ETH_TRANSPORT/netlink_init.c   |  2 +-
 openair2/LAYER2/PDCP_v10.1.0/pdcp.h           |  2 +-
 openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c      |  4 +--
 openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c   |  2 +-
 targets/SIMU/USER/Makefile                    |  2 +-
 targets/SIMU/USER/oaisim_functions.c          |  2 +-
 10 files changed, 12 insertions(+), 39 deletions(-)

diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt
index df670f438..ebe5c5224 100644
--- a/cmake_targets/CMakeLists.txt
+++ b/cmake_targets/CMakeLists.txt
@@ -390,10 +390,6 @@ add_boolean_option(USER_MODE True "????")
 add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????")
 add_boolean_option(DISABLE_USE_NAS False "???")
 add_boolean_option(ENABLE_STANDALONE_EPC True "Compile MME, SGW and PGW in a single executable")
-add_boolean_option(ENABLE_USE_GTPU_IN_KERNEL True "as per name")
-add_boolean_option(ENABLE_USE_NETFILTER_FOR_SGI False "SGI option")
-add_boolean_option(ENABLE_USE_PCAP_FOR_SGI False "SGI option")
-add_boolean_option(ENABLE_USE_RAW_SOCKET_FOR_SGI False "As per name")
 add_boolean_option(EPC_BUILD False "???")
 add_boolean_option(LOWLATENCY  True "Use the Linux scheduler SCHED_DEADLINE: kernel >= 3.14")
 add_boolean_option(NAS_ADDRESS_FIX False "specific to oaisim: for nasmesh driver")
@@ -617,7 +613,6 @@ include_directories("${OPENAIRCN_DIR}/GTPV1-U/nw-gtpv1u/shared")
 include_directories("${OPENAIRCN_DIR}/GTPV1-U/nw-gtpv1u/include")
 include_directories("${OPENAIRCN_DIR}/SGW-LITE")
 include_directories("${OPENAIRCN_DIR}/MME_APP")
-include_directories("${OPENAIRCN_DIR}/SGI")
 include_directories("${OPENAIRCN_DIR}/S6A")
 include_directories("${OPENAIR_DIR}")
 
@@ -984,27 +979,6 @@ IPTVERSION=${IPTVERSION} -DIPTABLES_VERSION_STRING=\"${IPTABLES_VERSION_STRING}\
 
 
 
-set(SGI_DIR  ${OPENAIRCN_DIR}/SGI)
-set(SGI_SRC
-  ${SGI_DIR}/sgi_task.c
-  ${SGI_DIR}/sgi_socket.c
-  ${SGI_DIR}/sgi_egress.c
-  ${SGI_DIR}/sgi_util.c
-)
-if(ENABLE_USE_PCAP_FOR_SGI)
-  set(SGI_SRC ${SGI_SRC}
-    ${SGI_DIR}/sgi_pcap.c
-    )
-  set(SGI_option_lib ${SGI_option_lib} pcap)
-endif()
-if (ENABLE_USE_NETFILTER_FOR_SGI)
-  set(SGI_SRC ${SGI_SRC}
-    ${SGI_DIR}/sgi_nf.c
-    )
-  set(SGI_option_lib ${SGI_option_lib} netfilter_queue nfnetlink)
-endif()
-add_library(SGI ${SGI_SRC})
-
 set(SCTP_SRC
   ${OPENAIRCN_DIR}/SCTP/sctp_common.c
   ${OPENAIRCN_DIR}/SCTP/sctp_eNB_task.c
@@ -1512,7 +1486,7 @@ add_executable(mme_gw
   )
 target_link_libraries (mme_gw
   -Wl,--start-group
-   NAS S1AP_LIB S1AP_EPC GTPV1U GTPV2C SCTP_SERVER UDP_SERVER SECU_CN SECU_OSA SGI S6A SGW MME_APP LFDS ${ITTI_LIB} CN_UTILS HASHTABLE
+   NAS S1AP_LIB S1AP_EPC GTPV1U GTPV2C SCTP_SERVER UDP_SERVER SECU_CN SECU_OSA S6A SGW MME_APP LFDS ${ITTI_LIB} CN_UTILS HASHTABLE
   -Wl,--end-group
   pthread m sctp  rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore
   )
@@ -1601,7 +1575,7 @@ add_executable(oai_sgw
   )
 target_link_libraries (oai_sgw
   -Wl,--start-group
-  GTPV1U SECU_CN SECU_OSA SGI S6A SGW CN_UTILS LFDS ${ITTI_LIB}
+  GTPV1U SECU_CN SECU_OSA S6A SGW CN_UTILS LFDS ${ITTI_LIB}
   -Wl,--end-group
   pthread m sctp  rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore
   )
@@ -1773,7 +1747,7 @@ add_executable(oaisim_mme
 )
 target_link_libraries (oaisim_mme
   -Wl,--start-group
-   NAS S1AP_LIB S1AP_EPC GTPV1U GTPV2C SCTP_SERVER UDP_SERVER SECU_CN SECU_OSA SGI S6A S11 SGW MME_APP LFDS MSC ${ITTI_LIB} CN_UTILS HASHTABLE
+   NAS S1AP_LIB S1AP_EPC GTPV1U GTPV2C SCTP_SERVER UDP_SERVER SECU_CN SECU_OSA S6A S11 SGW MME_APP LFDS MSC ${ITTI_LIB} CN_UTILS HASHTABLE
   -Wl,--end-group
   pthread m sctp  rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore
 )
diff --git a/cmake_targets/epc_build_oai/CMakeLists.template b/cmake_targets/epc_build_oai/CMakeLists.template
index 14819cec3..b26a42445 100644
--- a/cmake_targets/epc_build_oai/CMakeLists.template
+++ b/cmake_targets/epc_build_oai/CMakeLists.template
@@ -17,7 +17,6 @@ set (  ENABLE_RAL False )
 set (  ENABLE_SECURITY False )
 set (  ENABLE_STANDALONE_EPC True )
 set (  ENABLE_USE_CPU_EXECUTION_TIME False )
-set (  ENABLE_USE_GTPU_IN_KERNEL True )
 set (  ENABLE_USE_MME False )
 set (  ENABLE_VCD_FIFO False )
 set (  ENB_MODE False )
diff --git a/cmake_targets/lte_noS1_build_oai/CMakeLists.txt b/cmake_targets/lte_noS1_build_oai/CMakeLists.txt
index c1ab6b0f8..f56d6c57c 100644
--- a/cmake_targets/lte_noS1_build_oai/CMakeLists.txt
+++ b/cmake_targets/lte_noS1_build_oai/CMakeLists.txt
@@ -3,10 +3,11 @@ set(XFORMS 1 )
 set(RRC_ASN1_VERSION "Rel10")
 set(ENABLE_VCD_FIFO False )
 set(RF_BOARD "OAI_USRP")
-set(NAS 1)
 set(ENABLE_ITTI False)
 set(ENABLE_USE_MME False)
 set(LINK_ENB_PDCP_TO_GTPV1U False)
+set(PDCP_USE_NETLINK True )
+set(PDCP_USE_NETLINK_QUEUES True)
 set(SECU False)
 set(NAS_UE False)
 set(PACKAGE_NAME "\"lte-softmodem\"")
diff --git a/cmake_targets/oaisim_mme_build_oai/CMakeLists.template b/cmake_targets/oaisim_mme_build_oai/CMakeLists.template
index 7a0f3c2d9..1035a2859 100644
--- a/cmake_targets/oaisim_mme_build_oai/CMakeLists.template
+++ b/cmake_targets/oaisim_mme_build_oai/CMakeLists.template
@@ -15,7 +15,6 @@ set (  ENABLE_RAL False )
 set (  ENABLE_SECURITY False )
 set (  ENABLE_STANDALONE_EPC False )
 set (  ENABLE_USE_CPU_EXECUTION_TIME False )
-set (  ENABLE_USE_GTPU_IN_KERNEL True )
 set (  ENABLE_USE_MME False )
 set (  ENABLE_USE_RAW_SOCKET_FOR_SGI True)
 set (  ENABLE_VCD_FIFO False )
diff --git a/openair1/SIMULATION/ETH_TRANSPORT/netlink_init.c b/openair1/SIMULATION/ETH_TRANSPORT/netlink_init.c
index bb1b9fcb0..aaa8e9c32 100644
--- a/openair1/SIMULATION/ETH_TRANSPORT/netlink_init.c
+++ b/openair1/SIMULATION/ETH_TRANSPORT/netlink_init.c
@@ -75,7 +75,7 @@ int netlink_init(void)
 
   printf("[NETLINK]Opened socket with fd %d\n",nas_sock_fd);
 
-#if !defined(USE_PDCP_NETLINK_QUEUES)
+#if !defined(PDCP_USE_NETLINK_QUEUES)
   ret = fcntl(nas_sock_fd,F_SETFL,O_NONBLOCK);
 
   if (ret == -1) {
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h
index 33d410c87..420f424bd 100755
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h
@@ -360,7 +360,7 @@ public_pdcp(int pdcp_module_init     (void);)
 public_pdcp(void pdcp_module_cleanup (void);)
 public_pdcp(void pdcp_layer_init     (void);)
 public_pdcp(void pdcp_layer_cleanup  (void);)
-#if defined(USE_PDCP_NETLINK_QUEUES)
+#if defined(PDCP_USE_NETLINK_QUEUES)
 public_pdcp(int pdcp_netlink_init    (void);)
 
 #endif
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
index 6064abaf7..87a52c5fa 100755
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
@@ -315,7 +315,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const  ctxt_pP)
   struct pdcp_netlink_element_s* data_p    = NULL;
   module_id_t                    ue_id     = 0;
   pdcp_t*                        pdcp_p    = NULL;
-# if defined(USE_PDCP_NETLINK_QUEUES)
+# if defined(PDCP_USE_NETLINK_QUEUES)
   rb_id_t                        rab_id    = 0;
 
   pdcp_transmission_mode_t       pdcp_mode = PDCP_TRANSMISSION_MODE_UNKNOWN;
@@ -428,7 +428,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const  ctxt_pP)
   }
 
   return 0;
-# else /* USE_PDCP_NETLINK_QUEUES*/
+# else /* PDCP_USE_NETLINK_QUEUES*/
   int              len = 1;
   rb_id_t          rab_id  = 0;
 
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c
index 2da31bda1..1119e1a16 100644
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c
@@ -76,7 +76,7 @@ extern struct iovec nas_iov_rx;
 extern int nas_sock_fd;
 extern struct msghdr nas_msg_rx;
 
-#if defined(USE_PDCP_NETLINK_QUEUES)
+#if defined(PDCP_USE_NETLINK_QUEUES)
 static pthread_t pdcp_netlink_thread;
 
 /* We use lock-free queues between the User-plane driver running in kernel-space
diff --git a/targets/SIMU/USER/Makefile b/targets/SIMU/USER/Makefile
index bc8ab6da5..7de5f9382 100644
--- a/targets/SIMU/USER/Makefile
+++ b/targets/SIMU/USER/Makefile
@@ -265,7 +265,7 @@ endif
 CFLAGS += -DENABLE_VCD_FIFO
 CFLAGS += -DENABLE_NEW_MULTICAST
 ifdef NAS
-CFLAGS += -DUSE_PDCP_NETLINK_QUEUES
+CFLAGS += -DPDCP_USE_NETLINK_QUEUES
 endif
 # CFLAGS += -DENABLE_LOG_FIFO
 
diff --git a/targets/SIMU/USER/oaisim_functions.c b/targets/SIMU/USER/oaisim_functions.c
index 7b10023be..55d95ebec 100644
--- a/targets/SIMU/USER/oaisim_functions.c
+++ b/targets/SIMU/USER/oaisim_functions.c
@@ -803,7 +803,7 @@ void check_and_adjust_params(void)
   NB_eNB_INST = oai_emulation.info.nb_enb_local + oai_emulation.info.nb_enb_remote;
   NB_RN_INST = oai_emulation.info.nb_rn_local + oai_emulation.info.nb_rn_remote;
 
-#if defined(USE_PDCP_NETLINK_QUEUES) && defined(OPENAIR2)
+#if defined(PDCP_USE_NETLINK_QUEUES) && defined(OPENAIR2)
   pdcp_netlink_init();
 #endif
 
-- 
GitLab