From d8cc6d95e62d5b704891f73f77c67df297a8f59a Mon Sep 17 00:00:00 2001 From: Xenofon Foukas <x.foukas@sms.ed.ac.uk> Date: Tue, 23 Feb 2016 10:47:08 +0000 Subject: [PATCH] Added support for control delegation and dynamic loading of libraries --- cmake_targets/CMakeLists.txt | 13 +++++++++---- .../ENB_APP/MESSAGES/V2/control_delegation.proto | 6 ++++++ openair2/ENB_APP/MESSAGES/V2/header.proto | 3 +++ openair2/ENB_APP/MESSAGES/V2/progran.proto | 13 +++++++++++++ 4 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 openair2/ENB_APP/MESSAGES/V2/control_delegation.proto diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 49d18c80f8..85a6f35339 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -796,6 +796,7 @@ if (ENB_AGENT_SB_IF) ${PRPT_MSG_DIR}/mac_primitives.proto ${PRPT_MSG_DIR}/config_messages.proto ${PRPT_MSG_DIR}/config_common.proto + ${PRPT_MSG_DIR}/control_delegation.proto ) set(PRPT_C_DIR ${protobuf_generated_dir}/${PRPTDIR}) @@ -812,6 +813,7 @@ if (ENB_AGENT_SB_IF) ${PRPT_C_DIR}/mac_primitives.pb-c.c ${PRPT_C_DIR}/config_messages.pb-c.c ${PRPT_C_DIR}/config_common.pb-c.c + ${PRPT_C_DIR}/control_delegation.pb-c.c ) file(GLOB prpt_h ${PRPT_C_DIR}/*.h) @@ -1109,6 +1111,9 @@ add_library(L2 ${ENB_APP_SRC} ${OPENAIR2_DIR}/RRC/L2_INTERFACE/openair_rrc_L2_interface.c) +#Test for adding a shared library +add_library(alt_sched SHARED ${MAC_DIR}/eNB_agent_scheduler_dlsch_ue_alt.c) + # L3 Libs ########################## @@ -1604,7 +1609,7 @@ target_link_libraries (lte-softmodem target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES}) -target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${option_HW_lib} ${option_TP_lib} ${XFORMS_LIBRARIES} ${PROTOBUF_LIB}) +target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${option_HW_lib} ${option_TP_lib} ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS}) target_link_libraries (lte-softmodem ${LIBBOOST_LIBRARIES}) target_link_libraries (lte-softmodem ${LIB_LMS_LIBRARIES}) @@ -1638,7 +1643,7 @@ target_link_libraries (lte-softmodem-nos1 -Wl,--end-group ) target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES}) -target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib} ${option_TP_lib} ${XFORMS_LIBRARIES} ${PROTOBUF_LIB}) +target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib} ${option_TP_lib} ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS}) target_link_libraries (lte-softmodem-nos1 ${LIBBOOST_LIBRARIES}) target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES}) @@ -1770,12 +1775,12 @@ add_executable(oaisim_nos1 target_include_directories(oaisim_nos1 PUBLIC ${OPENAIR_TARGETS}/SIMU/USER) target_link_libraries (oaisim_nos1 -Wl,--start-group - RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB} ${PRPT_MSG_LIB} ${ASYNC_IF_LIB} ${ENB_AGENT_LIB} + RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB} ${PRPT_MSG_LIB} ${ASYNC_IF_LIB} ${ENB_AGENT_LIB} -Wl,--end-group ) target_link_libraries (oaisim_nos1 ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES}) target_link_libraries (oaisim_nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib} ${option_TP_lib} - ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES} ${PROTOBUF_LIB}) + ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS}) #Force link with forms, regardless XFORMS option target_link_libraries (oaisim_nos1 forms) diff --git a/openair2/ENB_APP/MESSAGES/V2/control_delegation.proto b/openair2/ENB_APP/MESSAGES/V2/control_delegation.proto new file mode 100644 index 0000000000..c5ce58d3a2 --- /dev/null +++ b/openair2/ENB_APP/MESSAGES/V2/control_delegation.proto @@ -0,0 +1,6 @@ +//'syntax = "proto2";' +package protocol; + +enum prp_control_delegation_type { + PRCDT_MAC_DL_UE_SCHEDULER = 1; // DL UE scheduler delegation +} \ No newline at end of file diff --git a/openair2/ENB_APP/MESSAGES/V2/header.proto b/openair2/ENB_APP/MESSAGES/V2/header.proto index 8e6adb1fda..6ce9959104 100644 --- a/openair2/ENB_APP/MESSAGES/V2/header.proto +++ b/openair2/ENB_APP/MESSAGES/V2/header.proto @@ -35,5 +35,8 @@ enum prp_type { // UE state change messages PRPT_UE_STATE_CHANGE = 14; + + // Control delegation messages + PRPT_DELEGATE_CONTROL = 15; } diff --git a/openair2/ENB_APP/MESSAGES/V2/progran.proto b/openair2/ENB_APP/MESSAGES/V2/progran.proto index 44fffc7ead..6b7b784629 100644 --- a/openair2/ENB_APP/MESSAGES/V2/progran.proto +++ b/openair2/ENB_APP/MESSAGES/V2/progran.proto @@ -6,6 +6,7 @@ import "header.proto"; import "time_common.proto"; import "config_messages.proto"; import "controller_commands.proto"; +import "control_delegation.proto"; message progran_message { optional progran_direction msg_dir = 100; @@ -25,6 +26,7 @@ message progran_message { prp_lc_config_reply lc_config_reply_msg = 13; prp_dl_mac_config dl_mac_config_msg = 14; prp_ue_state_change ue_state_change_msg = 15; + prp_control_delegation control_delegation_msg = 16; } } @@ -170,6 +172,17 @@ message prp_ue_state_change { optional prp_ue_config config = 3; // Body of the message (based on type) } +// +// Control delegation message +// + +message prp_control_delegation { + optional prp_header header = 1; + optional uint32 delegation_type = 2; // Bitmap of PRCDT_* flags + optional bytes payload = 3; // Byte array of shared lib containing the delegated functions + repeated string name = 4; // The delegated functions names ordered based on bitmap flags +} + // Extensions of the echo request and reply // messages for carrying a latency value in ms message prp_echo_request_latency { -- GitLab