Commit 57144404 authored by Michael Cook's avatar Michael Cook

Cleanup

Revert unnecessary changes relative to origin/develop

Reviewed with Andrew
parent 5ed13908
...@@ -226,18 +226,18 @@ THREAD_STRUCT = ( ...@@ -226,18 +226,18 @@ THREAD_STRUCT = (
log_config = log_config =
{ {
global_log_level ="debug"; global_log_level ="info";
global_log_verbosity ="medium"; global_log_verbosity ="medium";
hw_log_level ="info"; hw_log_level ="info";
hw_log_verbosity ="medium"; hw_log_verbosity ="medium";
phy_log_level ="info"; phy_log_level ="info";
phy_log_verbosity ="medium"; phy_log_verbosity ="medium";
mac_log_level ="debug"; mac_log_level ="info";
mac_log_verbosity ="high"; mac_log_verbosity ="high";
rlc_log_level ="info"; rlc_log_level ="info";
rlc_log_verbosity ="medium"; rlc_log_verbosity ="medium";
pdcp_log_level ="info"; pdcp_log_level ="info";
pdcp_log_verbosity ="medium"; pdcp_log_verbosity ="medium";
rrc_log_level ="debug"; rrc_log_level ="info";
rrc_log_verbosity ="medium"; rrc_log_verbosity ="medium";
}; };
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "common/config/config_userapi.h" #include "common/config/config_userapi.h"
#include <time.h> #include <time.h>
#include <sys/time.h> #include <sys/time.h>
// main log variables // main log variables
log_mem_cnt_t log_mem_d[2]; log_mem_cnt_t log_mem_d[2];
...@@ -487,17 +488,16 @@ static int log_header(char *log_buffer, ...@@ -487,17 +488,16 @@ static int log_header(char *log_buffer,
gettimeofday(&tv, NULL); gettimeofday(&tv, NULL);
struct tm tm; struct tm tm;
localtime_r(&tv.tv_sec, &tm); localtime_r(&tv.tv_sec, &tm);
return snprintf(log_buffer, buffsize, "%02d:%02d:%02d.%06ld %s%s[%s]%c %s %s%s", return snprintf(log_buffer, buffsize, "%02d:%02d:%02d.%06ld %s%s[%s]%c %s %s%s",
tm.tm_hour, tm.tm_hour,
tm.tm_min, tm.tm_min,
tm.tm_sec, tm.tm_sec,
tv.tv_usec, tv.tv_usec,
log_level_highlight_end[level], log_level_highlight_end[level],
((g_log->flag & FLAG_NOCOLOR) ? "" : log_level_highlight_start[level]), ( (g_log->flag & FLAG_NOCOLOR)?"":log_level_highlight_start[level]),
g_log->log_component[comp].name, g_log->log_component[comp].name,
((g_log->flag & FLAG_LEVEL) ? g_log->level2string[level] : ' '), ( (g_log->flag & FLAG_LEVEL)?g_log->level2string[level]:' '),
((g_log->flag & FLAG_THREAD) ? log_getthreadname(threadname, PR_SET_NAME + 1) : ""), ( (g_log->flag & FLAG_THREAD)?log_getthreadname(threadname,PR_SET_NAME+1):""),
format, format,
log_level_highlight_end[level]); log_level_highlight_end[level]);
} }
......
...@@ -106,14 +106,15 @@ extern "C" { ...@@ -106,14 +106,15 @@ extern "C" {
#define LOG_ORANGE "\033[93m" /*!< \brief VT100 sequence for orange foreground */ #define LOG_ORANGE "\033[93m" /*!< \brief VT100 sequence for orange foreground */
#define LOG_BLUE "\033[34m" /*!< \brief VT100 sequence for blue foreground */ #define LOG_BLUE "\033[34m" /*!< \brief VT100 sequence for blue foreground */
#define LOG_CYBL "\033[40;36m" /*!< \brief VT100 sequence for cyan foreground on black background */ #define LOG_CYBL "\033[40;36m" /*!< \brief VT100 sequence for cyan foreground on black background */
#define LOG_RESET "\033[0m" /*!< \brief VT100 sequence for reset (black) foreground */
#else #else
#define LOG_RED "" # define LOG_RED ""
#define LOG_GREEN "" # define LOG_GREEN ""
#define LOG_ORANGE "" # define LOG_ORANGE ""
#define LOG_BLUE "" # define LOG_BLUE ""
#define LOG_CYBL "" # define LOG_CYBL ""
#define LOG_RESET "" # define LOG_RESET ""
#endif #endif // LOG_WITH_COLORS
/* @}*/ /* @}*/
......
...@@ -423,7 +423,7 @@ int phy_subframe_indication(struct nfapi_vnf_p7_config *config, uint16_t phy_id, ...@@ -423,7 +423,7 @@ int phy_subframe_indication(struct nfapi_vnf_p7_config *config, uint16_t phy_id,
if (RC.eNB && RC.eNB[0][0]->configured) { if (RC.eNB && RC.eNB[0][0]->configured) {
uint16_t sfn = NFAPI_SFNSF2SFN(sfn_sf); uint16_t sfn = NFAPI_SFNSF2SFN(sfn_sf);
uint16_t sf = NFAPI_SFNSF2SF(sfn_sf); uint16_t sf = NFAPI_SFNSF2SF(sfn_sf);
LOG_D(PHY,"[VNF] subframe indication sfn_sf:%d sfn:%d sf:%d\n", sfn_sf, sfn, sf); //LOG_D(PHY,"[VNF] subframe indication sfn_sf:%d sfn:%d sf:%d\n", sfn_sf, sfn, sf);
wake_eNB_rxtx(RC.eNB[0][0], sfn, sf); wake_eNB_rxtx(RC.eNB[0][0], sfn, sf);
} else { } else {
printf("[VNF] %s() RC.eNB:%p\n", __FUNCTION__, RC.eNB); printf("[VNF] %s() RC.eNB:%p\n", __FUNCTION__, RC.eNB);
...@@ -439,9 +439,6 @@ int phy_rach_indication(struct nfapi_vnf_p7_config *config, nfapi_rach_indicatio ...@@ -439,9 +439,6 @@ int phy_rach_indication(struct nfapi_vnf_p7_config *config, nfapi_rach_indicatio
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0]; struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
printf("[VNF] RACH_IND eNB:%p sfn_sf:%d number_of_preambles:%d\n", eNB, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->rach_indication_body.number_of_preambles); printf("[VNF] RACH_IND eNB:%p sfn_sf:%d number_of_preambles:%d\n", eNB, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->rach_indication_body.number_of_preambles);
pthread_mutex_lock(&eNB->UL_INFO_mutex); pthread_mutex_lock(&eNB->UL_INFO_mutex);
LOG_E(MAC, "%s entered\n", __func__);
if(NFAPI_MODE == NFAPI_MODE_VNF){ if(NFAPI_MODE == NFAPI_MODE_VNF){
int8_t index = -1; int8_t index = -1;
for(uint8_t i= 0;i< NUM_NFPAI_SUBFRAME;i++){ for(uint8_t i= 0;i< NUM_NFPAI_SUBFRAME;i++){
...@@ -504,9 +501,7 @@ int phy_rach_indication(struct nfapi_vnf_p7_config *config, nfapi_rach_indicatio ...@@ -504,9 +501,7 @@ int phy_rach_indication(struct nfapi_vnf_p7_config *config, nfapi_rach_indicatio
int phy_harq_indication(struct nfapi_vnf_p7_config *config, nfapi_harq_indication_t *ind) { int phy_harq_indication(struct nfapi_vnf_p7_config *config, nfapi_harq_indication_t *ind) {
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0]; struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
LOG_D(MAC, "%s() NFAPI Frame: %d Subframe: %d number_of_harqs:%u\n", __FUNCTION__, NFAPI_SFNSF2SFN(ind->sfn_sf), LOG_D(MAC, "%s() NFAPI SFN/SF:%d number_of_harqs:%u\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->harq_indication_body.number_of_harqs);
NFAPI_SFNSF2SF(ind->sfn_sf), ind->harq_indication_body.number_of_harqs);
LOG_E(MAC, "%s entered\n", __func__);
pthread_mutex_lock(&eNB->UL_INFO_mutex); pthread_mutex_lock(&eNB->UL_INFO_mutex);
if(NFAPI_MODE == NFAPI_MODE_VNF){ if(NFAPI_MODE == NFAPI_MODE_VNF){
int8_t index = -1; int8_t index = -1;
...@@ -544,10 +539,6 @@ int phy_harq_indication(struct nfapi_vnf_p7_config *config, nfapi_harq_indicatio ...@@ -544,10 +539,6 @@ int phy_harq_indication(struct nfapi_vnf_p7_config *config, nfapi_harq_indicatio
int phy_crc_indication(struct nfapi_vnf_p7_config *config, nfapi_crc_indication_t *ind) { int phy_crc_indication(struct nfapi_vnf_p7_config *config, nfapi_crc_indication_t *ind) {
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0]; struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
pthread_mutex_lock(&eNB->UL_INFO_mutex); pthread_mutex_lock(&eNB->UL_INFO_mutex);
LOG_E(MAC, "%s entered sfn: %u sf: %u\n", __func__, NFAPI_SFNSF2SFN(ind->sfn_sf),
NFAPI_SFNSF2SF(ind->sfn_sf));
if(NFAPI_MODE == NFAPI_MODE_VNF){ if(NFAPI_MODE == NFAPI_MODE_VNF){
int8_t index = -1; int8_t index = -1;
for(uint8_t i= 0;i< NUM_NFPAI_SUBFRAME;i++){ for(uint8_t i= 0;i< NUM_NFPAI_SUBFRAME;i++){
...@@ -612,8 +603,6 @@ int phy_rx_indication(struct nfapi_vnf_p7_config *config, nfapi_rx_indication_t ...@@ -612,8 +603,6 @@ int phy_rx_indication(struct nfapi_vnf_p7_config *config, nfapi_rx_indication_t
LOG_D(MAC, "%s() NFAPI SFN/SF:%d number_of_pdus:%u\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->rx_indication_body.number_of_pdus); LOG_D(MAC, "%s() NFAPI SFN/SF:%d number_of_pdus:%u\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->rx_indication_body.number_of_pdus);
} }
LOG_E(MAC, "%s entered sfn: %u sf: %u\n", __func__, NFAPI_SFNSF2SFN(ind->sfn_sf),
NFAPI_SFNSF2SF(ind->sfn_sf));
pthread_mutex_lock(&eNB->UL_INFO_mutex); pthread_mutex_lock(&eNB->UL_INFO_mutex);
if(NFAPI_MODE == NFAPI_MODE_VNF){ if(NFAPI_MODE == NFAPI_MODE_VNF){
int8_t index = -1; int8_t index = -1;
...@@ -751,7 +740,6 @@ int phy_cqi_indication(struct nfapi_vnf_p7_config *config, nfapi_cqi_indication_ ...@@ -751,7 +740,6 @@ int phy_cqi_indication(struct nfapi_vnf_p7_config *config, nfapi_cqi_indication_
//mac_cqi_ind(p7_vnf->mac, ind); //mac_cqi_ind(p7_vnf->mac, ind);
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0]; struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
LOG_D(MAC, "%s() NFAPI SFN/SF:%d number_of_cqis:%u\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->cqi_indication_body.number_of_cqis); LOG_D(MAC, "%s() NFAPI SFN/SF:%d number_of_cqis:%u\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->cqi_indication_body.number_of_cqis);
LOG_E(MAC, "%s entered\n", __func__);
pthread_mutex_lock(&eNB->UL_INFO_mutex); pthread_mutex_lock(&eNB->UL_INFO_mutex);
if(NFAPI_MODE == NFAPI_MODE_VNF){ if(NFAPI_MODE == NFAPI_MODE_VNF){
int8_t index = -1; int8_t index = -1;
......
...@@ -1553,11 +1553,11 @@ static uint8_t pack_tx_request_body_value(void* tlv, uint8_t **ppWritePackedMsg, ...@@ -1553,11 +1553,11 @@ static uint8_t pack_tx_request_body_value(void* tlv, uint8_t **ppWritePackedMsg,
if (pdu->segments[j].segment_length == 3) if (pdu->segments[j].segment_length == 3)
{ {
// NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() BCH? segment_data:%x %x %x\n", __FUNCTION__, NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() BCH? segment_data:%x %x %x\n", __FUNCTION__,
// pdu->segments[j].segment_data[0], pdu->segments[j].segment_data[0],
// pdu->segments[j].segment_data[1], pdu->segments[j].segment_data[1],
// pdu->segments[j].segment_data[2] pdu->segments[j].segment_data[2]
// ); );
} }
//NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() segment_data:%p segment_length:%u pusharray8()=%d\n", __FUNCTION__, pdu->segments[j].segment_data, pdu->segments[j].segment_length, push_ret); //NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() segment_data:%p segment_length:%u pusharray8()=%d\n", __FUNCTION__, pdu->segments[j].segment_data, pdu->segments[j].segment_length, push_ret);
...@@ -4502,11 +4502,11 @@ static uint8_t unpack_tx_request(uint8_t **ppReadPackedMsg, uint8_t *end, void * ...@@ -4502,11 +4502,11 @@ static uint8_t unpack_tx_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *
return 0; return 0;
if (pdu->segments[0].segment_length == 3) if (pdu->segments[0].segment_length == 3)
{ {
// NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() BCH? segment_data:%x %x %x\n", __FUNCTION__, NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() BCH? segment_data:%x %x %x\n", __FUNCTION__,
// pdu->segments[0].segment_data[0], pdu->segments[0].segment_data[0],
// pdu->segments[0].segment_data[1], pdu->segments[0].segment_data[1],
// pdu->segments[0].segment_data[2] pdu->segments[0].segment_data[2]
// ); );
} }
} }
else else
......
...@@ -49,10 +49,10 @@ void generate_sldch(PHY_VARS_UE *ue,SLDCH_t *sldch,int frame_tx,int subframe_tx) ...@@ -49,10 +49,10 @@ void generate_sldch(PHY_VARS_UE *ue,SLDCH_t *sldch,int frame_tx,int subframe_tx)
(void*)sldch, (void*)sldch,
sizeof(SLDCH_t)); sizeof(SLDCH_t));
// LOG_I(PHY,"SLDCH configuration %zd bytes, TBS payload %d bytes => %zd bytes\n", LOG_I(PHY,"SLDCH configuration %zd bytes, TBS payload %d bytes => %zd bytes\n",
// sizeof(SLDCH_t)-sizeof(uint8_t*), sizeof(SLDCH_t)-sizeof(uint8_t*),
// sldch->payload_length, sldch->payload_length,
// sldch_header_len+sizeof(SLDCH_t)-sizeof(uint8_t*)+sldch->payload_length); sldch_header_len+sizeof(SLDCH_t)-sizeof(uint8_t*)+sldch->payload_length);
multicast_link_write_sock(0, multicast_link_write_sock(0,
(char *)&pdu, (char *)&pdu,
......
...@@ -242,9 +242,9 @@ multicast_link_write_sock(int groupP, char *dataP, uint32_t sizeP) ...@@ -242,9 +242,9 @@ multicast_link_write_sock(int groupP, char *dataP, uint32_t sizeP)
if ((num = sendto (group_list[groupP].socket, dataP, sizeP, 0, if ((num = sendto (group_list[groupP].socket, dataP, sizeP, 0,
(struct sockaddr *) &group_list[groupP].sock_remote_addr, (struct sockaddr *) &group_list[groupP].sock_remote_addr,
sizeof (group_list[groupP].sock_remote_addr))) < 0) { sizeof (group_list[groupP].sock_remote_addr))) < 0) {
// LOG_E(PHY, "[MULTICAST] sendto has failed (%d:%s)\n (%s:%d)\n", LOG_E(PHY, "[MULTICAST] sendto has failed (%d:%s)\n (%s:%d)\n",
// errno, strerror(errno), errno, strerror(errno),
// __FILE__, __LINE__); __FILE__, __LINE__);
} }
return num; return num;
......
...@@ -200,7 +200,6 @@ get_prach_resources(module_id_t module_idP, ...@@ -200,7 +200,6 @@ get_prach_resources(module_id_t module_idP,
RA_prach_resources.ra_PREAMBLE_RECEIVED_TARGET_POWER = RA_prach_resources.ra_PREAMBLE_RECEIVED_TARGET_POWER =
get_Po_NOMINAL_PUSCH(module_idP, CC_id); get_Po_NOMINAL_PUSCH(module_idP, CC_id);
} else { // Msg3 is being retransmitted } else { // Msg3 is being retransmitted
LOG_E(MAC, "Didnt set UE Mode Correctly\n");
if (UE_mac_inst[module_idP].RA_usedGroupA == 1) { if (UE_mac_inst[module_idP].RA_usedGroupA == 1) {
if (rach_ConfigCommon->preambleInfo.preamblesGroupAConfig) { if (rach_ConfigCommon->preambleInfo.preamblesGroupAConfig) {
UE_mac_inst[module_idP].RA_prach_resources. UE_mac_inst[module_idP].RA_prach_resources.
...@@ -289,8 +288,6 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id, ...@@ -289,8 +288,6 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
uint8_t Size = 0; uint8_t Size = 0;
UE_MODE_t UE_mode; UE_MODE_t UE_mode;
LOG_D(MAC, "got inside ue_get_rach\n");
// Modification for phy_stub_ue operation // Modification for phy_stub_ue operation
if(NFAPI_MODE == NFAPI_UE_STUB_PNF || NFAPI_MODE == NFAPI_MODE_STANDALONE_PNF) { // phy_stub_ue mode if(NFAPI_MODE == NFAPI_UE_STUB_PNF || NFAPI_MODE == NFAPI_MODE_STANDALONE_PNF) { // phy_stub_ue mode
UE_mode = UE_mac_inst[module_idP].UE_mode[0]; UE_mode = UE_mac_inst[module_idP].UE_mode[0];
...@@ -322,7 +319,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id, ...@@ -322,7 +319,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
} }
if (UE_mac_inst[module_idP].RA_active == 0) { if (UE_mac_inst[module_idP].RA_active == 0) {
LOG_D(MAC, "RA not active\n"); LOG_I(MAC, "RA not active\n");
// check if RRC is ready to initiate the RA procedure // check if RRC is ready to initiate the RA procedure
Size = mac_rrc_data_req_ue(module_idP, Size = mac_rrc_data_req_ue(module_idP,
CC_id, CC_id,
...@@ -335,10 +332,10 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id, ...@@ -335,10 +332,10 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
0); 0);
Size16 = (uint16_t) Size; Size16 = (uint16_t) Size;
// LOG_D(MAC,"[UE %d] Frame %d: Requested RRCConnectionRequest, got %d bytes\n",module_idP,frameP,Size); // LOG_D(MAC,"[UE %d] Frame %d: Requested RRCConnectionRequest, got %d bytes\n",module_idP,frameP,Size);
LOG_D(RRC, LOG_I(RRC,
"[MSC_MSG][FRAME %05d][RRC_UE][MOD %02d][][--- MAC_DATA_REQ (RRCConnectionRequest eNB %d) --->][MAC_UE][MOD %02d][]\n", "[MSC_MSG][FRAME %05d][RRC_UE][MOD %02d][][--- MAC_DATA_REQ (RRCConnectionRequest eNB %d) --->][MAC_UE][MOD %02d][]\n",
frameP, module_idP, eNB_indexP, module_idP); frameP, module_idP, eNB_indexP, module_idP);
LOG_D(MAC, LOG_I(MAC,
"[UE %d] Frame %d: Requested RRCConnectionRequest, got %d bytes\n", "[UE %d] Frame %d: Requested RRCConnectionRequest, got %d bytes\n",
module_idP, frameP, Size); module_idP, frameP, Size);
......
...@@ -2468,11 +2468,11 @@ ue_scheduler(const module_id_t module_idP, ...@@ -2468,11 +2468,11 @@ ue_scheduler(const module_id_t module_idP,
if (msg_p != NULL) { if (msg_p != NULL) {
switch (ITTI_MSG_ID(msg_p)) { switch (ITTI_MSG_ID(msg_p)) {
case RRC_MAC_CCCH_DATA_REQ: case RRC_MAC_CCCH_DATA_REQ:
// LOG_I(MAC, LOG_I(MAC,
// "Received %s from %s: instance %d, frameP %d, eNB_index %d\n", "Received %s from %s: instance %d, frameP %d, eNB_index %d\n",
// ITTI_MSG_NAME(msg_p), ITTI_MSG_ORIGIN_NAME(msg_p), ITTI_MSG_INSTANCE(msg_p), ITTI_MSG_NAME(msg_p), ITTI_MSG_ORIGIN_NAME(msg_p), ITTI_MSG_INSTANCE(msg_p),
// RRC_MAC_CCCH_DATA_REQ(msg_p).frame, RRC_MAC_CCCH_DATA_REQ(msg_p).frame,
// RRC_MAC_CCCH_DATA_REQ(msg_p).enb_index); RRC_MAC_CCCH_DATA_REQ(msg_p).enb_index);
// TODO process CCCH data req. // TODO process CCCH data req.
break; break;
...@@ -3144,7 +3144,7 @@ SLDCH_t *ue_get_sldch(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t ...@@ -3144,7 +3144,7 @@ SLDCH_t *ue_get_sldch(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t
0); 0);
if (sldch->payload_length >0 ) { if (sldch->payload_length >0 ) {
// LOG_I(MAC,"Got %d bytes from RRC for SLDCH @ %p\n",sldch->payload_length,sldch); LOG_I(MAC,"Got %d bytes from RRC for SLDCH @ %p\n",sldch->payload_length,sldch);
return (sldch); return (sldch);
} else } else
return((SLDCH_t *)NULL); return((SLDCH_t *)NULL);
......
...@@ -124,8 +124,6 @@ void fill_sr_indication_UE_MAC(int Mod_id, ...@@ -124,8 +124,6 @@ void fill_sr_indication_UE_MAC(int Mod_id,
nfapi_ul_config_request_t *ul_config_req) { nfapi_ul_config_request_t *ul_config_req) {
pthread_mutex_lock(&fill_ul_mutex.sr_mutex); pthread_mutex_lock(&fill_ul_mutex.sr_mutex);
LOG_I(MAC, "Entered fill_sr_indication_UE_MAC\n");
nfapi_sr_indication_t *sr_ind = &UL_INFO->sr_ind; nfapi_sr_indication_t *sr_ind = &UL_INFO->sr_ind;
nfapi_sr_indication_body_t *sr_ind_body = &sr_ind->sr_indication_body; nfapi_sr_indication_body_t *sr_ind_body = &sr_ind->sr_indication_body;
nfapi_sr_indication_pdu_t *pdu = &sr_ind_body->sr_pdu_list[sr_ind_body->number_of_srs]; nfapi_sr_indication_pdu_t *pdu = &sr_ind_body->sr_pdu_list[sr_ind_body->number_of_srs];
...@@ -167,9 +165,6 @@ void fill_crc_indication_UE_MAC(int Mod_id, ...@@ -167,9 +165,6 @@ void fill_crc_indication_UE_MAC(int Mod_id,
nfapi_ul_config_request_t *ul_config_req) { nfapi_ul_config_request_t *ul_config_req) {
pthread_mutex_lock(&fill_ul_mutex.crc_mutex); pthread_mutex_lock(&fill_ul_mutex.crc_mutex);
LOG_I(MAC, "Entered fill_crc_indication_UE_MAC Frame %d Subframe %d\n",
frame, subframe);
nfapi_crc_indication_pdu_t *pdu = nfapi_crc_indication_pdu_t *pdu =
&UL_INFO->crc_ind.crc_indication_body &UL_INFO->crc_ind.crc_indication_body
.crc_pdu_list[UL_INFO->crc_ind.crc_indication_body.number_of_crcs]; .crc_pdu_list[UL_INFO->crc_ind.crc_indication_body.number_of_crcs];
...@@ -235,7 +230,7 @@ void fill_rach_indication_UE_MAC(int Mod_id, ...@@ -235,7 +230,7 @@ void fill_rach_indication_UE_MAC(int Mod_id,
.preamble_rel13.rach_resource_type = 0; .preamble_rel13.rach_resource_type = 0;
UL_INFO->rach_ind.rach_indication_body.preamble_list[0].instance_length = 0; UL_INFO->rach_ind.rach_indication_body.preamble_list[0].instance_length = 0;
LOG_D(PHY, LOG_I(PHY,
"UE Filling NFAPI indication for RACH : TA %d, Preamble %d, rnti %x, " "UE Filling NFAPI indication for RACH : TA %d, Preamble %d, rnti %x, "
"rach_resource_type %d\n", "rach_resource_type %d\n",
UL_INFO->rach_ind.rach_indication_body.preamble_list[0] UL_INFO->rach_ind.rach_indication_body.preamble_list[0]
...@@ -249,8 +244,6 @@ void fill_rach_indication_UE_MAC(int Mod_id, ...@@ -249,8 +244,6 @@ void fill_rach_indication_UE_MAC(int Mod_id,
// This function is currently defined only in the nfapi-RU-RAU-split so we // This function is currently defined only in the nfapi-RU-RAU-split so we
// should call it when we merge with that branch. // should call it when we merge with that branch.
// TODO Andrew - send proxy specific socket instead of oai_nfapi_rach_ind Send the whole UL_INFO struct
// as soon as numberof preambles
if (NFAPI_MODE == NFAPI_MODE_STANDALONE_PNF) { if (NFAPI_MODE == NFAPI_MODE_STANDALONE_PNF) {
send_standalone_msg(UL_INFO, UL_INFO->rach_ind.header.message_id); send_standalone_msg(UL_INFO, UL_INFO->rach_ind.header.message_id);
} else { } else {
...@@ -275,8 +268,6 @@ void fill_ulsch_cqi_indication_UE_MAC(int Mod_id, ...@@ -275,8 +268,6 @@ void fill_ulsch_cqi_indication_UE_MAC(int Mod_id,
&UL_INFO->cqi_ind.cqi_indication_body.cqi_raw_pdu_list &UL_INFO->cqi_ind.cqi_indication_body.cqi_raw_pdu_list
[UL_INFO->cqi_ind.cqi_indication_body.number_of_cqis]; [UL_INFO->cqi_ind.cqi_indication_body.number_of_cqis];
LOG_I(MAC, "Entered fill_ulsch_cqi_indication_UE_MAC\n");
UL_INFO->cqi_ind.sfn_sf = frame << 4 | subframe; UL_INFO->cqi_ind.sfn_sf = frame << 4 | subframe;
// because of nfapi_vnf.c:733, set message id to 0, not // because of nfapi_vnf.c:733, set message id to 0, not
// NFAPI_RX_CQI_INDICATION; // NFAPI_RX_CQI_INDICATION;
...@@ -316,8 +307,6 @@ void fill_ulsch_harq_indication_UE_MAC( ...@@ -316,8 +307,6 @@ void fill_ulsch_harq_indication_UE_MAC(
nfapi_ul_config_request_t *ul_config_req) { nfapi_ul_config_request_t *ul_config_req) {
pthread_mutex_lock(&fill_ul_mutex.harq_mutex); pthread_mutex_lock(&fill_ul_mutex.harq_mutex);
LOG_I(MAC, "Entered fill_ulsch_harq_indication_UE_MAC\n");
nfapi_harq_indication_pdu_t *pdu = nfapi_harq_indication_pdu_t *pdu =
&UL_INFO->harq_ind.harq_indication_body.harq_pdu_list &UL_INFO->harq_ind.harq_indication_body.harq_pdu_list
[UL_INFO->harq_ind.harq_indication_body.number_of_harqs]; [UL_INFO->harq_ind.harq_indication_body.number_of_harqs];
...@@ -367,8 +356,6 @@ void fill_uci_harq_indication_UE_MAC(int Mod_id, ...@@ -367,8 +356,6 @@ void fill_uci_harq_indication_UE_MAC(int Mod_id,
&body->harq_pdu_list[UL_INFO->harq_ind.harq_indication_body &body->harq_pdu_list[UL_INFO->harq_ind.harq_indication_body
.number_of_harqs]; .number_of_harqs];
LOG_I(MAC, "Entered fill_uci_harq_indication_UE_MAC\n");
UL_INFO->harq_ind.vendor_extension = ul_config_req->vendor_extension; UL_INFO->harq_ind.vendor_extension = ul_config_req->vendor_extension;
ind->sfn_sf = frame << 4 | subframe; ind->sfn_sf = frame << 4 | subframe;
...@@ -481,7 +468,8 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -481,7 +468,8 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
UE_mac_inst[Mod_id].RA_prach_resources.Msg3, UE_mac_inst[Mod_id].RA_prach_resources.Msg3,
buflen, buflen,
rnti, rnti,
index, ul_config_req); index,
ul_config_req);
Msg3_transmitted(Mod_id, 0, frame, 0); Msg3_transmitted(Mod_id, 0, frame, 0);
// Modification // Modification
UE_mac_inst[Mod_id].UE_mode[0] = PUSCH; UE_mac_inst[Mod_id].UE_mode[0] = PUSCH;
...@@ -491,8 +479,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -491,8 +479,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
// UE_mac_inst[Mod_id].first_ULSCH_Tx = 0; // UE_mac_inst[Mod_id].first_ULSCH_Tx = 0;
} else { } else {
ue_get_sdu(Mod_id, 0, frame, subframe, 0, ulsch_buffer, buflen, &access_mode); ue_get_sdu(Mod_id, 0, frame, subframe, 0, ulsch_buffer, buflen, &access_mode);
fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti, fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti, ul_config_req);
ul_config_req);
fill_rx_indication_UE_MAC(Mod_id, fill_rx_indication_UE_MAC(Mod_id,
frame, frame,
subframe, subframe,
...@@ -520,8 +507,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -520,8 +507,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
uint8_t access_mode = SCHEDULED_ACCESS; uint8_t access_mode = SCHEDULED_ACCESS;
if (buflen > 0) { if (buflen > 0) {
if (UE_mac_inst[Mod_id].first_ULSCH_Tx == 1) { // Msg3 case if (UE_mac_inst[Mod_id].first_ULSCH_Tx == 1) { // Msg3 case
fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti, fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti, ul_config_req);
ul_config_req);
fill_rx_indication_UE_MAC(Mod_id, fill_rx_indication_UE_MAC(Mod_id,
frame, frame,
subframe, subframe,
...@@ -538,8 +524,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -538,8 +524,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
UE_mac_inst[Mod_id].first_ULSCH_Tx = 0; UE_mac_inst[Mod_id].first_ULSCH_Tx = 0;
} else { } else {
ue_get_sdu(Mod_id, 0, frame, subframe, 0, ulsch_buffer, buflen, &access_mode); ue_get_sdu(Mod_id, 0, frame, subframe, 0, ulsch_buffer, buflen, &access_mode);
fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti, fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti, ul_config_req);
ul_config_req);
fill_rx_indication_UE_MAC(Mod_id, fill_rx_indication_UE_MAC(Mod_id,
frame, frame,
subframe, subframe,
...@@ -553,8 +538,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -553,8 +538,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
} }
if (ulsch_harq_information != NULL) if (ulsch_harq_information != NULL)
fill_ulsch_harq_indication_UE_MAC( fill_ulsch_harq_indication_UE_MAC(
Mod_id, frame, subframe, UL_INFO, ulsch_harq_information, rnti, Mod_id, frame, subframe, UL_INFO, ulsch_harq_information, rnti, ul_config_req);
ul_config_req);
} else if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE) { } else if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE) {
uint8_t ulsch_buffer[5477] __attribute__((aligned(32))); uint8_t ulsch_buffer[5477] __attribute__((aligned(32)));
...@@ -564,8 +548,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -564,8 +548,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
uint8_t access_mode = SCHEDULED_ACCESS; uint8_t access_mode = SCHEDULED_ACCESS;
if (buflen > 0) { if (buflen > 0) {
if (UE_mac_inst[Mod_id].first_ULSCH_Tx == 1) { // Msg3 case if (UE_mac_inst[Mod_id].first_ULSCH_Tx == 1) { // Msg3 case
fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti, fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti, ul_config_req);
ul_config_req);
fill_rx_indication_UE_MAC(Mod_id, fill_rx_indication_UE_MAC(Mod_id,
frame, frame,
subframe, subframe,
...@@ -582,8 +565,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -582,8 +565,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
UE_mac_inst[Mod_id].first_ULSCH_Tx = 0; UE_mac_inst[Mod_id].first_ULSCH_Tx = 0;
} else { } else {
ue_get_sdu(Mod_id, 0, frame, subframe, 0, ulsch_buffer, buflen, &access_mode); ue_get_sdu(Mod_id, 0, frame, subframe, 0, ulsch_buffer, buflen, &access_mode);
fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti, fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti, ul_config_req);
ul_config_req);
fill_rx_indication_UE_MAC(Mod_id, fill_rx_indication_UE_MAC(Mod_id,
frame, frame,
subframe, subframe,
...@@ -605,8 +587,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -605,8 +587,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
uint8_t access_mode = SCHEDULED_ACCESS; uint8_t access_mode = SCHEDULED_ACCESS;
if (buflen > 0) { if (buflen > 0) {
if (UE_mac_inst[Mod_id].first_ULSCH_Tx == 1) { // Msg3 case if (UE_mac_inst[Mod_id].first_ULSCH_Tx == 1) { // Msg3 case
fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti, fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti, ul_config_req);
ul_config_req);
fill_rx_indication_UE_MAC(Mod_id, fill_rx_indication_UE_MAC(Mod_id,
frame, frame,
subframe, subframe,
...@@ -623,8 +604,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -623,8 +604,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
UE_mac_inst[Mod_id].first_ULSCH_Tx = 0; UE_mac_inst[Mod_id].first_ULSCH_Tx = 0;
} else { } else {
ue_get_sdu(Mod_id, 0, frame, subframe, 0, ulsch_buffer, buflen, &access_mode); ue_get_sdu(Mod_id, 0, frame, subframe, 0, ulsch_buffer, buflen, &access_mode);
fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti, fill_crc_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, 0, index, rnti, ul_config_req);
ul_config_req);
fill_rx_indication_UE_MAC(Mod_id, fill_rx_indication_UE_MAC(Mod_id,
frame, frame,
subframe, subframe,
...@@ -638,15 +618,13 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -638,15 +618,13 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
} }
if (ulsch_harq_information != NULL) if (ulsch_harq_information != NULL)
fill_ulsch_harq_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, ulsch_harq_information, rnti, fill_ulsch_harq_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, ulsch_harq_information, rnti, ul_config_req);
ul_config_req);
} else if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE) { } else if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE) {
uint16_t rnti = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti; uint16_t rnti = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti;
nfapi_ul_config_harq_information *ulsch_harq_information = &ul_config_pdu->uci_harq_pdu.harq_information; nfapi_ul_config_harq_information *ulsch_harq_information = &ul_config_pdu->uci_harq_pdu.harq_information;
if (ulsch_harq_information != NULL) if (ulsch_harq_information != NULL)
fill_uci_harq_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, ulsch_harq_information, rnti, fill_uci_harq_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, ulsch_harq_information, rnti, ul_config_req);
ul_config_req);
} else if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE) { } else if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE) {
AssertFatal(1 == 0, "NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE not handled yet\n"); AssertFatal(1 == 0, "NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE not handled yet\n");
} else if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_UCI_CQI_HARQ_PDU_TYPE) { } else if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_UCI_CQI_HARQ_PDU_TYPE) {
...@@ -660,8 +638,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -660,8 +638,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel8.rnti; ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel8.rnti;
if (ue_get_SR(Mod_id, 0, frame, 0, rnti, subframe)) if (ue_get_SR(Mod_id, 0, frame, 0, rnti, subframe))
fill_sr_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, rnti, fill_sr_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, rnti, ul_config_req);
ul_config_req);
} else if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_UCI_SR_HARQ_PDU_TYPE) { } else if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_UCI_SR_HARQ_PDU_TYPE) {
// AssertFatal((UE_id = // AssertFatal((UE_id =
...@@ -675,15 +652,13 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -675,15 +652,13 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
// We fill the sr_indication only if ue_get_sr() would normally instruct PHY // We fill the sr_indication only if ue_get_sr() would normally instruct PHY
// to send a SR. // to send a SR.
if (ue_get_SR(Mod_id, 0, frame, 0, rnti, subframe)) if (ue_get_SR(Mod_id, 0, frame, 0, rnti, subframe))
fill_sr_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, rnti, fill_sr_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, rnti, ul_config_req);
ul_config_req);
nfapi_ul_config_harq_information *ulsch_harq_information = nfapi_ul_config_harq_information *ulsch_harq_information =
&ul_config_pdu->uci_sr_harq_pdu.harq_information; &ul_config_pdu->uci_sr_harq_pdu.harq_information;
if (ulsch_harq_information != NULL) if (ulsch_harq_information != NULL)
fill_uci_harq_indication_UE_MAC( fill_uci_harq_indication_UE_MAC(
Mod_id, frame, subframe, UL_INFO, ulsch_harq_information, rnti, Mod_id, frame, subframe, UL_INFO, ulsch_harq_information, rnti, ul_config_req);
ul_config_req);
} }
} }
...@@ -789,11 +764,11 @@ void dl_config_req_UE_MAC_dci(int sfn, ...@@ -789,11 +764,11 @@ void dl_config_req_UE_MAC_dci(int sfn,
const int pdu_index = dlsch->dlsch_pdu.dlsch_pdu_rel8.pdu_index; const int pdu_index = dlsch->dlsch_pdu.dlsch_pdu_rel8.pdu_index;
if (pdu_index < 0 || pdu_index >= tx_req_num_elems) { if (pdu_index < 0 || pdu_index >= tx_req_num_elems) {
// LOG_E(MAC, LOG_E(MAC,
// "%s(): Problem with receiving data: " "%s(): Problem with receiving data: "
// "sfn/sf:%d.%d PDU size:%d, TX_PDU index: %d\n", "sfn/sf:%d.%d PDU size:%d, TX_PDU index: %d\n",
// __func__, __func__,
// sfn, sf, dci->pdu_size, dlsch->dlsch_pdu.dlsch_pdu_rel8.pdu_index); sfn, sf, dci->pdu_size, dlsch->dlsch_pdu.dlsch_pdu_rel8.pdu_index);
return; return;
} }
...@@ -910,11 +885,11 @@ void dl_config_req_UE_MAC_mch(int sfn, ...@@ -910,11 +885,11 @@ void dl_config_req_UE_MAC_mch(int sfn,
} else { } else {
const int pdu_index = mch->mch_pdu.mch_pdu_rel8.pdu_index; const int pdu_index = mch->mch_pdu.mch_pdu_rel8.pdu_index;
if (pdu_index < 0 || pdu_index >= tx_req_num_elems) { if (pdu_index < 0 || pdu_index >= tx_req_num_elems) {
// LOG_E(MAC, LOG_E(MAC,
// "%s(): Problem with receiving data: " "%s(): Problem with receiving data: "
// "sfn/sf:%d.%d PDU size:%d, TX_PDU index: %d\n", "sfn/sf:%d.%d PDU size:%d, TX_PDU index: %d\n",
// __func__, __func__,
// sfn, sf, mch->pdu_size, mch->mch_pdu.mch_pdu_rel8.pdu_index); sfn, sf, mch->pdu_size, mch->mch_pdu.mch_pdu_rel8.pdu_index);
return; return;
} }
ue_send_mch_sdu(ue_id, 0, sfn, ue_send_mch_sdu(ue_id, 0, sfn,
...@@ -945,8 +920,9 @@ void hi_dci0_req_UE_MAC(int sfn, ...@@ -945,8 +920,9 @@ void hi_dci0_req_UE_MAC(int sfn,
// The following set of memcpy functions should be getting called as callback // The following set of memcpy functions should be getting called as callback
// functions from pnf_p7_subframe_ind. // functions from pnf_p7_subframe_ind.
int memcpy_dl_config_req(L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7, nfapi_dl_config_request_t *req) int memcpy_dl_config_req(L1_rxtx_proc_t *proc,
{ nfapi_pnf_p7_config_t *pnf_p7,
nfapi_dl_config_request_t *req) {
nfapi_dl_config_request_t *p = malloc(sizeof(nfapi_dl_config_request_t)); nfapi_dl_config_request_t *p = malloc(sizeof(nfapi_dl_config_request_t));
...@@ -1031,8 +1007,9 @@ int memcpy_tx_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_tx_request_t *req) { ...@@ -1031,8 +1007,9 @@ int memcpy_tx_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_tx_request_t *req) {
return 0; return 0;
} }
int memcpy_hi_dci0_req (L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t* pnf_p7, nfapi_hi_dci0_request_t* req) int memcpy_hi_dci0_req (L1_rxtx_proc_t *proc,
{ nfapi_pnf_p7_config_t* pnf_p7,
nfapi_hi_dci0_request_t* req) {
nfapi_hi_dci0_request_t *p = (nfapi_hi_dci0_request_t *)malloc(sizeof(nfapi_hi_dci0_request_t)); nfapi_hi_dci0_request_t *p = (nfapi_hi_dci0_request_t *)malloc(sizeof(nfapi_hi_dci0_request_t));
//if(req!=0){ //if(req!=0){
......
...@@ -261,7 +261,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB, ...@@ -261,7 +261,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
eNB->UL_INFO.subframe = proc->subframe_rx; eNB->UL_INFO.subframe = proc->subframe_rx;
eNB->UL_INFO.module_id = eNB->Mod_id; eNB->UL_INFO.module_id = eNB->Mod_id;
eNB->UL_INFO.CC_id = eNB->CC_id; eNB->UL_INFO.CC_id = eNB->CC_id;
eNB->if_inst->UL_indication(&eNB->UL_INFO, proc); // Andrew calling eNB maclayer check the UL_INFO structure eNB->if_inst->UL_indication(&eNB->UL_INFO, proc);
AssertFatal((ret= pthread_mutex_unlock(&eNB->UL_INFO_mutex))==0,"error unlocking UL_INFO_mutex, return %d\n",ret); AssertFatal((ret= pthread_mutex_unlock(&eNB->UL_INFO_mutex))==0,"error unlocking UL_INFO_mutex, return %d\n",ret);
/* this conflict resolution may be totally wrong, to be tested */ /* this conflict resolution may be totally wrong, to be tested */
/* CONFLICT RESOLUTION: BEGIN */ /* CONFLICT RESOLUTION: BEGIN */
......
...@@ -511,13 +511,18 @@ static void wait_nfapi_init(char *thread_name) { ...@@ -511,13 +511,18 @@ static void wait_nfapi_init(char *thread_name) {
int main ( int argc, char **argv ) int main ( int argc, char **argv )
{ {
struct sched_param param = { struct sched_param param =
{
.sched_priority = sched_get_priority_max(SCHED_RR) .sched_priority = sched_get_priority_max(SCHED_RR)
}; };
if (sched_setscheduler( 0, SCHED_RR, &param ) == -1 ) if (sched_setscheduler( 0, SCHED_RR, &param ) == -1 )
{
fprintf(stderr,"error setting scheduler ... are you root?\n"); fprintf(stderr,"error setting scheduler ... are you root?\n");
}
else else
{
fprintf(stderr,"selected rt scheduler\n"); fprintf(stderr,"selected rt scheduler\n");
}
int i; int i;
int CC_id = 0; int CC_id = 0;
......
...@@ -419,10 +419,11 @@ void init_UE_stub_single_thread(int nb_inst, ...@@ -419,10 +419,11 @@ void init_UE_stub_single_thread(int nb_inst,
init_UE_single_thread_stub(nb_inst); init_UE_single_thread_stub(nb_inst);
printf("UE threads created \n"); printf("UE threads created \n");
//LOG_I(PHY,"Starting multicast link on %s\n",emul_iface);
//if(NFAPI_MODE!=NFAPI_UE_STUB_PNF || NFAPI_MODE!=NFAPI_MODE_STANDALONE_PNF) // dont need this if(NFAPI_MODE!=NFAPI_UE_STUB_PNF) {
//multicast_link_start(ue_stub_rx_handler,0,emul_iface); LOG_I(PHY,"Starting multicast link on %s\n",emul_iface);
multicast_link_start(ue_stub_rx_handler,0,emul_iface);
}
} }
void init_UE_standalone_thread() void init_UE_standalone_thread()
...@@ -1064,33 +1065,6 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg) ...@@ -1064,33 +1065,6 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
hi_dci0_req->hi_dci0_request_body.number_of_dci, hi_dci0_req->hi_dci0_request_body.number_of_dci,
NFAPI_SFNSF2SFN(hi_dci0_req->sfn_sf), NFAPI_SFNSF2SF(hi_dci0_req->sfn_sf)); NFAPI_SFNSF2SFN(hi_dci0_req->sfn_sf), NFAPI_SFNSF2SF(hi_dci0_req->sfn_sf));
} }
// if ((dl_config_req != NULL) != (tx_request_pdu_list != NULL)) {
// uint64_t start = clock_usec();
// uint64_t deadline = start + 10000;
// for (;;) {
// if (dl_config_req == NULL) {
// dl_config_req = get_queue(&dl_config_req_queue);
// }
// if (tx_request_pdu_list == NULL) {
// tx_request_pdu_list = get_queue(&tx_req_pdu_queue);
// }
// if (dl_config_req && tx_request_pdu_list) {
// uint64_t elapsed = clock_usec() - start;
// if (elapsed > 1000) {
// LOG_E(MAC, "Time difference between dl_config_req & tx_pdu is: %" PRIu64 "usec (%d %d)\n",
// elapsed, num_lone, num_pairs);
// }
// break;
// }
// if (clock_usec() > deadline) {
// LOG_E(MAC, "In behemoth dl_config_req: %p tx_req_pdu_list: %p (%d %d)\n", dl_config_req,
// tx_request_pdu_list, num_lone, num_pairs);
// break;
// }
// }
// }
if ((dl_config_req != NULL) != (tx_request_pdu_list != NULL)) { if ((dl_config_req != NULL) != (tx_request_pdu_list != NULL)) {
num_lone++; num_lone++;
...@@ -1832,6 +1806,11 @@ static void *UE_phy_stub_thread_rxn_txnp4(void *arg) ...@@ -1832,6 +1806,11 @@ static void *UE_phy_stub_thread_rxn_txnp4(void *arg)
phy_procedures_UE_SL_RX(UE,proc); phy_procedures_UE_SL_RX(UE,proc);
oai_subframe_ind(timer_frame, timer_subframe); oai_subframe_ind(timer_frame, timer_subframe);
if(dl_config_req!= NULL) {
AssertFatal(0, "dl_config_req_UE_MAC() not handled\n");
//dl_config_req_UE_MAC(dl_config_req, Mod_id);
}
//if(UE_mac_inst[Mod_id].hi_dci0_req!= NULL){ //if(UE_mac_inst[Mod_id].hi_dci0_req!= NULL){
if (hi_dci0_req!=NULL && hi_dci0_req->hi_dci0_request_body.hi_dci0_pdu_list!=NULL) { if (hi_dci0_req!=NULL && hi_dci0_req->hi_dci0_request_body.hi_dci0_pdu_list!=NULL) {
AssertFatal(0, "hi_dci0_req_UE_MAC() not handled\n"); AssertFatal(0, "hi_dci0_req_UE_MAC() not handled\n");
......
...@@ -543,13 +543,18 @@ void init_pdcp(void) { ...@@ -543,13 +543,18 @@ void init_pdcp(void) {
} }
int main( int argc, char **argv ) { int main( int argc, char **argv ) {
struct sched_param param = { struct sched_param param =
{
.sched_priority = sched_get_priority_max(SCHED_RR) .sched_priority = sched_get_priority_max(SCHED_RR)
}; };
if (sched_setscheduler( 0, SCHED_RR, &param ) == -1 ) if (sched_setscheduler( 0, SCHED_RR, &param ) == -1 )
{
fprintf(stderr,"error setting scheduler ... are you root?\n"); fprintf(stderr,"error setting scheduler ... are you root?\n");
}
else else
{
fprintf(stderr,"selected rt scheduler\n"); fprintf(stderr,"selected rt scheduler\n");
}
int CC_id; int CC_id;
uint8_t abstraction_flag=0; uint8_t abstraction_flag=0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment