Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangjie
OpenXG-RAN
Commits
46724972
Commit
46724972
authored
Feb 23, 2016
by
Xenofon Foukas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for DL UE scheduler control delegation
parent
25e5e3b8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
2 deletions
+81
-2
openair2/ENB_APP/enb_agent_common.c
openair2/ENB_APP/enb_agent_common.c
+74
-0
openair2/ENB_APP/enb_agent_common.h
openair2/ENB_APP/enb_agent_common.h
+3
-0
openair2/ENB_APP/enb_agent_defs.h
openair2/ENB_APP/enb_agent_defs.h
+1
-1
openair2/ENB_APP/enb_agent_handler.c
openair2/ENB_APP/enb_agent_handler.c
+2
-0
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.agent.oaisim.local_no_mme.conf
...RIC-LTE-EPC/CONF/enb.band7.agent.oaisim.local_no_mme.conf
+1
-1
No files found.
openair2/ENB_APP/enb_agent_common.c
View file @
46724972
...
...
@@ -34,8 +34,12 @@
* \version 0.1
*/
#include<stdio.h>
#include <dlfcn.h>
#include <time.h>
#include "enb_agent_common.h"
#include "enb_agent_extern.h"
#include "PHY/extern.h"
#include "log.h"
...
...
@@ -703,6 +707,76 @@ int enb_agent_destroy_lc_config_request(Protocol__ProgranMessage *msg) {
return
0
;
}
// call this function to start a nanosecond-resolution timer
struct
timespec
timer_start
(){
struct
timespec
start_time
;
clock_gettime
(
CLOCK_PROCESS_CPUTIME_ID
,
&
start_time
);
return
start_time
;
}
// call this function to end a timer, returning nanoseconds elapsed as a long
long
timer_end
(
struct
timespec
start_time
){
struct
timespec
end_time
;
clock_gettime
(
CLOCK_PROCESS_CPUTIME_ID
,
&
end_time
);
long
diffInNanos
=
end_time
.
tv_nsec
-
start_time
.
tv_nsec
;
return
diffInNanos
;
}
int
enb_agent_control_delegation
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__ProgranMessage
**
msg
)
{
Protocol__ProgranMessage
*
input
=
(
Protocol__ProgranMessage
*
)
params
;
Protocol__PrpControlDelegation
*
control_delegation_msg
=
input
->
control_delegation_msg
;
uint32_t
delegation_type
=
control_delegation_msg
->
delegation_type
;
void
*
lib
;
int
i
;
struct
timespec
vartime
=
timer_start
();
//Write the payload lib into a file in the cache and load the lib
char
lib_name
[
120
];
char
target
[
512
];
snprintf
(
lib_name
,
sizeof
(
lib_name
),
"/delegation_lib_%d.so"
,
control_delegation_msg
->
header
->
xid
);
strcpy
(
target
,
local_cache
);
strcat
(
target
,
lib_name
);
FILE
*
f
;
f
=
fopen
(
target
,
"wb"
);
fwrite
(
control_delegation_msg
->
payload
.
data
,
control_delegation_msg
->
payload
.
len
,
1
,
f
);
fclose
(
f
);
lib
=
dlopen
(
target
,
RTLD_NOW
);
if
(
lib
==
NULL
)
{
goto
error
;
}
i
=
0
;
//Check functions that need to be delegated
//DL UE scheduler delegation
if
(
delegation_type
&
PROTOCOL__PRP_CONTROL_DELEGATION_TYPE__PRCDT_MAC_DL_UE_SCHEDULER
)
{
void
*
loaded_scheduler
=
dlsym
(
lib
,
control_delegation_msg
->
name
[
i
]);
i
++
;
if
(
loaded_scheduler
)
{
if
(
mac_agent_registered
[
mod_id
])
{
agent_mac_xface
[
mod_id
]
->
enb_agent_schedule_ue_spec
=
loaded_scheduler
;
LOG_D
(
ENB_APP
,
"Delegated control for DL UE scheduler successfully
\n
"
);
}
}
}
long
time_elapsed_nanos
=
timer_end
(
vartime
);
LOG_I
(
ENB_AGENT
,
"DID IT IN %lld
\n
"
,
time_elapsed_nanos
);
*
msg
=
NULL
;
return
0
;
error:
return
-
1
;
}
int
enb_agent_destroy_control_delegation
(
Protocol__ProgranMessage
*
msg
)
{
/*TODO: Dealocate memory for a dynamically allocated control delegation message*/
}
/*
* get generic info from RAN
*/
...
...
openair2/ENB_APP/enb_agent_common.h
View file @
46724972
...
...
@@ -111,6 +111,9 @@ int enb_agent_destroy_lc_config_request(Protocol__ProgranMessage *msg);
int
enb_agent_ue_state_change
(
mid_t
mod_id
,
uint32_t
rnti
,
uint8_t
state_change
);
int
enb_agent_destroy_ue_state_change
(
Protocol__ProgranMessage
*
msg
);
int
enb_agent_control_delegation
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__ProgranMessage
**
msg
);
int
enb_agent_destroy_control_delegation
(
Protocol__ProgranMessage
*
msg
);
Protocol__ProgranMessage
*
enb_agent_handle_message
(
mid_t
mod_id
,
uint8_t
*
data
,
uint32_t
size
);
...
...
openair2/ENB_APP/enb_agent_defs.h
View file @
46724972
...
...
@@ -47,7 +47,7 @@
#define NUM_MAX_UE 2048
#define DEFAULT_ENB_AGENT_IPv4_ADDRESS "127.0.0.1"
#define DEFAULT_ENB_AGENT_PORT 2210
#define DEFAULT_ENB_AGENT_CACHE "/mnt/
tmpfs
"
#define DEFAULT_ENB_AGENT_CACHE "/mnt/
oai_agent_cache
"
typedef
enum
{
...
...
openair2/ENB_APP/enb_agent_handler.c
View file @
46724972
...
...
@@ -57,6 +57,7 @@ enb_agent_message_decoded_callback agent_messages_callback[][3] = {
{
0
,
0
,
0
},
/*PROTOCOL__PROGRAN_MESSAGE__MSG_LC_CONFIG_REPLY_MSG*/
{
0
,
0
,
0
},
/*PROTOCOL__PROGRAN_MESSAGE__MSG_DL_MAC_CONFIG_MSG*/
{
0
,
0
,
0
},
/*PROTOCOL__PROGRAN_MESSAGE__MSG_UE_STATE_CHANGE_MSG*/
{
enb_agent_control_delegation
,
0
,
0
},
/*PROTOCOL__PROGRAN_MESSAGE__MSG_CONTROL_DELEGATION_MSG*/
};
...
...
@@ -76,6 +77,7 @@ enb_agent_message_destruction_callback message_destruction_callback[] = {
enb_agent_destroy_lc_config_reply
,
enb_agent_mac_destroy_dl_config
,
enb_agent_destroy_ue_state_change
,
enb_agent_destroy_control_delegation
,
};
static
const
char
*
enb_agent_direction2String
[]
=
{
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.agent.oaisim.local_no_mme.conf
View file @
46724972
...
...
@@ -123,7 +123,7 @@ eNBs =
ENB_AGENT_INTERFACE_NAME
=
"eth0"
;
ENB_AGENT_IPV4_ADDRESS
=
"127.0.0.1/24"
;
ENB_AGENT_PORT
=
2210
;
ENB_AGENT_CACHE
=
"/mnt/
tmpfs
"
;
ENB_AGENT_CACHE
=
"/mnt/
oai_agent_cache
"
;
};
log_config
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment