make build test work after the removal of RAL, MIH (802.21), minor coding guidelines corrections in RLCs
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7753 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -545,7 +545,7 @@ add_boolean_option(RRC_DEFAULT_RAB_IS_AM False "Otherwise it is UM, confi
|
|||||||
# SPECIFIC OPTIONS
|
# SPECIFIC OPTIONS
|
||||||
##########################
|
##########################
|
||||||
add_boolean_option(SPECTRA False "???")
|
add_boolean_option(SPECTRA False "???")
|
||||||
add_boolean_option(MIH_C_MEDIEVAL_EXTENSIONS True "EXTENSIONS TO MIH 802.21 IN CONTEXT OF IST PROJECT CALLED MEDIEVAL")
|
add_boolean_option(MIH_C_MEDIEVAL_EXTENSIONS False "EXTENSIONS TO MIH 802.21 IN CONTEXT OF IST PROJECT CALLED MEDIEVAL")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -646,7 +646,8 @@ include_directories(${OPENAIR_DIR}/common/utils/collection/hashtable)
|
|||||||
if (MESSAGE_CHART_GENERATOR)
|
if (MESSAGE_CHART_GENERATOR)
|
||||||
add_library(MSC
|
add_library(MSC
|
||||||
${OPENAIR_DIR}/common/utils/msc/msc.c
|
${OPENAIR_DIR}/common/utils/msc/msc.c
|
||||||
)
|
)
|
||||||
|
set(MSC_LIB MSC)
|
||||||
endif()
|
endif()
|
||||||
include_directories(${OPENAIR_DIR}/common/utils/msc)
|
include_directories(${OPENAIR_DIR}/common/utils/msc)
|
||||||
|
|
||||||
@@ -1560,17 +1561,11 @@ add_executable(lte-softmodem
|
|||||||
${XFORMS_SOURCE_SOFTMODEM}
|
${XFORMS_SOURCE_SOFTMODEM}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (MESSAGE_CHART_GENERATOR)
|
|
||||||
target_link_libraries (lte-softmodem
|
target_link_libraries (lte-softmodem
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS MSC L2 ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${MIH_LIB}
|
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${MIH_LIB}
|
||||||
-Wl,--end-group )
|
-Wl,--end-group )
|
||||||
else (MESSAGE_CHART_GENERATOR)
|
|
||||||
target_link_libraries (lte-softmodem
|
|
||||||
-Wl,--start-group
|
|
||||||
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${MIH_LIB}
|
|
||||||
-Wl,--end-group )
|
|
||||||
endif(MESSAGE_CHART_GENERATOR)
|
|
||||||
|
|
||||||
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES})
|
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} ${XFORMS_LIBRARIES} )
|
target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${option_HW_lib} ${XFORMS_LIBRARIES} )
|
||||||
@@ -1598,17 +1593,11 @@ add_executable(lte-softmodem-nos1
|
|||||||
${XFORMS_SOURCE}
|
${XFORMS_SOURCE}
|
||||||
${XFORMS_SOURCE_SOFTMODEM}
|
${XFORMS_SOURCE_SOFTMODEM}
|
||||||
)
|
)
|
||||||
if (MESSAGE_CHART_GENERATOR)
|
|
||||||
target_link_libraries (lte-softmodem-nos1
|
target_link_libraries (lte-softmodem-nos1
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_LIB PHY LFDS MSC L2 ${RAL_LIB} ${ITTI_LIB} ${MIH_LIB}
|
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${ITTI_LIB} ${MIH_LIB}
|
||||||
-Wl,--end-group )
|
-Wl,--end-group )
|
||||||
else (MESSAGE_CHART_GENERATOR)
|
|
||||||
target_link_libraries (lte-softmodem-nos1
|
|
||||||
-Wl,--start-group
|
|
||||||
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_LIB PHY LFDS L2 ${RAL_LIB} ${ITTI_LIB} ${MIH_LIB}
|
|
||||||
-Wl,--end-group )
|
|
||||||
endif(MESSAGE_CHART_GENERATOR)
|
|
||||||
target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES})
|
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} ${XFORMS_LIBRARIES} )
|
target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib} ${XFORMS_LIBRARIES} )
|
||||||
target_link_libraries (lte-softmodem-nos1 ${LIBBOOST_LIBRARIES})
|
target_link_libraries (lte-softmodem-nos1 ${LIBBOOST_LIBRARIES})
|
||||||
@@ -1625,21 +1614,13 @@ add_executable(mme_gw
|
|||||||
${OPENAIRCN_DIR}/SCTP/sctp_primitives_server.c
|
${OPENAIRCN_DIR}/SCTP/sctp_primitives_server.c
|
||||||
${OPENAIRCN_DIR}/NAS/MME/nas_mme_task.c
|
${OPENAIRCN_DIR}/NAS/MME/nas_mme_task.c
|
||||||
)
|
)
|
||||||
if (MESSAGE_CHART_GENERATOR)
|
|
||||||
target_link_libraries (mme_gw
|
target_link_libraries (mme_gw
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
LIB_NAS_MME S1AP_LIB S1AP_EPC GTPV1U GTPV2C SCTP_SERVER UDP_SERVER SECU_CN SECU_OSA S6A SGW MME_APP LFDS MSC ${ITTI_LIB} CN_UTILS HASHTABLE
|
LIB_NAS_MME S1AP_LIB S1AP_EPC GTPV1U GTPV2C SCTP_SERVER UDP_SERVER SECU_CN SECU_OSA S6A SGW MME_APP LFDS ${MSC_LIB} ${ITTI_LIB} CN_UTILS HASHTABLE
|
||||||
-Wl,--end-group
|
-Wl,--end-group
|
||||||
pthread m sctp rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore
|
pthread m sctp rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore
|
||||||
)
|
)
|
||||||
else (MESSAGE_CHART_GENERATOR)
|
|
||||||
target_link_libraries (mme_gw
|
|
||||||
-Wl,--start-group
|
|
||||||
LIB_NAS_MME 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
|
|
||||||
)
|
|
||||||
endif(MESSAGE_CHART_GENERATOR)
|
|
||||||
|
|
||||||
# Default parameters
|
# Default parameters
|
||||||
# Does not work on simple install (fqdn in /etc/hosts 127.0.1.1)
|
# Does not work on simple install (fqdn in /etc/hosts 127.0.1.1)
|
||||||
@@ -1720,21 +1701,13 @@ add_executable(oai_sgw
|
|||||||
${OPENAIRCN_DIR}/OAI_SGW/oai_sgw_log.c
|
${OPENAIRCN_DIR}/OAI_SGW/oai_sgw_log.c
|
||||||
${OPENAIRCN_DIR}/OAI_SGW/oai_sgw.c
|
${OPENAIRCN_DIR}/OAI_SGW/oai_sgw.c
|
||||||
)
|
)
|
||||||
if (MESSAGE_CHART_GENERATOR)
|
|
||||||
target_link_libraries (oai_sgw
|
target_link_libraries (oai_sgw
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
GTPV1U SECU_CN SECU_OSA S6A SGW CN_UTILS LFDS MSC ${ITTI_LIB}
|
GTPV1U SECU_CN SECU_OSA S6A SGW CN_UTILS LFDS ${MSC_LIB} ${ITTI_LIB}
|
||||||
-Wl,--end-group
|
-Wl,--end-group
|
||||||
pthread m sctp rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore
|
pthread m sctp rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore
|
||||||
)
|
)
|
||||||
else (MESSAGE_CHART_GENERATOR)
|
|
||||||
target_link_libraries (oai_sgw
|
|
||||||
-Wl,--start-group
|
|
||||||
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
|
|
||||||
)
|
|
||||||
endif(MESSAGE_CHART_GENERATOR)
|
|
||||||
|
|
||||||
|
|
||||||
# rrh
|
# rrh
|
||||||
@@ -1814,18 +1787,14 @@ add_executable(oaisim
|
|||||||
${HW_SOURCE}
|
${HW_SOURCE}
|
||||||
${XFORMS_SOURCE}
|
${XFORMS_SOURCE}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
target_include_directories(oaisim PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
|
target_include_directories(oaisim PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
|
||||||
if (MESSAGE_CHART_GENERATOR)
|
|
||||||
target_link_libraries (oaisim
|
target_link_libraries (oaisim
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS MSC L2 ${RAL_LIB} LIB_NAS_UE SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB}
|
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} LIB_NAS_UE SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB}
|
||||||
-Wl,--end-group )
|
-Wl,--end-group )
|
||||||
else(MESSAGE_CHART_GENERATOR)
|
|
||||||
target_link_libraries (oaisim
|
|
||||||
-Wl,--start-group
|
|
||||||
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${RAL_LIB} LIB_NAS_UE SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB}
|
|
||||||
-Wl,--end-group )
|
|
||||||
endif(MESSAGE_CHART_GENERATOR)
|
|
||||||
target_link_libraries (oaisim ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES})
|
target_link_libraries (oaisim ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES})
|
||||||
target_link_libraries (oaisim pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${option_HW_lib}
|
target_link_libraries (oaisim pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${option_HW_lib}
|
||||||
${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES})
|
${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES})
|
||||||
@@ -1856,17 +1825,11 @@ add_executable(oaisim_nos1
|
|||||||
${XFORMS_SOURCE}
|
${XFORMS_SOURCE}
|
||||||
)
|
)
|
||||||
target_include_directories(oaisim_nos1 PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
|
target_include_directories(oaisim_nos1 PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
|
||||||
if (MESSAGE_CHART_GENERATOR)
|
|
||||||
target_link_libraries (oaisim_nos1
|
target_link_libraries (oaisim_nos1
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
RRC_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS MSC L2 ${RAL_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB}
|
RRC_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB}
|
||||||
-Wl,--end-group )
|
-Wl,--end-group )
|
||||||
else(MESSAGE_CHART_GENERATOR)
|
|
||||||
target_link_libraries (oaisim_nos1
|
|
||||||
-Wl,--start-group
|
|
||||||
RRC_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS L2 ${RAL_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB}
|
|
||||||
-Wl,--end-group )
|
|
||||||
endif(MESSAGE_CHART_GENERATOR)
|
|
||||||
target_link_libraries (oaisim_nos1 ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES})
|
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}
|
target_link_libraries (oaisim_nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib}
|
||||||
${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES})
|
${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES})
|
||||||
|
|||||||
@@ -82,13 +82,13 @@ test_compile \
|
|||||||
test.0108 oaisim \
|
test.0108 oaisim \
|
||||||
oaisim $tdir/bin/oaisim.r10.itti rel10.itti
|
oaisim $tdir/bin/oaisim.r10.itti rel10.itti
|
||||||
|
|
||||||
test_compile \
|
#test_compile \ LG: RAL REMOVED
|
||||||
test.0114 oaisim \
|
# test.0114 oaisim \
|
||||||
oaisim $tdir/bin/oaisim.r8.itti.ral rel8.itti.ral
|
# oaisim $tdir/bin/oaisim.r8.itti.ral rel8.itti.ral
|
||||||
|
|
||||||
test_compile \
|
#test_compile \ LG: RAL REMOVED
|
||||||
test.0115 oaisim \
|
# test.0115 oaisim \
|
||||||
oaisim $tdir/bin/oaisim.r10.itti.ral rel10.itti.ral
|
# oaisim $tdir/bin/oaisim.r10.itti.ral rel10.itti.ral
|
||||||
|
|
||||||
test_compile \
|
test_compile \
|
||||||
test.0120 nasmesh \
|
test.0120 nasmesh \
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ set ( MAX_NUM_CCs 1 )
|
|||||||
set ( MESSAGE_CHART_GENERATOR False )
|
set ( MESSAGE_CHART_GENERATOR False )
|
||||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||||
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
|
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||||
set ( MSG_PRINT False )
|
set ( MSG_PRINT False )
|
||||||
set ( MU_RECEIVER False )
|
set ( MU_RECEIVER False )
|
||||||
set ( NAS_ADDRESS_FIX False )
|
set ( NAS_ADDRESS_FIX False )
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ set ( MAX_NUM_CCs 1 )
|
|||||||
set ( MESSAGE_CHART_GENERATOR False )
|
set ( MESSAGE_CHART_GENERATOR False )
|
||||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||||
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
|
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||||
set ( MSG_PRINT False )
|
set ( MSG_PRINT False )
|
||||||
set ( MU_RECEIVER False )
|
set ( MU_RECEIVER False )
|
||||||
set ( NAS_ADDRESS_FIX False )
|
set ( NAS_ADDRESS_FIX False )
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ set ( MAX_NUM_CCs 1 )
|
|||||||
set ( MESSAGE_CHART_GENERATOR False )
|
set ( MESSAGE_CHART_GENERATOR False )
|
||||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||||
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
|
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||||
set ( MSG_PRINT False )
|
set ( MSG_PRINT False )
|
||||||
set ( MU_RECEIVER False )
|
set ( MU_RECEIVER False )
|
||||||
set ( NAS_ADDRESS_FIX False )
|
set ( NAS_ADDRESS_FIX False )
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ set ( MAX_NUM_CCs 1 )
|
|||||||
set ( MESSAGE_CHART_GENERATOR False )
|
set ( MESSAGE_CHART_GENERATOR False )
|
||||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||||
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
|
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||||
set ( MSG_PRINT False )
|
set ( MSG_PRINT False )
|
||||||
set ( MU_RECEIVER False )
|
set ( MU_RECEIVER False )
|
||||||
set ( NAS_ADDRESS_FIX False )
|
set ( NAS_ADDRESS_FIX False )
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ set ( MAX_NUM_CCs 1 )
|
|||||||
set ( MESSAGE_CHART_GENERATOR False )
|
set ( MESSAGE_CHART_GENERATOR False )
|
||||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||||
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
|
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||||
set ( MSG_PRINT False )
|
set ( MSG_PRINT False )
|
||||||
set ( MU_RECEIVER False )
|
set ( MU_RECEIVER False )
|
||||||
set ( NAS_ADDRESS_FIX False )
|
set ( NAS_ADDRESS_FIX False )
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ set ( MAX_NUM_CCs 1 )
|
|||||||
set ( MESSAGE_CHART_GENERATOR False )
|
set ( MESSAGE_CHART_GENERATOR False )
|
||||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||||
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
|
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||||
set ( MSG_PRINT False )
|
set ( MSG_PRINT False )
|
||||||
set ( MU_RECEIVER False )
|
set ( MU_RECEIVER False )
|
||||||
set ( NAS_ADDRESS_FIX False )
|
set ( NAS_ADDRESS_FIX False )
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ set(MAX_NUM_CCs 1)
|
|||||||
set(MESSAGE_CHART_GENERATOR False )
|
set(MESSAGE_CHART_GENERATOR False )
|
||||||
set(MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
set(MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||||
set(MESSAGE_CHART_GENERATOR_PHY False )
|
set(MESSAGE_CHART_GENERATOR_PHY False )
|
||||||
set(MIH_C_MEDIEVAL_EXTENSIONS True)
|
set(MIH_C_MEDIEVAL_EXTENSIONS False)
|
||||||
set(MSG_PRINT False)
|
set(MSG_PRINT False)
|
||||||
set(MU_RECEIVER False)
|
set(MU_RECEIVER False)
|
||||||
set(NAS_ADDRESS_FIX true)
|
set(NAS_ADDRESS_FIX true)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ set ( MAX_NUM_CCs 1 )
|
|||||||
set ( MESSAGE_CHART_GENERATOR False )
|
set ( MESSAGE_CHART_GENERATOR False )
|
||||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||||
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
|
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||||
set ( MSG_PRINT False )
|
set ( MSG_PRINT False )
|
||||||
set ( MU_RECEIVER False )
|
set ( MU_RECEIVER False )
|
||||||
set ( NAS_ADDRESS_FIX False )
|
set ( NAS_ADDRESS_FIX False )
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ set(MAX_NUM_CCs 1)
|
|||||||
set(MESSAGE_CHART_GENERATOR False)
|
set(MESSAGE_CHART_GENERATOR False)
|
||||||
set(MESSAGE_CHART_GENERATOR_RLC_MAC False)
|
set(MESSAGE_CHART_GENERATOR_RLC_MAC False)
|
||||||
set(MESSAGE_CHART_GENERATOR_PHY False)
|
set(MESSAGE_CHART_GENERATOR_PHY False)
|
||||||
set(MIH_C_MEDIEVAL_EXTENSIONS True)
|
set(MIH_C_MEDIEVAL_EXTENSIONS False)
|
||||||
set(MSG_PRINT False)
|
set(MSG_PRINT False)
|
||||||
set(MU_RECEIVER False)
|
set(MU_RECEIVER False)
|
||||||
set(NAS_ADDRESS_FIX true)
|
set(NAS_ADDRESS_FIX true)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ set(ENABLE_ITTI True)
|
|||||||
set(ENABLE_NAS_UE_LOGGING False)
|
set(ENABLE_NAS_UE_LOGGING False)
|
||||||
set(ENABLE_NEW_MULTICAST True)
|
set(ENABLE_NEW_MULTICAST True)
|
||||||
set(ENABLE_PGM_TRANSPORT True)
|
set(ENABLE_PGM_TRANSPORT True)
|
||||||
set(ENABLE_RAL True)
|
set(ENABLE_RAL False)
|
||||||
set(ENABLE_SECURITY False)
|
set(ENABLE_SECURITY False)
|
||||||
set(ENABLE_USE_CPU_EXECUTION_TIME True)
|
set(ENABLE_USE_CPU_EXECUTION_TIME True)
|
||||||
set(ENABLE_USE_MME False)
|
set(ENABLE_USE_MME False)
|
||||||
@@ -25,7 +25,7 @@ set(LOG_NO_THREAD True)
|
|||||||
set(LOWLATENCY False)
|
set(LOWLATENCY False)
|
||||||
set(MAC_CONTEXT 1)
|
set(MAC_CONTEXT 1)
|
||||||
set(MAX_NUM_CCs 1)
|
set(MAX_NUM_CCs 1)
|
||||||
set(MIH_C_MEDIEVAL_EXTENSIONS True)
|
set(MIH_C_MEDIEVAL_EXTENSIONS False)
|
||||||
set(MSG_PRINT False)
|
set(MSG_PRINT False)
|
||||||
set(MU_RECEIVER False)
|
set(MU_RECEIVER False)
|
||||||
set(NAS_ADDRESS_FIX true)
|
set(NAS_ADDRESS_FIX true)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ set ( ENABLE_ITTI True )
|
|||||||
set ( ENABLE_NAS_UE_LOGGING False )
|
set ( ENABLE_NAS_UE_LOGGING False )
|
||||||
set ( ENABLE_NEW_MULTICAST True )
|
set ( ENABLE_NEW_MULTICAST True )
|
||||||
set ( ENABLE_PGM_TRANSPORT True )
|
set ( ENABLE_PGM_TRANSPORT True )
|
||||||
set ( ENABLE_RAL True )
|
set ( ENABLE_RAL False )
|
||||||
set ( ENABLE_SECURITY False )
|
set ( ENABLE_SECURITY False )
|
||||||
set ( ENABLE_STANDALONE_EPC False )
|
set ( ENABLE_STANDALONE_EPC False )
|
||||||
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
||||||
@@ -34,7 +34,7 @@ set ( MAX_NUM_CCs 1 )
|
|||||||
set ( MESSAGE_CHART_GENERATOR False )
|
set ( MESSAGE_CHART_GENERATOR False )
|
||||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||||
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
|
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||||
set ( MSG_PRINT False )
|
set ( MSG_PRINT False )
|
||||||
set ( MU_RECEIVER False )
|
set ( MU_RECEIVER False )
|
||||||
set ( NAS_ADDRESS_FIX False )
|
set ( NAS_ADDRESS_FIX False )
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ set ( MAX_NUM_CCs 1 )
|
|||||||
set ( MESSAGE_CHART_GENERATOR False )
|
set ( MESSAGE_CHART_GENERATOR False )
|
||||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||||
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
|
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||||
set ( MSG_PRINT False )
|
set ( MSG_PRINT False )
|
||||||
set ( MU_RECEIVER False )
|
set ( MU_RECEIVER False )
|
||||||
set ( NAS_ADDRESS_FIX False )
|
set ( NAS_ADDRESS_FIX False )
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
#define INTERTASK_INTERFACE_TYPES_H_
|
#define INTERTASK_INTERFACE_TYPES_H_
|
||||||
|
|
||||||
#include "itti_types.h"
|
#include "itti_types.h"
|
||||||
|
#include "platform_types.h"
|
||||||
|
|
||||||
/* Defines to handle bit fields on unsigned long values */
|
/* Defines to handle bit fields on unsigned long values */
|
||||||
#define UL_BIT_MASK(lENGTH) ((1UL << (lENGTH)) - 1UL)
|
#define UL_BIT_MASK(lENGTH) ((1UL << (lENGTH)) - 1UL)
|
||||||
|
|||||||
@@ -362,7 +362,7 @@ void msc_flush_messages(void)
|
|||||||
int rv;
|
int rv;
|
||||||
msc_queue_item_t *item_p = NULL;
|
msc_queue_item_t *item_p = NULL;
|
||||||
|
|
||||||
while ((rv = lfds611_queue_dequeue( g_msc_message_queue_p, &item_p )) == 1) {
|
while ((rv = lfds611_queue_dequeue( g_msc_message_queue_p, (void**)&item_p )) == 1) {
|
||||||
if (NULL != item_p->message_str) {
|
if (NULL != item_p->message_str) {
|
||||||
fputs(item_p->message_str, g_msc_fd);
|
fputs(item_p->message_str, g_msc_fd);
|
||||||
// TODO BIN DATA
|
// TODO BIN DATA
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ typedef enum {
|
|||||||
#if defined(MESSAGE_CHART_GENERATOR)
|
#if defined(MESSAGE_CHART_GENERATOR)
|
||||||
int msc_init(const msc_env_t envP, const int max_threadsP);
|
int msc_init(const msc_env_t envP, const int max_threadsP);
|
||||||
void msc_start_use(void);
|
void msc_start_use(void);
|
||||||
|
void msc_flush_messages(void);
|
||||||
void msc_end(void);
|
void msc_end(void);
|
||||||
void msc_log_declare_proto(const msc_proto_t protoP);
|
void msc_log_declare_proto(const msc_proto_t protoP);
|
||||||
void msc_log_event(const msc_proto_t protoP,char *format, ...);
|
void msc_log_event(const msc_proto_t protoP,char *format, ...);
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "hashtable.h"
|
#include "hashtable.h"
|
||||||
|
#include "asn1_constants.h"
|
||||||
|
|
||||||
#ifndef GTPV1U_ENB_DEFS_H_
|
#ifndef GTPV1U_ENB_DEFS_H_
|
||||||
#define GTPV1U_ENB_DEFS_H_
|
#define GTPV1U_ENB_DEFS_H_
|
||||||
|
|||||||
@@ -38,7 +38,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "assertions.h"
|
|
||||||
#include "conversions.h"
|
#include "conversions.h"
|
||||||
|
|
||||||
#include "intertask_interface.h"
|
#include "intertask_interface.h"
|
||||||
|
|||||||
+4
-4
@@ -51,7 +51,7 @@
|
|||||||
# define msg mexPrintf
|
# define msg mexPrintf
|
||||||
#else
|
#else
|
||||||
# ifdef OPENAIR2
|
# ifdef OPENAIR2
|
||||||
# if defined(ENABLE_RAL)
|
# if ENABLE_RAL
|
||||||
# include "collection/hashtable/hashtable.h"
|
# include "collection/hashtable/hashtable.h"
|
||||||
# include "COMMON/ral_messages_types.h"
|
# include "COMMON/ral_messages_types.h"
|
||||||
# include "UTIL/queue.h"
|
# include "UTIL/queue.h"
|
||||||
@@ -145,7 +145,7 @@ typedef struct UE_SCAN_INFO_s {
|
|||||||
int32_t freq_offset_Hz[3][10];
|
int32_t freq_offset_Hz[3][10];
|
||||||
} UE_SCAN_INFO_t;
|
} UE_SCAN_INFO_t;
|
||||||
|
|
||||||
#if defined(ENABLE_RAL)
|
#if ENABLE_RAL
|
||||||
typedef struct ral_threshold_phy_s {
|
typedef struct ral_threshold_phy_s {
|
||||||
SLIST_ENTRY(ral_threshold_phy_s) ral_thresholds;
|
SLIST_ENTRY(ral_threshold_phy_s) ral_thresholds;
|
||||||
ral_threshold_t threshold;
|
ral_threshold_t threshold;
|
||||||
@@ -368,7 +368,7 @@ typedef struct PHY_VARS_eNB_s {
|
|||||||
time_stats_t localization_stats;
|
time_stats_t localization_stats;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ENABLE_RAL)
|
#if ENABLE_RAL
|
||||||
hash_table_t *ral_thresholds_timed;
|
hash_table_t *ral_thresholds_timed;
|
||||||
SLIST_HEAD(ral_thresholds_gen_poll_enb_s, ral_threshold_phy_t) ral_thresholds_gen_polled[RAL_LINK_PARAM_GEN_MAX];
|
SLIST_HEAD(ral_thresholds_gen_poll_enb_s, ral_threshold_phy_t) ral_thresholds_gen_polled[RAL_LINK_PARAM_GEN_MAX];
|
||||||
SLIST_HEAD(ral_thresholds_lte_poll_enb_s, ral_threshold_phy_t) ral_thresholds_lte_polled[RAL_LINK_PARAM_LTE_MAX];
|
SLIST_HEAD(ral_thresholds_lte_poll_enb_s, ral_threshold_phy_t) ral_thresholds_lte_polled[RAL_LINK_PARAM_LTE_MAX];
|
||||||
@@ -644,7 +644,7 @@ typedef struct {
|
|||||||
time_stats_t dlsch_tc_intl2_stats;
|
time_stats_t dlsch_tc_intl2_stats;
|
||||||
time_stats_t tx_prach;
|
time_stats_t tx_prach;
|
||||||
|
|
||||||
#if defined(ENABLE_RAL)
|
#if ENABLE_RAL
|
||||||
hash_table_t *ral_thresholds_timed;
|
hash_table_t *ral_thresholds_timed;
|
||||||
SLIST_HEAD(ral_thresholds_gen_poll_s, ral_threshold_phy_t) ral_thresholds_gen_polled[RAL_LINK_PARAM_GEN_MAX];
|
SLIST_HEAD(ral_thresholds_gen_poll_s, ral_threshold_phy_t) ral_thresholds_gen_polled[RAL_LINK_PARAM_GEN_MAX];
|
||||||
SLIST_HEAD(ral_thresholds_lte_poll_s, ral_threshold_phy_t) ral_thresholds_lte_polled[RAL_LINK_PARAM_LTE_MAX];
|
SLIST_HEAD(ral_thresholds_lte_poll_s, ral_threshold_phy_t) ral_thresholds_lte_polled[RAL_LINK_PARAM_LTE_MAX];
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
# include "intertask_interface.h"
|
# include "intertask_interface.h"
|
||||||
# if defined(ENABLE_RAL)
|
# if ENABLE_RAL
|
||||||
# include "timer.h"
|
# include "timer.h"
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
@@ -1239,7 +1239,7 @@ int QPSK2[4]= {AMP_OVER_2|(AMP_OVER_2<<16),AMP_OVER_2|((65536-AMP_OVER_2)<<16),(
|
|||||||
|
|
||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
# if defined(ENABLE_RAL)
|
# if ENABLE_RAL
|
||||||
extern PHY_MEASUREMENTS PHY_measurements;
|
extern PHY_MEASUREMENTS PHY_measurements;
|
||||||
|
|
||||||
void phy_eNB_lte_measurement_thresholds_test_and_report(instance_t instanceP, ral_threshold_phy_t* threshold_phy_pP, uint16_t valP)
|
void phy_eNB_lte_measurement_thresholds_test_and_report(instance_t instanceP, ral_threshold_phy_t* threshold_phy_pP, uint16_t valP)
|
||||||
@@ -4408,7 +4408,7 @@ void phy_procedures_eNB_lte(unsigned char subframe,PHY_VARS_eNB **phy_vars_eNB,u
|
|||||||
Mod_id = instance;
|
Mod_id = instance;
|
||||||
|
|
||||||
switch (ITTI_MSG_ID(msg_p)) {
|
switch (ITTI_MSG_ID(msg_p)) {
|
||||||
# if defined(ENABLE_RAL)
|
# if ENABLE_RAL
|
||||||
|
|
||||||
case TIMER_HAS_EXPIRED:
|
case TIMER_HAS_EXPIRED:
|
||||||
// check if it is a measurement timer
|
// check if it is a measurement timer
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ fifo_dump_emos_UE emos_dump_UE;
|
|||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
# include "intertask_interface.h"
|
# include "intertask_interface.h"
|
||||||
# if defined(ENABLE_RAL)
|
# if ENABLE_RAL
|
||||||
# include "timer.h"
|
# include "timer.h"
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
@@ -3488,7 +3488,7 @@ int phy_procedures_RN_UE_RX(uint8_t slot_rx, uint8_t next_slot, relaying_type_t
|
|||||||
|
|
||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
# if defined(ENABLE_RAL)
|
# if ENABLE_RAL
|
||||||
extern PHY_MEASUREMENTS PHY_measurements;
|
extern PHY_MEASUREMENTS PHY_measurements;
|
||||||
|
|
||||||
void phy_UE_lte_measurement_thresholds_test_and_report(instance_t instanceP, ral_threshold_phy_t* threshold_phy_pP, uint16_t valP)
|
void phy_UE_lte_measurement_thresholds_test_and_report(instance_t instanceP, ral_threshold_phy_t* threshold_phy_pP, uint16_t valP)
|
||||||
@@ -3626,7 +3626,7 @@ void phy_procedures_UE_lte(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstr
|
|||||||
unsigned int Mod_id;
|
unsigned int Mod_id;
|
||||||
int result;
|
int result;
|
||||||
#endif
|
#endif
|
||||||
# if defined(ENABLE_RAL)
|
# if ENABLE_RAL
|
||||||
int CC_id =0;
|
int CC_id =0;
|
||||||
#endif
|
#endif
|
||||||
int frame_rx = phy_vars_ue->frame_rx;
|
int frame_rx = phy_vars_ue->frame_rx;
|
||||||
@@ -3673,7 +3673,7 @@ void phy_procedures_UE_lte(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstr
|
|||||||
LOG_I(PHY, "[UE %d] Received %s\n", Mod_id, msg_name);
|
LOG_I(PHY, "[UE %d] Received %s\n", Mod_id, msg_name);
|
||||||
|
|
||||||
/* TODO process the message */
|
/* TODO process the message */
|
||||||
# if defined(ENABLE_RAL)
|
# if ENABLE_RAL
|
||||||
{
|
{
|
||||||
MessageDef *message_p;
|
MessageDef *message_p;
|
||||||
|
|
||||||
@@ -3692,7 +3692,7 @@ void phy_procedures_UE_lte(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstr
|
|||||||
# endif
|
# endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
# if defined(ENABLE_RAL)
|
# if ENABLE_RAL
|
||||||
|
|
||||||
case TIMER_HAS_EXPIRED:
|
case TIMER_HAS_EXPIRED:
|
||||||
// check if it is a measurement timer
|
// check if it is a measurement timer
|
||||||
|
|||||||
@@ -30,6 +30,9 @@
|
|||||||
#ifndef GTPV1_U_MESSAGES_TYPES_H_
|
#ifndef GTPV1_U_MESSAGES_TYPES_H_
|
||||||
#define GTPV1_U_MESSAGES_TYPES_H_
|
#define GTPV1_U_MESSAGES_TYPES_H_
|
||||||
|
|
||||||
|
#include "asn1_constants.h"
|
||||||
|
|
||||||
|
|
||||||
#define GTPV1U_MAX_BEARERS_PER_UE max_val_DRB_Identity
|
#define GTPV1U_MAX_BEARERS_PER_UE max_val_DRB_Identity
|
||||||
|
|
||||||
#define GTPV1U_ENB_CREATE_TUNNEL_REQ(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uCreateTunnelReq
|
#define GTPV1U_ENB_CREATE_TUNNEL_REQ(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uCreateTunnelReq
|
||||||
|
|||||||
@@ -38,7 +38,9 @@
|
|||||||
#include "pdcp_messages_def.h"
|
#include "pdcp_messages_def.h"
|
||||||
#include "rrc_messages_def.h"
|
#include "rrc_messages_def.h"
|
||||||
#include "nas_messages_def.h"
|
#include "nas_messages_def.h"
|
||||||
|
#if ENABLE_RAL
|
||||||
#include "ral_messages_def.h"
|
#include "ral_messages_def.h"
|
||||||
|
#endif
|
||||||
#include "s1ap_messages_def.h"
|
#include "s1ap_messages_def.h"
|
||||||
#include "x2ap_messages_def.h"
|
#include "x2ap_messages_def.h"
|
||||||
#include "sctp_messages_def.h"
|
#include "sctp_messages_def.h"
|
||||||
|
|||||||
@@ -46,7 +46,9 @@
|
|||||||
#include "pdcp_messages_types.h"
|
#include "pdcp_messages_types.h"
|
||||||
#include "rrc_messages_types.h"
|
#include "rrc_messages_types.h"
|
||||||
#include "nas_messages_types.h"
|
#include "nas_messages_types.h"
|
||||||
|
#if ENABLE_RAL
|
||||||
#include "ral_messages_types.h"
|
#include "ral_messages_types.h"
|
||||||
|
#endif
|
||||||
#include "s1ap_messages_types.h"
|
#include "s1ap_messages_types.h"
|
||||||
#include "x2ap_messages_types.h"
|
#include "x2ap_messages_types.h"
|
||||||
#include "sctp_messages_types.h"
|
#include "sctp_messages_types.h"
|
||||||
|
|||||||
@@ -38,7 +38,9 @@
|
|||||||
#define PHY_MESSAGES_TYPES_H_
|
#define PHY_MESSAGES_TYPES_H_
|
||||||
|
|
||||||
#include "PHY/impl_defs_lte.h"
|
#include "PHY/impl_defs_lte.h"
|
||||||
#include "ral_messages_types.h"
|
#if ENABLE_RAL
|
||||||
|
#include "ral_messages_types.h" //LG: MIH moved from repository/trunk to repository/extras
|
||||||
|
#endif
|
||||||
//-------------------------------------------------------------------------------------------//
|
//-------------------------------------------------------------------------------------------//
|
||||||
// Defines to access message fields.
|
// Defines to access message fields.
|
||||||
#define PHY_CONFIGURATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.phy_configuration_req
|
#define PHY_CONFIGURATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.phy_configuration_req
|
||||||
@@ -93,9 +95,9 @@ typedef struct PhyDeactivateReq_s {
|
|||||||
} PhyDeactivateReq;
|
} PhyDeactivateReq;
|
||||||
|
|
||||||
typedef struct PhyFindCellReq_s {
|
typedef struct PhyFindCellReq_s {
|
||||||
//# if defined(ENABLE_RAL)
|
# if ENABLE_RAL
|
||||||
ral_transaction_id_t transaction_id;
|
ral_transaction_id_t transaction_id;
|
||||||
//# endif
|
# endif
|
||||||
Earfcn earfcn_start;
|
Earfcn earfcn_start;
|
||||||
Earfcn earfcn_end;
|
Earfcn earfcn_end;
|
||||||
} PhyFindCellReq;
|
} PhyFindCellReq;
|
||||||
@@ -104,28 +106,34 @@ typedef struct PhyFindNextCellReq_s {
|
|||||||
} PhyFindNextCellReq;
|
} PhyFindNextCellReq;
|
||||||
|
|
||||||
typedef struct PhyMeasThresholdReq_s {
|
typedef struct PhyMeasThresholdReq_s {
|
||||||
|
# if ENABLE_RAL
|
||||||
ral_transaction_id_t transaction_id;
|
ral_transaction_id_t transaction_id;
|
||||||
ral_link_cfg_param_t cfg_param;
|
ral_link_cfg_param_t cfg_param;
|
||||||
|
#endif
|
||||||
} PhyMeasThresholdReq;
|
} PhyMeasThresholdReq;
|
||||||
|
|
||||||
typedef struct PhyMeasReportInd_s {
|
typedef struct PhyMeasReportInd_s {
|
||||||
|
# if ENABLE_RAL
|
||||||
ral_threshold_t threshold;
|
ral_threshold_t threshold;
|
||||||
ral_link_param_t link_param;
|
ral_link_param_t link_param;
|
||||||
|
#endif
|
||||||
} PhyMeasReportInd;
|
} PhyMeasReportInd;
|
||||||
|
|
||||||
// UE: PHY -> RRC messages
|
// UE: PHY -> RRC messages
|
||||||
typedef struct PhyFindCellInd_s {
|
typedef struct PhyFindCellInd_s {
|
||||||
//# if defined(ENABLE_RAL)
|
# if ENABLE_RAL
|
||||||
ral_transaction_id_t transaction_id;
|
ral_transaction_id_t transaction_id;
|
||||||
//# endif
|
# endif
|
||||||
uint8_t cell_nb;
|
uint8_t cell_nb;
|
||||||
CellInfo cells[MAX_REPORTED_CELL];
|
CellInfo cells[MAX_REPORTED_CELL];
|
||||||
} PhyFindCellInd;
|
} PhyFindCellInd;
|
||||||
|
|
||||||
typedef struct PhyMeasThresholdConf_s {
|
typedef struct PhyMeasThresholdConf_s {
|
||||||
|
# if ENABLE_RAL
|
||||||
ral_transaction_id_t transaction_id;
|
ral_transaction_id_t transaction_id;
|
||||||
ral_status_t status;
|
ral_status_t status;
|
||||||
uint8_t num_link_cfg_params;
|
uint8_t num_link_cfg_params;
|
||||||
ral_link_cfg_status_t cfg_status[RAL_MAX_LINK_CFG_PARAMS];
|
ral_link_cfg_status_t cfg_status[RAL_MAX_LINK_CFG_PARAMS];
|
||||||
|
#endif
|
||||||
} PhyMeasThresholdConf;
|
} PhyMeasThresholdConf;
|
||||||
#endif /* PHY_MESSAGES_TYPES_H_ */
|
#endif /* PHY_MESSAGES_TYPES_H_ */
|
||||||
|
|||||||
@@ -26,13 +26,13 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_AM_MODULE
|
#define RLC_AM_MODULE 1
|
||||||
#define RLC_AM_C
|
#define RLC_AM_C 1
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
#include "platform_constants.h"
|
#include "platform_constants.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#if defined(ENABLE_ITTI)
|
#if ENABLE_ITTI
|
||||||
# include "intertask_interface.h"
|
# include "intertask_interface.h"
|
||||||
#endif
|
#endif
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
@@ -48,9 +48,7 @@
|
|||||||
#include "UTIL/LOG/log.h"
|
#include "UTIL/LOG/log.h"
|
||||||
#include "UL-AM-RLC.h"
|
#include "UL-AM-RLC.h"
|
||||||
#include "DL-AM-RLC.h"
|
#include "DL-AM-RLC.h"
|
||||||
//#define TRACE_RLC_AM_TX_STATUS
|
|
||||||
//#define TRACE_RLC_AM_TX
|
|
||||||
//#define TRACE_RLC_AM_BO
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
uint32_t
|
uint32_t
|
||||||
@@ -58,14 +56,13 @@ rlc_am_get_buffer_occupancy_in_bytes (
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t * const rlc_pP)
|
rlc_am_entity_t * const rlc_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
uint32_t max_li_overhead;
|
uint32_t max_li_overhead;
|
||||||
uint32_t header_overhead;
|
uint32_t header_overhead;
|
||||||
|
|
||||||
// priority of control trafic
|
// priority of control trafic
|
||||||
if (rlc_pP->status_requested) {
|
if (rlc_pP->status_requested) {
|
||||||
if (rlc_pP->t_status_prohibit.running == 0) {
|
if (rlc_pP->t_status_prohibit.running == 0) {
|
||||||
#ifdef TRACE_RLC_AM_BO
|
#if TRACE_RLC_AM_BO
|
||||||
|
|
||||||
if (((15 + rlc_pP->num_nack_sn*(10+1) + rlc_pP->num_nack_so*(15+15+1) + 7) >> 3) > 0) {
|
if (((15 + rlc_pP->num_nack_sn*(10+1) + rlc_pP->num_nack_so*(15+15+1) + 7) >> 3) > 0) {
|
||||||
LOG_D(RLC, PROTOCOL_CTXT_FMT RB_AM_FMT" BO : CONTROL PDU %d bytes \n",
|
LOG_D(RLC, PROTOCOL_CTXT_FMT RB_AM_FMT" BO : CONTROL PDU %d bytes \n",
|
||||||
@@ -92,7 +89,7 @@ rlc_am_get_buffer_occupancy_in_bytes (
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef TRACE_RLC_AM_BO
|
#if TRACE_RLC_AM_BO
|
||||||
|
|
||||||
if ((rlc_pP->status_buffer_occupancy + rlc_pP->retransmission_buffer_occupancy + rlc_pP->sdu_buffer_occupancy + max_li_overhead + header_overhead) > 0) {
|
if ((rlc_pP->status_buffer_occupancy + rlc_pP->retransmission_buffer_occupancy + rlc_pP->sdu_buffer_occupancy + max_li_overhead + header_overhead) > 0) {
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT" BO : STATUS BUFFER %d bytes \n", PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP), rlc_pP->status_buffer_occupancy);
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT" BO : STATUS BUFFER %d bytes \n", PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP), rlc_pP->status_buffer_occupancy);
|
||||||
@@ -114,9 +111,8 @@ rlc_am_release (
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t * const rlc_pP
|
rlc_am_entity_t * const rlc_pP
|
||||||
)
|
)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
|
// empty
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
@@ -127,7 +123,6 @@ config_req_rlc_am (
|
|||||||
const rb_id_t rb_idP
|
const rb_id_t rb_idP
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
rlc_union_t *rlc_union_p = NULL;
|
rlc_union_t *rlc_union_p = NULL;
|
||||||
rlc_am_entity_t *l_rlc_p = NULL;
|
rlc_am_entity_t *l_rlc_p = NULL;
|
||||||
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||||
@@ -174,7 +169,6 @@ void config_req_rlc_am_asn1 (
|
|||||||
const struct RLC_Config__am * const config_am_pP,
|
const struct RLC_Config__am * const config_am_pP,
|
||||||
const rb_id_t rb_idP)
|
const rb_id_t rb_idP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
rlc_union_t *rlc_union_p = NULL;
|
rlc_union_t *rlc_union_p = NULL;
|
||||||
rlc_am_entity_t *l_rlc_p = NULL;
|
rlc_am_entity_t *l_rlc_p = NULL;
|
||||||
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||||
@@ -279,7 +273,6 @@ void rlc_am_stat_req (
|
|||||||
unsigned int* stat_timer_reordering_timed_out,
|
unsigned int* stat_timer_reordering_timed_out,
|
||||||
unsigned int* stat_timer_poll_retransmit_timed_out,
|
unsigned int* stat_timer_poll_retransmit_timed_out,
|
||||||
unsigned int* stat_timer_status_prohibit_timed_out)
|
unsigned int* stat_timer_status_prohibit_timed_out)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
*stat_tx_pdcp_sdu = rlc_pP->stat_tx_pdcp_sdu;
|
*stat_tx_pdcp_sdu = rlc_pP->stat_tx_pdcp_sdu;
|
||||||
*stat_tx_pdcp_bytes = rlc_pP->stat_tx_pdcp_bytes;
|
*stat_tx_pdcp_bytes = rlc_pP->stat_tx_pdcp_bytes;
|
||||||
@@ -317,7 +310,6 @@ rlc_am_get_pdus (
|
|||||||
rlc_am_entity_t * const rlc_pP
|
rlc_am_entity_t * const rlc_pP
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
int display_flag = 0;
|
int display_flag = 0;
|
||||||
// 5.1.3.1 Transmit operations
|
// 5.1.3.1 Transmit operations
|
||||||
// 5.1.3.1.1
|
// 5.1.3.1.1
|
||||||
@@ -368,7 +360,7 @@ rlc_am_get_pdus (
|
|||||||
if (pdu != NULL {
|
if (pdu != NULL {
|
||||||
if ( ((rlc_am_tx_control_pdu_management_t*)(pdu->data))->size <= rlc_pP->nb_bytes_requested_by_mac) {
|
if ( ((rlc_am_tx_control_pdu_management_t*)(pdu->data))->size <= rlc_pP->nb_bytes_requested_by_mac) {
|
||||||
pdu = list_remove_head(&rlc_pP->control_pdu_list);
|
pdu = list_remove_head(&rlc_pP->control_pdu_list);
|
||||||
#ifdef TRACE_RLC_AM_TX
|
#if TRACE_RLC_AM_TX
|
||||||
msg ("[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] SEND CONTROL PDU\n", ((rlc_am_entity_t *) rlc_pP)->module_id,((rlc_am_entity_t *) rlc_pP)->rb_id, ctxt_pP->frame);
|
msg ("[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] SEND CONTROL PDU\n", ((rlc_am_entity_t *) rlc_pP)->module_id,((rlc_am_entity_t *) rlc_pP)->rb_id, ctxt_pP->frame);
|
||||||
#endif
|
#endif
|
||||||
list_add_tail_eurecom (pdu, &rlc_pP->pdus_to_mac_layer);
|
list_add_tail_eurecom (pdu, &rlc_pP->pdus_to_mac_layer);
|
||||||
@@ -470,7 +462,7 @@ rlc_am_get_pdus (
|
|||||||
|
|
||||||
/* ONLY ONE TB PER TTI
|
/* ONLY ONE TB PER TTI
|
||||||
if ((tx_data_pdu_management->retx_count >= 0) && (rlc_pP->nb_bytes_requested_by_mac < RLC_AM_MIN_SEGMENT_SIZE_REQUEST)) {
|
if ((tx_data_pdu_management->retx_count >= 0) && (rlc_pP->nb_bytes_requested_by_mac < RLC_AM_MIN_SEGMENT_SIZE_REQUEST)) {
|
||||||
#ifdef TRACE_RLC_AM_TX
|
#if TRACE_RLC_AM_TX
|
||||||
msg ("[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] BREAK LOOP ON RETRANSMISSION BECAUSE ONLY %d BYTES ALLOWED TO TRANSMIT BY MAC\n",ctxt_pP->frame, ((rlc_am_entity_t *) rlc_pP)->module_id,((rlc_am_entity_t *) rlc_pP)->rb_id, rlc_pP->nb_bytes_requested_by_mac);
|
msg ("[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] BREAK LOOP ON RETRANSMISSION BECAUSE ONLY %d BYTES ALLOWED TO TRANSMIT BY MAC\n",ctxt_pP->frame, ((rlc_am_entity_t *) rlc_pP)->module_id,((rlc_am_entity_t *) rlc_pP)->rb_id, rlc_pP->nb_bytes_requested_by_mac);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
@@ -529,8 +521,6 @@ rlc_am_rx (
|
|||||||
struct mac_data_ind data_indP
|
struct mac_data_ind data_indP
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
rlc_am_entity_t *rlc = (rlc_am_entity_t *) arg_pP;
|
rlc_am_entity_t *rlc = (rlc_am_entity_t *) arg_pP;
|
||||||
|
|
||||||
switch (rlc->protocol_state) {
|
switch (rlc->protocol_state) {
|
||||||
@@ -557,7 +547,6 @@ rlc_am_mac_status_indication (
|
|||||||
const uint16_t tb_sizeP,
|
const uint16_t tb_sizeP,
|
||||||
struct mac_status_ind tx_statusP)
|
struct mac_status_ind tx_statusP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
struct mac_status_resp status_resp;
|
struct mac_status_resp status_resp;
|
||||||
uint16_t sdu_size = 0;
|
uint16_t sdu_size = 0;
|
||||||
uint16_t sdu_remaining_size = 0;
|
uint16_t sdu_remaining_size = 0;
|
||||||
@@ -628,7 +617,7 @@ rlc_am_mac_status_indication (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
|
#if MESSAGE_CHART_GENERATOR_RLC_MAC
|
||||||
MSC_LOG_RX_MESSAGE(
|
MSC_LOG_RX_MESSAGE(
|
||||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
|
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
|
||||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_MAC_ENB:MSC_MAC_UE,
|
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_MAC_ENB:MSC_MAC_UE,
|
||||||
@@ -650,7 +639,7 @@ rlc_am_mac_status_indication (
|
|||||||
status_resp.head_sdu_remaining_size_to_send);
|
status_resp.head_sdu_remaining_size_to_send);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TRACE_RLC_AM_TX_STATUS
|
#if TRACE_RLC_AM_TX_STATUS
|
||||||
|
|
||||||
if (tb_sizeP > 0) {
|
if (tb_sizeP > 0) {
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT" MAC_STATUS_INDICATION (DATA) %d bytes -> %d bytes\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT" MAC_STATUS_INDICATION (DATA) %d bytes -> %d bytes\n",
|
||||||
@@ -677,11 +666,10 @@ rlc_am_mac_data_request (
|
|||||||
void * const rlc_pP
|
void * const rlc_pP
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
struct mac_data_req data_req;
|
struct mac_data_req data_req;
|
||||||
rlc_am_entity_t *l_rlc_p = (rlc_am_entity_t *) rlc_pP;
|
rlc_am_entity_t *l_rlc_p = (rlc_am_entity_t *) rlc_pP;
|
||||||
unsigned int nb_bytes_requested_by_mac = ((rlc_am_entity_t *) rlc_pP)->nb_bytes_requested_by_mac;
|
unsigned int nb_bytes_requested_by_mac = ((rlc_am_entity_t *) rlc_pP)->nb_bytes_requested_by_mac;
|
||||||
#if defined(TRACE_RLC_AM_PDU) || defined(MESSAGE_CHART_GENERATOR)
|
#if TRACE_RLC_AM_PDU || MESSAGE_CHART_GENERATOR
|
||||||
rlc_am_pdu_info_t pdu_info;
|
rlc_am_pdu_info_t pdu_info;
|
||||||
rlc_am_pdu_sn_10_t *rlc_am_pdu_sn_10_p;
|
rlc_am_pdu_sn_10_t *rlc_am_pdu_sn_10_p;
|
||||||
mem_block_t *tb_p;
|
mem_block_t *tb_p;
|
||||||
@@ -689,7 +677,7 @@ rlc_am_mac_data_request (
|
|||||||
int num_nack;
|
int num_nack;
|
||||||
char message_string[9000];
|
char message_string[9000];
|
||||||
size_t message_string_size = 0;
|
size_t message_string_size = 0;
|
||||||
# if defined(ENABLE_ITTI)
|
# if ENABLE_ITTI
|
||||||
MessageDef *msg_p;
|
MessageDef *msg_p;
|
||||||
# endif
|
# endif
|
||||||
int octet_index, index;
|
int octet_index, index;
|
||||||
@@ -710,7 +698,7 @@ rlc_am_mac_data_request (
|
|||||||
data_req.buffer_occupancy_in_bytes = rlc_am_get_buffer_occupancy_in_bytes(ctxt_pP, l_rlc_p);
|
data_req.buffer_occupancy_in_bytes = rlc_am_get_buffer_occupancy_in_bytes(ctxt_pP, l_rlc_p);
|
||||||
data_req.rlc_info.rlc_protocol_state = l_rlc_p->protocol_state;
|
data_req.rlc_info.rlc_protocol_state = l_rlc_p->protocol_state;
|
||||||
|
|
||||||
#if defined(TRACE_RLC_AM_PDU) || defined(MESSAGE_CHART_GENERATOR)
|
#if TRACE_RLC_AM_PDU || MESSAGE_CHART_GENERATOR
|
||||||
|
|
||||||
if (data_req.data.nb_elements > 0) {
|
if (data_req.data.nb_elements > 0) {
|
||||||
|
|
||||||
@@ -723,7 +711,7 @@ rlc_am_mac_data_request (
|
|||||||
|
|
||||||
if ((((struct mac_tb_req *) (tb_p->data))->data_ptr[0] & RLC_DC_MASK) == RLC_DC_DATA_PDU ) {
|
if ((((struct mac_tb_req *) (tb_p->data))->data_ptr[0] & RLC_DC_MASK) == RLC_DC_DATA_PDU ) {
|
||||||
if (rlc_am_get_data_pdu_infos(ctxt_pP,l_rlc_p,rlc_am_pdu_sn_10_p, tb_size_in_bytes, &pdu_info) >= 0) {
|
if (rlc_am_get_data_pdu_infos(ctxt_pP,l_rlc_p,rlc_am_pdu_sn_10_p, tb_size_in_bytes, &pdu_info) >= 0) {
|
||||||
#ifdef MESSAGE_CHART_GENERATOR
|
#if MESSAGE_CHART_GENERATOR
|
||||||
message_string_size = 0;
|
message_string_size = 0;
|
||||||
message_string_size += sprintf(&message_string[message_string_size],
|
message_string_size += sprintf(&message_string[message_string_size],
|
||||||
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" DATA SN %u size %u RF %u P %u FI %u",
|
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" DATA SN %u size %u RF %u P %u FI %u",
|
||||||
@@ -756,7 +744,7 @@ rlc_am_mac_data_request (
|
|||||||
message_string);
|
message_string);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
# if defined(ENABLE_ITTI)
|
# if ENABLE_ITTI
|
||||||
message_string_size = 0;
|
message_string_size = 0;
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", tb_size_in_bytes);
|
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", tb_size_in_bytes);
|
||||||
@@ -835,7 +823,7 @@ rlc_am_mac_data_request (
|
|||||||
} else {
|
} else {
|
||||||
if (rlc_am_get_control_pdu_infos(rlc_am_pdu_sn_10_p, &tb_size_in_bytes, &l_rlc_p->control_pdu_info) >= 0) {
|
if (rlc_am_get_control_pdu_infos(rlc_am_pdu_sn_10_p, &tb_size_in_bytes, &l_rlc_p->control_pdu_info) >= 0) {
|
||||||
tb_size_in_bytes = ((struct mac_tb_req *) (tb_p->data))->tb_size; //tb_size_in_bytes modified by rlc_am_get_control_pdu_infos!
|
tb_size_in_bytes = ((struct mac_tb_req *) (tb_p->data))->tb_size; //tb_size_in_bytes modified by rlc_am_get_control_pdu_infos!
|
||||||
#ifdef MESSAGE_CHART_GENERATOR
|
#if MESSAGE_CHART_GENERATOR
|
||||||
message_string_size = 0;
|
message_string_size = 0;
|
||||||
message_string_size += sprintf(&message_string[message_string_size],
|
message_string_size += sprintf(&message_string[message_string_size],
|
||||||
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" STATUS ACK_SN %u",
|
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" STATUS ACK_SN %u",
|
||||||
@@ -864,7 +852,7 @@ rlc_am_mac_data_request (
|
|||||||
message_string);
|
message_string);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
# if defined(ENABLE_ITTI)
|
# if ENABLE_ITTI
|
||||||
message_string_size = 0;
|
message_string_size = 0;
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", tb_size_in_bytes);
|
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", tb_size_in_bytes);
|
||||||
@@ -911,12 +899,11 @@ rlc_am_mac_data_indication (
|
|||||||
struct mac_data_ind data_indP
|
struct mac_data_ind data_indP
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
rlc_am_entity_t* l_rlc_p = (rlc_am_entity_t*) rlc_pP;
|
rlc_am_entity_t* l_rlc_p = (rlc_am_entity_t*) rlc_pP;
|
||||||
/*rlc_am_control_pdu_info_t control_pdu_info;
|
/*rlc_am_control_pdu_info_t control_pdu_info;
|
||||||
int num_li;
|
int num_li;
|
||||||
int16_t tb_size;*/
|
int16_t tb_size;*/
|
||||||
#if defined(TRACE_RLC_AM_PDU) || defined(MESSAGE_CHART_GENERATOR)
|
#if TRACE_RLC_AM_PDU || MESSAGE_CHART_GENERATOR
|
||||||
rlc_am_pdu_info_t pdu_info;
|
rlc_am_pdu_info_t pdu_info;
|
||||||
rlc_am_pdu_sn_10_t *rlc_am_pdu_sn_10_p;
|
rlc_am_pdu_sn_10_t *rlc_am_pdu_sn_10_p;
|
||||||
mem_block_t *tb_p;
|
mem_block_t *tb_p;
|
||||||
@@ -924,13 +911,13 @@ rlc_am_mac_data_indication (
|
|||||||
int num_nack;
|
int num_nack;
|
||||||
char message_string[7000];
|
char message_string[7000];
|
||||||
size_t message_string_size = 0;
|
size_t message_string_size = 0;
|
||||||
# if defined(ENABLE_ITTI)
|
# if ENABLE_ITTI
|
||||||
MessageDef *msg_p;
|
MessageDef *msg_p;
|
||||||
# endif
|
# endif
|
||||||
int octet_index, index;
|
int octet_index, index;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(TRACE_RLC_AM_PDU) || defined(MESSAGE_CHART_GENERATOR)
|
#if TRACE_RLC_AM_PDU || MESSAGE_CHART_GENERATOR
|
||||||
|
|
||||||
if (data_indP.data.nb_elements > 0) {
|
if (data_indP.data.nb_elements > 0) {
|
||||||
|
|
||||||
@@ -943,7 +930,7 @@ rlc_am_mac_data_indication (
|
|||||||
|
|
||||||
if ((((struct mac_tb_ind *) (tb_p->data))->data_ptr[0] & RLC_DC_MASK) == RLC_DC_DATA_PDU ) {
|
if ((((struct mac_tb_ind *) (tb_p->data))->data_ptr[0] & RLC_DC_MASK) == RLC_DC_DATA_PDU ) {
|
||||||
if (rlc_am_get_data_pdu_infos(ctxt_pP,l_rlc_p,rlc_am_pdu_sn_10_p, tb_size_in_bytes, &pdu_info) >= 0) {
|
if (rlc_am_get_data_pdu_infos(ctxt_pP,l_rlc_p,rlc_am_pdu_sn_10_p, tb_size_in_bytes, &pdu_info) >= 0) {
|
||||||
#ifdef MESSAGE_CHART_GENERATOR
|
#if MESSAGE_CHART_GENERATOR
|
||||||
message_string_size = 0;
|
message_string_size = 0;
|
||||||
message_string_size += sprintf(&message_string[message_string_size],
|
message_string_size += sprintf(&message_string[message_string_size],
|
||||||
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" DATA SN %u size %u RF %u P %u FI %u",
|
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" DATA SN %u size %u RF %u P %u FI %u",
|
||||||
@@ -977,7 +964,7 @@ rlc_am_mac_data_indication (
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# if defined(ENABLE_ITTI) && defined(TRACE_RLC_AM_PDU)
|
# if ENABLE_ITTI && TRACE_RLC_AM_PDU
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", tb_size_in_bytes);
|
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", tb_size_in_bytes);
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "Header size : %u\n", pdu_info.header_size);
|
message_string_size += sprintf(&message_string[message_string_size], "Header size : %u\n", pdu_info.header_size);
|
||||||
@@ -1054,7 +1041,7 @@ rlc_am_mac_data_indication (
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (rlc_am_get_control_pdu_infos(rlc_am_pdu_sn_10_p, &tb_size_in_bytes, &l_rlc_p->control_pdu_info) >= 0) {
|
if (rlc_am_get_control_pdu_infos(rlc_am_pdu_sn_10_p, &tb_size_in_bytes, &l_rlc_p->control_pdu_info) >= 0) {
|
||||||
#ifdef MESSAGE_CHART_GENERATOR
|
#if MESSAGE_CHART_GENERATOR
|
||||||
message_string_size = 0;
|
message_string_size = 0;
|
||||||
message_string_size += sprintf(&message_string[message_string_size],
|
message_string_size += sprintf(&message_string[message_string_size],
|
||||||
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" STATUS size ACK_SN %u",
|
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" STATUS size ACK_SN %u",
|
||||||
@@ -1084,7 +1071,7 @@ rlc_am_mac_data_indication (
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# if defined(ENABLE_ITTI) && defined(TRACE_RLC_AM_PDU)
|
# if ENABLE_ITTI && TRACE_RLC_AM_PDU
|
||||||
message_string_size = 0;
|
message_string_size = 0;
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", ((struct mac_tb_ind *) (tb_p->data))->size);
|
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", ((struct mac_tb_ind *) (tb_p->data))->size);
|
||||||
@@ -1131,16 +1118,15 @@ rlc_am_data_req (
|
|||||||
void * const rlc_pP,
|
void * const rlc_pP,
|
||||||
mem_block_t * const sdu_pP)
|
mem_block_t * const sdu_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
rlc_am_entity_t *l_rlc_p = (rlc_am_entity_t *) rlc_pP;
|
rlc_am_entity_t *l_rlc_p = (rlc_am_entity_t *) rlc_pP;
|
||||||
uint32_t mui;
|
uint32_t mui;
|
||||||
uint16_t data_offset;
|
uint16_t data_offset;
|
||||||
uint16_t data_size;
|
uint16_t data_size;
|
||||||
uint8_t conf;
|
uint8_t conf;
|
||||||
#if defined(TRACE_RLC_AM_PDU)
|
#if TRACE_RLC_AM_PDU
|
||||||
char message_string[7000];
|
char message_string[7000];
|
||||||
size_t message_string_size = 0;
|
size_t message_string_size = 0;
|
||||||
#if defined(ENABLE_ITTI)
|
#if ENABLE_ITTI
|
||||||
MessageDef *msg_p;
|
MessageDef *msg_p;
|
||||||
#endif
|
#endif
|
||||||
int octet_index, index;
|
int octet_index, index;
|
||||||
@@ -1173,7 +1159,7 @@ rlc_am_data_req (
|
|||||||
mui);
|
mui);
|
||||||
|
|
||||||
|
|
||||||
#if defined(TRACE_RLC_AM_PDU)
|
#if TRACE_RLC_AM_PDU
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "SDU size : %u\n", data_size);
|
message_string_size += sprintf(&message_string[message_string_size], "SDU size : %u\n", data_size);
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "MUI : %u\n", mui);
|
message_string_size += sprintf(&message_string[message_string_size], "MUI : %u\n", mui);
|
||||||
@@ -1211,7 +1197,7 @@ rlc_am_data_req (
|
|||||||
|
|
||||||
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
||||||
|
|
||||||
# if defined(ENABLE_ITTI)
|
# if ENABLE_ITTI
|
||||||
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_AM_SDU_REQ, message_string_size + sizeof (IttiMsgText));
|
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_AM_SDU_REQ, message_string_size + sizeof (IttiMsgText));
|
||||||
msg_p->ittiMsg.rlc_am_sdu_req.size = message_string_size;
|
msg_p->ittiMsg.rlc_am_sdu_req.size = message_string_size;
|
||||||
memcpy(&msg_p->ittiMsg.rlc_am_sdu_req.text, message_string, message_string_size);
|
memcpy(&msg_p->ittiMsg.rlc_am_sdu_req.text, message_string, message_string_size);
|
||||||
@@ -1257,7 +1243,7 @@ rlc_am_data_req (
|
|||||||
conf,
|
conf,
|
||||||
mui);
|
mui);
|
||||||
} else {
|
} else {
|
||||||
#ifdef MESSAGE_CHART_GENERATOR
|
#if MESSAGE_CHART_GENERATOR
|
||||||
mui = ((struct rlc_am_data_req*) (sdu_pP->data))->mui;
|
mui = ((struct rlc_am_data_req*) (sdu_pP->data))->mui;
|
||||||
data_offset = ((struct rlc_am_data_req*) (sdu_pP->data))->data_offset;
|
data_offset = ((struct rlc_am_data_req*) (sdu_pP->data))->data_offset;
|
||||||
data_size = ((struct rlc_am_data_req*) (sdu_pP->data))->data_size;
|
data_size = ((struct rlc_am_data_req*) (sdu_pP->data))->data_size;
|
||||||
@@ -1283,7 +1269,7 @@ rlc_am_data_req (
|
|||||||
l_rlc_p->stat_tx_pdcp_sdu_discarded += 1;
|
l_rlc_p->stat_tx_pdcp_sdu_discarded += 1;
|
||||||
l_rlc_p->stat_tx_pdcp_bytes_discarded += ((struct rlc_am_data_req *) (sdu_pP->data))->data_size;
|
l_rlc_p->stat_tx_pdcp_bytes_discarded += ((struct rlc_am_data_req *) (sdu_pP->data))->data_size;
|
||||||
free_mem_block (sdu_pP);
|
free_mem_block (sdu_pP);
|
||||||
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
|
#if STOP_ON_IP_TRAFFIC_OVERLOAD
|
||||||
AssertFatal(0, PROTOCOL_RLC_AM_CTXT_FMT" RLC_AM_DATA_REQ size %d Bytes, SDU DROPPED, INPUT BUFFER OVERFLOW NB SDU %d current_sdu_index=%d next_sdu_index=%d \n",
|
AssertFatal(0, PROTOCOL_RLC_AM_CTXT_FMT" RLC_AM_DATA_REQ size %d Bytes, SDU DROPPED, INPUT BUFFER OVERFLOW NB SDU %d current_sdu_index=%d next_sdu_index=%d \n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,l_rlc_p),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,l_rlc_p),
|
||||||
data_size,
|
data_size,
|
||||||
|
|||||||
@@ -33,20 +33,19 @@
|
|||||||
COMPANY : EURECOM
|
COMPANY : EURECOM
|
||||||
EMAIL : Lionel.Gauthier@eurecom.fr
|
EMAIL : Lionel.Gauthier@eurecom.fr
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
#define RLC_AM_MODULE
|
#define RLC_AM_MODULE 1
|
||||||
#define RLC_AM_IN_SDU_C
|
#define RLC_AM_IN_SDU_C 1
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include "rlc_am.h"
|
#include "rlc_am.h"
|
||||||
#include "LAYER2/MAC/extern.h"
|
#include "LAYER2/MAC/extern.h"
|
||||||
#include "UTIL/LOG/log.h"
|
#include "UTIL/LOG/log.h"
|
||||||
|
|
||||||
#define TRACE_RLC_AM_FREE_SDU
|
#define TRACE_RLC_AM_FREE_SDU 0
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_free_in_sdu(
|
void rlc_am_free_in_sdu(
|
||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlcP,
|
rlc_am_entity_t *const rlcP,
|
||||||
const unsigned int index_in_bufferP)
|
const unsigned int index_in_bufferP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
if (index_in_bufferP <= RLC_AM_SDU_CONTROL_BUFFER_SIZE) {
|
if (index_in_bufferP <= RLC_AM_SDU_CONTROL_BUFFER_SIZE) {
|
||||||
if (rlcP->input_sdus[index_in_bufferP].mem_block != NULL) {
|
if (rlcP->input_sdus[index_in_bufferP].mem_block != NULL) {
|
||||||
@@ -70,7 +69,7 @@ void rlc_am_free_in_sdu(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TRACE_RLC_AM_FREE_SDU
|
#if TRACE_RLC_AM_FREE_SDU
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[FREE SDU] SDU INDEX %03u current_sdu_index=%u next_sdu_index=%u nb_sdu_no_segmented=%u\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[FREE SDU] SDU INDEX %03u current_sdu_index=%u next_sdu_index=%u nb_sdu_no_segmented=%u\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlcP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlcP),
|
||||||
index_in_bufferP,
|
index_in_bufferP,
|
||||||
@@ -86,7 +85,6 @@ rlc_am_free_in_sdu_data(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t* const rlcP,
|
rlc_am_entity_t* const rlcP,
|
||||||
const unsigned int index_in_bufferP)
|
const unsigned int index_in_bufferP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
if (index_in_bufferP <= RLC_AM_SDU_CONTROL_BUFFER_SIZE) {
|
if (index_in_bufferP <= RLC_AM_SDU_CONTROL_BUFFER_SIZE) {
|
||||||
if (rlcP->input_sdus[index_in_bufferP].mem_block != NULL) {
|
if (rlcP->input_sdus[index_in_bufferP].mem_block != NULL) {
|
||||||
@@ -102,7 +100,6 @@ signed int
|
|||||||
rlc_am_in_sdu_is_empty(
|
rlc_am_in_sdu_is_empty(
|
||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlcP)
|
rlc_am_entity_t *const rlcP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
if (rlcP->nb_sdu == 0) {
|
if (rlcP->nb_sdu == 0) {
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -26,8 +26,8 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_AM_MODULE
|
#define RLC_AM_MODULE 1
|
||||||
#define RLC_AM_INIT_C
|
#define RLC_AM_INIT_C 1
|
||||||
#ifdef USER_MODE
|
#ifdef USER_MODE
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -40,7 +40,6 @@ void
|
|||||||
rlc_am_init(
|
rlc_am_init(
|
||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlc_pP)
|
rlc_am_entity_t *const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
if (rlc_pP->initialized == TRUE) {
|
if (rlc_pP->initialized == TRUE) {
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[AM INIT] INITIALIZATION ALREADY DONE, DOING NOTHING\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[AM INIT] INITIALIZATION ALREADY DONE, DOING NOTHING\n",
|
||||||
@@ -97,7 +96,6 @@ void
|
|||||||
rlc_am_reestablish(
|
rlc_am_reestablish(
|
||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t* const rlc_pP)
|
rlc_am_entity_t* const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* RLC re-establishment is performed upon request by RRC, and the function
|
* RLC re-establishment is performed upon request by RRC, and the function
|
||||||
@@ -153,7 +151,6 @@ void
|
|||||||
rlc_am_cleanup(
|
rlc_am_cleanup(
|
||||||
rlc_am_entity_t* const rlc_pP
|
rlc_am_entity_t* const rlc_pP
|
||||||
)
|
)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
list2_free(&rlc_pP->receiver_buffer);
|
list2_free(&rlc_pP->receiver_buffer);
|
||||||
list_free(&rlc_pP->pdus_to_mac_layer);
|
list_free(&rlc_pP->pdus_to_mac_layer);
|
||||||
@@ -207,7 +204,6 @@ rlc_am_configure(
|
|||||||
const uint32_t t_poll_retransmitP,
|
const uint32_t t_poll_retransmitP,
|
||||||
const uint32_t t_reorderingP,
|
const uint32_t t_reorderingP,
|
||||||
const uint32_t t_status_prohibitP)
|
const uint32_t t_status_prohibitP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
if (rlc_pP->configured == TRUE) {
|
if (rlc_pP->configured == TRUE) {
|
||||||
LOG_I(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RECONFIGURE] max_retx_threshold %d poll_pdu %d poll_byte %d t_poll_retransmit %d t_reordering %d t_status_prohibit %d\n",
|
LOG_I(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RECONFIGURE] max_retx_threshold %d poll_pdu %d poll_byte %d t_poll_retransmit %d t_reordering %d t_status_prohibit %d\n",
|
||||||
@@ -258,7 +254,6 @@ rlc_am_set_debug_infos(
|
|||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const rb_id_t rb_idP)
|
const rb_id_t rb_idP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
|
|
||||||
rlc_pP->rb_id = rb_idP;
|
rlc_pP->rb_id = rb_idP;
|
||||||
|
|||||||
@@ -26,11 +26,11 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_AM_MODULE
|
#define RLC_AM_MODULE 1
|
||||||
#define RLC_AM_REASSEMBLY_C
|
#define RLC_AM_REASSEMBLY_C 1
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#if defined(ENABLE_ITTI)
|
#if ENABLE_ITTI
|
||||||
# include "intertask_interface.h"
|
# include "intertask_interface.h"
|
||||||
#endif
|
#endif
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
@@ -41,13 +41,11 @@
|
|||||||
#include "UTIL/LOG/log.h"
|
#include "UTIL/LOG/log.h"
|
||||||
#include "msc.h"
|
#include "msc.h"
|
||||||
|
|
||||||
//#define TRACE_RLC_AM_RX_DECODE
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
inline void
|
inline void
|
||||||
rlc_am_clear_rx_sdu (
|
rlc_am_clear_rx_sdu (
|
||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t * const rlc_pP)
|
rlc_am_entity_t * const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_pP->output_sdu_size_to_write = 0;
|
rlc_pP->output_sdu_size_to_write = 0;
|
||||||
}
|
}
|
||||||
@@ -58,7 +56,6 @@ rlc_am_reassembly (
|
|||||||
rlc_am_entity_t * const rlc_pP,
|
rlc_am_entity_t * const rlc_pP,
|
||||||
uint8_t * src_pP,
|
uint8_t * src_pP,
|
||||||
const int32_t lengthP)
|
const int32_t lengthP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[REASSEMBLY PAYLOAD] reassembly() %d bytes\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[REASSEMBLY PAYLOAD] reassembly() %d bytes\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
@@ -79,7 +76,7 @@ rlc_am_reassembly (
|
|||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[REASSEMBLY PAYLOAD] ERROR SDU SIZE OVERFLOW SDU GARBAGED\n",
|
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[REASSEMBLY PAYLOAD] ERROR SDU SIZE OVERFLOW SDU GARBAGED\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||||
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
|
#if STOP_ON_IP_TRAFFIC_OVERLOAD
|
||||||
AssertFatal(0, PROTOCOL_RLC_AM_CTXT_FMT" RLC_AM_DATA_IND, SDU SIZE OVERFLOW SDU GARBAGED\n",
|
AssertFatal(0, PROTOCOL_RLC_AM_CTXT_FMT" RLC_AM_DATA_IND, SDU SIZE OVERFLOW SDU GARBAGED\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||||
#endif
|
#endif
|
||||||
@@ -89,7 +86,7 @@ rlc_am_reassembly (
|
|||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[REASSEMBLY PAYLOAD] ERROR OUTPUT SDU IS NULL\n",
|
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[REASSEMBLY PAYLOAD] ERROR OUTPUT SDU IS NULL\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||||
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
|
#if STOP_ON_IP_TRAFFIC_OVERLOAD
|
||||||
AssertFatal(0, PROTOCOL_RLC_AM_CTXT_FMT" RLC_AM_DATA_IND, SDU DROPPED, OUT OF MEMORY\n",
|
AssertFatal(0, PROTOCOL_RLC_AM_CTXT_FMT" RLC_AM_DATA_IND, SDU DROPPED, OUT OF MEMORY\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||||
#endif
|
#endif
|
||||||
@@ -100,12 +97,11 @@ void
|
|||||||
rlc_am_send_sdu (
|
rlc_am_send_sdu (
|
||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t * const rlc_pP)
|
rlc_am_entity_t * const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
# if defined(TRACE_RLC_UM_PDU)
|
# if TRACE_RLC_UM_PDU
|
||||||
char message_string[7000];
|
char message_string[7000];
|
||||||
size_t message_string_size = 0;
|
size_t message_string_size = 0;
|
||||||
#if defined(ENABLE_ITTI)
|
#if ENABLE_ITTI
|
||||||
MessageDef *msg_p;
|
MessageDef *msg_p;
|
||||||
#endif
|
#endif
|
||||||
int octet_index, index;
|
int octet_index, index;
|
||||||
@@ -120,13 +116,13 @@ rlc_am_send_sdu (
|
|||||||
if (rlc_pP->output_sdu_size_to_write > 0) {
|
if (rlc_pP->output_sdu_size_to_write > 0) {
|
||||||
rlc_pP->stat_rx_pdcp_sdu += 1;
|
rlc_pP->stat_rx_pdcp_sdu += 1;
|
||||||
rlc_pP->stat_rx_pdcp_bytes += rlc_pP->output_sdu_size_to_write;
|
rlc_pP->stat_rx_pdcp_bytes += rlc_pP->output_sdu_size_to_write;
|
||||||
#ifdef TEST_RLC_AM
|
#if TEST_RLC_AM
|
||||||
rlc_am_v9_3_0_test_data_ind (rlc_pP->module_id,
|
rlc_am_v9_3_0_test_data_ind (rlc_pP->module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->output_sdu_size_to_write,
|
rlc_pP->output_sdu_size_to_write,
|
||||||
rlc_pP->output_sdu_in_construction);
|
rlc_pP->output_sdu_in_construction);
|
||||||
#else
|
#else
|
||||||
# if defined(TRACE_RLC_AM_PDU)
|
# if TRACE_RLC_AM_PDU
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", rlc_pP->rb_id);
|
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", rlc_pP->rb_id);
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "SDU size : %u\n", rlc_pP->output_sdu_size_to_write);
|
message_string_size += sprintf(&message_string[message_string_size], "SDU size : %u\n", rlc_pP->output_sdu_size_to_write);
|
||||||
|
|
||||||
@@ -166,7 +162,7 @@ rlc_am_send_sdu (
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# if defined(ENABLE_ITTI)
|
# if ENABLE_ITTI
|
||||||
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE ,
|
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE ,
|
||||||
RLC_AM_SDU_IND,
|
RLC_AM_SDU_IND,
|
||||||
message_string_size + sizeof (IttiMsgText));
|
message_string_size + sizeof (IttiMsgText));
|
||||||
@@ -179,7 +175,7 @@ rlc_am_send_sdu (
|
|||||||
LOG_T(RLC, "%s", message_string);
|
LOG_T(RLC, "%s", message_string);
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#if !defined(ENABLE_ITTI)
|
#if !ENABLE_ITTI
|
||||||
RLC_AM_MUTEX_UNLOCK(&rlc_pP->lock_input_sdus);
|
RLC_AM_MUTEX_UNLOCK(&rlc_pP->lock_input_sdus);
|
||||||
#endif
|
#endif
|
||||||
MSC_LOG_TX_MESSAGE(
|
MSC_LOG_TX_MESSAGE(
|
||||||
@@ -199,7 +195,7 @@ rlc_am_send_sdu (
|
|||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->output_sdu_size_to_write,
|
rlc_pP->output_sdu_size_to_write,
|
||||||
rlc_pP->output_sdu_in_construction);
|
rlc_pP->output_sdu_in_construction);
|
||||||
#if !defined(ENABLE_ITTI)
|
#if !ENABLE_ITTI
|
||||||
RLC_AM_MUTEX_LOCK(&rlc_pP->lock_input_sdus, ctxt_pP, rlc_pP);
|
RLC_AM_MUTEX_LOCK(&rlc_pP->lock_input_sdus, ctxt_pP, rlc_pP);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -225,14 +221,13 @@ rlc_am_reassemble_pdu(
|
|||||||
rlc_am_entity_t * const rlc_pP,
|
rlc_am_entity_t * const rlc_pP,
|
||||||
mem_block_t * const tb_pP)
|
mem_block_t * const tb_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
int i,j;
|
int i,j;
|
||||||
|
|
||||||
rlc_am_pdu_info_t* pdu_info = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
|
rlc_am_pdu_info_t* pdu_info = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[REASSEMBLY PDU] TRY REASSEMBLY PDU SN=%03d\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[REASSEMBLY PDU] TRY REASSEMBLY PDU SN=%03d\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
pdu_info->sn);
|
pdu_info->sn);
|
||||||
#ifdef TRACE_RLC_AM_RX_DECODE
|
#if TRACE_RLC_AM_RX_DECODE
|
||||||
rlc_am_display_data_pdu_infos(ctxt_pP, rlc_pP, pdu_info);
|
rlc_am_display_data_pdu_infos(ctxt_pP, rlc_pP, pdu_info);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -279,7 +274,7 @@ rlc_am_reassemble_pdu(
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
#ifdef USER_MODE
|
#if USER_MODE
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(0 != 0);
|
assert(0 != 0);
|
||||||
@@ -394,14 +389,14 @@ rlc_am_reassemble_pdu(
|
|||||||
// data is already ok, done by last loop above
|
// data is already ok, done by last loop above
|
||||||
rlc_am_reassembly (ctxt_pP, rlc_pP, &pdu_info->payload[j], pdu_info->hidden_size);
|
rlc_am_reassembly (ctxt_pP, rlc_pP, &pdu_info->payload[j], pdu_info->hidden_size);
|
||||||
} else {
|
} else {
|
||||||
#ifdef USER_MODE
|
#if USER_MODE
|
||||||
//assert (5!=5);
|
//assert (5!=5);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//rlc_pP->reassembly_missing_sn_detected = 0;
|
//rlc_pP->reassembly_missing_sn_detected = 0;
|
||||||
break;
|
break;
|
||||||
#ifdef USER_MODE
|
#if USER_MODE
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(1 != 1);
|
assert(1 != 1);
|
||||||
|
|||||||
@@ -26,9 +26,8 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_AM_MODULE
|
#define RLC_AM_MODULE 1
|
||||||
#define RLC_AM_RECEIVER_C
|
#define RLC_AM_RECEIVER_C 1
|
||||||
//#include "rtos_header.h"
|
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
@@ -39,9 +38,6 @@
|
|||||||
#include "LAYER2/MAC/extern.h"
|
#include "LAYER2/MAC/extern.h"
|
||||||
#include "UTIL/LOG/log.h"
|
#include "UTIL/LOG/log.h"
|
||||||
|
|
||||||
#define TRACE_RLC_AM_RX
|
|
||||||
//#define DEBUG_RLC_AM_DISPLAY_TB_DATA
|
|
||||||
//#define RLC_AM_GENERATE_ERRORS
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
signed int
|
signed int
|
||||||
rlc_am_get_data_pdu_infos(
|
rlc_am_get_data_pdu_infos(
|
||||||
@@ -50,7 +46,6 @@ rlc_am_get_data_pdu_infos(
|
|||||||
rlc_am_pdu_sn_10_t* header_pP,
|
rlc_am_pdu_sn_10_t* header_pP,
|
||||||
int16_t total_sizeP,
|
int16_t total_sizeP,
|
||||||
rlc_am_pdu_info_t* pdu_info_pP)
|
rlc_am_pdu_info_t* pdu_info_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
memset(pdu_info_pP, 0, sizeof (rlc_am_pdu_info_t));
|
memset(pdu_info_pP, 0, sizeof (rlc_am_pdu_info_t));
|
||||||
|
|
||||||
@@ -142,7 +137,6 @@ rlc_am_display_data_pdu_infos(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t * const rlc_pP,
|
rlc_am_entity_t * const rlc_pP,
|
||||||
rlc_am_pdu_info_t* pdu_info_pP)
|
rlc_am_pdu_info_t* pdu_info_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
int num_li;
|
int num_li;
|
||||||
|
|
||||||
@@ -183,7 +177,6 @@ rlc_am_rx_update_vr_ms(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t * const rlc_pP,
|
rlc_am_entity_t * const rlc_pP,
|
||||||
mem_block_t* tb_pP)
|
mem_block_t* tb_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
//rlc_am_pdu_info_t* pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
|
//rlc_am_pdu_info_t* pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
|
||||||
rlc_am_pdu_info_t* pdu_info_cursor_p = NULL;
|
rlc_am_pdu_info_t* pdu_info_cursor_p = NULL;
|
||||||
@@ -196,7 +189,7 @@ rlc_am_rx_update_vr_ms(
|
|||||||
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
||||||
|
|
||||||
if (((rlc_am_rx_pdu_management_t*)(cursor_p->data))->all_segments_received == 0) {
|
if (((rlc_am_rx_pdu_management_t*)(cursor_p->data))->all_segments_received == 0) {
|
||||||
#ifdef TRACE_RLC_AM_RX
|
#if TRACE_RLC_AM_RX
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[UPDATE VR(MS)] UPDATED VR(MS) %04d -> %04d\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[UPDATE VR(MS)] UPDATED VR(MS) %04d -> %04d\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
rlc_pP->vr_ms, pdu_info_cursor_p->sn);
|
rlc_pP->vr_ms, pdu_info_cursor_p->sn);
|
||||||
@@ -208,7 +201,7 @@ rlc_am_rx_update_vr_ms(
|
|||||||
cursor_p = cursor_p->next;
|
cursor_p = cursor_p->next;
|
||||||
} while (cursor_p != NULL);
|
} while (cursor_p != NULL);
|
||||||
|
|
||||||
#ifdef TRACE_RLC_AM_RX
|
#if TRACE_RLC_AM_RX
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[UPDATE VR(MS)] UPDATED VR(MS) %04d -> %04d\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[UPDATE VR(MS)] UPDATED VR(MS) %04d -> %04d\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
rlc_pP->vr_ms,
|
rlc_pP->vr_ms,
|
||||||
@@ -224,7 +217,6 @@ rlc_am_rx_update_vr_r(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t * const rlc_pP,
|
rlc_am_entity_t * const rlc_pP,
|
||||||
mem_block_t* tb_pP)
|
mem_block_t* tb_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_am_pdu_info_t* pdu_info_cursor_p = NULL;
|
rlc_am_pdu_info_t* pdu_info_cursor_p = NULL;
|
||||||
mem_block_t* cursor_p;
|
mem_block_t* cursor_p;
|
||||||
@@ -240,7 +232,7 @@ rlc_am_rx_update_vr_r(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TRACE_RLC_AM_RX
|
#if TRACE_RLC_AM_RX
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[UPDATE VR(R)] UPDATED VR(R) %04d -> %04d\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[UPDATE VR(R)] UPDATED VR(R) %04d -> %04d\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
rlc_pP->vr_r,
|
rlc_pP->vr_r,
|
||||||
@@ -267,7 +259,6 @@ rlc_am_receive_routing (
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t * const rlc_pP,
|
rlc_am_entity_t * const rlc_pP,
|
||||||
struct mac_data_ind data_indP)
|
struct mac_data_ind data_indP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
mem_block_t *tb_p = NULL;
|
mem_block_t *tb_p = NULL;
|
||||||
uint8_t *first_byte_p = NULL;
|
uint8_t *first_byte_p = NULL;
|
||||||
@@ -309,7 +300,6 @@ rlc_am_receive_process_data_pdu (
|
|||||||
mem_block_t* tb_pP,
|
mem_block_t* tb_pP,
|
||||||
uint8_t* first_byte_pP,
|
uint8_t* first_byte_pP,
|
||||||
uint16_t tb_size_in_bytesP)
|
uint16_t tb_size_in_bytesP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
// 5.1.3.2 Receive operations
|
// 5.1.3.2 Receive operations
|
||||||
// 5.1.3.2.1 General
|
// 5.1.3.2.1 General
|
||||||
@@ -367,7 +357,7 @@ rlc_am_receive_process_data_pdu (
|
|||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[PROCESS RX PDU] PDU DISCARDED, STATUS REQUESTED:\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[PROCESS RX PDU] PDU DISCARDED, STATUS REQUESTED:\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||||
rlc_pP->status_requested = 1;
|
rlc_pP->status_requested = 1;
|
||||||
#if defined(RLC_STOP_ON_LOST_PDU)
|
#if RLC_STOP_ON_LOST_PDU
|
||||||
AssertFatal( 0 == 1,
|
AssertFatal( 0 == 1,
|
||||||
PROTOCOL_RLC_AM_CTXT_FMT" LOST PDU DETECTED\n",
|
PROTOCOL_RLC_AM_CTXT_FMT" LOST PDU DETECTED\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||||
@@ -405,7 +395,7 @@ rlc_am_receive_process_data_pdu (
|
|||||||
// - set VR(X) to VR(H).
|
// - set VR(X) to VR(H).
|
||||||
|
|
||||||
|
|
||||||
#ifdef TRACE_RLC_AM_RX
|
#if TRACE_RLC_AM_RX
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[PROCESS RX PDU] RX LIST AFTER INSERTION:\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[PROCESS RX PDU] RX LIST AFTER INSERTION:\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||||
rlc_am_rx_list_display(rlc_pP, "rlc_am_receive_process_data_pdu AFTER INSERTION ");
|
rlc_am_rx_list_display(rlc_pP, "rlc_am_receive_process_data_pdu AFTER INSERTION ");
|
||||||
|
|||||||
@@ -26,8 +26,8 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_AM_MODULE
|
#define RLC_AM_MODULE 1
|
||||||
#define RLC_AM_RETRANSMIT_C
|
#define RLC_AM_RETRANSMIT_C 1
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//#include "rtos_header.h"
|
//#include "rtos_header.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -43,7 +43,6 @@ void rlc_am_nack_pdu (
|
|||||||
const rlc_sn_t snP,
|
const rlc_sn_t snP,
|
||||||
const sdu_size_t so_startP,
|
const sdu_size_t so_startP,
|
||||||
const sdu_size_t so_endP)
|
const sdu_size_t so_endP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
// 5.2.1 Retransmission
|
// 5.2.1 Retransmission
|
||||||
// ...
|
// ...
|
||||||
@@ -112,7 +111,7 @@ void rlc_am_nack_pdu (
|
|||||||
rlc_pP->input_sdus[sdu_index].nb_pdus_ack += 1;
|
rlc_pP->input_sdus[sdu_index].nb_pdus_ack += 1;
|
||||||
|
|
||||||
if (rlc_pP->input_sdus[sdu_index].nb_pdus_ack == rlc_pP->input_sdus[sdu_index].nb_pdus) {
|
if (rlc_pP->input_sdus[sdu_index].nb_pdus_ack == rlc_pP->input_sdus[sdu_index].nb_pdus) {
|
||||||
#ifdef TEST_RLC_AM
|
#if TEST_RLC_AM
|
||||||
rlc_am_v9_3_0_test_data_conf (rlc_pP->module_id, rlc_pP->rb_id, rlc_pP->input_sdus[sdu_index].mui, RLC_SDU_CONFIRM_NO);
|
rlc_am_v9_3_0_test_data_conf (rlc_pP->module_id, rlc_pP->rb_id, rlc_pP->input_sdus[sdu_index].mui, RLC_SDU_CONFIRM_NO);
|
||||||
#else
|
#else
|
||||||
rlc_data_conf(ctxt_pP, rlc_pP->rb_id, rlc_pP->input_sdus[sdu_index].mui, RLC_SDU_CONFIRM_NO, rlc_pP->is_data_plane);
|
rlc_data_conf(ctxt_pP, rlc_pP->rb_id, rlc_pP->input_sdus[sdu_index].mui, RLC_SDU_CONFIRM_NO, rlc_pP->is_data_plane);
|
||||||
@@ -142,7 +141,6 @@ void rlc_am_ack_pdu (
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
const rlc_sn_t snP)
|
const rlc_sn_t snP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
mem_block_t* mb_p = rlc_pP->pdu_retrans_buffer[snP].mem_block;
|
mem_block_t* mb_p = rlc_pP->pdu_retrans_buffer[snP].mem_block;
|
||||||
int pdu_sdu_index;
|
int pdu_sdu_index;
|
||||||
@@ -173,7 +171,7 @@ void rlc_am_ack_pdu (
|
|||||||
|
|
||||||
if ((rlc_pP->input_sdus[sdu_index].nb_pdus_ack == rlc_pP->input_sdus[sdu_index].nb_pdus) &&
|
if ((rlc_pP->input_sdus[sdu_index].nb_pdus_ack == rlc_pP->input_sdus[sdu_index].nb_pdus) &&
|
||||||
(rlc_pP->input_sdus[sdu_index].sdu_remaining_size == 0)) {
|
(rlc_pP->input_sdus[sdu_index].sdu_remaining_size == 0)) {
|
||||||
#ifdef TEST_RLC_AM
|
#if TEST_RLC_AM
|
||||||
rlc_am_v9_3_0_test_data_conf (
|
rlc_am_v9_3_0_test_data_conf (
|
||||||
rlc_pP->module_id,
|
rlc_pP->module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
@@ -276,7 +274,6 @@ mem_block_t* rlc_am_retransmit_get_copy (
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
const rlc_sn_t snP)
|
const rlc_sn_t snP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
mem_block_t* mb_original_p = rlc_pP->pdu_retrans_buffer[snP].mem_block;
|
mem_block_t* mb_original_p = rlc_pP->pdu_retrans_buffer[snP].mem_block;
|
||||||
|
|
||||||
@@ -305,7 +302,6 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
const rlc_sn_t snP,
|
const rlc_sn_t snP,
|
||||||
sdu_size_t * const sizeP /* in-out*/)
|
sdu_size_t * const sizeP /* in-out*/)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
|
|
||||||
// 5.2 ARQ procedures
|
// 5.2 ARQ procedures
|
||||||
@@ -487,7 +483,7 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
test_start_offset,
|
test_start_offset,
|
||||||
test_li_sum);
|
test_li_sum);
|
||||||
/*if (test_max_copy_payload_size > (test_li_sum - test_start_offset)) {
|
/*if (test_max_copy_payload_size > (test_li_sum - test_start_offset)) {
|
||||||
#ifdef TRACE_RLC_AM_RESEGMENT
|
#if TRACE_RLC_AM_RESEGMENT
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] CUT test_max_copy_payload_size with test_li_sum - test_start_offset %d -> %d\n",ctxt_pP->frame, rlc_pP->module_id, rlc_pP->rb_id, test_max_copy_payload_size, test_li_sum - test_start_offset);
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] CUT test_max_copy_payload_size with test_li_sum - test_start_offset %d -> %d\n",ctxt_pP->frame, rlc_pP->module_id, rlc_pP->rb_id, test_max_copy_payload_size, test_li_sum - test_start_offset);
|
||||||
#endif
|
#endif
|
||||||
test_max_copy_payload_size = test_li_sum - test_start_offset;
|
test_max_copy_payload_size = test_li_sum - test_start_offset;
|
||||||
@@ -771,7 +767,6 @@ void rlc_am_tx_buffer_display (
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t* const rlc_pP,
|
rlc_am_entity_t* const rlc_pP,
|
||||||
char* const message_pP)
|
char* const message_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_sn_t sn = rlc_pP->vt_a;
|
rlc_sn_t sn = rlc_pP->vt_a;
|
||||||
int i, loop = 0;
|
int i, loop = 0;
|
||||||
@@ -824,7 +819,6 @@ void rlc_am_tx_buffer_display (
|
|||||||
void rlc_am_retransmit_any_pdu(
|
void rlc_am_retransmit_any_pdu(
|
||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t* const rlc_pP)
|
rlc_am_entity_t* const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_sn_t sn = (rlc_pP->vt_s - 1) & RLC_AM_SN_MASK;
|
rlc_sn_t sn = (rlc_pP->vt_s - 1) & RLC_AM_SN_MASK;
|
||||||
rlc_sn_t sn_end = (rlc_pP->vt_a - 1) & RLC_AM_SN_MASK;
|
rlc_sn_t sn_end = (rlc_pP->vt_a - 1) & RLC_AM_SN_MASK;
|
||||||
@@ -847,7 +841,7 @@ void rlc_am_retransmit_any_pdu(
|
|||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[FORCE-TRAFFIC] RE-SEND DATA PDU SN %04d\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[FORCE-TRAFFIC] RE-SEND DATA PDU SN %04d\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
sn);
|
sn);
|
||||||
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
|
#if MESSAGE_CHART_GENERATOR_RLC_MAC
|
||||||
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
||||||
"0 "PROTOCOL_RLC_AM_MSC_FMT" RTX any pdu found SN %u",\
|
"0 "PROTOCOL_RLC_AM_MSC_FMT" RTX any pdu found SN %u",\
|
||||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), sn);
|
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), sn);
|
||||||
@@ -882,7 +876,7 @@ void rlc_am_retransmit_any_pdu(
|
|||||||
found_pdu_sn);
|
found_pdu_sn);
|
||||||
|
|
||||||
if (rlc_pP->nb_bytes_requested_by_mac > 4) {
|
if (rlc_pP->nb_bytes_requested_by_mac > 4) {
|
||||||
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
|
#if MESSAGE_CHART_GENERATOR_RLC_MAC
|
||||||
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
||||||
"0 "PROTOCOL_RLC_AM_MSC_FMT" RTX any pdu found SN %u (subseg)",\
|
"0 "PROTOCOL_RLC_AM_MSC_FMT" RTX any pdu found SN %u (subseg)",\
|
||||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), found_pdu_sn);
|
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), found_pdu_sn);
|
||||||
|
|||||||
@@ -26,11 +26,9 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_AM_MODULE
|
#define RLC_AM_MODULE 1
|
||||||
#define RLC_AM_RX_LIST_C
|
#define RLC_AM_RX_LIST_C 1
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
//#include "rtos_header.h"
|
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
@@ -49,7 +47,6 @@ rlc_am_rx_list_insert_pdu(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t* const rlc_pP,
|
rlc_am_entity_t* const rlc_pP,
|
||||||
mem_block_t* const tb_pP)
|
mem_block_t* const tb_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_am_pdu_info_t* pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
|
rlc_am_pdu_info_t* pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
|
||||||
rlc_am_pdu_info_t* pdu_info_cursor_p = NULL;
|
rlc_am_pdu_info_t* pdu_info_cursor_p = NULL;
|
||||||
@@ -496,7 +493,6 @@ rlc_am_rx_check_all_byte_segments(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t* const rlc_pP,
|
rlc_am_entity_t* const rlc_pP,
|
||||||
mem_block_t* const tb_pP)
|
mem_block_t* const tb_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_am_pdu_info_t *pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
|
rlc_am_pdu_info_t *pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
|
||||||
mem_block_t *cursor_p = NULL;
|
mem_block_t *cursor_p = NULL;
|
||||||
@@ -584,7 +580,6 @@ rlc_am_rx_mark_all_segments_received(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t* const rlc_pP,
|
rlc_am_entity_t* const rlc_pP,
|
||||||
mem_block_t* const fisrt_segment_tbP)
|
mem_block_t* const fisrt_segment_tbP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_am_pdu_info_t* pdu_info_p = &((rlc_am_rx_pdu_management_t*)(fisrt_segment_tbP->data))->pdu_info;
|
rlc_am_pdu_info_t* pdu_info_p = &((rlc_am_rx_pdu_management_t*)(fisrt_segment_tbP->data))->pdu_info;
|
||||||
rlc_am_pdu_info_t* pdu_info_cursor_p = NULL;
|
rlc_am_pdu_info_t* pdu_info_cursor_p = NULL;
|
||||||
@@ -616,7 +611,6 @@ void
|
|||||||
rlc_am_rx_list_reassemble_rlc_sdus(
|
rlc_am_rx_list_reassemble_rlc_sdus(
|
||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t* const rlc_pP)
|
rlc_am_entity_t* const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
mem_block_t* cursor_p = NULL;
|
mem_block_t* cursor_p = NULL;
|
||||||
rlc_am_rx_pdu_management_t* rlc_am_rx_old_pdu_management = NULL;
|
rlc_am_rx_pdu_management_t* rlc_am_rx_old_pdu_management = NULL;
|
||||||
@@ -642,7 +636,7 @@ rlc_am_rx_list_reassemble_rlc_sdus(
|
|||||||
|
|
||||||
rlc_am_rx_pdu_management_p = ((rlc_am_rx_pdu_management_t*)(cursor_p->data));
|
rlc_am_rx_pdu_management_p = ((rlc_am_rx_pdu_management_t*)(cursor_p->data));
|
||||||
} else {
|
} else {
|
||||||
#if defined(RLC_STOP_ON_LOST_PDU)
|
#if RLC_STOP_ON_LOST_PDU
|
||||||
|
|
||||||
if (list2_get_head(&rlc_pP->receiver_buffer) != cursor_p) {
|
if (list2_get_head(&rlc_pP->receiver_buffer) != cursor_p) {
|
||||||
AssertFatal( 0 == 1,
|
AssertFatal( 0 == 1,
|
||||||
@@ -663,7 +657,6 @@ list2_insert_before_element (
|
|||||||
mem_block_t * element_to_insert_pP,
|
mem_block_t * element_to_insert_pP,
|
||||||
mem_block_t * element_pP,
|
mem_block_t * element_pP,
|
||||||
list2_t * list_pP)
|
list2_t * list_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
if ((element_to_insert_pP != NULL) && (element_pP != NULL)) {
|
if ((element_to_insert_pP != NULL) && (element_pP != NULL)) {
|
||||||
list_pP->nb_elements = list_pP->nb_elements + 1;
|
list_pP->nb_elements = list_pP->nb_elements + 1;
|
||||||
@@ -690,7 +683,6 @@ list2_insert_after_element (
|
|||||||
mem_block_t * element_to_insert_pP,
|
mem_block_t * element_to_insert_pP,
|
||||||
mem_block_t * element_pP,
|
mem_block_t * element_pP,
|
||||||
list2_t * list_pP)
|
list2_t * list_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
|
|
||||||
if ((element_to_insert_pP != NULL) && (element_pP != NULL)) {
|
if ((element_to_insert_pP != NULL) && (element_pP != NULL)) {
|
||||||
@@ -717,7 +709,6 @@ void
|
|||||||
rlc_am_rx_list_display (
|
rlc_am_rx_list_display (
|
||||||
const rlc_am_entity_t* const rlc_pP,
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
char* message_pP)
|
char* message_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
mem_block_t *cursor_p = NULL;
|
mem_block_t *cursor_p = NULL;
|
||||||
unsigned int loop = 0;
|
unsigned int loop = 0;
|
||||||
|
|||||||
@@ -26,14 +26,13 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_AM_MODULE
|
#define RLC_AM_MODULE 1
|
||||||
#define RLC_AM_SEGMENT_C
|
#define RLC_AM_SEGMENT_C 1
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#ifdef USER_MODE
|
#if USER_MODE
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#endif
|
#endif
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//#include "rtos_header.h"
|
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include "msc.h"
|
#include "msc.h"
|
||||||
@@ -48,7 +47,6 @@ void rlc_am_pdu_polling (
|
|||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
rlc_am_pdu_sn_10_t *const pdu_pP,
|
rlc_am_pdu_sn_10_t *const pdu_pP,
|
||||||
const int16_t payload_sizeP)
|
const int16_t payload_sizeP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
// 5.2.2 Polling
|
// 5.2.2 Polling
|
||||||
// An AM RLC entity can poll its peer AM RLC entity in order to trigger STATUS reporting at the peer AM RLC entity.
|
// An AM RLC entity can poll its peer AM RLC entity in order to trigger STATUS reporting at the peer AM RLC entity.
|
||||||
@@ -127,7 +125,6 @@ void rlc_am_segment_10 (
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlc_pP)
|
rlc_am_entity_t *const rlc_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
list_t pdus;
|
list_t pdus;
|
||||||
sdu_size_t pdu_remaining_size = 0;
|
sdu_size_t pdu_remaining_size = 0;
|
||||||
sdu_size_t test_pdu_remaining_size = 0;
|
sdu_size_t test_pdu_remaining_size = 0;
|
||||||
@@ -465,7 +462,7 @@ void rlc_am_segment_10 (
|
|||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
sdu_mngt_p->sdu_remaining_size,
|
sdu_mngt_p->sdu_remaining_size,
|
||||||
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
|
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
|
||||||
#ifdef USER_MODE
|
#if USER_MODE
|
||||||
assert(1!=1);
|
assert(1!=1);
|
||||||
#endif
|
#endif
|
||||||
memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size);
|
memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size);
|
||||||
|
|||||||
@@ -26,20 +26,18 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_AM_MODULE
|
#define RLC_AM_MODULE 1
|
||||||
#define RLC_AM_SEGMENT_HOLES_C
|
#define RLC_AM_SEGMENT_HOLES_C 1
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include "rlc_am.h"
|
#include "rlc_am.h"
|
||||||
#include "LAYER2/MAC/extern.h"
|
#include "LAYER2/MAC/extern.h"
|
||||||
#include "UTIL/LOG/log.h"
|
#include "UTIL/LOG/log.h"
|
||||||
#define TRACE_RLC_AM_HOLE
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_clear_holes (
|
void rlc_am_clear_holes (
|
||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
const rlc_sn_t snP)
|
const rlc_sn_t snP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_pP->pdu_retrans_buffer[snP].num_holes = 0;
|
rlc_pP->pdu_retrans_buffer[snP].num_holes = 0;
|
||||||
}
|
}
|
||||||
@@ -49,7 +47,6 @@ void rlc_am_shift_down_holes (
|
|||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
const rlc_sn_t snP,
|
const rlc_sn_t snP,
|
||||||
const int indexP)
|
const int indexP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -66,7 +63,6 @@ void rlc_am_shift_up_holes (
|
|||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
const rlc_sn_t snP,
|
const rlc_sn_t snP,
|
||||||
const int indexP)
|
const int indexP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
// shift include indexP
|
// shift include indexP
|
||||||
int i;
|
int i;
|
||||||
@@ -86,10 +82,9 @@ void rlc_am_remove_hole (
|
|||||||
const rlc_sn_t snP,
|
const rlc_sn_t snP,
|
||||||
const sdu_size_t so_startP,
|
const sdu_size_t so_startP,
|
||||||
const sdu_size_t so_stopP)
|
const sdu_size_t so_stopP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
#ifdef TRACE_RLC_AM_HOLE
|
#if TRACE_RLC_AM_HOLE
|
||||||
LOG_D(RLC,
|
LOG_D(RLC,
|
||||||
PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] REMOVE HOLE SN %04d so_startP %05d so_stopP %05d rlc_pP->pdu_retrans_buffer[snP].nack_so_start %05d rlc_pP->pdu_retrans_buffer[snP].nack_so_stop %05d\n",
|
PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] REMOVE HOLE SN %04d so_startP %05d so_stopP %05d rlc_pP->pdu_retrans_buffer[snP].nack_so_start %05d rlc_pP->pdu_retrans_buffer[snP].nack_so_stop %05d\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
@@ -104,7 +99,7 @@ void rlc_am_remove_hole (
|
|||||||
if (rlc_pP->pdu_retrans_buffer[snP].num_holes == 0) {
|
if (rlc_pP->pdu_retrans_buffer[snP].num_holes == 0) {
|
||||||
assert(so_startP == rlc_pP->pdu_retrans_buffer[snP].nack_so_start);
|
assert(so_startP == rlc_pP->pdu_retrans_buffer[snP].nack_so_start);
|
||||||
assert(so_stopP <= rlc_pP->pdu_retrans_buffer[snP].nack_so_stop);
|
assert(so_stopP <= rlc_pP->pdu_retrans_buffer[snP].nack_so_stop);
|
||||||
#ifdef TRACE_RLC_AM_HOLE
|
#if TRACE_RLC_AM_HOLE
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] REMOVE HOLE SN %04d MODIFIED nack_so_start %05d->%05d\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] REMOVE HOLE SN %04d MODIFIED nack_so_start %05d->%05d\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
snP,
|
snP,
|
||||||
@@ -135,7 +130,7 @@ void rlc_am_remove_hole (
|
|||||||
rlc_pP->pdu_retrans_buffer[snP].nack_so_stop = rlc_pP->pdu_retrans_buffer[snP].hole_so_stop[rlc_pP->pdu_retrans_buffer[snP].num_holes - 1];
|
rlc_pP->pdu_retrans_buffer[snP].nack_so_stop = rlc_pP->pdu_retrans_buffer[snP].hole_so_stop[rlc_pP->pdu_retrans_buffer[snP].num_holes - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TRACE_RLC_AM_HOLE
|
#if TRACE_RLC_AM_HOLE
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] REMOVE HOLE SN %04d NOW nack_so_start %05d nack_so_stop %05d num holes %d\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] REMOVE HOLE SN %04d NOW nack_so_start %05d nack_so_stop %05d num holes %d\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
snP,
|
snP,
|
||||||
@@ -169,7 +164,7 @@ void rlc_am_remove_hole (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TRACE_RLC_AM_HOLE
|
#if TRACE_RLC_AM_HOLE
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] REMOVE HOLE SN %04d NOW nack_so_start %05d nack_so_stop %05d num holes %d\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] REMOVE HOLE SN %04d NOW nack_so_start %05d nack_so_stop %05d num holes %d\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
snP,
|
snP,
|
||||||
@@ -186,12 +181,11 @@ void rlc_am_get_next_hole (
|
|||||||
const rlc_sn_t snP,
|
const rlc_sn_t snP,
|
||||||
sdu_size_t* const so_startP,
|
sdu_size_t* const so_startP,
|
||||||
sdu_size_t* const so_stopP)
|
sdu_size_t* const so_stopP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
if (rlc_pP->pdu_retrans_buffer[snP].num_holes == 0) {
|
if (rlc_pP->pdu_retrans_buffer[snP].num_holes == 0) {
|
||||||
*so_startP = rlc_pP->pdu_retrans_buffer[snP].nack_so_start;
|
*so_startP = rlc_pP->pdu_retrans_buffer[snP].nack_so_start;
|
||||||
*so_stopP = rlc_pP->pdu_retrans_buffer[snP].nack_so_stop;
|
*so_stopP = rlc_pP->pdu_retrans_buffer[snP].nack_so_stop;
|
||||||
#ifdef TRACE_RLC_AM_HOLE
|
#if TRACE_RLC_AM_HOLE
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] rlc_am_get_next_hole(SN %04d) %05d->%05d (NUM HOLES == 0)\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] rlc_am_get_next_hole(SN %04d) %05d->%05d (NUM HOLES == 0)\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
snP,
|
snP,
|
||||||
@@ -201,7 +195,7 @@ void rlc_am_get_next_hole (
|
|||||||
} else {
|
} else {
|
||||||
*so_startP = rlc_pP->pdu_retrans_buffer[snP].hole_so_start[0];
|
*so_startP = rlc_pP->pdu_retrans_buffer[snP].hole_so_start[0];
|
||||||
*so_stopP = rlc_pP->pdu_retrans_buffer[snP].hole_so_stop[0];
|
*so_stopP = rlc_pP->pdu_retrans_buffer[snP].hole_so_stop[0];
|
||||||
#ifdef TRACE_RLC_AM_HOLE
|
#if TRACE_RLC_AM_HOLE
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] rlc_am_get_next_hole(SN %04d) %05d->%05d (NUM HOLES == %d)\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] rlc_am_get_next_hole(SN %04d) %05d->%05d (NUM HOLES == %d)\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
snP,
|
snP,
|
||||||
@@ -218,7 +212,6 @@ void rlc_am_add_hole (
|
|||||||
const rlc_sn_t snP,
|
const rlc_sn_t snP,
|
||||||
const sdu_size_t so_startP,
|
const sdu_size_t so_startP,
|
||||||
sdu_size_t so_stopP)
|
sdu_size_t so_stopP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
int i, hole_index;
|
int i, hole_index;
|
||||||
|
|
||||||
@@ -232,7 +225,7 @@ void rlc_am_add_hole (
|
|||||||
rlc_pP->pdu_retrans_buffer[snP].num_holes = 0;
|
rlc_pP->pdu_retrans_buffer[snP].num_holes = 0;
|
||||||
rlc_pP->pdu_retrans_buffer[snP].nack_so_start = so_startP;
|
rlc_pP->pdu_retrans_buffer[snP].nack_so_start = so_startP;
|
||||||
rlc_pP->pdu_retrans_buffer[snP].nack_so_stop = so_stopP;
|
rlc_pP->pdu_retrans_buffer[snP].nack_so_stop = so_stopP;
|
||||||
#ifdef TRACE_RLC_AM_HOLE
|
#if TRACE_RLC_AM_HOLE
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] SN %04d GLOBAL NACK 0->%05d\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] SN %04d GLOBAL NACK 0->%05d\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
snP,
|
snP,
|
||||||
@@ -255,7 +248,7 @@ void rlc_am_add_hole (
|
|||||||
|
|
||||||
rlc_pP->pdu_retrans_buffer[snP].nack_so_start = so_startP;
|
rlc_pP->pdu_retrans_buffer[snP].nack_so_start = so_startP;
|
||||||
rlc_pP->pdu_retrans_buffer[snP].nack_so_stop = so_stopP;
|
rlc_pP->pdu_retrans_buffer[snP].nack_so_stop = so_stopP;
|
||||||
#ifdef TRACE_RLC_AM_HOLE
|
#if TRACE_RLC_AM_HOLE
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] FIRST HOLE SN %04d GLOBAL NACK %05d->%05d\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] FIRST HOLE SN %04d GLOBAL NACK %05d->%05d\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
snP,
|
snP,
|
||||||
@@ -290,7 +283,7 @@ void rlc_am_add_hole (
|
|||||||
}
|
}
|
||||||
|
|
||||||
rlc_pP->pdu_retrans_buffer[snP].num_holes += 1;
|
rlc_pP->pdu_retrans_buffer[snP].num_holes += 1;
|
||||||
#ifdef TRACE_RLC_AM_HOLE
|
#if TRACE_RLC_AM_HOLE
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] INSERT %d th HOLE SN %04d GLOBAL NACK %05d->%05d\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] INSERT %d th HOLE SN %04d GLOBAL NACK %05d->%05d\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
rlc_pP->pdu_retrans_buffer[snP].num_holes,
|
rlc_pP->pdu_retrans_buffer[snP].num_holes,
|
||||||
@@ -314,7 +307,7 @@ void rlc_am_add_hole (
|
|||||||
rlc_pP->pdu_retrans_buffer[snP].num_holes += 1;
|
rlc_pP->pdu_retrans_buffer[snP].num_holes += 1;
|
||||||
// update nack "window" vars nack_so_start, nack_so_stop
|
// update nack "window" vars nack_so_start, nack_so_stop
|
||||||
rlc_pP->pdu_retrans_buffer[snP].nack_so_stop = so_stopP;
|
rlc_pP->pdu_retrans_buffer[snP].nack_so_stop = so_stopP;
|
||||||
#ifdef TRACE_RLC_AM_HOLE
|
#if TRACE_RLC_AM_HOLE
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] INSERT THE %d th LAST HOLE SN %04d GLOBAL NACK %05d->%05d\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[HOLE] INSERT THE %d th LAST HOLE SN %04d GLOBAL NACK %05d->%05d\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
rlc_pP->pdu_retrans_buffer[snP].num_holes,
|
rlc_pP->pdu_retrans_buffer[snP].num_holes,
|
||||||
|
|||||||
@@ -26,14 +26,14 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_AM_MODULE
|
#define RLC_AM_MODULE 1
|
||||||
#define RLC_AM_STATUS_REPORT_C
|
#define RLC_AM_STATUS_REPORT_C 1
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#if defined(ENABLE_ITTI)
|
#if ENABLE_ITTI
|
||||||
# include "intertask_interface.h"
|
# include "intertask_interface.h"
|
||||||
#endif
|
#endif
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
@@ -42,16 +42,13 @@
|
|||||||
#include "LAYER2/MAC/extern.h"
|
#include "LAYER2/MAC/extern.h"
|
||||||
#include "UTIL/LOG/log.h"
|
#include "UTIL/LOG/log.h"
|
||||||
|
|
||||||
//#define TRACE_RLC_AM_STATUS_CREATION 1
|
# if ENABLE_ITTI
|
||||||
|
|
||||||
# if defined(ENABLE_ITTI)
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_am_itti_display_status_ind_infos(
|
rlc_am_itti_display_status_ind_infos(
|
||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const rlc_am_entity_t *const rlc_pP,
|
const rlc_am_entity_t *const rlc_pP,
|
||||||
const rlc_am_control_pdu_info_t *const pdu_info_pP)
|
const rlc_am_control_pdu_info_t *const pdu_info_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
char message_string[1000];
|
char message_string[1000];
|
||||||
size_t message_string_size = 0;
|
size_t message_string_size = 0;
|
||||||
@@ -91,7 +88,6 @@ uint16_t rlc_am_read_bit_field(
|
|||||||
unsigned int* bit_pos_pP,
|
unsigned int* bit_pos_pP,
|
||||||
const signed int bits_to_readP)
|
const signed int bits_to_readP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
uint16_t value = 0;
|
uint16_t value = 0;
|
||||||
unsigned int bits_read = 0;
|
unsigned int bits_read = 0;
|
||||||
signed int bits_to_read = bits_to_readP;
|
signed int bits_to_read = bits_to_readP;
|
||||||
@@ -130,7 +126,6 @@ rlc_am_write8_bit_field(
|
|||||||
const signed int bits_to_writeP,
|
const signed int bits_to_writeP,
|
||||||
const uint8_t valueP)
|
const uint8_t valueP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
unsigned int available_bits;
|
unsigned int available_bits;
|
||||||
signed int bits_to_write= bits_to_writeP;
|
signed int bits_to_write= bits_to_writeP;
|
||||||
|
|
||||||
@@ -166,7 +161,6 @@ rlc_am_write16_bit_field(
|
|||||||
signed int bits_to_writeP,
|
signed int bits_to_writeP,
|
||||||
const uint16_t valueP)
|
const uint16_t valueP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
assert(bits_to_writeP <= 16);
|
assert(bits_to_writeP <= 16);
|
||||||
|
|
||||||
if (bits_to_writeP > 8) {
|
if (bits_to_writeP > 8) {
|
||||||
@@ -182,7 +176,6 @@ rlc_am_get_control_pdu_infos(
|
|||||||
rlc_am_pdu_sn_10_t* const header_pP,
|
rlc_am_pdu_sn_10_t* const header_pP,
|
||||||
sdu_size_t * const total_size_pP,
|
sdu_size_t * const total_size_pP,
|
||||||
rlc_am_control_pdu_info_t* const pdu_info_pP)
|
rlc_am_control_pdu_info_t* const pdu_info_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
memset(pdu_info_pP, 0, sizeof (rlc_am_control_pdu_info_t));
|
memset(pdu_info_pP, 0, sizeof (rlc_am_control_pdu_info_t));
|
||||||
|
|
||||||
@@ -250,7 +243,6 @@ void
|
|||||||
rlc_am_display_control_pdu_infos(
|
rlc_am_display_control_pdu_infos(
|
||||||
const rlc_am_control_pdu_info_t* const pdu_info_pP
|
const rlc_am_control_pdu_info_t* const pdu_info_pP
|
||||||
)
|
)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
int num_nack;
|
int num_nack;
|
||||||
|
|
||||||
@@ -280,7 +272,6 @@ rlc_am_receive_process_control_pdu(
|
|||||||
mem_block_t* const tb_pP,
|
mem_block_t* const tb_pP,
|
||||||
uint8_t** first_byte_ppP,
|
uint8_t** first_byte_ppP,
|
||||||
sdu_size_t * const tb_size_in_bytes_pP)
|
sdu_size_t * const tb_size_in_bytes_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_am_pdu_sn_10_t *rlc_am_pdu_sn_10_p = (rlc_am_pdu_sn_10_t*)*first_byte_ppP;
|
rlc_am_pdu_sn_10_t *rlc_am_pdu_sn_10_p = (rlc_am_pdu_sn_10_t*)*first_byte_ppP;
|
||||||
sdu_size_t initial_pdu_size = *tb_size_in_bytes_pP;
|
sdu_size_t initial_pdu_size = *tb_size_in_bytes_pP;
|
||||||
@@ -396,7 +387,6 @@ rlc_am_write_status_pdu(
|
|||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
rlc_am_pdu_sn_10_t* const rlc_am_pdu_sn_10_pP,
|
rlc_am_pdu_sn_10_t* const rlc_am_pdu_sn_10_pP,
|
||||||
rlc_am_control_pdu_info_t* const pdu_info_pP)
|
rlc_am_control_pdu_info_t* const pdu_info_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
unsigned int bit_pos = 4; // range from 0 (MSB/left) to 7 (LSB/right)
|
unsigned int bit_pos = 4; // range from 0 (MSB/left) to 7 (LSB/right)
|
||||||
uint8_t* byte_pos_p = &rlc_am_pdu_sn_10_pP->b1;
|
uint8_t* byte_pos_p = &rlc_am_pdu_sn_10_pP->b1;
|
||||||
@@ -430,7 +420,7 @@ rlc_am_write_status_pdu(
|
|||||||
num_bytes += 1;
|
num_bytes += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TRACE_RLC_AM_STATUS_CREATION
|
#if TRACE_RLC_AM_STATUS_CREATION
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT" WROTE STATUS PDU %d BYTES\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT" WROTE STATUS PDU %d BYTES\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
num_bytes);
|
num_bytes);
|
||||||
@@ -443,7 +433,6 @@ rlc_am_send_status_pdu(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlc_pP
|
rlc_am_entity_t *const rlc_pP
|
||||||
)
|
)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
// When STATUS reporting has been triggered, the receiving side of an AM RLC entity shall:
|
// When STATUS reporting has been triggered, the receiving side of an AM RLC entity shall:
|
||||||
// - if t-StatusProhibit is not running:
|
// - if t-StatusProhibit is not running:
|
||||||
@@ -481,7 +470,7 @@ rlc_am_send_status_pdu(
|
|||||||
memset(&control_pdu_info, 0, sizeof(rlc_am_control_pdu_info_t));
|
memset(&control_pdu_info, 0, sizeof(rlc_am_control_pdu_info_t));
|
||||||
// header size
|
// header size
|
||||||
nb_bits_to_transmit = nb_bits_to_transmit - 15;
|
nb_bits_to_transmit = nb_bits_to_transmit - 15;
|
||||||
#ifdef TRACE_RLC_AM_STATUS_CREATION
|
#if TRACE_RLC_AM_STATUS_CREATION
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] nb_bits_to_transmit %d (15 already allocated for header)\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] nb_bits_to_transmit %d (15 already allocated for header)\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
nb_bits_to_transmit);
|
nb_bits_to_transmit);
|
||||||
@@ -498,7 +487,7 @@ rlc_am_send_status_pdu(
|
|||||||
|
|
||||||
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
||||||
sn_cursor = pdu_info_cursor_p->sn;
|
sn_cursor = pdu_info_cursor_p->sn;
|
||||||
#ifdef TRACE_RLC_AM_STATUS_CREATION
|
#if TRACE_RLC_AM_STATUS_CREATION
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d FIND VR(R) <= SN sn_cursor %04d -> %04d\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d FIND VR(R) <= SN sn_cursor %04d -> %04d\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
__LINE__,
|
__LINE__,
|
||||||
@@ -513,7 +502,7 @@ rlc_am_send_status_pdu(
|
|||||||
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
||||||
all_segments_received = ((rlc_am_rx_pdu_management_t*)(cursor_p->data))->all_segments_received;
|
all_segments_received = ((rlc_am_rx_pdu_management_t*)(cursor_p->data))->all_segments_received;
|
||||||
sn_cursor = pdu_info_cursor_p->sn;
|
sn_cursor = pdu_info_cursor_p->sn;
|
||||||
#ifdef TRACE_RLC_AM_STATUS_CREATION
|
#if TRACE_RLC_AM_STATUS_CREATION
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d LOOPING sn_cursor %04d previous sn_cursor %04d \n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d LOOPING sn_cursor %04d previous sn_cursor %04d \n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
__LINE__,
|
__LINE__,
|
||||||
@@ -532,7 +521,7 @@ rlc_am_send_status_pdu(
|
|||||||
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
||||||
all_segments_received = ((rlc_am_rx_pdu_management_t*)(cursor_p->data))->all_segments_received;
|
all_segments_received = ((rlc_am_rx_pdu_management_t*)(cursor_p->data))->all_segments_received;
|
||||||
sn_cursor = pdu_info_cursor_p->sn;
|
sn_cursor = pdu_info_cursor_p->sn;
|
||||||
#ifdef TRACE_RLC_AM_STATUS_CREATION
|
#if TRACE_RLC_AM_STATUS_CREATION
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d NOW sn_cursor %04d \n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d NOW sn_cursor %04d \n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
__LINE__,
|
__LINE__,
|
||||||
@@ -541,7 +530,7 @@ rlc_am_send_status_pdu(
|
|||||||
} else {
|
} else {
|
||||||
if (all_segments_received) {
|
if (all_segments_received) {
|
||||||
control_pdu_info.ack_sn = (sn_cursor + 1) & RLC_AM_SN_MASK;
|
control_pdu_info.ack_sn = (sn_cursor + 1) & RLC_AM_SN_MASK;
|
||||||
#ifdef TRACE_RLC_AM_STATUS_CREATION
|
#if TRACE_RLC_AM_STATUS_CREATION
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING ACK SN %04d \n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING ACK SN %04d \n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
__LINE__,
|
__LINE__,
|
||||||
@@ -549,7 +538,7 @@ rlc_am_send_status_pdu(
|
|||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
control_pdu_info.ack_sn = (previous_sn_cursor + 1) & RLC_AM_SN_MASK;
|
control_pdu_info.ack_sn = (previous_sn_cursor + 1) & RLC_AM_SN_MASK;
|
||||||
#ifdef TRACE_RLC_AM_STATUS_CREATION
|
#if TRACE_RLC_AM_STATUS_CREATION
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING ACK SN %04d (CASE PREVIOUS SN)\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING ACK SN %04d (CASE PREVIOUS SN)\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
__LINE__,
|
__LINE__,
|
||||||
@@ -575,7 +564,7 @@ rlc_am_send_status_pdu(
|
|||||||
control_pdu_info.nack_list[control_pdu_info.num_nack].e2 = 0;
|
control_pdu_info.nack_list[control_pdu_info.num_nack].e2 = 0;
|
||||||
control_pdu_info.num_nack += 1;
|
control_pdu_info.num_nack += 1;
|
||||||
nb_bits_to_transmit = nb_bits_to_transmit - 12;
|
nb_bits_to_transmit = nb_bits_to_transmit - 12;
|
||||||
#ifdef TRACE_RLC_AM_STATUS_CREATION
|
#if TRACE_RLC_AM_STATUS_CREATION
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING NACK %04d\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING NACK %04d\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
__LINE__,
|
__LINE__,
|
||||||
@@ -583,7 +572,7 @@ rlc_am_send_status_pdu(
|
|||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
control_pdu_info.ack_sn = (previous_sn_cursor + 1) & RLC_AM_SN_MASK;
|
control_pdu_info.ack_sn = (previous_sn_cursor + 1) & RLC_AM_SN_MASK;
|
||||||
#ifdef TRACE_RLC_AM_STATUS_CREATION
|
#if TRACE_RLC_AM_STATUS_CREATION
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d NO MORE BITS FOR SENDING NACK %04d -> ABORT AND SET FINAL ACK %04d\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d NO MORE BITS FOR SENDING NACK %04d -> ABORT AND SET FINAL ACK %04d\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
__LINE__,
|
__LINE__,
|
||||||
@@ -599,7 +588,7 @@ rlc_am_send_status_pdu(
|
|||||||
// -------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------
|
||||||
if (all_segments_received == 0) {
|
if (all_segments_received == 0) {
|
||||||
waited_so = 0;
|
waited_so = 0;
|
||||||
#ifdef TRACE_RLC_AM_STATUS_CREATION
|
#if TRACE_RLC_AM_STATUS_CREATION
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] if (all_segments_received == 0) \n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] if (all_segments_received == 0) \n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||||
#endif
|
#endif
|
||||||
@@ -614,7 +603,7 @@ rlc_am_send_status_pdu(
|
|||||||
control_pdu_info.nack_list[control_pdu_info.num_nack].e2 = 1;
|
control_pdu_info.nack_list[control_pdu_info.num_nack].e2 = 1;
|
||||||
control_pdu_info.num_nack += 1;
|
control_pdu_info.num_nack += 1;
|
||||||
nb_bits_to_transmit = nb_bits_to_transmit - 42;
|
nb_bits_to_transmit = nb_bits_to_transmit - 42;
|
||||||
#ifdef TRACE_RLC_AM_STATUS_CREATION
|
#if TRACE_RLC_AM_STATUS_CREATION
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING NACK %04d SO START %05d SO END %05d (CASE SO %d > WAITED SO %d)\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING NACK %04d SO START %05d SO END %05d (CASE SO %d > WAITED SO %d)\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
__LINE__,
|
__LINE__,
|
||||||
@@ -628,7 +617,7 @@ rlc_am_send_status_pdu(
|
|||||||
if (pdu_info_cursor_p->lsf == 1) { // last segment flag
|
if (pdu_info_cursor_p->lsf == 1) { // last segment flag
|
||||||
//waited_so = 0x7FF;
|
//waited_so = 0x7FF;
|
||||||
waited_so = 0x7FFF;
|
waited_so = 0x7FFF;
|
||||||
#ifdef TRACE_RLC_AM_STATUS_CREATION
|
#if TRACE_RLC_AM_STATUS_CREATION
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d SN %04d SET WAITED SO 0x7FFF)\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d SN %04d SET WAITED SO 0x7FFF)\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
__LINE__, sn_cursor);
|
__LINE__, sn_cursor);
|
||||||
@@ -636,7 +625,7 @@ rlc_am_send_status_pdu(
|
|||||||
//break;
|
//break;
|
||||||
} else {
|
} else {
|
||||||
waited_so = pdu_info_cursor_p->so + pdu_info_cursor_p->payload_size;
|
waited_so = pdu_info_cursor_p->so + pdu_info_cursor_p->payload_size;
|
||||||
#ifdef TRACE_RLC_AM_STATUS_CREATION
|
#if TRACE_RLC_AM_STATUS_CREATION
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d SN %04d SET WAITED SO %d @1\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d SN %04d SET WAITED SO %d @1\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
__LINE__,
|
__LINE__,
|
||||||
@@ -656,7 +645,7 @@ rlc_am_send_status_pdu(
|
|||||||
waited_so = 0x7FFF;
|
waited_so = 0x7FFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TRACE_RLC_AM_STATUS_CREATION
|
#if TRACE_RLC_AM_STATUS_CREATION
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d SN %04d SET WAITED SO %d @2\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d SN %04d SET WAITED SO %d @2\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
__LINE__,
|
__LINE__,
|
||||||
@@ -690,7 +679,7 @@ rlc_am_send_status_pdu(
|
|||||||
control_pdu_info.nack_list[control_pdu_info.num_nack].e2 = 1;
|
control_pdu_info.nack_list[control_pdu_info.num_nack].e2 = 1;
|
||||||
control_pdu_info.num_nack += 1;
|
control_pdu_info.num_nack += 1;
|
||||||
nb_bits_to_transmit = nb_bits_to_transmit - 42;
|
nb_bits_to_transmit = nb_bits_to_transmit - 42;
|
||||||
#ifdef TRACE_RLC_AM_STATUS_CREATION
|
#if TRACE_RLC_AM_STATUS_CREATION
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING NACK %04d SO START %05d SO END %05d\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING NACK %04d SO START %05d SO END %05d\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
__LINE__,
|
__LINE__,
|
||||||
@@ -715,7 +704,7 @@ rlc_am_send_status_pdu(
|
|||||||
control_pdu_info.ack_sn = (previous_sn_cursor + 1) & RLC_AM_SN_MASK;
|
control_pdu_info.ack_sn = (previous_sn_cursor + 1) & RLC_AM_SN_MASK;
|
||||||
} else {
|
} else {
|
||||||
control_pdu_info.ack_sn = rlc_pP->vr_r;
|
control_pdu_info.ack_sn = rlc_pP->vr_r;
|
||||||
#ifdef TRACE_RLC_AM_STATUS_CREATION
|
#if TRACE_RLC_AM_STATUS_CREATION
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING ACK %04d = VR(R)\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING ACK %04d = VR(R)\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
__LINE__,
|
__LINE__,
|
||||||
@@ -732,7 +721,7 @@ end_push_nack:
|
|||||||
//msg ("[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] nb_bits_to_transmit %d\n",
|
//msg ("[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] nb_bits_to_transmit %d\n",
|
||||||
// rlc_pP->module_id, rlc_pP->rb_id, ctxt_pP->frame,nb_bits_to_transmit);
|
// rlc_pP->module_id, rlc_pP->rb_id, ctxt_pP->frame,nb_bits_to_transmit);
|
||||||
|
|
||||||
#ifdef TRACE_RLC_AM_STATUS_CREATION
|
#if TRACE_RLC_AM_STATUS_CREATION
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING ACK %04d NUM NACK %d\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d PREPARE SENDING ACK %04d NUM NACK %d\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
__LINE__,
|
__LINE__,
|
||||||
@@ -742,7 +731,7 @@ end_push_nack:
|
|||||||
// encode the control pdu
|
// encode the control pdu
|
||||||
pdu_size = rlc_pP->nb_bytes_requested_by_mac - ((nb_bits_to_transmit - 7 )>> 3);
|
pdu_size = rlc_pP->nb_bytes_requested_by_mac - ((nb_bits_to_transmit - 7 )>> 3);
|
||||||
|
|
||||||
#ifdef TRACE_RLC_AM_STATUS_CREATION
|
#if TRACE_RLC_AM_STATUS_CREATION
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d forecast pdu_size %d\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] LINE %d forecast pdu_size %d\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
__LINE__,
|
__LINE__,
|
||||||
@@ -758,7 +747,7 @@ end_push_nack:
|
|||||||
((struct mac_tb_req*)(tb_p->data))->tb_size = pdu_size;
|
((struct mac_tb_req*)(tb_p->data))->tb_size = pdu_size;
|
||||||
//assert((((struct mac_tb_req*)(tb_p->data))->tb_size) < 3000);
|
//assert((((struct mac_tb_req*)(tb_p->data))->tb_size) < 3000);
|
||||||
|
|
||||||
#ifdef TRACE_RLC_AM_STATUS_CREATION
|
#if TRACE_RLC_AM_STATUS_CREATION
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] SEND STATUS PDU SIZE %d, rlc_pP->nb_bytes_requested_by_mac %d, nb_bits_to_transmit>>3 %d\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] SEND STATUS PDU SIZE %d, rlc_pP->nb_bytes_requested_by_mac %d, nb_bits_to_transmit>>3 %d\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
pdu_size,
|
pdu_size,
|
||||||
|
|||||||
@@ -26,9 +26,9 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_AM_MODULE
|
#define RLC_AM_MODULE 1
|
||||||
#define RLC_AM_TEST_C
|
#define RLC_AM_TEST_C 1
|
||||||
#define RLC_C
|
#define RLC_C 1
|
||||||
|
|
||||||
#include <execinfo.h>
|
#include <execinfo.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
@@ -26,8 +26,8 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_AM_MODULE
|
#define RLC_AM_MODULE 1
|
||||||
#define RLC_AM_TIMER_POLL_RETRANSMIT_C
|
#define RLC_AM_TIMER_POLL_RETRANSMIT_C 1
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//#include "rtos_header.h"
|
//#include "rtos_header.h"
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
@@ -43,7 +43,6 @@ rlc_am_check_timer_poll_retransmit(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t * const rlc_pP
|
rlc_am_entity_t * const rlc_pP
|
||||||
)
|
)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
// 5.2.2.3 Expiry of t-PollRetransmit
|
// 5.2.2.3 Expiry of t-PollRetransmit
|
||||||
// Upon expiry of t-PollRetransmit, the transmitting side of an AM RLC entity shall:
|
// Upon expiry of t-PollRetransmit, the transmitting side of an AM RLC entity shall:
|
||||||
@@ -77,7 +76,7 @@ rlc_am_check_timer_poll_retransmit(
|
|||||||
rlc_pP->t_poll_retransmit.running = 0;
|
rlc_pP->t_poll_retransmit.running = 0;
|
||||||
rlc_pP->t_poll_retransmit.timed_out = 1;
|
rlc_pP->t_poll_retransmit.timed_out = 1;
|
||||||
rlc_pP->stat_timer_poll_retransmit_timed_out += 1;
|
rlc_pP->stat_timer_poll_retransmit_timed_out += 1;
|
||||||
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
|
#if MESSAGE_CHART_GENERATOR_RLC_MAC
|
||||||
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
||||||
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_poll_retransmit timed-out",\
|
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_poll_retransmit timed-out",\
|
||||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
|
||||||
@@ -98,7 +97,6 @@ rlc_am_is_timer_poll_retransmit_timed_out(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t * const rlc_pP
|
rlc_am_entity_t * const rlc_pP
|
||||||
)
|
)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
return rlc_pP->t_poll_retransmit.timed_out;
|
return rlc_pP->t_poll_retransmit.timed_out;
|
||||||
}
|
}
|
||||||
@@ -108,7 +106,6 @@ rlc_am_stop_and_reset_timer_poll_retransmit(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t * const rlc_pP
|
rlc_am_entity_t * const rlc_pP
|
||||||
)
|
)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T_POLL_RETRANSMIT] STOPPED AND RESET\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T_POLL_RETRANSMIT] STOPPED AND RESET\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||||
@@ -116,7 +113,7 @@ rlc_am_stop_and_reset_timer_poll_retransmit(
|
|||||||
rlc_pP->t_poll_retransmit.ms_time_out = 0;
|
rlc_pP->t_poll_retransmit.ms_time_out = 0;
|
||||||
rlc_pP->t_poll_retransmit.ms_start = 0;
|
rlc_pP->t_poll_retransmit.ms_start = 0;
|
||||||
rlc_pP->t_poll_retransmit.timed_out = 0;
|
rlc_pP->t_poll_retransmit.timed_out = 0;
|
||||||
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
|
#if MESSAGE_CHART_GENERATOR_RLC_MAC
|
||||||
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
||||||
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_poll_retransmit stopped & reseted",\
|
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_poll_retransmit stopped & reseted",\
|
||||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
|
||||||
@@ -128,7 +125,6 @@ rlc_am_start_timer_poll_retransmit(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t * const rlc_pP
|
rlc_am_entity_t * const rlc_pP
|
||||||
)
|
)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_pP->t_poll_retransmit.timed_out = 0;
|
rlc_pP->t_poll_retransmit.timed_out = 0;
|
||||||
|
|
||||||
@@ -140,7 +136,7 @@ rlc_am_start_timer_poll_retransmit(
|
|||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T_POLL_RETRANSMIT] STARTED (TIME-OUT = FRAME %05d)\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T_POLL_RETRANSMIT] STARTED (TIME-OUT = FRAME %05d)\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
rlc_pP->t_poll_retransmit.ms_time_out);
|
rlc_pP->t_poll_retransmit.ms_time_out);
|
||||||
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
|
#if MESSAGE_CHART_GENERATOR_RLC_MAC
|
||||||
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
||||||
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_poll_retransmit started (TO %u ms)",\
|
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_poll_retransmit started (TO %u ms)",\
|
||||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), rlc_pP->t_poll_retransmit.ms_time_out);
|
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), rlc_pP->t_poll_retransmit.ms_time_out);
|
||||||
@@ -150,7 +146,7 @@ rlc_am_start_timer_poll_retransmit(
|
|||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
|
#if MESSAGE_CHART_GENERATOR_RLC_MAC
|
||||||
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
||||||
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_poll_retransmit not restarted (TO %u ms)",\
|
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_poll_retransmit not restarted (TO %u ms)",\
|
||||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), rlc_pP->t_poll_retransmit.ms_time_out);
|
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), rlc_pP->t_poll_retransmit.ms_time_out);
|
||||||
@@ -164,7 +160,6 @@ rlc_am_init_timer_poll_retransmit(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t * const rlc_pP,
|
rlc_am_entity_t * const rlc_pP,
|
||||||
const uint32_t ms_durationP)
|
const uint32_t ms_durationP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_pP->t_poll_retransmit.running = 0;
|
rlc_pP->t_poll_retransmit.running = 0;
|
||||||
rlc_pP->t_poll_retransmit.ms_time_out = 0;
|
rlc_pP->t_poll_retransmit.ms_time_out = 0;
|
||||||
|
|||||||
@@ -26,10 +26,9 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_AM_MODULE
|
#define RLC_AM_MODULE 1
|
||||||
#define RLC_AM_TIMER_POLL_REORDERING_C
|
#define RLC_AM_TIMER_POLL_REORDERING_C 1
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//#include "rtos_header.h"
|
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
#include "platform_constants.h"
|
#include "platform_constants.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -42,7 +41,6 @@ void
|
|||||||
rlc_am_check_timer_reordering(
|
rlc_am_check_timer_reordering(
|
||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t * const rlc_pP)
|
rlc_am_entity_t * const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
|
|
||||||
if (rlc_pP->t_reordering.running) {
|
if (rlc_pP->t_reordering.running) {
|
||||||
@@ -73,7 +71,7 @@ rlc_am_check_timer_reordering(
|
|||||||
// - start t-Reordering;
|
// - start t-Reordering;
|
||||||
// - set VR(X) to VR(H).
|
// - set VR(X) to VR(H).
|
||||||
|
|
||||||
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
|
#if MESSAGE_CHART_GENERATOR_RLC_MAC
|
||||||
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
||||||
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_reordering timed out",\
|
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_reordering timed out",\
|
||||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
|
||||||
@@ -126,7 +124,6 @@ void
|
|||||||
rlc_am_stop_and_reset_timer_reordering(
|
rlc_am_stop_and_reset_timer_reordering(
|
||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t * const rlc_pP)
|
rlc_am_entity_t * const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T-REORDERING] STOPPED AND RESET\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T-REORDERING] STOPPED AND RESET\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||||
@@ -134,7 +131,7 @@ rlc_am_stop_and_reset_timer_reordering(
|
|||||||
rlc_pP->t_reordering.ms_time_out = 0;
|
rlc_pP->t_reordering.ms_time_out = 0;
|
||||||
rlc_pP->t_reordering.ms_start = 0;
|
rlc_pP->t_reordering.ms_start = 0;
|
||||||
rlc_pP->t_reordering.timed_out = 0;
|
rlc_pP->t_reordering.timed_out = 0;
|
||||||
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
|
#if MESSAGE_CHART_GENERATOR_RLC_MAC
|
||||||
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
||||||
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_reordering stopped & reseted",\
|
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_reordering stopped & reseted",\
|
||||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
|
||||||
@@ -145,7 +142,6 @@ void
|
|||||||
rlc_am_start_timer_reordering(
|
rlc_am_start_timer_reordering(
|
||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t * const rlc_pP)
|
rlc_am_entity_t * const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_pP->t_reordering.timed_out = 0;
|
rlc_pP->t_reordering.timed_out = 0;
|
||||||
|
|
||||||
@@ -157,7 +153,7 @@ rlc_am_start_timer_reordering(
|
|||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T-REORDERING] STARTED (TIME-OUT = %5u ms)\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T-REORDERING] STARTED (TIME-OUT = %5u ms)\n",
|
||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
rlc_pP->t_reordering.ms_time_out);
|
rlc_pP->t_reordering.ms_time_out);
|
||||||
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
|
#if MESSAGE_CHART_GENERATOR_RLC_MAC
|
||||||
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
||||||
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_reordering started (TO %u ms)",\
|
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_reordering started (TO %u ms)",\
|
||||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), rlc_pP->t_reordering.ms_time_out);
|
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), rlc_pP->t_reordering.ms_time_out);
|
||||||
@@ -174,7 +170,6 @@ rlc_am_init_timer_reordering(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t * const rlc_pP,
|
rlc_am_entity_t * const rlc_pP,
|
||||||
const uint32_t ms_durationP)
|
const uint32_t ms_durationP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_pP->t_reordering.running = 0;
|
rlc_pP->t_reordering.running = 0;
|
||||||
rlc_pP->t_reordering.ms_time_out = 0;
|
rlc_pP->t_reordering.ms_time_out = 0;
|
||||||
|
|||||||
@@ -26,10 +26,9 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_AM_MODULE
|
#define RLC_AM_MODULE 1
|
||||||
#define RLC_AM_TIMER_STATUS_PROHIBIT_C
|
#define RLC_AM_TIMER_STATUS_PROHIBIT_C 1
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//#include "rtos_header.h"
|
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
#include "platform_constants.h"
|
#include "platform_constants.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -42,7 +41,6 @@ void
|
|||||||
rlc_am_check_timer_status_prohibit(
|
rlc_am_check_timer_status_prohibit(
|
||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t * const rlc_pP)
|
rlc_am_entity_t * const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
if (rlc_pP->t_status_prohibit.ms_duration > 0) {
|
if (rlc_pP->t_status_prohibit.ms_duration > 0) {
|
||||||
if (rlc_pP->t_status_prohibit.running) {
|
if (rlc_pP->t_status_prohibit.running) {
|
||||||
@@ -70,7 +68,7 @@ rlc_am_check_timer_status_prohibit(
|
|||||||
rlc_pP->t_status_prohibit.timed_out = 1;
|
rlc_pP->t_status_prohibit.timed_out = 1;
|
||||||
rlc_pP->stat_timer_status_prohibit_timed_out += 1;
|
rlc_pP->stat_timer_status_prohibit_timed_out += 1;
|
||||||
|
|
||||||
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
|
#if MESSAGE_CHART_GENERATOR_RLC_MAC
|
||||||
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
||||||
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_status_prohibit timed out",\
|
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_status_prohibit timed out",\
|
||||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
|
||||||
@@ -90,7 +88,6 @@ rlc_am_stop_and_reset_timer_status_prohibit(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlc_pP
|
rlc_am_entity_t *const rlc_pP
|
||||||
)
|
)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
if (rlc_pP->t_status_prohibit.ms_duration > 0) {
|
if (rlc_pP->t_status_prohibit.ms_duration > 0) {
|
||||||
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T-STATUS-PROHIBIT] STOPPED AND RESET\n",
|
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[T-STATUS-PROHIBIT] STOPPED AND RESET\n",
|
||||||
@@ -99,7 +96,7 @@ rlc_am_stop_and_reset_timer_status_prohibit(
|
|||||||
rlc_pP->t_status_prohibit.ms_time_out = 0;
|
rlc_pP->t_status_prohibit.ms_time_out = 0;
|
||||||
rlc_pP->t_status_prohibit.ms_start = 0;
|
rlc_pP->t_status_prohibit.ms_start = 0;
|
||||||
rlc_pP->t_status_prohibit.timed_out = 0;
|
rlc_pP->t_status_prohibit.timed_out = 0;
|
||||||
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
|
#if MESSAGE_CHART_GENERATOR_RLC_MAC
|
||||||
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
||||||
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_status_prohibit stopped & reseted",\
|
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_status_prohibit stopped & reseted",\
|
||||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP));
|
||||||
@@ -112,7 +109,6 @@ rlc_am_start_timer_status_prohibit(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlc_pP
|
rlc_am_entity_t *const rlc_pP
|
||||||
)
|
)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_pP->t_status_prohibit.timed_out = 0;
|
rlc_pP->t_status_prohibit.timed_out = 0;
|
||||||
|
|
||||||
@@ -125,7 +121,7 @@ rlc_am_start_timer_status_prohibit(
|
|||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
rlc_pP->t_status_prohibit.ms_time_out);
|
rlc_pP->t_status_prohibit.ms_time_out);
|
||||||
LOG_D(RLC, "TIME-OUT = FRAME %u\n", rlc_pP->t_status_prohibit.ms_time_out);
|
LOG_D(RLC, "TIME-OUT = FRAME %u\n", rlc_pP->t_status_prohibit.ms_time_out);
|
||||||
#if defined(MESSAGE_CHART_GENERATOR_RLC_MAC)
|
#if MESSAGE_CHART_GENERATOR_RLC_MAC
|
||||||
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
||||||
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_status_prohibit started (TO %u ms)",\
|
"0 "PROTOCOL_RLC_AM_MSC_FMT" t_status_prohibit started (TO %u ms)",\
|
||||||
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), rlc_pP->t_status_prohibit.ms_time_out);
|
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), rlc_pP->t_status_prohibit.ms_time_out);
|
||||||
@@ -141,7 +137,6 @@ void rlc_am_init_timer_status_prohibit(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
const uint32_t ms_durationP)
|
const uint32_t ms_durationP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_pP->t_status_prohibit.running = 0;
|
rlc_pP->t_status_prohibit.running = 0;
|
||||||
rlc_pP->t_status_prohibit.ms_time_out = 0;
|
rlc_pP->t_status_prohibit.ms_time_out = 0;
|
||||||
|
|||||||
@@ -26,14 +26,13 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_AM_MODULE
|
#define RLC_AM_MODULE 1
|
||||||
#define RLC_AM_WINDOWS_C
|
#define RLC_AM_WINDOWS_C 1
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#ifdef USER_MODE
|
#if USER_MODE
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#endif
|
#endif
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//#include "rtos_header.h"
|
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include "rlc_am.h"
|
#include "rlc_am.h"
|
||||||
@@ -43,7 +42,6 @@ signed int rlc_am_in_tx_window(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const rlc_am_entity_t* const rlc_pP,
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
const rlc_sn_t snP)
|
const rlc_sn_t snP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_usn_t shifted_sn;
|
rlc_usn_t shifted_sn;
|
||||||
rlc_usn_t upper_bound;
|
rlc_usn_t upper_bound;
|
||||||
@@ -67,7 +65,6 @@ rlc_am_in_rx_window(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const rlc_am_entity_t* const rlc_pP,
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
const rlc_sn_t snP)
|
const rlc_sn_t snP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_usn_t shifted_sn;
|
rlc_usn_t shifted_sn;
|
||||||
rlc_usn_t upper_bound;
|
rlc_usn_t upper_bound;
|
||||||
@@ -91,7 +88,6 @@ rlc_am_sn_gte_vr_h(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const rlc_am_entity_t* const rlc_pP,
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
const rlc_sn_t snP)
|
const rlc_sn_t snP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_usn_t shifted_sn;
|
rlc_usn_t shifted_sn;
|
||||||
rlc_usn_t upper_bound;
|
rlc_usn_t upper_bound;
|
||||||
@@ -114,7 +110,6 @@ signed int rlc_am_sn_gte_vr_x(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const rlc_am_entity_t* const rlc_pP,
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
const rlc_sn_t snP)
|
const rlc_sn_t snP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_usn_t shifted_sn;
|
rlc_usn_t shifted_sn;
|
||||||
rlc_usn_t upper_bound;
|
rlc_usn_t upper_bound;
|
||||||
@@ -138,7 +133,6 @@ rlc_am_sn_gt_vr_ms(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const rlc_am_entity_t* const rlc_pP,
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
const rlc_sn_t snP)
|
const rlc_sn_t snP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_usn_t shifted_sn;
|
rlc_usn_t shifted_sn;
|
||||||
rlc_usn_t upper_bound;
|
rlc_usn_t upper_bound;
|
||||||
@@ -163,7 +157,6 @@ rlc_am_tx_sn1_gt_sn2(
|
|||||||
const rlc_am_entity_t* const rlc_pP,
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
const rlc_sn_t sn1P,
|
const rlc_sn_t sn1P,
|
||||||
const rlc_sn_t sn2P)
|
const rlc_sn_t sn2P)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_usn_t shifted_sn;
|
rlc_usn_t shifted_sn;
|
||||||
rlc_usn_t upper_bound;
|
rlc_usn_t upper_bound;
|
||||||
@@ -188,7 +181,6 @@ rlc_am_rx_sn1_gt_sn2(
|
|||||||
const rlc_am_entity_t* const rlc_pP,
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
const rlc_sn_t sn1P,
|
const rlc_sn_t sn1P,
|
||||||
const rlc_sn_t sn2P)
|
const rlc_sn_t sn2P)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_usn_t shifted_sn;
|
rlc_usn_t shifted_sn;
|
||||||
rlc_usn_t upper_bound;
|
rlc_usn_t upper_bound;
|
||||||
|
|||||||
@@ -26,8 +26,8 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_TM_MODULE
|
#define RLC_TM_MODULE 1
|
||||||
#define RLC_TM_C
|
#define RLC_TM_C 1
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
#include "platform_constants.h"
|
#include "platform_constants.h"
|
||||||
@@ -46,12 +46,11 @@ rlc_tm_send_sdu (
|
|||||||
uint8_t * const srcP,
|
uint8_t * const srcP,
|
||||||
const sdu_size_t length_in_bitsP)
|
const sdu_size_t length_in_bitsP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
int length_in_bytes;
|
int length_in_bytes;
|
||||||
#ifdef DEBUG_RLC_TM_DISPLAY_ASCII_DATA
|
#if DEBUG_RLC_TM_DISPLAY_ASCII_DATA
|
||||||
int index;
|
int index;
|
||||||
#endif
|
#endif
|
||||||
#ifdef DEBUG_RLC_TM_REASSEMBLY
|
#if DEBUG_RLC_TM_REASSEMBLY
|
||||||
LOG_D(RLC, PROTOCOL_RLC_TM_CTXT_FMT"[SEND_SDU] %d bits\n",
|
LOG_D(RLC, PROTOCOL_RLC_TM_CTXT_FMT"[SEND_SDU] %d bits\n",
|
||||||
PROTOCOL_RLC_TM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_TM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
length_in_bitsP);
|
length_in_bitsP);
|
||||||
@@ -63,7 +62,7 @@ rlc_tm_send_sdu (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((rlc_pP->output_sdu_in_construction)) {
|
if ((rlc_pP->output_sdu_in_construction)) {
|
||||||
#ifdef DEBUG_RLC_TM_DISPLAY_ASCII_DATA
|
#if DEBUG_RLC_TM_DISPLAY_ASCII_DATA
|
||||||
LOG_D(RLC, PROTOCOL_RLC_TM_CTXT_FMT"[SEND_SDU] DATA :",
|
LOG_D(RLC, PROTOCOL_RLC_TM_CTXT_FMT"[SEND_SDU] DATA :",
|
||||||
PROTOCOL_RLC_TM_CTXT_ARGS(ctxt_pP, rlc_pP));
|
PROTOCOL_RLC_TM_CTXT_ARGS(ctxt_pP, rlc_pP));
|
||||||
|
|
||||||
@@ -95,7 +94,6 @@ rlc_tm_no_segment (
|
|||||||
rlc_tm_entity_t *const rlc_pP
|
rlc_tm_entity_t *const rlc_pP
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
mem_block_t *pdu_p = NULL;
|
mem_block_t *pdu_p = NULL;
|
||||||
struct rlc_tm_tx_sdu_management *sdu_mngt_p = NULL;
|
struct rlc_tm_tx_sdu_management *sdu_mngt_p = NULL;
|
||||||
struct rlc_tm_tx_pdu_management *pdu_mngt_p = NULL;
|
struct rlc_tm_tx_pdu_management *pdu_mngt_p = NULL;
|
||||||
@@ -138,7 +136,6 @@ rlc_tm_rx (
|
|||||||
void * const argP,
|
void * const argP,
|
||||||
struct mac_data_ind data_indP)
|
struct mac_data_ind data_indP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
rlc_tm_entity_t * const rlc_p = (rlc_tm_entity_t *) argP;
|
rlc_tm_entity_t * const rlc_p = (rlc_tm_entity_t *) argP;
|
||||||
mem_block_t *tb_p;
|
mem_block_t *tb_p;
|
||||||
@@ -164,7 +161,6 @@ rlc_tm_mac_status_indication (
|
|||||||
const tb_size_t tb_sizeP,
|
const tb_size_t tb_sizeP,
|
||||||
struct mac_status_ind tx_statusP)
|
struct mac_status_ind tx_statusP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
struct mac_status_resp status_resp;
|
struct mac_status_resp status_resp;
|
||||||
|
|
||||||
((rlc_tm_entity_t *) rlc_pP)->rlc_pdu_size = tb_sizeP;
|
((rlc_tm_entity_t *) rlc_pP)->rlc_pdu_size = tb_sizeP;
|
||||||
@@ -181,7 +177,6 @@ rlc_tm_mac_data_request (
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
void * const rlc_pP)
|
void * const rlc_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
rlc_tm_entity_t* rlc_p = (rlc_tm_entity_t*) rlc_pP;
|
rlc_tm_entity_t* rlc_p = (rlc_tm_entity_t*) rlc_pP;
|
||||||
struct mac_data_req data_req;
|
struct mac_data_req data_req;
|
||||||
|
|
||||||
@@ -208,7 +203,6 @@ rlc_tm_mac_data_indication (
|
|||||||
void * const rlc_pP,
|
void * const rlc_pP,
|
||||||
struct mac_data_ind data_indP)
|
struct mac_data_ind data_indP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
rlc_tm_entity_t* rlc_p = (rlc_tm_entity_t*) rlc_pP;
|
rlc_tm_entity_t* rlc_p = (rlc_tm_entity_t*) rlc_pP;
|
||||||
|
|
||||||
if (data_indP.data.nb_elements > 0) {
|
if (data_indP.data.nb_elements > 0) {
|
||||||
@@ -227,10 +221,9 @@ rlc_tm_data_req (
|
|||||||
void *const rlc_pP,
|
void *const rlc_pP,
|
||||||
mem_block_t *const sdu_pP)
|
mem_block_t *const sdu_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
rlc_tm_entity_t *rlc_p = (rlc_tm_entity_t *) rlc_pP;
|
rlc_tm_entity_t *rlc_p = (rlc_tm_entity_t *) rlc_pP;
|
||||||
|
|
||||||
#ifdef DEBUG_RLC_TM_DATA_REQUEST
|
#if DEBUG_RLC_TM_DATA_REQUEST
|
||||||
LOG_D (RLC, PROTOCOL_RLC_TM_CTXT_FMT" RLC_TM_DATA_REQ size %d Bytes, BO %ld , NB SDU %d current_sdu_index=%d next_sdu_index=%d\n",
|
LOG_D (RLC, PROTOCOL_RLC_TM_CTXT_FMT" RLC_TM_DATA_REQ size %d Bytes, BO %ld , NB SDU %d current_sdu_index=%d next_sdu_index=%d\n",
|
||||||
PROTOCOL_RLC_TM_CTXT_ARGS(ctxt_pP, rlc_p),
|
PROTOCOL_RLC_TM_CTXT_ARGS(ctxt_pP, rlc_p),
|
||||||
((struct rlc_um_data_req *) (sdu_pP->data))->data_size,
|
((struct rlc_um_data_req *) (sdu_pP->data))->data_size,
|
||||||
|
|||||||
@@ -26,8 +26,8 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_TM_MODULE
|
#define RLC_TM_MODULE 1
|
||||||
#define RLC_TM_INIT_C
|
#define RLC_TM_INIT_C 1
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include "rlc_tm.h"
|
#include "rlc_tm.h"
|
||||||
#include "LAYER2/MAC/extern.h"
|
#include "LAYER2/MAC/extern.h"
|
||||||
@@ -39,7 +39,6 @@ void config_req_rlc_tm (
|
|||||||
const rb_id_t rb_idP
|
const rb_id_t rb_idP
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
rlc_union_t *rlc_union_p = NULL;
|
rlc_union_t *rlc_union_p = NULL;
|
||||||
rlc_tm_entity_t *rlc_p = NULL;
|
rlc_tm_entity_t *rlc_p = NULL;
|
||||||
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||||
@@ -71,7 +70,6 @@ void rlc_tm_init (
|
|||||||
rlc_tm_entity_t * const rlcP
|
rlc_tm_entity_t * const rlcP
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
int saved_allocation = rlcP->allocation;
|
int saved_allocation = rlcP->allocation;
|
||||||
memset (rlcP, 0, sizeof (struct rlc_tm_entity));
|
memset (rlcP, 0, sizeof (struct rlc_tm_entity));
|
||||||
rlcP->allocation = saved_allocation;
|
rlcP->allocation = saved_allocation;
|
||||||
@@ -103,7 +101,6 @@ rlc_tm_reset_state_variables (
|
|||||||
struct rlc_tm_entity * const rlcP
|
struct rlc_tm_entity * const rlcP
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
rlcP->output_sdu_size_to_write = 0;
|
rlcP->output_sdu_size_to_write = 0;
|
||||||
rlcP->buffer_occupancy = 0;
|
rlcP->buffer_occupancy = 0;
|
||||||
rlcP->nb_sdu = 0;
|
rlcP->nb_sdu = 0;
|
||||||
@@ -116,7 +113,6 @@ rlc_tm_cleanup (
|
|||||||
rlc_tm_entity_t * const rlcP
|
rlc_tm_entity_t * const rlcP
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
int index;
|
int index;
|
||||||
// TX SIDE
|
// TX SIDE
|
||||||
list_free (&rlcP->pdus_to_mac_layer);
|
list_free (&rlcP->pdus_to_mac_layer);
|
||||||
@@ -146,7 +142,6 @@ void rlc_tm_configure(
|
|||||||
rlc_tm_entity_t * const rlcP,
|
rlc_tm_entity_t * const rlcP,
|
||||||
const boolean_t is_uplink_downlinkP)
|
const boolean_t is_uplink_downlinkP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
rlcP->is_uplink_downlink = is_uplink_downlinkP;
|
rlcP->is_uplink_downlink = is_uplink_downlinkP;
|
||||||
rlc_tm_reset_state_variables (ctxt_pP, rlcP);
|
rlc_tm_reset_state_variables (ctxt_pP, rlcP);
|
||||||
}
|
}
|
||||||
@@ -157,7 +152,6 @@ void rlc_tm_set_debug_infos(
|
|||||||
rlc_tm_entity_t * const rlcP,
|
rlc_tm_entity_t * const rlcP,
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const rb_id_t rb_idP)
|
const rb_id_t rb_idP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlcP->rb_id = rb_idP;
|
rlcP->rb_id = rb_idP;
|
||||||
|
|
||||||
|
|||||||
@@ -26,14 +26,14 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_UM_MODULE
|
#define RLC_UM_MODULE 1
|
||||||
#define RLC_UM_C
|
#define RLC_UM_C 1
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//#include "rtos_header.h"
|
//#include "rtos_header.h"
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
#include "platform_constants.h"
|
#include "platform_constants.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#if defined(ENABLE_ITTI)
|
#if ENABLE_ITTI
|
||||||
# include "intertask_interface.h"
|
# include "intertask_interface.h"
|
||||||
#endif
|
#endif
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
@@ -68,7 +68,6 @@ void rlc_um_stat_req (rlc_um_entity_t *rlc_pP,
|
|||||||
unsigned int* stat_rx_data_bytes_out_of_window,
|
unsigned int* stat_rx_data_bytes_out_of_window,
|
||||||
unsigned int* stat_timer_reordering_timed_out)
|
unsigned int* stat_timer_reordering_timed_out)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
*stat_tx_pdcp_sdu = rlc_pP->stat_tx_pdcp_sdu;
|
*stat_tx_pdcp_sdu = rlc_pP->stat_tx_pdcp_sdu;
|
||||||
*stat_tx_pdcp_bytes = rlc_pP->stat_tx_pdcp_bytes;
|
*stat_tx_pdcp_bytes = rlc_pP->stat_tx_pdcp_bytes;
|
||||||
*stat_tx_pdcp_sdu_discarded = rlc_pP->stat_tx_pdcp_sdu_discarded;
|
*stat_tx_pdcp_sdu_discarded = rlc_pP->stat_tx_pdcp_sdu_discarded;
|
||||||
@@ -91,7 +90,6 @@ void rlc_um_stat_req (rlc_um_entity_t *rlc_pP,
|
|||||||
uint32_t
|
uint32_t
|
||||||
rlc_um_get_buffer_occupancy (rlc_um_entity_t *rlc_pP)
|
rlc_um_get_buffer_occupancy (rlc_um_entity_t *rlc_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
if (rlc_pP->buffer_occupancy > 0) {
|
if (rlc_pP->buffer_occupancy > 0) {
|
||||||
return rlc_pP->buffer_occupancy;
|
return rlc_pP->buffer_occupancy;
|
||||||
} else {
|
} else {
|
||||||
@@ -102,7 +100,6 @@ rlc_um_get_buffer_occupancy (rlc_um_entity_t *rlc_pP)
|
|||||||
void
|
void
|
||||||
rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, void *argP)
|
rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, void *argP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
rlc_um_entity_t *rlc_p = (rlc_um_entity_t *) argP;
|
rlc_um_entity_t *rlc_p = (rlc_um_entity_t *) argP;
|
||||||
|
|
||||||
switch (rlc_p->protocol_state) {
|
switch (rlc_p->protocol_state) {
|
||||||
@@ -178,9 +175,8 @@ rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, void *argP)
|
|||||||
void
|
void
|
||||||
rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind data_indP)
|
rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind data_indP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
rlc_um_entity_t *l_rlc_p = (rlc_um_entity_t *) argP;
|
rlc_um_entity_t *l_rlc_p = (rlc_um_entity_t *) argP;
|
||||||
#if defined(TRACE_RLC_UM_PDU) || defined(MESSAGE_CHART_GENERATOR)
|
#if TRACE_RLC_UM_PDU || MESSAGE_CHART_GENERATOR
|
||||||
char message_string[10000];
|
char message_string[10000];
|
||||||
mem_block_t *tb_p;
|
mem_block_t *tb_p;
|
||||||
int16_t tb_size_in_bytes;
|
int16_t tb_size_in_bytes;
|
||||||
@@ -188,9 +184,9 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
|
|||||||
rlc_um_pdu_info_t pdu_info;
|
rlc_um_pdu_info_t pdu_info;
|
||||||
int index;
|
int index;
|
||||||
#endif
|
#endif
|
||||||
#if defined(TRACE_RLC_UM_PDU)
|
#if TRACE_RLC_UM_PDU
|
||||||
int octet_index;
|
int octet_index;
|
||||||
# if defined(ENABLE_ITTI)
|
# if ENABLE_ITTI
|
||||||
MessageDef *msg_p;
|
MessageDef *msg_p;
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
@@ -207,7 +203,7 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
|
|||||||
// - enters the DATA_TRANSFER_READY state.
|
// - enters the DATA_TRANSFER_READY state.
|
||||||
LOG_N(RLC, PROTOCOL_RLC_UM_CTXT_FMT" ERROR MAC_DATA_IND IN RLC_NULL_STATE\n",
|
LOG_N(RLC, PROTOCOL_RLC_UM_CTXT_FMT" ERROR MAC_DATA_IND IN RLC_NULL_STATE\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,l_rlc_p));
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,l_rlc_p));
|
||||||
#if defined(MESSAGE_CHART_GENERATOR)
|
#if MESSAGE_CHART_GENERATOR
|
||||||
|
|
||||||
if (data_indP.data.nb_elements > 0) {
|
if (data_indP.data.nb_elements > 0) {
|
||||||
tb_p = data_indP.data.head;
|
tb_p = data_indP.data.head;
|
||||||
@@ -265,7 +261,7 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
|
|||||||
// - enters the LOCAL_SUSPEND state.
|
// - enters the LOCAL_SUSPEND state.
|
||||||
data_indP.tb_size = data_indP.tb_size >> 3;
|
data_indP.tb_size = data_indP.tb_size >> 3;
|
||||||
|
|
||||||
#if defined(TRACE_RLC_UM_PDU) || defined(MESSAGE_CHART_GENERATOR)
|
#if TRACE_RLC_UM_PDU || MESSAGE_CHART_GENERATOR
|
||||||
|
|
||||||
if (data_indP.data.nb_elements > 0) {
|
if (data_indP.data.nb_elements > 0) {
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" MAC_DATA_IND %d TBs\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" MAC_DATA_IND %d TBs\n",
|
||||||
@@ -282,7 +278,7 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
|
|||||||
&pdu_info,
|
&pdu_info,
|
||||||
l_rlc_p->rx_sn_length);
|
l_rlc_p->rx_sn_length);
|
||||||
|
|
||||||
#if defined(MESSAGE_CHART_GENERATOR)
|
#if MESSAGE_CHART_GENERATOR
|
||||||
message_string_size = 0;
|
message_string_size = 0;
|
||||||
message_string_size += sprintf(&message_string[message_string_size],
|
message_string_size += sprintf(&message_string[message_string_size],
|
||||||
MSC_AS_TIME_FMT" "PROTOCOL_RLC_UM_MSC_FMT"DATA SN %u size %u FI %u",
|
MSC_AS_TIME_FMT" "PROTOCOL_RLC_UM_MSC_FMT"DATA SN %u size %u FI %u",
|
||||||
@@ -308,7 +304,7 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
|
|||||||
message_string);
|
message_string);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#if defined(TRACE_RLC_UM_PDU)
|
#if TRACE_RLC_UM_PDU
|
||||||
message_string_size = 0;
|
message_string_size = 0;
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", tb_size_in_bytes);
|
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", tb_size_in_bytes);
|
||||||
@@ -361,7 +357,7 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
|
|||||||
|
|
||||||
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
||||||
|
|
||||||
# if defined(ENABLE_ITTI)
|
# if ENABLE_ITTI
|
||||||
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag ? TASK_RLC_ENB:TASK_RLC_UE , RLC_UM_DATA_PDU_IND, message_string_size + sizeof (IttiMsgText));
|
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag ? TASK_RLC_ENB:TASK_RLC_UE , RLC_UM_DATA_PDU_IND, message_string_size + sizeof (IttiMsgText));
|
||||||
msg_p->ittiMsg.rlc_um_data_pdu_ind.size = message_string_size;
|
msg_p->ittiMsg.rlc_um_data_pdu_ind.size = message_string_size;
|
||||||
memcpy(&msg_p->ittiMsg.rlc_um_data_pdu_ind.text, message_string, message_string_size);
|
memcpy(&msg_p->ittiMsg.rlc_um_data_pdu_ind.text, message_string, message_string_size);
|
||||||
@@ -370,8 +366,8 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
|
|||||||
|
|
||||||
# else
|
# else
|
||||||
LOG_T(RLC, "%s", message_string);
|
LOG_T(RLC, "%s", message_string);
|
||||||
# endif // defined(ENABLE_ITTI)
|
# endif // ENABLE_ITTI
|
||||||
#endif // defined(TRACE_RLC_UM_PDU)
|
#endif // TRACE_RLC_UM_PDU
|
||||||
|
|
||||||
tb_p = tb_p->next;
|
tb_p = tb_p->next;
|
||||||
}
|
}
|
||||||
@@ -439,7 +435,6 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
|
|||||||
struct mac_status_resp
|
struct mac_status_resp
|
||||||
rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP)
|
rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
struct mac_status_resp status_resp;
|
struct mac_status_resp status_resp;
|
||||||
uint16_t sdu_size = 0;
|
uint16_t sdu_size = 0;
|
||||||
uint16_t sdu_remaining_size = 0;
|
uint16_t sdu_remaining_size = 0;
|
||||||
@@ -489,7 +484,7 @@ rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP
|
|||||||
//msg("[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][RB %02d] MAC_STATUS_INDICATION BO = %d\n", ((rlc_um_entity_t *) rlc_pP)->module_id, ((rlc_um_entity_t *) rlc_pP)->rb_id, status_resp.buffer_occupancy_in_bytes);
|
//msg("[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][RB %02d] MAC_STATUS_INDICATION BO = %d\n", ((rlc_um_entity_t *) rlc_pP)->module_id, ((rlc_um_entity_t *) rlc_pP)->rb_id, status_resp.buffer_occupancy_in_bytes);
|
||||||
|
|
||||||
status_resp.rlc_info.rlc_protocol_state = ((rlc_um_entity_t *) rlc_pP)->protocol_state;
|
status_resp.rlc_info.rlc_protocol_state = ((rlc_um_entity_t *) rlc_pP)->protocol_state;
|
||||||
#ifdef TRACE_RLC_UM_TX_STATUS
|
#if TRACE_RLC_UM_TX_STATUS
|
||||||
|
|
||||||
if ((((rlc_um_entity_t *) rlc_pP)->rb_id > 0) && (status_resp.buffer_occupancy_in_bytes > 0)) {
|
if ((((rlc_um_entity_t *) rlc_pP)->rb_id > 0) && (status_resp.buffer_occupancy_in_bytes > 0)) {
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" MAC_STATUS_INDICATION (DATA) %d bytes requested -> %d bytes available\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" MAC_STATUS_INDICATION (DATA) %d bytes requested -> %d bytes available\n",
|
||||||
@@ -522,14 +517,13 @@ rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP
|
|||||||
struct mac_data_req
|
struct mac_data_req
|
||||||
rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP)
|
rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
struct mac_data_req data_req;
|
struct mac_data_req data_req;
|
||||||
int16_t tb_size_in_bytes;
|
int16_t tb_size_in_bytes;
|
||||||
mem_block_t *tb_p;
|
mem_block_t *tb_p;
|
||||||
#if defined(TRACE_RLC_UM_PDU) || defined(MESSAGE_CHART_GENERATOR)
|
#if TRACE_RLC_UM_PDU || MESSAGE_CHART_GENERATOR
|
||||||
char message_string[10000];
|
char message_string[10000];
|
||||||
size_t message_string_size = 0;
|
size_t message_string_size = 0;
|
||||||
# if defined(ENABLE_ITTI)
|
# if ENABLE_ITTI
|
||||||
MessageDef *msg_p;
|
MessageDef *msg_p;
|
||||||
# endif
|
# endif
|
||||||
rlc_um_pdu_info_t pdu_info;
|
rlc_um_pdu_info_t pdu_info;
|
||||||
@@ -564,10 +558,10 @@ rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP)
|
|||||||
l_rlc_p->stat_tx_data_bytes += tb_size_in_bytes;
|
l_rlc_p->stat_tx_data_bytes += tb_size_in_bytes;
|
||||||
|
|
||||||
AssertFatal( tb_size_in_bytes > 0 , "RLC UM PDU LENGTH %d", tb_size_in_bytes);
|
AssertFatal( tb_size_in_bytes > 0 , "RLC UM PDU LENGTH %d", tb_size_in_bytes);
|
||||||
#if defined(TRACE_RLC_UM_PDU) || defined(MESSAGE_CHART_GENERATOR)
|
#if TRACE_RLC_UM_PDU || MESSAGE_CHART_GENERATOR
|
||||||
rlc_um_get_pdu_infos(ctxt_pP, l_rlc_p,(rlc_um_pdu_sn_10_t*) ((struct mac_tb_req*) (tb_p->data))->data_ptr, tb_size_in_bytes, &pdu_info, l_rlc_p->rx_sn_length);
|
rlc_um_get_pdu_infos(ctxt_pP, l_rlc_p,(rlc_um_pdu_sn_10_t*) ((struct mac_tb_req*) (tb_p->data))->data_ptr, tb_size_in_bytes, &pdu_info, l_rlc_p->rx_sn_length);
|
||||||
#endif
|
#endif
|
||||||
#ifdef MESSAGE_CHART_GENERATOR
|
#if MESSAGE_CHART_GENERATOR
|
||||||
message_string_size = 0;
|
message_string_size = 0;
|
||||||
message_string_size += sprintf(&message_string[message_string_size],
|
message_string_size += sprintf(&message_string[message_string_size],
|
||||||
MSC_AS_TIME_FMT" "PROTOCOL_RLC_UM_MSC_FMT" DATA SN %u size %u FI %u",
|
MSC_AS_TIME_FMT" "PROTOCOL_RLC_UM_MSC_FMT" DATA SN %u size %u FI %u",
|
||||||
@@ -593,7 +587,7 @@ rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP)
|
|||||||
message_string);
|
message_string);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef TRACE_RLC_UM_PDU
|
#if TRACE_RLC_UM_PDU
|
||||||
message_string_size = 0;
|
message_string_size = 0;
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", tb_size_in_bytes);
|
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", tb_size_in_bytes);
|
||||||
@@ -646,7 +640,7 @@ rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP)
|
|||||||
|
|
||||||
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
||||||
|
|
||||||
# if defined(ENABLE_ITTI)
|
# if ENABLE_ITTI
|
||||||
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_UM_DATA_PDU_REQ, message_string_size + sizeof (IttiMsgText));
|
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_UM_DATA_PDU_REQ, message_string_size + sizeof (IttiMsgText));
|
||||||
msg_p->ittiMsg.rlc_um_data_pdu_req.size = message_string_size;
|
msg_p->ittiMsg.rlc_um_data_pdu_req.size = message_string_size;
|
||||||
memcpy(&msg_p->ittiMsg.rlc_um_data_pdu_req.text, message_string, message_string_size);
|
memcpy(&msg_p->ittiMsg.rlc_um_data_pdu_req.text, message_string, message_string_size);
|
||||||
@@ -668,7 +662,6 @@ rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP)
|
|||||||
void
|
void
|
||||||
rlc_um_mac_data_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, struct mac_data_ind data_indP)
|
rlc_um_mac_data_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, struct mac_data_ind data_indP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
rlc_um_rx (ctxt_pP, rlc_pP, data_indP);
|
rlc_um_rx (ctxt_pP, rlc_pP, data_indP);
|
||||||
rlc_um_check_timer_dar_time_out(ctxt_pP, rlc_pP);
|
rlc_um_check_timer_dar_time_out(ctxt_pP, rlc_pP);
|
||||||
}
|
}
|
||||||
@@ -677,15 +670,14 @@ rlc_um_mac_data_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP,
|
|||||||
void
|
void
|
||||||
rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, mem_block_t *sdu_pP)
|
rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, mem_block_t *sdu_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
rlc_um_entity_t *rlc_p = (rlc_um_entity_t *) rlc_pP;
|
rlc_um_entity_t *rlc_p = (rlc_um_entity_t *) rlc_pP;
|
||||||
|
|
||||||
#ifndef USER_MODE
|
#if ! USER_MODE
|
||||||
unsigned long int rlc_um_time_us;
|
unsigned long int rlc_um_time_us;
|
||||||
int min, sec, usec;
|
int min, sec, usec;
|
||||||
#endif
|
#endif
|
||||||
#if defined(TRACE_RLC_UM_PDU)
|
#if TRACE_RLC_UM_PDU
|
||||||
#if defined(ENABLE_ITTI)
|
#if ENABLE_ITTI
|
||||||
MessageDef *msg_p;
|
MessageDef *msg_p;
|
||||||
# endif
|
# endif
|
||||||
uint16_t data_offset;
|
uint16_t data_offset;
|
||||||
@@ -730,7 +722,7 @@ rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, mem_block_t
|
|||||||
((struct rlc_um_tx_sdu_management*) (sdu_pP->data))->sdu_size);
|
((struct rlc_um_tx_sdu_management*) (sdu_pP->data))->sdu_size);
|
||||||
|
|
||||||
|
|
||||||
# if defined(TRACE_RLC_UM_PDU)
|
# if TRACE_RLC_UM_PDU
|
||||||
data_offset = sizeof (struct rlc_um_data_req_alloc);
|
data_offset = sizeof (struct rlc_um_data_req_alloc);
|
||||||
data_size = ((struct rlc_um_tx_sdu_management *)(sdu_pP->data))->sdu_size;
|
data_size = ((struct rlc_um_tx_sdu_management *)(sdu_pP->data))->sdu_size;
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", rlc_p->rb_id);
|
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", rlc_p->rb_id);
|
||||||
@@ -768,7 +760,7 @@ rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, mem_block_t
|
|||||||
|
|
||||||
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
||||||
|
|
||||||
# if defined(ENABLE_ITTI)
|
# if ENABLE_ITTI
|
||||||
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_UM_SDU_REQ, message_string_size + sizeof (IttiMsgText));
|
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_UM_SDU_REQ, message_string_size + sizeof (IttiMsgText));
|
||||||
msg_p->ittiMsg.rlc_um_sdu_req.size = message_string_size;
|
msg_p->ittiMsg.rlc_um_sdu_req.size = message_string_size;
|
||||||
memcpy(&msg_p->ittiMsg.rlc_um_sdu_req.text, message_string, message_string_size);
|
memcpy(&msg_p->ittiMsg.rlc_um_sdu_req.text, message_string, message_string_size);
|
||||||
@@ -783,4 +775,18 @@ rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, mem_block_t
|
|||||||
rlc_p->buffer_occupancy += ((struct rlc_um_tx_sdu_management *) (sdu_pP->data))->sdu_size;
|
rlc_p->buffer_occupancy += ((struct rlc_um_tx_sdu_management *) (sdu_pP->data))->sdu_size;
|
||||||
list_add_tail_eurecom(sdu_pP, &rlc_p->input_sdus);
|
list_add_tail_eurecom(sdu_pP, &rlc_p->input_sdus);
|
||||||
RLC_UM_MUTEX_UNLOCK(&rlc_p->lock_input_sdus);
|
RLC_UM_MUTEX_UNLOCK(&rlc_p->lock_input_sdus);
|
||||||
|
#if DEBUG_RLC_CONGESTION
|
||||||
|
#if MESSAGE_CHART_GENERATOR
|
||||||
|
if (rlc_p->buffer_occupancy > 4096) {
|
||||||
|
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
|
||||||
|
"0 "PROTOCOL_RLC_AM_MSC_FMT" BO %u bytes",\
|
||||||
|
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), rlc_p->buffer_occupancy);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
LOG_W(RLC, PROTOCOL_RLC_UM_CTXT_FMT" BO %d , NB SDU %d\n",
|
||||||
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
|
||||||
|
rlc_p->buffer_occupancy,
|
||||||
|
rlc_p->input_sdus.nb_elements);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,8 +26,8 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_UM_MODULE
|
#define RLC_UM_MODULE 1
|
||||||
#define RLC_UM_CONTROL_PRIMITIVES_C
|
#define RLC_UM_CONTROL_PRIMITIVES_C 1
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -49,7 +49,6 @@ void config_req_rlc_um (
|
|||||||
const rlc_um_info_t * const config_um_pP,
|
const rlc_um_info_t * const config_um_pP,
|
||||||
const rb_id_t rb_idP)
|
const rb_id_t rb_idP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
rlc_union_t *rlc_union_p = NULL;
|
rlc_union_t *rlc_union_p = NULL;
|
||||||
rlc_um_entity_t *rlc_p = NULL;
|
rlc_um_entity_t *rlc_p = NULL;
|
||||||
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||||
@@ -105,7 +104,7 @@ void config_req_rlc_um_asn1 (
|
|||||||
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||||
hashtable_rc_t h_rc;
|
hashtable_rc_t h_rc;
|
||||||
|
|
||||||
#if defined(Rel10)
|
#if Rel10
|
||||||
|
|
||||||
if (mbms_flagP) {
|
if (mbms_flagP) {
|
||||||
AssertFatal(dl_rlc_pP, "No RLC UM DL config");
|
AssertFatal(dl_rlc_pP, "No RLC UM DL config");
|
||||||
@@ -266,7 +265,6 @@ rlc_um_init (
|
|||||||
rlc_um_entity_t * const rlc_pP
|
rlc_um_entity_t * const rlc_pP
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
AssertFatal(rlc_pP, "Bad RLC UM pointer (NULL)");
|
AssertFatal(rlc_pP, "Bad RLC UM pointer (NULL)");
|
||||||
|
|
||||||
@@ -316,7 +314,6 @@ rlc_um_reset_state_variables (
|
|||||||
rlc_um_entity_t * const rlc_pP
|
rlc_um_entity_t * const rlc_pP
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
rlc_pP->buffer_occupancy = 0;
|
rlc_pP->buffer_occupancy = 0;
|
||||||
|
|
||||||
|
|
||||||
@@ -332,7 +329,6 @@ void
|
|||||||
rlc_um_cleanup (
|
rlc_um_cleanup (
|
||||||
rlc_um_entity_t * const rlc_pP)
|
rlc_um_entity_t * const rlc_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
int index;
|
int index;
|
||||||
// TX SIDE
|
// TX SIDE
|
||||||
list_free (&rlc_pP->pdus_to_mac_layer);
|
list_free (&rlc_pP->pdus_to_mac_layer);
|
||||||
@@ -369,7 +365,6 @@ void rlc_um_configure(
|
|||||||
const uint32_t rx_sn_field_lengthP,
|
const uint32_t rx_sn_field_lengthP,
|
||||||
const uint32_t tx_sn_field_lengthP,
|
const uint32_t tx_sn_field_lengthP,
|
||||||
const uint32_t is_mXchP)
|
const uint32_t is_mXchP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
if (rx_sn_field_lengthP == 10) {
|
if (rx_sn_field_lengthP == 10) {
|
||||||
rlc_pP->rx_sn_length = 10;
|
rlc_pP->rx_sn_length = 10;
|
||||||
@@ -430,7 +425,6 @@ void rlc_um_set_debug_infos(
|
|||||||
rlc_um_entity_t * const rlc_pP,
|
rlc_um_entity_t * const rlc_pP,
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const rb_id_t rb_idP)
|
const rb_id_t rb_idP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" [SET DEBUG INFOS] rb_id %d srb_flag %d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" [SET DEBUG INFOS] rb_id %d srb_flag %d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
|
|||||||
@@ -26,8 +26,8 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_UM_MODULE
|
#define RLC_UM_MODULE 1
|
||||||
#define RLC_UM_DAR_C
|
#define RLC_UM_DAR_C 1
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -41,8 +41,6 @@
|
|||||||
#include "UTIL/LOG/log.h"
|
#include "UTIL/LOG/log.h"
|
||||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||||
|
|
||||||
//#define TRACE_RLC_UM_DAR 1
|
|
||||||
//#define TRACE_RLC_UM_RX 1
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
signed int rlc_um_get_pdu_infos(
|
signed int rlc_um_get_pdu_infos(
|
||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
@@ -51,7 +49,6 @@ signed int rlc_um_get_pdu_infos(
|
|||||||
const sdu_size_t total_sizeP,
|
const sdu_size_t total_sizeP,
|
||||||
rlc_um_pdu_info_t * const pdu_info_pP,
|
rlc_um_pdu_info_t * const pdu_info_pP,
|
||||||
const uint8_t sn_lengthP)
|
const uint8_t sn_lengthP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
sdu_size_t sum_li = 0;
|
sdu_size_t sum_li = 0;
|
||||||
memset(pdu_info_pP, 0, sizeof (rlc_um_pdu_info_t));
|
memset(pdu_info_pP, 0, sizeof (rlc_um_pdu_info_t));
|
||||||
@@ -135,7 +132,6 @@ signed int rlc_um_get_pdu_infos(
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
int rlc_um_read_length_indicators(unsigned char**data_ppP, rlc_um_e_li_t* e_liP, unsigned int* li_array_pP, unsigned int *num_li_pP, sdu_size_t *data_size_pP)
|
int rlc_um_read_length_indicators(unsigned char**data_ppP, rlc_um_e_li_t* e_liP, unsigned int* li_array_pP, unsigned int *num_li_pP, sdu_size_t *data_size_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
int continue_loop = 1;
|
int continue_loop = 1;
|
||||||
unsigned int e1 = 0;
|
unsigned int e1 = 0;
|
||||||
unsigned int li1 = 0;
|
unsigned int li1 = 0;
|
||||||
@@ -184,7 +180,6 @@ rlc_um_try_reassembly(
|
|||||||
rlc_sn_t start_snP,
|
rlc_sn_t start_snP,
|
||||||
rlc_sn_t end_snP)
|
rlc_sn_t end_snP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
mem_block_t *pdu_mem_p = NULL;
|
mem_block_t *pdu_mem_p = NULL;
|
||||||
struct mac_tb_ind *tb_ind_p = NULL;
|
struct mac_tb_ind *tb_ind_p = NULL;
|
||||||
rlc_um_e_li_t *e_li_p = NULL;
|
rlc_um_e_li_t *e_li_p = NULL;
|
||||||
@@ -209,7 +204,7 @@ rlc_um_try_reassembly(
|
|||||||
start_snP = start_snP + rlc_pP->rx_sn_modulo;
|
start_snP = start_snP + rlc_pP->rx_sn_modulo;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY FROM PDU SN=%03d+1 TO PDU SN=%03d SN Length = %d bits (%s:%u)\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY FROM PDU SN=%03d+1 TO PDU SN=%03d SN Length = %d bits (%s:%u)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
rlc_pP->last_reassemblied_sn,
|
rlc_pP->last_reassemblied_sn,
|
||||||
@@ -235,7 +230,7 @@ rlc_um_try_reassembly(
|
|||||||
if ((pdu_mem_p = rlc_pP->dar_buffer[sn])) {
|
if ((pdu_mem_p = rlc_pP->dar_buffer[sn])) {
|
||||||
|
|
||||||
if ((rlc_pP->last_reassemblied_sn+1)%rlc_pP->rx_sn_modulo != sn) {
|
if ((rlc_pP->last_reassemblied_sn+1)%rlc_pP->rx_sn_modulo != sn) {
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_W(RLC,
|
LOG_W(RLC,
|
||||||
PROTOCOL_RLC_UM_CTXT_FMT" FINDING a HOLE in RLC UM SN: CLEARING OUTPUT SDU BECAUSE NEW SN (%03d) TO REASSEMBLY NOT CONTIGUOUS WITH LAST REASSEMBLIED SN (%03d) (%s:%u)\n",
|
PROTOCOL_RLC_UM_CTXT_FMT" FINDING a HOLE in RLC UM SN: CLEARING OUTPUT SDU BECAUSE NEW SN (%03d) TO REASSEMBLY NOT CONTIGUOUS WITH LAST REASSEMBLIED SN (%03d) (%s:%u)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
@@ -251,7 +246,7 @@ rlc_um_try_reassembly(
|
|||||||
tb_ind_p = (struct mac_tb_ind *)(pdu_mem_p->data);
|
tb_ind_p = (struct mac_tb_ind *)(pdu_mem_p->data);
|
||||||
|
|
||||||
if (rlc_pP->rx_sn_length == 10) {
|
if (rlc_pP->rx_sn_length == 10) {
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY 10 PDU SN=%03d\n (%s:%u)",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY 10 PDU SN=%03d\n (%s:%u)",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
sn,
|
sn,
|
||||||
@@ -264,7 +259,7 @@ rlc_um_try_reassembly(
|
|||||||
size = tb_ind_p->size - 2;
|
size = tb_ind_p->size - 2;
|
||||||
data_p = &tb_ind_p->data_ptr[2];
|
data_p = &tb_ind_p->data_ptr[2];
|
||||||
} else {
|
} else {
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY 5 PDU SN=%03d Byte 0=%02X (%s:%u)\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY 5 PDU SN=%03d Byte 0=%02X (%s:%u)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
sn,
|
sn,
|
||||||
@@ -277,7 +272,7 @@ rlc_um_try_reassembly(
|
|||||||
e_li_p = (rlc_um_e_li_t*)((rlc_um_pdu_sn_5_t*)(tb_ind_p->data_ptr))->data;
|
e_li_p = (rlc_um_e_li_t*)((rlc_um_pdu_sn_5_t*)(tb_ind_p->data_ptr))->data;
|
||||||
size = tb_ind_p->size - 1;
|
size = tb_ind_p->size - 1;
|
||||||
data_p = &tb_ind_p->data_ptr[1];
|
data_p = &tb_ind_p->data_ptr[1];
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" e=%01X fi=%01X\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" e=%01X fi=%01X\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
e,
|
e,
|
||||||
@@ -290,7 +285,7 @@ rlc_um_try_reassembly(
|
|||||||
if (e == RLC_E_FIXED_PART_DATA_FIELD_FOLLOW) {
|
if (e == RLC_E_FIXED_PART_DATA_FIELD_FOLLOW) {
|
||||||
switch (fi) {
|
switch (fi) {
|
||||||
case RLC_FI_1ST_BYTE_DATA_IS_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_LAST_BYTE_SDU:
|
case RLC_FI_1ST_BYTE_DATA_IS_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_LAST_BYTE_SDU:
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY PDU NO E_LI FI=11 (00) (%s:%u)\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY PDU NO E_LI FI=11 (00) (%s:%u)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
__FILE__,
|
__FILE__,
|
||||||
@@ -306,7 +301,7 @@ rlc_um_try_reassembly(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case RLC_FI_1ST_BYTE_DATA_IS_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_NOT_LAST_BYTE_SDU:
|
case RLC_FI_1ST_BYTE_DATA_IS_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_NOT_LAST_BYTE_SDU:
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY PDU NO E_LI FI=10 (01) (%s:%u)\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY PDU NO E_LI FI=10 (01) (%s:%u)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
__FILE__,
|
__FILE__,
|
||||||
@@ -320,7 +315,7 @@ rlc_um_try_reassembly(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case RLC_FI_1ST_BYTE_DATA_IS_NOT_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_LAST_BYTE_SDU:
|
case RLC_FI_1ST_BYTE_DATA_IS_NOT_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_LAST_BYTE_SDU:
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY PDU NO E_LI FI=01 (10) (%s:%u)\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY PDU NO E_LI FI=01 (10) (%s:%u)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
__FILE__,
|
__FILE__,
|
||||||
@@ -341,7 +336,7 @@ rlc_um_try_reassembly(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case RLC_FI_1ST_BYTE_DATA_IS_NOT_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_NOT_LAST_BYTE_SDU:
|
case RLC_FI_1ST_BYTE_DATA_IS_NOT_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_NOT_LAST_BYTE_SDU:
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY PDU NO E_LI FI=00 (11) (%s:%u)\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY PDU NO E_LI FI=00 (11) (%s:%u)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
__FILE__,
|
__FILE__,
|
||||||
@@ -352,7 +347,7 @@ rlc_um_try_reassembly(
|
|||||||
// one whole segment of SDU in PDU
|
// one whole segment of SDU in PDU
|
||||||
rlc_um_reassembly (ctxt_pP, rlc_pP, data_p, size);
|
rlc_um_reassembly (ctxt_pP, rlc_pP, data_p, size);
|
||||||
} else {
|
} else {
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_W(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY PDU NO E_LI FI=00 (11) MISSING SN DETECTED (%s:%u)\n",
|
LOG_W(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY PDU NO E_LI FI=00 (11) MISSING SN DETECTED (%s:%u)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
__FILE__,
|
__FILE__,
|
||||||
@@ -363,7 +358,7 @@ rlc_um_try_reassembly(
|
|||||||
rlc_pP->reassembly_missing_sn_detected = 1; // not necessary but for readability of the code
|
rlc_pP->reassembly_missing_sn_detected = 1; // not necessary but for readability of the code
|
||||||
rlc_pP->stat_rx_data_pdu_dropped += 1;
|
rlc_pP->stat_rx_data_pdu_dropped += 1;
|
||||||
rlc_pP->stat_rx_data_bytes_dropped += tb_ind_p->size;
|
rlc_pP->stat_rx_data_bytes_dropped += tb_ind_p->size;
|
||||||
#if defined(RLC_STOP_ON_LOST_PDU)
|
#if RLC_STOP_ON_LOST_PDU
|
||||||
AssertFatal( rlc_pP->reassembly_missing_sn_detected == 1,
|
AssertFatal( rlc_pP->reassembly_missing_sn_detected == 1,
|
||||||
PROTOCOL_RLC_UM_CTXT_FMT" MISSING PDU DETECTED (%s:%u)\n",
|
PROTOCOL_RLC_UM_CTXT_FMT" MISSING PDU DETECTED (%s:%u)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
@@ -384,7 +379,7 @@ rlc_um_try_reassembly(
|
|||||||
if (rlc_um_read_length_indicators(&data_p, e_li_p, li_array, &num_li, &size ) >= 0) {
|
if (rlc_um_read_length_indicators(&data_p, e_li_p, li_array, &num_li, &size ) >= 0) {
|
||||||
switch (fi) {
|
switch (fi) {
|
||||||
case RLC_FI_1ST_BYTE_DATA_IS_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_LAST_BYTE_SDU:
|
case RLC_FI_1ST_BYTE_DATA_IS_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_LAST_BYTE_SDU:
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY PDU FI=11 (00) Li=",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY PDU FI=11 (00) Li=",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP));
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP));
|
||||||
|
|
||||||
@@ -414,7 +409,7 @@ rlc_um_try_reassembly(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case RLC_FI_1ST_BYTE_DATA_IS_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_NOT_LAST_BYTE_SDU:
|
case RLC_FI_1ST_BYTE_DATA_IS_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_NOT_LAST_BYTE_SDU:
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY PDU FI=10 (01) Li=",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY PDU FI=10 (01) Li=",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP));
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP));
|
||||||
|
|
||||||
@@ -443,7 +438,7 @@ rlc_um_try_reassembly(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case RLC_FI_1ST_BYTE_DATA_IS_NOT_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_LAST_BYTE_SDU:
|
case RLC_FI_1ST_BYTE_DATA_IS_NOT_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_LAST_BYTE_SDU:
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY PDU FI=01 (10) Li=",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY PDU FI=01 (10) Li=",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP));
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP));
|
||||||
|
|
||||||
@@ -480,7 +475,7 @@ rlc_um_try_reassembly(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case RLC_FI_1ST_BYTE_DATA_IS_NOT_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_NOT_LAST_BYTE_SDU:
|
case RLC_FI_1ST_BYTE_DATA_IS_NOT_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_NOT_LAST_BYTE_SDU:
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY PDU FI=00 (11) Li=",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRY REASSEMBLY PDU FI=00 (11) Li=",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP));
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP));
|
||||||
|
|
||||||
@@ -492,7 +487,7 @@ rlc_um_try_reassembly(
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (rlc_pP->reassembly_missing_sn_detected) {
|
if (rlc_pP->reassembly_missing_sn_detected) {
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" DISCARD FIRST LI %d (%s:%u)",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" DISCARD FIRST LI %d (%s:%u)",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
li_array[0],
|
li_array[0],
|
||||||
@@ -529,7 +524,7 @@ rlc_um_try_reassembly(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_W(RLC, PROTOCOL_RLC_UM_CTXT_FMT" Missing SN detected (%s:%u)\n",
|
LOG_W(RLC, PROTOCOL_RLC_UM_CTXT_FMT" Missing SN detected (%s:%u)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
__FILE__,
|
__FILE__,
|
||||||
@@ -539,7 +534,7 @@ rlc_um_try_reassembly(
|
|||||||
rlc_pP->stat_rx_data_bytes_dropped += tb_ind_p->size;
|
rlc_pP->stat_rx_data_bytes_dropped += tb_ind_p->size;
|
||||||
|
|
||||||
rlc_pP->reassembly_missing_sn_detected = 1;
|
rlc_pP->reassembly_missing_sn_detected = 1;
|
||||||
#if defined(RLC_STOP_ON_LOST_PDU)
|
#if RLC_STOP_ON_LOST_PDU
|
||||||
AssertFatal( rlc_pP->reassembly_missing_sn_detected == 1,
|
AssertFatal( rlc_pP->reassembly_missing_sn_detected == 1,
|
||||||
PROTOCOL_RLC_UM_CTXT_FMT" MISSING PDU DETECTED (%s:%u)\n",
|
PROTOCOL_RLC_UM_CTXT_FMT" MISSING PDU DETECTED (%s:%u)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
@@ -550,7 +545,7 @@ rlc_um_try_reassembly(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" REMOVE PDU FROM DAR BUFFER SN=%03d (%s:%u)\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" REMOVE PDU FROM DAR BUFFER SN=%03d (%s:%u)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
sn,
|
sn,
|
||||||
@@ -561,7 +556,7 @@ rlc_um_try_reassembly(
|
|||||||
rlc_pP->dar_buffer[sn] = NULL;
|
rlc_pP->dar_buffer[sn] = NULL;
|
||||||
} else {
|
} else {
|
||||||
rlc_pP->last_reassemblied_missing_sn = sn;
|
rlc_pP->last_reassemblied_missing_sn = sn;
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" Missing SN %04d detected, clearing RX SDU (%s:%u)\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" Missing SN %04d detected, clearing RX SDU (%s:%u)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
sn,
|
sn,
|
||||||
@@ -570,7 +565,7 @@ rlc_um_try_reassembly(
|
|||||||
#endif
|
#endif
|
||||||
rlc_pP->reassembly_missing_sn_detected = 1;
|
rlc_pP->reassembly_missing_sn_detected = 1;
|
||||||
rlc_um_clear_rx_sdu(ctxt_pP, rlc_pP);
|
rlc_um_clear_rx_sdu(ctxt_pP, rlc_pP);
|
||||||
#if defined(RLC_STOP_ON_LOST_PDU)
|
#if RLC_STOP_ON_LOST_PDU
|
||||||
AssertFatal( rlc_pP->reassembly_missing_sn_detected == 1,
|
AssertFatal( rlc_pP->reassembly_missing_sn_detected == 1,
|
||||||
PROTOCOL_RLC_UM_CTXT_FMT" MISSING PDU DETECTED (%s:%u)\n",
|
PROTOCOL_RLC_UM_CTXT_FMT" MISSING PDU DETECTED (%s:%u)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
@@ -586,7 +581,7 @@ rlc_um_try_reassembly(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRIED REASSEMBLY VR(UR)=%03d VR(UX)=%03d VR(UH)=%03d (%s:%u)\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TRIED REASSEMBLY VR(UR)=%03d VR(UX)=%03d VR(UH)=%03d (%s:%u)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
rlc_pP->vr_ur,
|
rlc_pP->vr_ur,
|
||||||
@@ -603,9 +598,8 @@ void
|
|||||||
rlc_um_stop_and_reset_timer_reordering(
|
rlc_um_stop_and_reset_timer_reordering(
|
||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_um_entity_t * rlc_pP)
|
rlc_um_entity_t * rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" [T-REORDERING] STOPPED AND RESET\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" [T-REORDERING] STOPPED AND RESET\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP));
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP));
|
||||||
#endif
|
#endif
|
||||||
@@ -619,7 +613,6 @@ void
|
|||||||
rlc_um_start_timer_reordering(
|
rlc_um_start_timer_reordering(
|
||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_um_entity_t * rlc_pP)
|
rlc_um_entity_t * rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_pP->t_reordering.timed_out = 0;
|
rlc_pP->t_reordering.timed_out = 0;
|
||||||
|
|
||||||
@@ -627,7 +620,7 @@ rlc_um_start_timer_reordering(
|
|||||||
rlc_pP->t_reordering.running = 1;
|
rlc_pP->t_reordering.running = 1;
|
||||||
rlc_pP->t_reordering.ms_time_out = PROTOCOL_CTXT_TIME_MILLI_SECONDS(ctxt_pP) + rlc_pP->t_reordering.ms_duration;
|
rlc_pP->t_reordering.ms_time_out = PROTOCOL_CTXT_TIME_MILLI_SECONDS(ctxt_pP) + rlc_pP->t_reordering.ms_duration;
|
||||||
rlc_pP->t_reordering.ms_start = PROTOCOL_CTXT_TIME_MILLI_SECONDS(ctxt_pP);
|
rlc_pP->t_reordering.ms_start = PROTOCOL_CTXT_TIME_MILLI_SECONDS(ctxt_pP);
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" [T-REORDERING] STARTED (TIME-OUT = FRAME %05u)\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" [T-REORDERING] STARTED (TIME-OUT = FRAME %05u)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
rlc_pP->t_reordering.ms_time_out);
|
rlc_pP->t_reordering.ms_time_out);
|
||||||
@@ -643,7 +636,6 @@ rlc_um_init_timer_reordering(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_um_entity_t * const rlc_pP,
|
rlc_um_entity_t * const rlc_pP,
|
||||||
const uint32_t ms_durationP)
|
const uint32_t ms_durationP)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
rlc_pP->t_reordering.running = 0;
|
rlc_pP->t_reordering.running = 0;
|
||||||
rlc_pP->t_reordering.ms_time_out = 0;
|
rlc_pP->t_reordering.ms_time_out = 0;
|
||||||
@@ -656,7 +648,6 @@ void rlc_um_check_timer_dar_time_out(
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_um_entity_t * const rlc_pP)
|
rlc_um_entity_t * const rlc_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
signed int in_window;
|
signed int in_window;
|
||||||
rlc_usn_t old_vr_ur;
|
rlc_usn_t old_vr_ur;
|
||||||
|
|
||||||
@@ -692,7 +683,7 @@ void rlc_um_check_timer_dar_time_out(
|
|||||||
// -start t-Reordering;
|
// -start t-Reordering;
|
||||||
// -set VR(UX) to VR(UH).
|
// -set VR(UX) to VR(UH).
|
||||||
rlc_pP->stat_timer_reordering_timed_out += 1;
|
rlc_pP->stat_timer_reordering_timed_out += 1;
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT"*****************************************************\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT"*****************************************************\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP));
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP));
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT"* T I M E - O U T *\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT"* T I M E - O U T *\n",
|
||||||
@@ -720,7 +711,7 @@ void rlc_um_check_timer_dar_time_out(
|
|||||||
rlc_pP->vr_ur = (rlc_pP->vr_ur+1)%rlc_pP->rx_sn_modulo;
|
rlc_pP->vr_ur = (rlc_pP->vr_ur+1)%rlc_pP->rx_sn_modulo;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, " %d", rlc_pP->vr_ur);
|
LOG_D(RLC, " %d", rlc_pP->vr_ur);
|
||||||
LOG_D(RLC, "\n");
|
LOG_D(RLC, "\n");
|
||||||
#endif
|
#endif
|
||||||
@@ -731,13 +722,13 @@ void rlc_um_check_timer_dar_time_out(
|
|||||||
if (in_window == 2) {
|
if (in_window == 2) {
|
||||||
rlc_um_start_timer_reordering(ctxt_pP, rlc_pP);
|
rlc_um_start_timer_reordering(ctxt_pP, rlc_pP);
|
||||||
rlc_pP->vr_ux = rlc_pP->vr_uh;
|
rlc_pP->vr_ux = rlc_pP->vr_uh;
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" restarting t-Reordering set VR(UX) to %d (VR(UH)>VR(UR))\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" restarting t-Reordering set VR(UX) to %d (VR(UH)>VR(UR))\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
rlc_pP->vr_ux);
|
rlc_pP->vr_ux);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" STOP t-Reordering VR(UX) = %03d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" STOP t-Reordering VR(UX) = %03d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
rlc_pP->vr_ux);
|
rlc_pP->vr_ux);
|
||||||
@@ -759,9 +750,8 @@ rlc_um_remove_pdu_from_dar_buffer(
|
|||||||
rlc_um_entity_t * const rlc_pP,
|
rlc_um_entity_t * const rlc_pP,
|
||||||
rlc_usn_t snP)
|
rlc_usn_t snP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
mem_block_t * pdu_p = rlc_pP->dar_buffer[snP];
|
mem_block_t * pdu_p = rlc_pP->dar_buffer[snP];
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" REMOVE PDU FROM DAR BUFFER SN=%03d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" REMOVE PDU FROM DAR BUFFER SN=%03d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
snP);
|
snP);
|
||||||
@@ -773,7 +763,6 @@ rlc_um_remove_pdu_from_dar_buffer(
|
|||||||
mem_block_t*
|
mem_block_t*
|
||||||
rlc_um_get_pdu_from_dar_buffer(const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, rlc_usn_t snP)
|
rlc_um_get_pdu_from_dar_buffer(const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, rlc_usn_t snP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
return rlc_pP->dar_buffer[snP];
|
return rlc_pP->dar_buffer[snP];
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -784,8 +773,7 @@ rlc_um_store_pdu_in_dar_buffer(
|
|||||||
mem_block_t *pdu_pP,
|
mem_block_t *pdu_pP,
|
||||||
rlc_usn_t snP)
|
rlc_usn_t snP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
#if TRACE_RLC_UM_DAR
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" STORE PDU IN DAR BUFFER SN=%03d VR(UR)=%03d VR(UX)=%03d VR(UH)=%03d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" STORE PDU IN DAR BUFFER SN=%03d VR(UR)=%03d VR(UX)=%03d VR(UH)=%03d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
snP,
|
snP,
|
||||||
@@ -810,10 +798,8 @@ rlc_um_in_window(
|
|||||||
rlc_sn_t snP,
|
rlc_sn_t snP,
|
||||||
rlc_sn_t higher_boundP)
|
rlc_sn_t higher_boundP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
rlc_sn_t modulus = (rlc_sn_t)rlc_pP->vr_uh - rlc_pP->rx_um_window_size;
|
rlc_sn_t modulus = (rlc_sn_t)rlc_pP->vr_uh - rlc_pP->rx_um_window_size;
|
||||||
#ifdef TRACE_RLC_UM_RX
|
#if TRACE_RLC_UM_RX
|
||||||
rlc_sn_t lower_bound = lower_boundP;
|
rlc_sn_t lower_bound = lower_boundP;
|
||||||
rlc_sn_t higher_bound = higher_boundP;
|
rlc_sn_t higher_bound = higher_boundP;
|
||||||
rlc_sn_t sn = snP;
|
rlc_sn_t sn = snP;
|
||||||
@@ -823,7 +809,7 @@ rlc_um_in_window(
|
|||||||
snP = (snP - modulus) % rlc_pP->rx_sn_modulo;
|
snP = (snP - modulus) % rlc_pP->rx_sn_modulo;
|
||||||
|
|
||||||
if ( lower_boundP > snP) {
|
if ( lower_boundP > snP) {
|
||||||
#ifdef TRACE_RLC_UM_RX
|
#if TRACE_RLC_UM_RX
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" %d not in WINDOW[%03d:%03d] (SN<LOWER BOUND)\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" %d not in WINDOW[%03d:%03d] (SN<LOWER BOUND)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
sn,
|
sn,
|
||||||
@@ -834,7 +820,7 @@ rlc_um_in_window(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( higher_boundP < snP) {
|
if ( higher_boundP < snP) {
|
||||||
#ifdef TRACE_RLC_UM_RX
|
#if TRACE_RLC_UM_RX
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" %d not in WINDOW[%03d:%03d] (SN>HIGHER BOUND) <=> %d not in WINDOW[%03d:%03d]\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" %d not in WINDOW[%03d:%03d] (SN>HIGHER BOUND) <=> %d not in WINDOW[%03d:%03d]\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
sn,
|
sn,
|
||||||
@@ -849,7 +835,7 @@ rlc_um_in_window(
|
|||||||
|
|
||||||
if ( lower_boundP == snP) {
|
if ( lower_boundP == snP) {
|
||||||
if ( higher_boundP == snP) {
|
if ( higher_boundP == snP) {
|
||||||
#ifdef TRACE_RLC_UM_RX
|
#if TRACE_RLC_UM_RX
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" %d in WINDOW[%03d:%03d] (SN=HIGHER BOUND=LOWER BOUND)\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" %d in WINDOW[%03d:%03d] (SN=HIGHER BOUND=LOWER BOUND)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
sn,
|
sn,
|
||||||
@@ -859,7 +845,7 @@ rlc_um_in_window(
|
|||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TRACE_RLC_UM_RX
|
#if TRACE_RLC_UM_RX
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" %d in WINDOW[%03d:%03d] (SN=LOWER BOUND)\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" %d in WINDOW[%03d:%03d] (SN=LOWER BOUND)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
sn,
|
sn,
|
||||||
@@ -870,7 +856,7 @@ rlc_um_in_window(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( higher_boundP == snP) {
|
if ( higher_boundP == snP) {
|
||||||
#ifdef TRACE_RLC_UM_RX
|
#if TRACE_RLC_UM_RX
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" %d in WINDOW[%03d:%03d] (SN=HIGHER BOUND)\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" %d in WINDOW[%03d:%03d] (SN=HIGHER BOUND)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
sn,
|
sn,
|
||||||
@@ -890,13 +876,12 @@ rlc_um_in_reordering_window(
|
|||||||
rlc_um_entity_t * const rlc_pP,
|
rlc_um_entity_t * const rlc_pP,
|
||||||
const rlc_sn_t snP)
|
const rlc_sn_t snP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
rlc_sn_t modulus = (signed int)rlc_pP->vr_uh - rlc_pP->rx_um_window_size;
|
rlc_sn_t modulus = (signed int)rlc_pP->vr_uh - rlc_pP->rx_um_window_size;
|
||||||
rlc_sn_t sn_mod = (snP - modulus) % rlc_pP->rx_sn_modulo;
|
rlc_sn_t sn_mod = (snP - modulus) % rlc_pP->rx_sn_modulo;
|
||||||
|
|
||||||
if ( 0 <= sn_mod) {
|
if ( 0 <= sn_mod) {
|
||||||
if (sn_mod < rlc_pP->rx_um_window_size) {
|
if (sn_mod < rlc_pP->rx_um_window_size) {
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" %d IN REORDERING WINDOW[%03d:%03d[ SN %d IN [%03d:%03d[ VR(UR)=%03d VR(UH)=%03d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" %d IN REORDERING WINDOW[%03d:%03d[ SN %d IN [%03d:%03d[ VR(UR)=%03d VR(UH)=%03d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
sn_mod,
|
sn_mod,
|
||||||
@@ -912,7 +897,7 @@ rlc_um_in_reordering_window(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
|
|
||||||
if (modulus < 0) {
|
if (modulus < 0) {
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" %d NOT IN REORDERING WINDOW[%03d:%03d[ SN %d NOT IN [%03d:%03d[ VR(UR)=%03d VR(UH)=%03d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" %d NOT IN REORDERING WINDOW[%03d:%03d[ SN %d NOT IN [%03d:%03d[ VR(UR)=%03d VR(UH)=%03d\n",
|
||||||
@@ -950,7 +935,6 @@ rlc_um_receive_process_dar (
|
|||||||
rlc_um_pdu_sn_10_t * const pdu_pP,
|
rlc_um_pdu_sn_10_t * const pdu_pP,
|
||||||
const sdu_size_t tb_sizeP)
|
const sdu_size_t tb_sizeP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// 36.322v9.3.0 section 5.1.2.2.1:
|
// 36.322v9.3.0 section 5.1.2.2.1:
|
||||||
// The receiving UM RLC entity shall maintain a reordering window according to state variable VR(UH) as follows:
|
// The receiving UM RLC entity shall maintain a reordering window according to state variable VR(UH) as follows:
|
||||||
// -a SN falls within the reordering window if (VR(UH) – UM_Window_Size) <= SN < VR(UH);
|
// -a SN falls within the reordering window if (VR(UH) – UM_Window_Size) <= SN < VR(UH);
|
||||||
@@ -988,7 +972,7 @@ rlc_um_receive_process_dar (
|
|||||||
|
|
||||||
in_window = rlc_um_in_window(ctxt_pP, rlc_pP, rlc_pP->vr_uh - rlc_pP->rx_um_window_size, sn, rlc_pP->vr_ur);
|
in_window = rlc_um_in_window(ctxt_pP, rlc_pP, rlc_pP->vr_uh - rlc_pP->rx_um_window_size, sn, rlc_pP->vr_ur);
|
||||||
|
|
||||||
#if defined(TRACE_RLC_PAYLOAD)
|
#if TRACE_RLC_PAYLOAD
|
||||||
rlc_util_print_hex_octets(RLC, &pdu_pP->b1, tb_sizeP);
|
rlc_util_print_hex_octets(RLC, &pdu_pP->b1, tb_sizeP);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -999,7 +983,7 @@ rlc_um_receive_process_dar (
|
|||||||
// rlc_um_in_window() returns 2 if higher_bound == sn
|
// rlc_um_in_window() returns 2 if higher_bound == sn
|
||||||
// rlc_um_in_window() returns 3 if higher_bound == sn == lower_bound
|
// rlc_um_in_window() returns 3 if higher_bound == sn == lower_bound
|
||||||
if ((in_window == 1) || (in_window == 0)) {
|
if ((in_window == 1) || (in_window == 0)) {
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" RX PDU VR(UH) – UM_Window_Size) <= SN %d < VR(UR) -> GARBAGE\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" RX PDU VR(UH) – UM_Window_Size) <= SN %d < VR(UR) -> GARBAGE\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
sn);
|
sn);
|
||||||
@@ -1017,7 +1001,7 @@ rlc_um_receive_process_dar (
|
|||||||
in_window = rlc_um_in_window(ctxt_pP, rlc_pP, rlc_pP->vr_ur, sn, rlc_pP->vr_uh);
|
in_window = rlc_um_in_window(ctxt_pP, rlc_pP, rlc_pP->vr_ur, sn, rlc_pP->vr_uh);
|
||||||
|
|
||||||
if (in_window == 0) {
|
if (in_window == 0) {
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" RX PDU VR(UR) < SN %d < VR(UH) and RECEIVED BEFORE-> GARBAGE\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" RX PDU VR(UR) < SN %d < VR(UH) and RECEIVED BEFORE-> GARBAGE\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
sn);
|
sn);
|
||||||
@@ -1035,7 +1019,7 @@ rlc_um_receive_process_dar (
|
|||||||
// 2 lines to avoid memory leaks
|
// 2 lines to avoid memory leaks
|
||||||
rlc_pP->stat_rx_data_pdus_duplicate += 1;
|
rlc_pP->stat_rx_data_pdus_duplicate += 1;
|
||||||
rlc_pP->stat_rx_data_bytes_duplicate += tb_sizeP;
|
rlc_pP->stat_rx_data_bytes_duplicate += tb_sizeP;
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" RX PDU SN %03d REMOVE OLD PDU BEFORE STORING NEW PDU\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" RX PDU SN %03d REMOVE OLD PDU BEFORE STORING NEW PDU\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
sn);
|
sn);
|
||||||
@@ -1057,7 +1041,7 @@ rlc_um_receive_process_dar (
|
|||||||
// -if VR(UR) falls outside of the reordering window:
|
// -if VR(UR) falls outside of the reordering window:
|
||||||
// -set VR(UR) to (VR(UH) – UM_Window_Size);
|
// -set VR(UR) to (VR(UH) – UM_Window_Size);
|
||||||
if (rlc_um_in_reordering_window(ctxt_pP, rlc_pP, sn) < 0) {
|
if (rlc_um_in_reordering_window(ctxt_pP, rlc_pP, sn) < 0) {
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" RX PDU SN %d OUTSIDE REORDERING WINDOW VR(UH)=%d UM_Window_Size=%d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" RX PDU SN %d OUTSIDE REORDERING WINDOW VR(UH)=%d UM_Window_Size=%d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
sn,
|
sn,
|
||||||
@@ -1078,7 +1062,7 @@ rlc_um_receive_process_dar (
|
|||||||
|
|
||||||
|
|
||||||
if (rlc_um_in_reordering_window(ctxt_pP, rlc_pP, rlc_pP->vr_ur) < 0) {
|
if (rlc_um_in_reordering_window(ctxt_pP, rlc_pP, rlc_pP->vr_ur) < 0) {
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" VR(UR) %d OUTSIDE REORDERING WINDOW SET TO VR(UH) – UM_Window_Size = %d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" VR(UR) %d OUTSIDE REORDERING WINDOW SET TO VR(UH) – UM_Window_Size = %d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
rlc_pP->vr_ur,
|
rlc_pP->vr_ur,
|
||||||
@@ -1114,7 +1098,7 @@ rlc_um_receive_process_dar (
|
|||||||
in_window = rlc_um_in_reordering_window(ctxt_pP, rlc_pP, rlc_pP->vr_ux);
|
in_window = rlc_um_in_reordering_window(ctxt_pP, rlc_pP, rlc_pP->vr_ux);
|
||||||
|
|
||||||
if (in_window < 0) {
|
if (in_window < 0) {
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC,
|
LOG_D(RLC,
|
||||||
PROTOCOL_RLC_UM_CTXT_FMT" STOP and RESET t-Reordering because VR(UX) falls outside of the reordering window and VR(UX)=%d is not equal to VR(UH)=%d -or- VR(UX) <= VR(UR)\n",
|
PROTOCOL_RLC_UM_CTXT_FMT" STOP and RESET t-Reordering because VR(UX) falls outside of the reordering window and VR(UX)=%d is not equal to VR(UH)=%d -or- VR(UX) <= VR(UR)\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
@@ -1130,7 +1114,7 @@ rlc_um_receive_process_dar (
|
|||||||
in_window = rlc_um_in_window(ctxt_pP, rlc_pP, rlc_pP->vr_ur, rlc_pP->vr_ux, rlc_pP->vr_uh);
|
in_window = rlc_um_in_window(ctxt_pP, rlc_pP, rlc_pP->vr_ur, rlc_pP->vr_ux, rlc_pP->vr_uh);
|
||||||
|
|
||||||
if ((in_window == -2) || (in_window == 1)) {
|
if ((in_window == -2) || (in_window == 1)) {
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC,
|
LOG_D(RLC,
|
||||||
PROTOCOL_RLC_UM_CTXT_FMT" STOP and RESET t-Reordering because VR(UX) falls outside of the reordering window and VR(UX)=%d is not equal to VR(UH)=%d\n",
|
PROTOCOL_RLC_UM_CTXT_FMT" STOP and RESET t-Reordering because VR(UX) falls outside of the reordering window and VR(UX)=%d is not equal to VR(UH)=%d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
@@ -1152,7 +1136,7 @@ rlc_um_receive_process_dar (
|
|||||||
if (in_window == 2) {
|
if (in_window == 2) {
|
||||||
rlc_um_start_timer_reordering(ctxt_pP, rlc_pP);
|
rlc_um_start_timer_reordering(ctxt_pP, rlc_pP);
|
||||||
rlc_pP->vr_ux = rlc_pP->vr_uh;
|
rlc_pP->vr_ux = rlc_pP->vr_uh;
|
||||||
#if defined (TRACE_RLC_UM_DAR)
|
#if TRACE_RLC_UM_DAR
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" RESTART t-Reordering set VR(UX) to VR(UH) =%d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" RESTART t-Reordering set VR(UX) to VR(UH) =%d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||||
rlc_pP->vr_ux);
|
rlc_pP->vr_ux);
|
||||||
|
|||||||
@@ -26,14 +26,13 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_UM_MODULE
|
#define RLC_UM_MODULE 1
|
||||||
#define RLC_UM_FSM_C
|
#define RLC_UM_FSM_C 1
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include "rlc_um.h"
|
#include "rlc_um.h"
|
||||||
#include "LAYER2/MAC/extern.h"
|
#include "LAYER2/MAC/extern.h"
|
||||||
#include "UTIL/LOG/log.h"
|
#include "UTIL/LOG/log.h"
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -42,7 +41,6 @@ rlc_um_fsm_notify_event (
|
|||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_um_entity_t *rlc_pP, uint8_t eventP)
|
rlc_um_entity_t *rlc_pP, uint8_t eventP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
switch (rlc_pP->protocol_state) {
|
switch (rlc_pP->protocol_state) {
|
||||||
//-------------------------------
|
//-------------------------------
|
||||||
|
|||||||
@@ -26,14 +26,15 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_UM_MODULE
|
#define RLC_UM_MODULE 1
|
||||||
#define RLC_UM_REASSEMBLY_C
|
#define RLC_UM_REASSEMBLY_C 1
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#ifdef USER_MODE
|
#if USER_MODE
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined(ENABLE_ITTI)
|
#if ENABLE_ITTI
|
||||||
|
# include "platform_types.h"
|
||||||
# include "intertask_interface.h"
|
# include "intertask_interface.h"
|
||||||
#endif
|
#endif
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
@@ -45,13 +46,10 @@
|
|||||||
#include "UTIL/LOG/log.h"
|
#include "UTIL/LOG/log.h"
|
||||||
#include "msc.h"
|
#include "msc.h"
|
||||||
|
|
||||||
//#define TRACE_RLC_UM_DISPLAY_ASCII_DATA 1
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
inline void
|
inline void
|
||||||
rlc_um_clear_rx_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t* rlc_pP)
|
rlc_um_clear_rx_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t* rlc_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
rlc_pP->output_sdu_size_to_write = 0;
|
rlc_pP->output_sdu_size_to_write = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,7 +57,6 @@ rlc_um_clear_rx_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t* rlc_
|
|||||||
void
|
void
|
||||||
rlc_um_reassembly (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP, uint8_t * src_pP, int32_t lengthP)
|
rlc_um_reassembly (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP, uint8_t * src_pP, int32_t lengthP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
sdu_size_t sdu_max_size;
|
sdu_size_t sdu_max_size;
|
||||||
|
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT"[REASSEMBLY] reassembly() %d bytes %d bytes already reassemblied\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT"[REASSEMBLY] reassembly() %d bytes %d bytes already reassemblied\n",
|
||||||
@@ -88,14 +85,14 @@ rlc_um_reassembly (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
|
|||||||
if ((rlc_pP->output_sdu_size_to_write + lengthP) <= sdu_max_size) {
|
if ((rlc_pP->output_sdu_size_to_write + lengthP) <= sdu_max_size) {
|
||||||
memcpy (&rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write], src_pP, lengthP);
|
memcpy (&rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write], src_pP, lengthP);
|
||||||
rlc_pP->output_sdu_size_to_write += lengthP;
|
rlc_pP->output_sdu_size_to_write += lengthP;
|
||||||
#ifdef TRACE_RLC_UM_DISPLAY_ASCII_DATA
|
#if TRACE_RLC_UM_DISPLAY_ASCII_DATA
|
||||||
rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write] = 0;
|
rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write] = 0;
|
||||||
LOG_T(RLC, PROTOCOL_RLC_UM_CTXT_FMT"[REASSEMBLY] DATA :",
|
LOG_T(RLC, PROTOCOL_RLC_UM_CTXT_FMT"[REASSEMBLY] DATA :",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||||
rlc_util_print_hex_octets(RLC, (unsigned char*)rlc_pP->output_sdu_in_construction->data, rlc_pP->output_sdu_size_to_write);
|
rlc_util_print_hex_octets(RLC, (unsigned char*)rlc_pP->output_sdu_in_construction->data, rlc_pP->output_sdu_size_to_write);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
|
#if STOP_ON_IP_TRAFFIC_OVERLOAD
|
||||||
AssertFatal(0, PROTOCOL_RLC_UM_CTXT_FMT" RLC_UM_DATA_IND, SDU TOO BIG, DROPPED\n",
|
AssertFatal(0, PROTOCOL_RLC_UM_CTXT_FMT" RLC_UM_DATA_IND, SDU TOO BIG, DROPPED\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||||
#endif
|
#endif
|
||||||
@@ -108,7 +105,7 @@ rlc_um_reassembly (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
|
|||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, PROTOCOL_RLC_UM_CTXT_FMT"[REASSEMBLY]ERROR OUTPUT SDU IS NULL\n",
|
LOG_E(RLC, PROTOCOL_RLC_UM_CTXT_FMT"[REASSEMBLY]ERROR OUTPUT SDU IS NULL\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||||
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
|
#if STOP_ON_IP_TRAFFIC_OVERLOAD
|
||||||
AssertFatal(0, PROTOCOL_RLC_UM_CTXT_FMT" RLC_UM_DATA_IND, SDU DROPPED, OUT OF MEMORY\n",
|
AssertFatal(0, PROTOCOL_RLC_UM_CTXT_FMT" RLC_UM_DATA_IND, SDU DROPPED, OUT OF MEMORY\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||||
#endif
|
#endif
|
||||||
@@ -119,8 +116,6 @@ rlc_um_reassembly (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
|
|||||||
void
|
void
|
||||||
rlc_um_send_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
rlc_um_send_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
if ((rlc_pP->output_sdu_in_construction)) {
|
if ((rlc_pP->output_sdu_in_construction)) {
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" SEND_SDU to upper layers %d bytes sdu %p\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" SEND_SDU to upper layers %d bytes sdu %p\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
@@ -142,8 +137,8 @@ rlc_um_send_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
|||||||
rlc_pP->output_sdu_size_to_write
|
rlc_pP->output_sdu_size_to_write
|
||||||
);
|
);
|
||||||
|
|
||||||
#ifdef TEST_RLC_UM
|
#if TEST_RLC_UM
|
||||||
#ifdef TRACE_RLC_UM_DISPLAY_ASCII_DATA
|
#if TRACE_RLC_UM_DISPLAY_ASCII_DATA
|
||||||
rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write] = 0;
|
rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write] = 0;
|
||||||
LOG_T(RLC, PROTOCOL_RLC_UM_CTXT_FMT"[SEND_SDU] DATA :",
|
LOG_T(RLC, PROTOCOL_RLC_UM_CTXT_FMT"[SEND_SDU] DATA :",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||||
|
|||||||
@@ -26,8 +26,8 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_UM_MODULE
|
#define RLC_UM_MODULE 1
|
||||||
#define RLC_UM_RECEIVER_C
|
#define RLC_UM_RECEIVER_C 1
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include "rlc.h"
|
#include "rlc.h"
|
||||||
@@ -39,15 +39,12 @@
|
|||||||
#include "MAC_INTERFACE/extern.h"
|
#include "MAC_INTERFACE/extern.h"
|
||||||
#include "UTIL/LOG/log.h"
|
#include "UTIL/LOG/log.h"
|
||||||
|
|
||||||
//#define TRACE_RLC_UM_RX 1
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_um_display_rx_window(
|
rlc_um_display_rx_window(
|
||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_um_entity_t * const rlc_pP
|
rlc_um_entity_t * const rlc_pP
|
||||||
)
|
)
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
unsigned long sn = 0;
|
unsigned long sn = 0;
|
||||||
unsigned long end_sn = 0;
|
unsigned long end_sn = 0;
|
||||||
@@ -139,7 +136,6 @@ rlc_um_receive (
|
|||||||
rlc_um_entity_t * const rlc_pP,
|
rlc_um_entity_t * const rlc_pP,
|
||||||
struct mac_data_ind data_indP)
|
struct mac_data_ind data_indP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
mem_block_t *tb_p = NULL;
|
mem_block_t *tb_p = NULL;
|
||||||
uint8_t *first_byte_p = NULL;
|
uint8_t *first_byte_p = NULL;
|
||||||
|
|||||||
@@ -26,13 +26,13 @@
|
|||||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#define RLC_UM_MODULE
|
#define RLC_UM_MODULE 1
|
||||||
#define RLC_UM_SEGMENT_C
|
#define RLC_UM_SEGMENT_C 1
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
#include "platform_constants.h"
|
#include "platform_constants.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#ifdef USER_MODE
|
#if USER_MODE
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#endif
|
#endif
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
@@ -43,12 +43,10 @@
|
|||||||
#include "MAC_INTERFACE/extern.h"
|
#include "MAC_INTERFACE/extern.h"
|
||||||
#include "UTIL/LOG/log.h"
|
#include "UTIL/LOG/log.h"
|
||||||
|
|
||||||
//#define TRACE_RLC_UM_SEGMENT 1
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
list_t pdus;
|
list_t pdus;
|
||||||
signed int pdu_remaining_size;
|
signed int pdu_remaining_size;
|
||||||
signed int test_pdu_remaining_size;
|
signed int test_pdu_remaining_size;
|
||||||
@@ -78,7 +76,7 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
|
|||||||
unsigned int max_li_overhead;
|
unsigned int max_li_overhead;
|
||||||
|
|
||||||
if (nb_bytes_to_transmit < 3) {
|
if (nb_bytes_to_transmit < 3) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" NO SEGMENTATION nb_bytes to transmit = %d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" NO SEGMENTATION nb_bytes to transmit = %d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
nb_bytes_to_transmit);
|
nb_bytes_to_transmit);
|
||||||
@@ -94,7 +92,7 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
|
|||||||
|
|
||||||
while ((list_get_head(&rlc_pP->input_sdus)) && (nb_bytes_to_transmit > 0)) {
|
while ((list_get_head(&rlc_pP->input_sdus)) && (nb_bytes_to_transmit > 0)) {
|
||||||
|
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" nb_bytes_to_transmit %d BO %d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" nb_bytes_to_transmit %d BO %d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
nb_bytes_to_transmit,
|
nb_bytes_to_transmit,
|
||||||
@@ -111,14 +109,14 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
|
|||||||
|
|
||||||
if (nb_bytes_to_transmit >= (rlc_pP->buffer_occupancy + rlc_pP->tx_header_min_length_in_bytes + max_li_overhead)) {
|
if (nb_bytes_to_transmit >= (rlc_pP->buffer_occupancy + rlc_pP->tx_header_min_length_in_bytes + max_li_overhead)) {
|
||||||
data_pdu_size = rlc_pP->buffer_occupancy + rlc_pP->tx_header_min_length_in_bytes + max_li_overhead;
|
data_pdu_size = rlc_pP->buffer_occupancy + rlc_pP->tx_header_min_length_in_bytes + max_li_overhead;
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" alloc PDU size %d bytes to contain not all bytes requested by MAC but all BO of RLC@1\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" alloc PDU size %d bytes to contain not all bytes requested by MAC but all BO of RLC@1\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
data_pdu_size);
|
data_pdu_size);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
data_pdu_size = nb_bytes_to_transmit;
|
data_pdu_size = nb_bytes_to_transmit;
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" alloc PDU size %d bytes to contain all bytes requested by MAC@1\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" alloc PDU size %d bytes to contain all bytes requested by MAC@1\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
data_pdu_size);
|
data_pdu_size);
|
||||||
@@ -126,7 +124,7 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(pdu_mem_p = get_free_mem_block (data_pdu_size + sizeof(struct mac_tb_req)))) {
|
if (!(pdu_mem_p = get_free_mem_block (data_pdu_size + sizeof(struct mac_tb_req)))) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_E(RLC, PROTOCOL_RLC_UM_CTXT_FMT" ERROR COULD NOT GET NEW PDU, EXIT\n",
|
LOG_E(RLC, PROTOCOL_RLC_UM_CTXT_FMT" ERROR COULD NOT GET NEW PDU, EXIT\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||||
#endif
|
#endif
|
||||||
@@ -134,7 +132,7 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" get new PDU %d bytes\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" get new PDU %d bytes\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
data_pdu_size);
|
data_pdu_size);
|
||||||
@@ -193,7 +191,7 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
|
|||||||
test_remaining_num_li_to_substract = 1;
|
test_remaining_num_li_to_substract = 1;
|
||||||
test_li_length_in_bytes = test_li_length_in_bytes ^ 3;
|
test_li_length_in_bytes = test_li_length_in_bytes ^ 3;
|
||||||
} else {
|
} else {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" sdu_mngt_p->sdu_remaining_size=%d test_pdu_remaining_size=%d test_li_length_in_bytes=%d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" sdu_mngt_p->sdu_remaining_size=%d test_pdu_remaining_size=%d test_li_length_in_bytes=%d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
sdu_mngt_p->sdu_remaining_size,
|
sdu_mngt_p->sdu_remaining_size,
|
||||||
@@ -221,7 +219,7 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
|
|||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
// Do the real filling of the pdu_p
|
// Do the real filling of the pdu_p
|
||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" data shift %d Bytes num_li %d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" data shift %d Bytes num_li %d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
((test_num_li*3) +1) >> 1,
|
((test_num_li*3) +1) >> 1,
|
||||||
@@ -248,14 +246,14 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
|
|||||||
sdu_mngt_p = ((struct rlc_um_tx_sdu_management *) (sdu_in_buffer->data));
|
sdu_mngt_p = ((struct rlc_um_tx_sdu_management *) (sdu_in_buffer->data));
|
||||||
|
|
||||||
if (sdu_mngt_p->sdu_segmented_size == 0) {
|
if (sdu_mngt_p->sdu_segmented_size == 0) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" GET NEW SDU %p AVAILABLE SIZE %d Bytes\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" GET NEW SDU %p AVAILABLE SIZE %d Bytes\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
sdu_mngt_p,
|
sdu_mngt_p,
|
||||||
sdu_mngt_p->sdu_remaining_size);
|
sdu_mngt_p->sdu_remaining_size);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" GET AGAIN SDU %p REMAINING AVAILABLE SIZE %d Bytes / %d Bytes \n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" GET AGAIN SDU %p REMAINING AVAILABLE SIZE %d Bytes / %d Bytes \n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
sdu_mngt_p,
|
sdu_mngt_p,
|
||||||
@@ -267,7 +265,7 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
|
|||||||
data_sdu_p = (char *) &(sdu_in_buffer->data[sizeof (struct rlc_um_tx_sdu_management) + sdu_mngt_p->sdu_segmented_size]);
|
data_sdu_p = (char *) &(sdu_in_buffer->data[sizeof (struct rlc_um_tx_sdu_management) + sdu_mngt_p->sdu_segmented_size]);
|
||||||
|
|
||||||
if (sdu_mngt_p->sdu_remaining_size > pdu_remaining_size) {
|
if (sdu_mngt_p->sdu_remaining_size > pdu_remaining_size) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" Filling all remaining PDU with %d bytes\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" Filling all remaining PDU with %d bytes\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
pdu_remaining_size);
|
pdu_remaining_size);
|
||||||
@@ -291,7 +289,7 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
|
|||||||
continue_fill_pdu_with_sdu = 0;
|
continue_fill_pdu_with_sdu = 0;
|
||||||
pdu_remaining_size = 0;
|
pdu_remaining_size = 0;
|
||||||
} else if (sdu_mngt_p->sdu_remaining_size == pdu_remaining_size) {
|
} else if (sdu_mngt_p->sdu_remaining_size == pdu_remaining_size) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" Exactly Filling remaining PDU with %d remaining bytes of SDU\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" Exactly Filling remaining PDU with %d remaining bytes of SDU\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
pdu_remaining_size);
|
pdu_remaining_size);
|
||||||
@@ -311,7 +309,7 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
|
|||||||
continue_fill_pdu_with_sdu = 0;
|
continue_fill_pdu_with_sdu = 0;
|
||||||
pdu_remaining_size = 0;
|
pdu_remaining_size = 0;
|
||||||
} else if ((sdu_mngt_p->sdu_remaining_size + (li_length_in_bytes ^ 3)) < pdu_remaining_size ) {
|
} else if ((sdu_mngt_p->sdu_remaining_size + (li_length_in_bytes ^ 3)) < pdu_remaining_size ) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" Filling PDU with %d all remaining bytes of SDU\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" Filling PDU with %d all remaining bytes of SDU\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
sdu_mngt_p->sdu_remaining_size);
|
sdu_mngt_p->sdu_remaining_size);
|
||||||
@@ -333,7 +331,7 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
|
|||||||
//e_li_p->li1 = sdu_mngt_p->sdu_remaining_size;
|
//e_li_p->li1 = sdu_mngt_p->sdu_remaining_size;
|
||||||
e_li_p->b1 = e_li_p->b1 | (sdu_mngt_p->sdu_remaining_size >> 4);
|
e_li_p->b1 = e_li_p->b1 | (sdu_mngt_p->sdu_remaining_size >> 4);
|
||||||
e_li_p->b2 = sdu_mngt_p->sdu_remaining_size << 4;
|
e_li_p->b2 = sdu_mngt_p->sdu_remaining_size << 4;
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" set e_li_p->b1=%02X set e_li_p->b2=%02X fill_num_li=%d test_num_li=%d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" set e_li_p->b1=%02X set e_li_p->b2=%02X fill_num_li=%d test_num_li=%d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
e_li_p->b1,
|
e_li_p->b1,
|
||||||
@@ -350,7 +348,7 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
|
|||||||
//e_li_p->li2 = sdu_mngt_p->sdu_remaining_size;
|
//e_li_p->li2 = sdu_mngt_p->sdu_remaining_size;
|
||||||
e_li_p->b2 = e_li_p->b2 | (sdu_mngt_p->sdu_remaining_size >> 8);
|
e_li_p->b2 = e_li_p->b2 | (sdu_mngt_p->sdu_remaining_size >> 8);
|
||||||
e_li_p->b3 = sdu_mngt_p->sdu_remaining_size & 0xFF;
|
e_li_p->b3 = sdu_mngt_p->sdu_remaining_size & 0xFF;
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" set e_li_p->b2=%02X set e_li_p->b3=%02X fill_num_li=%d test_num_li=%d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" set e_li_p->b2=%02X set e_li_p->b3=%02X fill_num_li=%d test_num_li=%d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
e_li_p->b2,
|
e_li_p->b2,
|
||||||
@@ -371,14 +369,14 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
|
|||||||
sdu_mngt_p = NULL;
|
sdu_mngt_p = NULL;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" Filling PDU with %d all remaining bytes of SDU and reduce TB size by %d bytes\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" Filling PDU with %d all remaining bytes of SDU and reduce TB size by %d bytes\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
sdu_mngt_p->sdu_remaining_size,
|
sdu_mngt_p->sdu_remaining_size,
|
||||||
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
|
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_MODE
|
#if USER_MODE
|
||||||
#ifndef EXMIMO
|
#if !EXMIMO
|
||||||
assert(1!=1);
|
assert(1!=1);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -422,7 +420,7 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
|
|||||||
pdu_tb_req_p->data_ptr = (unsigned char*)pdu_p;
|
pdu_tb_req_p->data_ptr = (unsigned char*)pdu_p;
|
||||||
pdu_tb_req_p->tb_size = data_pdu_size - pdu_remaining_size;
|
pdu_tb_req_p->tb_size = data_pdu_size - pdu_remaining_size;
|
||||||
list_add_tail_eurecom (pdu_mem_p, &rlc_pP->pdus_to_mac_layer);
|
list_add_tail_eurecom (pdu_mem_p, &rlc_pP->pdus_to_mac_layer);
|
||||||
#if defined(TRACE_RLC_PAYLOAD)
|
#if TRACE_RLC_PAYLOAD
|
||||||
rlc_util_print_hex_octets(RLC, pdu_mem_p->data, data_pdu_size);
|
rlc_util_print_hex_octets(RLC, pdu_mem_p->data, data_pdu_size);
|
||||||
#endif
|
#endif
|
||||||
AssertFatal( pdu_tb_req_p->tb_size > 0 , "SEGMENT10: FINAL RLC UM PDU LENGTH %d", pdu_tb_req_p->tb_size);
|
AssertFatal( pdu_tb_req_p->tb_size > 0 , "SEGMENT10: FINAL RLC UM PDU LENGTH %d", pdu_tb_req_p->tb_size);
|
||||||
@@ -439,7 +437,6 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
|
|||||||
void
|
void
|
||||||
rlc_um_segment_5 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
rlc_um_segment_5 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
list_t pdus;
|
list_t pdus;
|
||||||
signed int pdu_remaining_size = 0;
|
signed int pdu_remaining_size = 0;
|
||||||
signed int test_pdu_remaining_size = 0;
|
signed int test_pdu_remaining_size = 0;
|
||||||
@@ -469,7 +466,7 @@ rlc_um_segment_5 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
|||||||
unsigned int max_li_overhead = 0;
|
unsigned int max_li_overhead = 0;
|
||||||
|
|
||||||
if (nb_bytes_to_transmit < 2) {
|
if (nb_bytes_to_transmit < 2) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" NO SEGMENTATION5 nb_bytes to transmit = %d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" NO SEGMENTATION5 nb_bytes to transmit = %d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
nb_bytes_to_transmit);
|
nb_bytes_to_transmit);
|
||||||
@@ -483,7 +480,7 @@ rlc_um_segment_5 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
|||||||
RLC_UM_MUTEX_LOCK(&rlc_pP->lock_input_sdus, ctxt_pP, rlc_pP);
|
RLC_UM_MUTEX_LOCK(&rlc_pP->lock_input_sdus, ctxt_pP, rlc_pP);
|
||||||
|
|
||||||
while ((list_get_head(&rlc_pP->input_sdus)) && (nb_bytes_to_transmit > 0)) {
|
while ((list_get_head(&rlc_pP->input_sdus)) && (nb_bytes_to_transmit > 0)) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT"nb_bytes_to_transmit %d BO %d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT"nb_bytes_to_transmit %d BO %d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
nb_bytes_to_transmit,
|
nb_bytes_to_transmit,
|
||||||
@@ -500,14 +497,14 @@ rlc_um_segment_5 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
|||||||
|
|
||||||
if (nb_bytes_to_transmit >= (rlc_pP->buffer_occupancy + rlc_pP->tx_header_min_length_in_bytes + max_li_overhead)) {
|
if (nb_bytes_to_transmit >= (rlc_pP->buffer_occupancy + rlc_pP->tx_header_min_length_in_bytes + max_li_overhead)) {
|
||||||
data_pdu_size = rlc_pP->buffer_occupancy + rlc_pP->tx_header_min_length_in_bytes + max_li_overhead;
|
data_pdu_size = rlc_pP->buffer_occupancy + rlc_pP->tx_header_min_length_in_bytes + max_li_overhead;
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" alloc PDU size %d bytes to contain not all bytes requested by MAC but all BO of RLC@1\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" alloc PDU size %d bytes to contain not all bytes requested by MAC but all BO of RLC@1\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
data_pdu_size);
|
data_pdu_size);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
data_pdu_size = nb_bytes_to_transmit;
|
data_pdu_size = nb_bytes_to_transmit;
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" alloc PDU size %d bytes to contain all bytes requested by MAC@1\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" alloc PDU size %d bytes to contain all bytes requested by MAC@1\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
data_pdu_size);
|
data_pdu_size);
|
||||||
@@ -515,7 +512,7 @@ rlc_um_segment_5 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(pdu_mem_p = get_free_mem_block (data_pdu_size + sizeof(struct mac_tb_req)))) {
|
if (!(pdu_mem_p = get_free_mem_block (data_pdu_size + sizeof(struct mac_tb_req)))) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_E(RLC, PROTOCOL_RLC_UM_CTXT_FMT" ERROR COULD NOT GET NEW PDU, EXIT\n",
|
LOG_E(RLC, PROTOCOL_RLC_UM_CTXT_FMT" ERROR COULD NOT GET NEW PDU, EXIT\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
|
||||||
#endif
|
#endif
|
||||||
@@ -523,7 +520,7 @@ rlc_um_segment_5 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" get new PDU %d bytes\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" get new PDU %d bytes\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
data_pdu_size);
|
data_pdu_size);
|
||||||
@@ -583,7 +580,7 @@ rlc_um_segment_5 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
|||||||
test_remaining_num_li_to_substract = 1;
|
test_remaining_num_li_to_substract = 1;
|
||||||
test_li_length_in_bytes = test_li_length_in_bytes ^ 3;
|
test_li_length_in_bytes = test_li_length_in_bytes ^ 3;
|
||||||
} else {
|
} else {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" sdu_mngt_p->sdu_remaining_size=%d test_pdu_remaining_size=%d test_li_length_in_bytes=%d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" sdu_mngt_p->sdu_remaining_size=%d test_pdu_remaining_size=%d test_li_length_in_bytes=%d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
sdu_mngt_p->sdu_remaining_size,
|
sdu_mngt_p->sdu_remaining_size,
|
||||||
@@ -612,7 +609,7 @@ rlc_um_segment_5 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
|||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
// Do the real filling of the pdu_p
|
// Do the real filling of the pdu_p
|
||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" data shift %d Bytes num_li %d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" data shift %d Bytes num_li %d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
((test_num_li*3) +1) >> 1,
|
((test_num_li*3) +1) >> 1,
|
||||||
@@ -639,14 +636,14 @@ rlc_um_segment_5 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
|||||||
sdu_mngt_p = ((struct rlc_um_tx_sdu_management *) (sdu_in_buffer->data));
|
sdu_mngt_p = ((struct rlc_um_tx_sdu_management *) (sdu_in_buffer->data));
|
||||||
|
|
||||||
if (sdu_mngt_p->sdu_segmented_size == 0) {
|
if (sdu_mngt_p->sdu_segmented_size == 0) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" GET NEW SDU %p AVAILABLE SIZE %d Bytes\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" GET NEW SDU %p AVAILABLE SIZE %d Bytes\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
sdu_mngt_p,
|
sdu_mngt_p,
|
||||||
sdu_mngt_p->sdu_remaining_size);
|
sdu_mngt_p->sdu_remaining_size);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" GET AGAIN SDU %p REMAINING AVAILABLE SIZE %d Bytes / %d Bytes \n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" GET AGAIN SDU %p REMAINING AVAILABLE SIZE %d Bytes / %d Bytes \n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
sdu_mngt_p,
|
sdu_mngt_p,
|
||||||
@@ -658,7 +655,7 @@ rlc_um_segment_5 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
|||||||
data_sdu_p = (char*) &(sdu_in_buffer->data[sizeof (struct rlc_um_tx_sdu_management) + sdu_mngt_p->sdu_segmented_size]);
|
data_sdu_p = (char*) &(sdu_in_buffer->data[sizeof (struct rlc_um_tx_sdu_management) + sdu_mngt_p->sdu_segmented_size]);
|
||||||
|
|
||||||
if (sdu_mngt_p->sdu_remaining_size > pdu_remaining_size) {
|
if (sdu_mngt_p->sdu_remaining_size > pdu_remaining_size) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" Filling all remaining PDU with %d bytes\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" Filling all remaining PDU with %d bytes\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
pdu_remaining_size);
|
pdu_remaining_size);
|
||||||
@@ -681,7 +678,7 @@ rlc_um_segment_5 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
|||||||
continue_fill_pdu_with_sdu = 0;
|
continue_fill_pdu_with_sdu = 0;
|
||||||
pdu_remaining_size = 0;
|
pdu_remaining_size = 0;
|
||||||
} else if (sdu_mngt_p->sdu_remaining_size == pdu_remaining_size) {
|
} else if (sdu_mngt_p->sdu_remaining_size == pdu_remaining_size) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" Exactly Filling remaining PDU with %d remaining bytes of SDU\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" Exactly Filling remaining PDU with %d remaining bytes of SDU\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
pdu_remaining_size);
|
pdu_remaining_size);
|
||||||
@@ -699,7 +696,7 @@ rlc_um_segment_5 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
|||||||
continue_fill_pdu_with_sdu = 0;
|
continue_fill_pdu_with_sdu = 0;
|
||||||
pdu_remaining_size = 0;
|
pdu_remaining_size = 0;
|
||||||
} else if ((sdu_mngt_p->sdu_remaining_size + (li_length_in_bytes ^ 3)) < pdu_remaining_size ) {
|
} else if ((sdu_mngt_p->sdu_remaining_size + (li_length_in_bytes ^ 3)) < pdu_remaining_size ) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" Filling PDU with %d all remaining bytes of SDU\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" Filling PDU with %d all remaining bytes of SDU\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
sdu_mngt_p->sdu_remaining_size);
|
sdu_mngt_p->sdu_remaining_size);
|
||||||
@@ -721,7 +718,7 @@ rlc_um_segment_5 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
|||||||
//e_li_p->li1 = sdu_mngt_p->sdu_remaining_size;
|
//e_li_p->li1 = sdu_mngt_p->sdu_remaining_size;
|
||||||
e_li_p->b1 = e_li_p->b1 | (sdu_mngt_p->sdu_remaining_size >> 4);
|
e_li_p->b1 = e_li_p->b1 | (sdu_mngt_p->sdu_remaining_size >> 4);
|
||||||
e_li_p->b2 = sdu_mngt_p->sdu_remaining_size << 4;
|
e_li_p->b2 = sdu_mngt_p->sdu_remaining_size << 4;
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" set e_li_p->b1=%02X set e_li_p->b2=%02X fill_num_li=%d test_num_li=%d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" set e_li_p->b1=%02X set e_li_p->b2=%02X fill_num_li=%d test_num_li=%d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
e_li_p->b1,
|
e_li_p->b1,
|
||||||
@@ -738,7 +735,7 @@ rlc_um_segment_5 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
|||||||
//e_li_p->li2 = sdu_mngt_p->sdu_remaining_size;
|
//e_li_p->li2 = sdu_mngt_p->sdu_remaining_size;
|
||||||
e_li_p->b2 = e_li_p->b2 | (sdu_mngt_p->sdu_remaining_size >> 8);
|
e_li_p->b2 = e_li_p->b2 | (sdu_mngt_p->sdu_remaining_size >> 8);
|
||||||
e_li_p->b3 = sdu_mngt_p->sdu_remaining_size & 0xFF;
|
e_li_p->b3 = sdu_mngt_p->sdu_remaining_size & 0xFF;
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" set e_li_p->b2=%02X set e_li_p->b3=%02X fill_num_li=%d test_num_li=%d\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" set e_li_p->b2=%02X set e_li_p->b3=%02X fill_num_li=%d test_num_li=%d\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
e_li_p->b2,
|
e_li_p->b2,
|
||||||
@@ -759,13 +756,13 @@ rlc_um_segment_5 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
|||||||
sdu_mngt_p = NULL;
|
sdu_mngt_p = NULL;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if TRACE_RLC_UM_SEGMENT
|
||||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" Filling PDU with %d all remaining bytes of SDU and reduce TB size by %d bytes\n",
|
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" Filling PDU with %d all remaining bytes of SDU and reduce TB size by %d bytes\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
sdu_mngt_p->sdu_remaining_size,
|
sdu_mngt_p->sdu_remaining_size,
|
||||||
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
|
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_MODE
|
#if USER_MODE
|
||||||
assert(1!=1);
|
assert(1!=1);
|
||||||
#endif
|
#endif
|
||||||
memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size);
|
memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size);
|
||||||
@@ -806,7 +803,7 @@ rlc_um_segment_5 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
|||||||
pdu_tb_req_p->data_ptr = (unsigned char*)pdu_p;
|
pdu_tb_req_p->data_ptr = (unsigned char*)pdu_p;
|
||||||
pdu_tb_req_p->tb_size = data_pdu_size - pdu_remaining_size;
|
pdu_tb_req_p->tb_size = data_pdu_size - pdu_remaining_size;
|
||||||
list_add_tail_eurecom (pdu_mem_p, &rlc_pP->pdus_to_mac_layer);
|
list_add_tail_eurecom (pdu_mem_p, &rlc_pP->pdus_to_mac_layer);
|
||||||
#if defined(TRACE_RLC_PAYLOAD)
|
#if TRACE_RLC_PAYLOAD
|
||||||
rlc_util_print_hex_octets(RLC, (unsigned char*)pdu_mem_p->data, data_pdu_size);
|
rlc_util_print_hex_octets(RLC, (unsigned char*)pdu_mem_p->data, data_pdu_size);
|
||||||
#endif
|
#endif
|
||||||
AssertFatal( pdu_tb_req_p->tb_size > 0 , "SEGMENT5: FINAL RLC UM PDU LENGTH %d", pdu_tb_req_p->tb_size);
|
AssertFatal( pdu_tb_req_p->tb_size > 0 , "SEGMENT5: FINAL RLC UM PDU LENGTH %d", pdu_tb_req_p->tb_size);
|
||||||
|
|||||||
@@ -115,7 +115,7 @@
|
|||||||
# include "commonDef.h"
|
# include "commonDef.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ENABLE_RAL)
|
#if ENABLE_RAL
|
||||||
# include "collection/hashtable/obj_hashtable.h"
|
# include "collection/hashtable/obj_hashtable.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@ typedef struct uid_linear_allocator_s {
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(ENABLE_RAL)
|
#if ENABLE_RAL
|
||||||
typedef struct rrc_ral_threshold_key_s {
|
typedef struct rrc_ral_threshold_key_s {
|
||||||
ral_link_param_type_t link_param_type;
|
ral_link_param_type_t link_param_type;
|
||||||
ral_threshold_t threshold;
|
ral_threshold_t threshold;
|
||||||
@@ -414,7 +414,7 @@ typedef struct eNB_RRC_INST_s {
|
|||||||
RB_HEAD(rrc_ue_tree_s, rrc_eNB_ue_context_s) rrc_ue_head; // ue_context tree key search by rnti
|
RB_HEAD(rrc_ue_tree_s, rrc_eNB_ue_context_s) rrc_ue_head; // ue_context tree key search by rnti
|
||||||
uint8_t HO_flag;
|
uint8_t HO_flag;
|
||||||
uint8_t Nb_ue;
|
uint8_t Nb_ue;
|
||||||
#if defined(ENABLE_RAL)
|
#if ENABLE_RAL
|
||||||
obj_hash_table_t *ral_meas_thresholds;
|
obj_hash_table_t *ral_meas_thresholds;
|
||||||
#endif
|
#endif
|
||||||
hash_table_t *initial_id2_s1ap_ids; // key is content is rrc_ue_s1ap_ids_t
|
hash_table_t *initial_id2_s1ap_ids; // key is content is rrc_ue_s1ap_ids_t
|
||||||
@@ -509,7 +509,7 @@ typedef struct UE_RRC_INST_s {
|
|||||||
float rsrq_db[7];
|
float rsrq_db[7];
|
||||||
float rsrp_db_filtered[7];
|
float rsrp_db_filtered[7];
|
||||||
float rsrq_db_filtered[7];
|
float rsrq_db_filtered[7];
|
||||||
#if defined(ENABLE_RAL)
|
#if ENABLE_RAL
|
||||||
obj_hash_table_t *ral_meas_thresholds;
|
obj_hash_table_t *ral_meas_thresholds;
|
||||||
ral_transaction_id_t scan_transaction_id;
|
ral_transaction_id_t scan_transaction_id;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
#include "RRC/NAS/nas_config.h"
|
#include "RRC/NAS/nas_config.h"
|
||||||
#include "RRC/NAS/rb_config.h"
|
#include "RRC/NAS/rb_config.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_RAL
|
#if ENABLE_RAL
|
||||||
#include "rrc_UE_ral.h"
|
#include "rrc_UE_ral.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -189,7 +189,7 @@ static int rrc_set_state (module_id_t ue_mod_idP, Rrc_State_t state)
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
static int rrc_set_sub_state( module_id_t ue_mod_idP, Rrc_Sub_State_t subState )
|
static int rrc_set_sub_state( module_id_t ue_mod_idP, Rrc_Sub_State_t subState )
|
||||||
{
|
{
|
||||||
#if (defined(ENABLE_ITTI) && (defined(ENABLE_USE_MME) || defined(ENABLE_RAL)))
|
#if (defined(ENABLE_ITTI) && (defined(ENABLE_USE_MME) || ENABLE_RAL))
|
||||||
|
|
||||||
switch (UE_rrc_inst[ue_mod_idP].RrcState) {
|
switch (UE_rrc_inst[ue_mod_idP].RrcState) {
|
||||||
case RRC_STATE_INACTIVE:
|
case RRC_STATE_INACTIVE:
|
||||||
@@ -1061,7 +1061,7 @@ rrc_ue_process_radioResourceConfigDedicated(
|
|||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
||||||
#ifdef ENABLE_RAL
|
#if ENABLE_RAL
|
||||||
// first msg that includes srb config
|
// first msg that includes srb config
|
||||||
UE_rrc_inst[ctxt_pP->module_id].num_srb=radioResourceConfigDedicated->srb_ToAddModList->list.count;
|
UE_rrc_inst[ctxt_pP->module_id].num_srb=radioResourceConfigDedicated->srb_ToAddModList->list.count;
|
||||||
#endif
|
#endif
|
||||||
@@ -1613,7 +1613,7 @@ rrc_ue_process_rrcConnectionReconfiguration(
|
|||||||
free (rrcConnectionReconfiguration_r8->dedicatedInfoNASList);
|
free (rrcConnectionReconfiguration_r8->dedicatedInfoNASList);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_RAL
|
#if ENABLE_RAL
|
||||||
{
|
{
|
||||||
MessageDef *message_ral_p = NULL;
|
MessageDef *message_ral_p = NULL;
|
||||||
rrc_ral_connection_reestablishment_ind_t connection_reestablishment_ind;
|
rrc_ral_connection_reestablishment_ind_t connection_reestablishment_ind;
|
||||||
@@ -1975,7 +1975,7 @@ rrc_ue_decode_dcch(
|
|||||||
LOG_I(RRC, "[UE %d] State = RRC_RECONFIGURED during HO (eNB %d)\n",
|
LOG_I(RRC, "[UE %d] State = RRC_RECONFIGURED during HO (eNB %d)\n",
|
||||||
ctxt_pP->module_id, target_eNB_index);
|
ctxt_pP->module_id, target_eNB_index);
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
#ifdef ENABLE_RAL
|
#if ENABLE_RAL
|
||||||
{
|
{
|
||||||
MessageDef *message_ral_p = NULL;
|
MessageDef *message_ral_p = NULL;
|
||||||
rrc_ral_connection_reconfiguration_ho_ind_t connection_reconfiguration_ho_ind;
|
rrc_ral_connection_reconfiguration_ho_ind_t connection_reconfiguration_ho_ind;
|
||||||
@@ -2032,7 +2032,7 @@ rrc_ue_decode_dcch(
|
|||||||
ctxt_pP->module_id,
|
ctxt_pP->module_id,
|
||||||
eNB_indexP);
|
eNB_indexP);
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
#ifdef ENABLE_RAL
|
#if ENABLE_RAL
|
||||||
{
|
{
|
||||||
MessageDef *message_ral_p = NULL;
|
MessageDef *message_ral_p = NULL;
|
||||||
rrc_ral_connection_reconfiguration_ind_t connection_reconfiguration_ind;
|
rrc_ral_connection_reconfiguration_ind_t connection_reconfiguration_ind;
|
||||||
@@ -2097,7 +2097,7 @@ rrc_ue_decode_dcch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
itti_send_msg_to_task(TASK_NAS_UE, ctxt_pP->instance, msg_p);
|
itti_send_msg_to_task(TASK_NAS_UE, ctxt_pP->instance, msg_p);
|
||||||
#if defined(ENABLE_RAL)
|
#if ENABLE_RAL
|
||||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, RRC_RAL_CONNECTION_RELEASE_IND);
|
msg_p = itti_alloc_new_message(TASK_RRC_UE, RRC_RAL_CONNECTION_RELEASE_IND);
|
||||||
RRC_RAL_CONNECTION_RELEASE_IND(msg_p).ue_id = ctxt_pP->module_id;
|
RRC_RAL_CONNECTION_RELEASE_IND(msg_p).ue_id = ctxt_pP->module_id;
|
||||||
itti_send_msg_to_task(TASK_RAL_UE, ctxt_pP->instance, msg_p);
|
itti_send_msg_to_task(TASK_RAL_UE, ctxt_pP->instance, msg_p);
|
||||||
@@ -3243,7 +3243,7 @@ static int decode_SI( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_in
|
|||||||
if (UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State == RRC_IDLE) {
|
if (UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State == RRC_IDLE) {
|
||||||
LOG_I( RRC, "[UE %d] Received SIB1/SIB2/SIB3 Switching to RRC_SI_RECEIVED\n", ctxt_pP->module_id );
|
LOG_I( RRC, "[UE %d] Received SIB1/SIB2/SIB3 Switching to RRC_SI_RECEIVED\n", ctxt_pP->module_id );
|
||||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State = RRC_SI_RECEIVED;
|
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State = RRC_SI_RECEIVED;
|
||||||
#ifdef ENABLE_RAL
|
#if ENABLE_RAL
|
||||||
{
|
{
|
||||||
MessageDef *message_ral_p = NULL;
|
MessageDef *message_ral_p = NULL;
|
||||||
rrc_ral_system_information_ind_t ral_si_ind;
|
rrc_ral_system_information_ind_t ral_si_ind;
|
||||||
@@ -4171,7 +4171,7 @@ void *rrc_ue_task( void *args_p )
|
|||||||
|
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if defined(ENABLE_RAL)
|
# if ENABLE_RAL
|
||||||
|
|
||||||
case RRC_RAL_SCAN_REQ:
|
case RRC_RAL_SCAN_REQ:
|
||||||
LOG_D(RRC, "[UE %d] Received %s: state %d\n", ue_mod_id, msg_name);
|
LOG_D(RRC, "[UE %d] Received %s: state %d\n", ue_mod_id, msg_name);
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
# include "intertask_interface.h"
|
# include "intertask_interface.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_RAL
|
#if ENABLE_RAL
|
||||||
# include "rrc_eNB_ral.h"
|
# include "rrc_eNB_ral.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -2947,7 +2947,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
|||||||
ue_context_pP->ue_context.kenb, &kRRCint);
|
ue_context_pP->ue_context.kenb, &kRRCint);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_RAL
|
#if ENABLE_RAL
|
||||||
{
|
{
|
||||||
MessageDef *message_ral_p = NULL;
|
MessageDef *message_ral_p = NULL;
|
||||||
rrc_ral_connection_reconfiguration_ind_t connection_reconfiguration_ind;
|
rrc_ral_connection_reconfiguration_ind_t connection_reconfiguration_ind;
|
||||||
@@ -4353,12 +4353,11 @@ rrc_enb_task(
|
|||||||
openair_rrc_lite_eNB_configuration(ENB_INSTANCE_TO_MODULE_ID(instance), &RRC_CONFIGURATION_REQ(msg_p));
|
openair_rrc_lite_eNB_configuration(ENB_INSTANCE_TO_MODULE_ID(instance), &RRC_CONFIGURATION_REQ(msg_p));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
# ifdef ENABLE_RAL
|
# if ENABLE_RAL
|
||||||
|
|
||||||
case RRC_RAL_CONFIGURE_THRESHOLD_REQ:
|
case RRC_RAL_CONFIGURE_THRESHOLD_REQ:
|
||||||
rrc_enb_ral_handle_configure_threshold_request(instance, msg_p);
|
rrc_enb_ral_handle_configure_threshold_request(instance, msg_p);
|
||||||
break;
|
break;
|
||||||
# endif
|
|
||||||
|
|
||||||
//SPECTRA: Add the RRC connection reconfiguration with Second cell configuration
|
//SPECTRA: Add the RRC connection reconfiguration with Second cell configuration
|
||||||
case RRC_RAL_CONNECTION_RECONFIGURATION_REQ:
|
case RRC_RAL_CONNECTION_RECONFIGURATION_REQ:
|
||||||
@@ -4372,13 +4371,11 @@ rrc_enb_task(
|
|||||||
msg_p->ittiMsgHeader.lte_time.slot);
|
msg_p->ittiMsgHeader.lte_time.slot);
|
||||||
LOG_I(RRC, "[eNB %d] Send RRC_RAL_CONNECTION_RECONFIGURATION_REQ to UE %s\n", instance, msg_name_p);
|
LOG_I(RRC, "[eNB %d] Send RRC_RAL_CONNECTION_RECONFIGURATION_REQ to UE %s\n", instance, msg_name_p);
|
||||||
//Method RRC connection reconfiguration command with Second cell configuration
|
//Method RRC connection reconfiguration command with Second cell configuration
|
||||||
# ifdef ENABLE_RAL
|
|
||||||
//rrc_eNB_generate_RRCConnectionReconfiguration_SCell(instance, 0/* TODO put frameP number ! */, /*ue_mod_id force ue_mod_id to first UE*/0, 36126);
|
//rrc_eNB_generate_RRCConnectionReconfiguration_SCell(instance, 0/* TODO put frameP number ! */, /*ue_mod_id force ue_mod_id to first UE*/0, 36126);
|
||||||
# else
|
|
||||||
//rrc_eNB_generate_defaultRRCConnectionReconfiguration(instance, 0/* TODO put frameP number ! */, /*ue_mod_id force ue_mod_id to first UE*/0,
|
//rrc_eNB_generate_defaultRRCConnectionReconfiguration(instance, 0/* TODO put frameP number ! */, /*ue_mod_id force ue_mod_id to first UE*/0,
|
||||||
// eNB_rrc_inst[instance].HO_flag);
|
// eNB_rrc_inst[instance].HO_flag);
|
||||||
# endif
|
|
||||||
break;
|
break;
|
||||||
|
# endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_E(RRC, "[eNB %d] Received unexpected message %s\n", instance, msg_name_p);
|
LOG_E(RRC, "[eNB %d] Received unexpected message %s\n", instance, msg_name_p);
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
# include "udp_eNB_task.h"
|
# include "udp_eNB_task.h"
|
||||||
# include "gtpv1u_eNB_task.h"
|
# include "gtpv1u_eNB_task.h"
|
||||||
# endif
|
# endif
|
||||||
# if defined(ENABLE_RAL)
|
# if ENABLE_RAL
|
||||||
# include "lteRALue.h"
|
# include "lteRALue.h"
|
||||||
# include "lteRALenb.h"
|
# include "lteRALenb.h"
|
||||||
# endif
|
# endif
|
||||||
@@ -94,7 +94,7 @@ int create_tasks(uint32_t enb_nb, uint32_t ue_nb)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
# if defined(ENABLE_RAL)
|
# if ENABLE_RAL
|
||||||
|
|
||||||
if (itti_create_task (TASK_RAL_ENB, eRAL_task, NULL) < 0) {
|
if (itti_create_task (TASK_RAL_ENB, eRAL_task, NULL) < 0) {
|
||||||
LOG_E(RAL_ENB, "Create task for RAL eNB failed\n");
|
LOG_E(RAL_ENB, "Create task for RAL eNB failed\n");
|
||||||
@@ -110,7 +110,7 @@ int create_tasks(uint32_t enb_nb, uint32_t ue_nb)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
# if defined(ENABLE_RAL)
|
# if ENABLE_RAL
|
||||||
|
|
||||||
if (itti_create_task (TASK_RAL_UE, mRAL_task, NULL) < 0) {
|
if (itti_create_task (TASK_RAL_UE, mRAL_task, NULL) < 0) {
|
||||||
LOG_E(RAL_UE, "Create task for RAL UE failed\n");
|
LOG_E(RAL_UE, "Create task for RAL UE failed\n");
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
#include "UTIL/OTG/otg_externs.h"
|
#include "UTIL/OTG/otg_externs.h"
|
||||||
#include "oml.h"
|
#include "oml.h"
|
||||||
#include "msc.h"
|
#include "msc.h"
|
||||||
#ifdef ENABLE_RAL
|
#if ENABLE_RAL
|
||||||
#include "lteRALenb.h"
|
#include "lteRALenb.h"
|
||||||
#include "lteRALue.h"
|
#include "lteRALue.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -353,7 +353,7 @@ void oaisim_config(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef ENABLE_RAL
|
#if ENABLE_RAL
|
||||||
mRAL_init_default_values();
|
mRAL_init_default_values();
|
||||||
eRAL_init_default_values();
|
eRAL_init_default_values();
|
||||||
#endif
|
#endif
|
||||||
@@ -432,7 +432,7 @@ int olg_config(void)
|
|||||||
set_comp_log(SCTP, LOG_DEBUG, LOG_MED,1);
|
set_comp_log(SCTP, LOG_DEBUG, LOG_MED,1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ENABLE_RAL)
|
#if ENABLE_RAL
|
||||||
set_comp_log(RAL_ENB, LOG_TRACE, LOG_MED,1);
|
set_comp_log(RAL_ENB, LOG_TRACE, LOG_MED,1);
|
||||||
set_comp_log(RAL_UE, LOG_TRACE, LOG_MED,1);
|
set_comp_log(RAL_UE, LOG_TRACE, LOG_MED,1);
|
||||||
set_log(RAL_ENB, LOG_DEBUG, 1);
|
set_log(RAL_ENB, LOG_DEBUG, 1);
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
#include "UTIL/OPT/opt.h"
|
#include "UTIL/OPT/opt.h"
|
||||||
#include "UTIL/OTG/otg_config.h"
|
#include "UTIL/OTG/otg_config.h"
|
||||||
#include "UTIL/OTG/otg_tx.h"
|
#include "UTIL/OTG/otg_tx.h"
|
||||||
#if defined (ENABLE_RAL)
|
#if ENABLE_RAL
|
||||||
#include "lteRALenb.h"
|
#include "lteRALenb.h"
|
||||||
#include "lteRALue.h"
|
#include "lteRALue.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -281,7 +281,7 @@ void get_simulation_options(int argc, char *argv[])
|
|||||||
printf("setting CBA backoff to %d\n", cba_backoff);
|
printf("setting CBA backoff to %d\n", cba_backoff);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if defined(ENABLE_RAL)
|
#if ENABLE_RAL
|
||||||
|
|
||||||
case LONG_OPTION_ENB_RAL_LISTENING_PORT:
|
case LONG_OPTION_ENB_RAL_LISTENING_PORT:
|
||||||
if (optarg) {
|
if (optarg) {
|
||||||
@@ -900,7 +900,7 @@ void init_openair1(void)
|
|||||||
{
|
{
|
||||||
module_id_t UE_id, eNB_id;
|
module_id_t UE_id, eNB_id;
|
||||||
uint8_t CC_id;
|
uint8_t CC_id;
|
||||||
#if defined(ENABLE_RAL)
|
#if ENABLE_RAL
|
||||||
int list_index;
|
int list_index;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -996,7 +996,7 @@ void init_openair1(void)
|
|||||||
PHY_vars_UE_g[UE_id][CC_id]->current_dlsch_cqi[0] = 10;
|
PHY_vars_UE_g[UE_id][CC_id]->current_dlsch_cqi[0] = 10;
|
||||||
|
|
||||||
LOG_I(EMU, "UE %d mode is initialized to %d\n", UE_id, PHY_vars_UE_g[UE_id][CC_id]->UE_mode[0] );
|
LOG_I(EMU, "UE %d mode is initialized to %d\n", UE_id, PHY_vars_UE_g[UE_id][CC_id]->UE_mode[0] );
|
||||||
#if defined(ENABLE_RAL)
|
#if ENABLE_RAL
|
||||||
PHY_vars_UE_g[UE_id][CC_id]->ral_thresholds_timed = hashtable_create (64, NULL, NULL);
|
PHY_vars_UE_g[UE_id][CC_id]->ral_thresholds_timed = hashtable_create (64, NULL, NULL);
|
||||||
|
|
||||||
for (list_index = 0; list_index < RAL_LINK_PARAM_GEN_MAX; list_index++) {
|
for (list_index = 0; list_index < RAL_LINK_PARAM_GEN_MAX; list_index++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user