Commit bf55d13c authored by Florian Kaltenberger's avatar Florian Kaltenberger

Merge branch 'develop_integration_2018_w39' into 'develop'

Develop integration 2018 w39

See merge request !405
parents 7d602d5c b83395c6
Pipeline #10649 passed with stage
in 0 seconds
...@@ -31,6 +31,9 @@ def testXMLFile = params.pythonTestXmlFile ...@@ -31,6 +31,9 @@ def testXMLFile = params.pythonTestXmlFile
// Name of the test stage // Name of the test stage
def testStageName = params.pipelineTestStageName def testStageName = params.pipelineTestStageName
// Name of the phone resource
def ciSmartPhoneResource = params.smartphonesResource
// Terminate Status // Terminate Status
def termUE = 0 def termUE = 0
def termENB = 1 def termENB = 1
...@@ -70,6 +73,7 @@ pipeline { ...@@ -70,6 +73,7 @@ pipeline {
string(name: 'pythonTestXmlFile', defaultValue: 'enb_usrpB210_band7_50PRB.xml', description: 'Location of the Test XML to be run') string(name: 'pythonTestXmlFile', defaultValue: 'enb_usrpB210_band7_50PRB.xml', description: 'Location of the Test XML to be run')
string(name: 'pipelineTestStageName', defaultValue: 'Test COTS-UE - OAI eNB - LTEBOX EPC', description: 'Naming of the Test Stage') string(name: 'pipelineTestStageName', defaultValue: 'Test COTS-UE - OAI eNB - LTEBOX EPC', description: 'Naming of the Test Stage')
booleanParam(name: 'pipelineZipsConsoleLog', defaultValue: 'True', description: 'If true, the pipeline script retrieves the job console log, zips it and archives it as artifact') booleanParam(name: 'pipelineZipsConsoleLog', defaultValue: 'True', description: 'If true, the pipeline script retrieves the job console log, zips it and archives it as artifact')
string(name: 'smartphonesResource', defaultValue: 'CI-Bench-1-Phones', description: 'Lockeable Resource to prevent multiple jobs to run simultaneously with the same resource')
//eNB parameters //eNB parameters
string(name: 'eNB_IPAddress', defaultValue: '192.168.XX.XX', description: 'IP Address of eNB') string(name: 'eNB_IPAddress', defaultValue: '192.168.XX.XX', description: 'IP Address of eNB')
...@@ -112,6 +116,9 @@ pipeline { ...@@ -112,6 +116,9 @@ pipeline {
testStageName = 'Template Test Stage' testStageName = 'Template Test Stage'
} }
if (params.smartphonesResource == null) {
allParametersPresent = false
}
if (params.eNB_IPAddress == null) { if (params.eNB_IPAddress == null) {
allParametersPresent = false allParametersPresent = false
} }
...@@ -178,6 +185,7 @@ pipeline { ...@@ -178,6 +185,7 @@ pipeline {
steps { steps {
script { script {
dir ('ci-scripts') { dir ('ci-scripts') {
lock (ciSmartPhoneResource) {
try { try {
echo "\u2705 \u001B[32m${testStageName}\u001B[0m" echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
withCredentials([ withCredentials([
...@@ -194,6 +202,7 @@ pipeline { ...@@ -194,6 +202,7 @@ pipeline {
} }
} }
} }
}
stage ("Terminate") { stage ("Terminate") {
parallel { parallel {
stage('Terminate UE') { stage('Terminate UE') {
......
...@@ -120,21 +120,34 @@ echo "Source Branch is : $SOURCE_BRANCH" ...@@ -120,21 +120,34 @@ echo "Source Branch is : $SOURCE_BRANCH"
echo "Target Branch is : $TARGET_BRANCH" echo "Target Branch is : $TARGET_BRANCH"
echo "Merged Commit is : $MERGE_COMMMIT" echo "Merged Commit is : $MERGE_COMMMIT"
echo "Target Init is : $TARGET_INIT_COMMIT" echo "Target Init is : $TARGET_INIT_COMMIT"
echo ""
echo " ----------------------------------------------------------"
echo ""
# Retrieve the list of modified files since the latest develop commit # Retrieve the list of modified files since the latest develop commit
MODIFIED_FILES=`git log $TARGET_INIT_COMMIT..$MERGE_COMMMIT --oneline --name-status | egrep "^M|^A" | sed -e "s@^M\t*@@" -e "s@^A\t*@@" | sort | uniq` MODIFIED_FILES=`git log $TARGET_INIT_COMMIT..$MERGE_COMMMIT --oneline --name-status | egrep "^M|^A" | sed -e "s@^M\t*@@" -e "s@^A\t*@@" | sort | uniq`
NB_TO_FORMAT=0 NB_TO_FORMAT=0
if [ -f oai_rules_result_list.txt ]
then
rm -f oai_rules_result_list.txt
fi
for FULLFILE in $MODIFIED_FILES for FULLFILE in $MODIFIED_FILES
do do
echo $FULLFILE
filename=$(basename -- "$FULLFILE") filename=$(basename -- "$FULLFILE")
EXT="${filename##*.}" EXT="${filename##*.}"
if [ $EXT = "c" ] || [ $EXT = "h" ] || [ $EXT = "cpp" ] || [ $EXT = "hpp" ] if [ $EXT = "c" ] || [ $EXT = "h" ] || [ $EXT = "cpp" ] || [ $EXT = "hpp" ]
then then
TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt $FULLFILE | grep -c Formatted ` TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt $FULLFILE | grep -c Formatted `
NB_TO_FORMAT=$((NB_TO_FORMAT + TO_FORMAT)) NB_TO_FORMAT=$((NB_TO_FORMAT + TO_FORMAT))
if [ $TO_FORMAT -ne 0 ]
then
echo $FULLFILE
echo $FULLFILE >> ./oai_rules_result_list.txt
fi
fi fi
done done
echo ""
echo " ----------------------------------------------------------"
echo "Nb Files that do NOT follow OAI rules: $NB_TO_FORMAT" echo "Nb Files that do NOT follow OAI rules: $NB_TO_FORMAT"
echo $NB_TO_FORMAT > ./oai_rules_result.txt echo $NB_TO_FORMAT > ./oai_rules_result.txt
......
...@@ -228,6 +228,15 @@ RUs = ( ...@@ -228,6 +228,15 @@ RUs = (
} }
); );
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
NETWORK_CONTROLLER : NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
......
...@@ -228,6 +228,15 @@ RUs = ( ...@@ -228,6 +228,15 @@ RUs = (
} }
); );
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
NETWORK_CONTROLLER : NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
......
...@@ -228,6 +228,15 @@ RUs = ( ...@@ -228,6 +228,15 @@ RUs = (
} }
); );
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
NETWORK_CONTROLLER : NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
......
...@@ -229,6 +229,15 @@ RUs = ( ...@@ -229,6 +229,15 @@ RUs = (
} }
); );
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
NETWORK_CONTROLLER : NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
......
...@@ -90,6 +90,9 @@ class SSHConnection(): ...@@ -90,6 +90,9 @@ class SSHConnection():
self.htmlUEConnected = 0 self.htmlUEConnected = 0
def open(self, ipaddress, username, password): def open(self, ipaddress, username, password):
count = 0
connect_status = False
while count < 4:
self.ssh = pexpect.spawn('ssh', [username + '@' + ipaddress], timeout = 5) self.ssh = pexpect.spawn('ssh', [username + '@' + ipaddress], timeout = 5)
self.sshresponse = self.ssh.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', 'Last login', pexpect.EOF, pexpect.TIMEOUT]) self.sshresponse = self.ssh.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', 'Last login', pexpect.EOF, pexpect.TIMEOUT])
if self.sshresponse == 0: if self.sshresponse == 0:
...@@ -98,30 +101,39 @@ class SSHConnection(): ...@@ -98,30 +101,39 @@ class SSHConnection():
self.ssh.sendline(password) self.ssh.sendline(password)
self.sshresponse = self.ssh.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT]) self.sshresponse = self.ssh.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
if self.sshresponse == 0: if self.sshresponse == 0:
pass count = 10
connect_status = True
else: else:
logging.debug('self.sshresponse = ' + str(self.sshresponse)) logging.debug('self.sshresponse = ' + str(self.sshresponse))
sys.exit('SSH Connection Failed')
elif self.sshresponse == 1: elif self.sshresponse == 1:
self.ssh.sendline(password) self.ssh.sendline(password)
self.sshresponse = self.ssh.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT]) self.sshresponse = self.ssh.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
if self.sshresponse == 0: if self.sshresponse == 0:
pass count = 10
connect_status = True
else: else:
logging.debug('self.sshresponse = ' + str(self.sshresponse)) logging.debug('self.sshresponse = ' + str(self.sshresponse))
sys.exit('SSH Connection Failed')
elif self.sshresponse == 2: elif self.sshresponse == 2:
# Checking if we are really on the remote client defined by its IP address # Checking if we are really on the remote client defined by its IP address
self.command('stdbuf -o0 ifconfig | egrep --color=never "inet addr:"', '\$', 5) self.command('stdbuf -o0 ifconfig | egrep --color=never "inet addr:"', '\$', 5)
result = re.search(str(ipaddress), str(self.ssh.before)) result = re.search(str(ipaddress), str(self.ssh.before))
if result is None: if result is None:
sys.exit('SSH Connection Failed: TIMEOUT !!!') self.close()
pass else:
count = 10
connect_status = True
else: else:
# debug output # debug output
logging.debug(str(self.ssh.before)) logging.debug(str(self.ssh.before))
logging.debug('self.sshresponse = ' + str(self.sshresponse)) logging.debug('self.sshresponse = ' + str(self.sshresponse))
sys.exit('SSH Connection Failed!!!') # adding a tempo when failure
if not connect_status:
time.sleep(1)
count += 1
if connect_status:
pass
else:
sys.exit('SSH Connection Failed')
def command(self, commandline, expectedline, timeout): def command(self, commandline, expectedline, timeout):
logging.debug(commandline) logging.debug(commandline)
......
...@@ -260,7 +260,7 @@ function sca_summary_table_footer { ...@@ -260,7 +260,7 @@ function sca_summary_table_footer {
echo " </tr>" >> ./build_results.html echo " </tr>" >> ./build_results.html
echo " </table>" >> ./build_results.html echo " </table>" >> ./build_results.html
echo " <p>Full details in zipped artifact (cppcheck/cppcheck.xml) </p>" >> ./build_results.html echo " <p>Full details in zipped artifact (cppcheck/cppcheck.xml) </p>" >> ./build_results.html
echo " <p>Graphical Interface tool : <code>cppcheck-gui -l cppcheck/cppcheck.xml</code> </p>" >> ./build_results.html echo " <p style=\"margin-left: 30px\">Graphical Interface tool : <strong><code>cppcheck-gui -l cppcheck/cppcheck.xml</code></strong></p>" >> ./build_results.html
} }
jb_checker=0 jb_checker=0
...@@ -490,12 +490,20 @@ then ...@@ -490,12 +490,20 @@ then
then then
if [ $PU_TRIG -eq 1 ]; then echo " <td bgcolor = \"green\">All files in repository follow OAI rules. </td>" >> ./build_results.html; fi if [ $PU_TRIG -eq 1 ]; then echo " <td bgcolor = \"green\">All files in repository follow OAI rules. </td>" >> ./build_results.html; fi
if [ $MR_TRIG -eq 1 ]; then echo " <td bgcolor = \"green\">All modified files in Merge-Request follow OAI rules.</td>" >> ./build_results.html; fi if [ $MR_TRIG -eq 1 ]; then echo " <td bgcolor = \"green\">All modified files in Merge-Request follow OAI rules.</td>" >> ./build_results.html; fi
echo " </tr>" >> ./build_results.html
echo " </table>" >> ./build_results.html
else else
if [ $PU_TRIG -eq 1 ]; then echo " <td bgcolor = \"orange\">$NB_FILES files in repository DO NOT follow OAI rules. </td>" >> ./build_results.html; fi if [ $PU_TRIG -eq 1 ]; then echo " <td bgcolor = \"orange\">$NB_FILES files in repository DO NOT follow OAI rules. </td>" >> ./build_results.html; fi
if [ $MR_TRIG -eq 1 ]; then echo " <td bgcolor = \"orange\">$NB_FILES modified files in Merge-Request DO NOT follow OAI rules.</td>" >> ./build_results.html; fi if [ $MR_TRIG -eq 1 ]; then echo " <td bgcolor = \"orange\">$NB_FILES modified files in Merge-Request DO NOT follow OAI rules.</td>" >> ./build_results.html; fi
fi
echo " </tr>" >> ./build_results.html echo " </tr>" >> ./build_results.html
if [ -f ./oai_rules_result_list.txt ]
then
awk '{print " <tr><td></td><td>"$1"</td></tr>"}' ./oai_rules_result_list.txt >> ./build_results.html
fi
echo " </table>" >> ./build_results.html echo " </table>" >> ./build_results.html
echo " <p>Please apply the following command to this(ese) file(s): </p>" >> ./build_results.html
echo " <p style=\"margin-left: 30px\"><strong><code>astyle --options=ci-scripts/astyle-options.txt filename(s)</code></strong></p>" >> ./build_results.html
fi
fi fi
echo " <h2>Ubuntu 16.04 LTS -- Summary</h2>" >> ./build_results.html echo " <h2>Ubuntu 16.04 LTS -- Summary</h2>" >> ./build_results.html
......
...@@ -474,12 +474,12 @@ include_directories ("${X2AP_DIR}") ...@@ -474,12 +474,12 @@ include_directories ("${X2AP_DIR}")
add_library(X2AP_ENB add_library(X2AP_ENB
${X2AP_DIR}/x2ap_eNB.c ${X2AP_DIR}/x2ap_eNB.c
# ${X2AP_DIR}/x2ap_eNB_decoder.c ${X2AP_DIR}/x2ap_eNB_decoder.c
# ${X2AP_DIR}/x2ap_eNB_encoder.c ${X2AP_DIR}/x2ap_eNB_encoder.c
${X2AP_DIR}/x2ap_eNB_handler.c ${X2AP_DIR}/x2ap_eNB_handler.c
# ${X2AP_DIR}/x2ap_eNB_itti_messaging.c ${X2AP_DIR}/x2ap_eNB_itti_messaging.c
${X2AP_DIR}/x2ap_eNB_management_procedures.c ${X2AP_DIR}/x2ap_eNB_management_procedures.c
# ${X2AP_DIR}/x2ap_eNB_generate_messages.c ${X2AP_DIR}/x2ap_eNB_generate_messages.c
) )
# Hardware dependant options # Hardware dependant options
......
...@@ -63,6 +63,8 @@ typedef enum { ...@@ -63,6 +63,8 @@ typedef enum {
MSC_S6A_MME, MSC_S6A_MME,
MSC_HSS, MSC_HSS,
MAX_MSC_PROTOS, MAX_MSC_PROTOS,
MSC_X2AP_SRC_ENB,
MSC_X2AP_TARGET_ENB,
} msc_proto_t; } msc_proto_t;
......
...@@ -115,11 +115,15 @@ extern "C" { ...@@ -115,11 +115,15 @@ extern "C" {
task_list_t *t=&tasks[destination_task_id]; task_list_t *t=&tasks[destination_task_id];
pthread_mutex_lock (&t->queue_cond_lock); pthread_mutex_lock (&t->queue_cond_lock);
int ret=itti_send_msg_to_task_locked(destination_task_id, instance, message); int ret=itti_send_msg_to_task_locked(destination_task_id, instance, message);
pthread_mutex_unlock (&t->queue_cond_lock);
while ( t->message_queue.size()>0 && t->admin.func != NULL ) while ( t->message_queue.size()>0 && t->admin.func != NULL ) {
if (t->message_queue.size()>1)
LOG_W(TMR,"queue in no thread mode is %ld\n", t->message_queue.size());
pthread_mutex_unlock (&t->queue_cond_lock);
t->admin.func(NULL); t->admin.func(NULL);
pthread_mutex_lock (&t->queue_cond_lock);
}
pthread_mutex_unlock (&t->queue_cond_lock);
return ret; return ret;
} }
...@@ -193,6 +197,8 @@ extern "C" { ...@@ -193,6 +197,8 @@ extern "C" {
pthread_mutex_unlock(&t->queue_cond_lock); pthread_mutex_unlock(&t->queue_cond_lock);
LOG_D(TMR,"enter blocking wait for %s\n", itti_get_task_name(task_id)); LOG_D(TMR,"enter blocking wait for %s\n", itti_get_task_name(task_id));
t->nb_events = epoll_wait(t->epoll_fd,t->events,t->nb_fd_epoll, epoll_timeout); t->nb_events = epoll_wait(t->epoll_fd,t->events,t->nb_fd_epoll, epoll_timeout);
if ( t->nb_events < 0 && (errno == EINTR || errno == EAGAIN ) )
pthread_mutex_lock(&t->queue_cond_lock);
} while (t->nb_events < 0 && (errno == EINTR || errno == EAGAIN ) ); } while (t->nb_events < 0 && (errno == EINTR || errno == EAGAIN ) );
AssertFatal (t->nb_events >=0, AssertFatal (t->nb_events >=0,
...@@ -278,6 +284,18 @@ extern "C" { ...@@ -278,6 +284,18 @@ extern "C" {
"Thread creation for task %d failed!\n", task_id); "Thread creation for task %d failed!\n", task_id);
pthread_setname_np( t->thread, itti_get_task_name(task_id) ); pthread_setname_np( t->thread, itti_get_task_name(task_id) );
LOG_I(TMR,"Created Posix thread %s\n", itti_get_task_name(task_id) ); LOG_I(TMR,"Created Posix thread %s\n", itti_get_task_name(task_id) );
#if 1 // BMC test RT prio
{
int policy;
struct sched_param sparam;
memset(&sparam, 0, sizeof(sparam));
sparam.sched_priority = sched_get_priority_max(SCHED_FIFO)-10;
policy = SCHED_FIFO ;
if (pthread_setschedparam(t->thread, policy, &sparam) != 0) {
LOG_E(TMR,"task %s : Failed to set pthread priority\n", itti_get_task_name(task_id) );
}
}
#endif
return 0; return 0;
} }
......
...@@ -233,6 +233,11 @@ typedef struct IttiMsgText_s { ...@@ -233,6 +233,11 @@ typedef struct IttiMsgText_s {
#include <openair3/S1AP/s1ap_eNB.h> #include <openair3/S1AP/s1ap_eNB.h>
//#include <proto.h> //#include <proto.h>
#include <openair3/GTPV1-U/gtpv1u_eNB_task.h>
void *rrc_enb_process_itti_msg(void *);
#include <openair3/SCTP/sctp_eNB_task.h>
#include <openair3/S1AP/s1ap_eNB.h>
/* /*
static const char *const messages_definition_xml = { static const char *const messages_definition_xml = {
#include <messages_xml.h> #include <messages_xml.h>
......
...@@ -169,6 +169,13 @@ void lte_param_init(PHY_VARS_eNB **eNBp, ...@@ -169,6 +169,13 @@ void lte_param_init(PHY_VARS_eNB **eNBp,
} }
else ru->N_TA_offset=0; else ru->N_TA_offset=0;
#if BASIC_SIMULATOR
/* this is required for the basic simulator in TDD mode
* TODO: find a proper cleaner solution
*/
UE->N_TA_offset = 0;
#endif
printf("Done lte_param_init\n"); printf("Done lte_param_init\n");
......
...@@ -57,8 +57,8 @@ ...@@ -57,8 +57,8 @@
uint64_t runtime, uint64_t runtime,
uint64_t deadline, uint64_t deadline,
uint64_t period);*/ uint64_t period);*/
extern WORKER_CONF_t get_thread_worker_conf(void);
extern int codingw;
void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch) void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch)
{ {
...@@ -615,7 +615,9 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB, ...@@ -615,7 +615,9 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
} }
} }
if(C >= 8 && get_nprocs()>=16 && codingw)//one main three worker if(get_thread_worker_conf() == WORKER_ENABLE)
{
if(C >= 8)//one main three worker
{ {
encoding_return = encoding_return =
dlsch_encoding_2threads(eNB, dlsch_encoding_2threads(eNB,
...@@ -633,7 +635,7 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB, ...@@ -633,7 +635,7 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
i_stats, i_stats,
3); 3);
} }
else if(C >= 6 && get_nprocs()>=8 && codingw)//one main two worker else if(C >= 6)//one main two worker
{ {
encoding_return = encoding_return =
dlsch_encoding_2threads(eNB, dlsch_encoding_2threads(eNB,
...@@ -651,7 +653,7 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB, ...@@ -651,7 +653,7 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
i_stats, i_stats,
2); 2);
} }
else if(C >= 4 && get_nprocs()>=4 && codingw)//one main one worker else if(C >= 4)//one main one worker
{ {
encoding_return = encoding_return =
dlsch_encoding_2threads(eNB, dlsch_encoding_2threads(eNB,
...@@ -670,6 +672,20 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB, ...@@ -670,6 +672,20 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
1); 1);
} }
else else
{
encoding_return =
dlsch_encoding(eNB,
a,
num_pdcch_symbols,
dlsch,
frame,
subframe,
rm_stats,
te_stats,
i_stats);
}
}
else
{ {
encoding_return = encoding_return =
dlsch_encoding(eNB, dlsch_encoding(eNB,
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#include "targets/RT/USER/rt_wrapper.h" #include "targets/RT/USER/rt_wrapper.h"
#include "transport_proto.h" #include "transport_proto.h"
extern int codingw; extern WORKER_CONF_t get_thread_worker_conf(void);
void free_eNB_ulsch(LTE_eNB_ULSCH_t *ulsch) void free_eNB_ulsch(LTE_eNB_ULSCH_t *ulsch)
{ {
...@@ -723,7 +723,7 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag) ...@@ -723,7 +723,7 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
int ulsch_decoding_data_all(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag) int ulsch_decoding_data_all(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
{ {
int ret = 0; int ret = 0;
/*if(codingw) /*if(get_thread_worker_conf() == WORKER_ENABLE)
{ {
ret = ulsch_decoding_data_2thread(eNB,UE_id,harq_pid,llr8_flag); ret = ulsch_decoding_data_2thread(eNB,UE_id,harq_pid,llr8_flag);
} }
......
...@@ -862,7 +862,22 @@ typedef enum { ...@@ -862,7 +862,22 @@ typedef enum {
RESYNCH=4 RESYNCH=4
} UE_MODE_t; } UE_MODE_t;
/// Threading Parameter
typedef enum {
PARALLEL_SINGLE_THREAD =0,
PARALLEL_RU_L1_SPLIT =1,
PARALLEL_RU_L1_TRX_SPLIT =2
}PARALLEL_CONF_t;
typedef enum {
WORKER_DISABLE =0,
WORKER_ENABLE =1
}WORKER_CONF_t;
typedef struct THREAD_STRUCT_s {
PARALLEL_CONF_t parallel_conf;
WORKER_CONF_t worker_conf;
} THREAD_STRUCT;
typedef enum {SF_DL, SF_UL, SF_S} lte_subframe_t; typedef enum {SF_DL, SF_UL, SF_S} lte_subframe_t;
......
...@@ -270,7 +270,6 @@ typedef enum { ...@@ -270,7 +270,6 @@ typedef enum {
REMOTE_IF4p5 =3, REMOTE_IF4p5 =3,
REMOTE_IF1pp =4, REMOTE_IF1pp =4,
MAX_RU_IF_TYPES =5 MAX_RU_IF_TYPES =5
//EMULATE_RF =6
} RU_if_south_t; } RU_if_south_t;
typedef struct RU_t_s{ typedef struct RU_t_s{
......
...@@ -82,7 +82,30 @@ double t_rx_min = 1000000000; /*!< \brief initial min process time for rx */ ...@@ -82,7 +82,30 @@ double t_rx_min = 1000000000; /*!< \brief initial min process time for rx */
int n_tx_dropped = 0; /*!< \brief initial max process time for tx */ int n_tx_dropped = 0; /*!< \brief initial max process time for tx */
int n_rx_dropped = 0; /*!< \brief initial max process time for rx */ int n_rx_dropped = 0; /*!< \brief initial max process time for rx */
int codingw = 0; char *parallel_config = NULL;
char *worker_config = NULL;
static THREAD_STRUCT thread_struct;
void set_parallel_conf(char *parallel_conf)
{
if(strcmp(parallel_conf,"PARALLEL_SINGLE_THREAD")==0) thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD;
else if(strcmp(parallel_conf,"PARALLEL_RU_L1_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_SPLIT;
else if(strcmp(parallel_conf,"PARALLEL_RU_L1_TRX_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_TRX_SPLIT;
printf("[CONFIG] parallel conf is set to %d\n",thread_struct.parallel_conf);
}
void set_worker_conf(char *worker_conf)
{
if(strcmp(worker_conf,"WORKER_DISABLE")==0) thread_struct.worker_conf = WORKER_DISABLE;
else if(strcmp(worker_conf,"WORKER_ENABLE")==0) thread_struct.worker_conf = WORKER_ENABLE;
printf("[CONFIG] worker conf is set to %d\n",thread_struct.worker_conf);
}
PARALLEL_CONF_t get_thread_parallel_conf(void)
{
return thread_struct.parallel_conf;
}
WORKER_CONF_t get_thread_worker_conf(void)
{
return thread_struct.worker_conf;
}
int emulate_rf = 0; int emulate_rf = 0;
...@@ -1041,6 +1064,8 @@ int main(int argc, char **argv) ...@@ -1041,6 +1064,8 @@ int main(int argc, char **argv)
break; break;
} }
} }
set_parallel_conf("PARALLEL_RU_L1_TRX_SPLIT");
set_worker_conf("WORKER_ENABLE");
if (transmission_mode>1) pa=dBm3; if (transmission_mode>1) pa=dBm3;
printf("dlsim: tmode %d, pa %d\n",transmission_mode,pa); printf("dlsim: tmode %d, pa %d\n",transmission_mode,pa);
......
...@@ -97,7 +97,30 @@ nfapi_tx_request_pdu_t tx_pdu_list[MAX_NUM_TX_REQUEST_PDU]; ...@@ -97,7 +97,30 @@ nfapi_tx_request_pdu_t tx_pdu_list[MAX_NUM_TX_REQUEST_PDU];
nfapi_tx_request_t TX_req; nfapi_tx_request_t TX_req;
Sched_Rsp_t sched_resp; Sched_Rsp_t sched_resp;
int codingw = 0; char *parallel_config = NULL;
char *worker_config = NULL;
static THREAD_STRUCT thread_struct;
void set_parallel_conf(char *parallel_conf)
{
if(strcmp(parallel_conf,"PARALLEL_SINGLE_THREAD")==0) thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD;
else if(strcmp(parallel_conf,"PARALLEL_RU_L1_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_SPLIT;
else if(strcmp(parallel_conf,"PARALLEL_RU_L1_TRX_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_TRX_SPLIT;
printf("[CONFIG] parallel conf is set to %d\n",thread_struct.parallel_conf);
}