Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OAI-RAN-5G-sheduler_MaxTBS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MAQ5G-PFC
OAI-RAN-5G-sheduler_MaxTBS
Commits
dec1c93c
Commit
dec1c93c
authored
9 years ago
by
Xenofon Foukas
Browse files
Options
Downloads
Patches
Plain Diff
Changed channel struct for async_channel implementation
parent
a054eb81
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
openair2/ENB_APP/enb_agent_async.c
+11
-11
11 additions, 11 deletions
openair2/ENB_APP/enb_agent_async.c
openair2/ENB_APP/enb_agent_async.h
+9
-1
9 additions, 1 deletion
openair2/ENB_APP/enb_agent_async.h
openair2/ENB_APP/enb_agent_net_comm.c
+3
-3
3 additions, 3 deletions
openair2/ENB_APP/enb_agent_net_comm.c
with
23 additions
and
15 deletions
openair2/ENB_APP/enb_agent_async.c
+
11
−
11
View file @
dec1c93c
...
...
@@ -39,21 +39,21 @@
#include
"log.h"
enb_agent_
instance
_t
*
enb_agent_async_channel_info
(
mid_t
mod_id
,
char
*
dst_ip
,
uint16_t
dst_port
)
{
enb_agent_
async_channel
_t
*
enb_agent_async_channel_info
(
mid_t
mod_id
,
char
*
dst_ip
,
uint16_t
dst_port
)
{
enb_agent_
instance
_t
*
channel
;
channel
=
(
enb_agent_
instance
_t
*
)
malloc
(
sizeof
(
enb_agent_
instance
_t
));
enb_agent_
async_channel
_t
*
channel
;
channel
=
(
enb_agent_
async_channel
_t
*
)
malloc
(
sizeof
(
enb_agent_
channel
_t
));
if
(
channel
==
NULL
)
goto
error
;
channel
->
mod
_id
=
mod_id
;
channel
->
enb
_id
=
mod_id
;
/*Create a socket*/
channel
->
link
=
new_link_client
(
dst_ip
,
dst_port
);
if
(
channel
->
link
==
NULL
)
goto
error
;
LOG_I
(
ENB_AGENT
,
"starting enb agent client for module id %d on ipv4 %s, port %d
\n
"
,
channel
->
mod
_id
,
channel
->
enb
_id
,
dst_ip
,
dst_port
);
...
...
@@ -80,22 +80,22 @@ enb_agent_instance_t * enb_agent_async_channel_info(mid_t mod_id, char *dst_ip,
}
int
enb_agent_async_msg_send
(
void
*
data
,
int
size
,
int
priority
,
void
*
channel_info
)
{
enb_agent_
instance
_t
*
channel
;
channel
=
(
enb_agent_
instance
_t
*
)
channel_info
;
enb_agent_
async_channel
_t
*
channel
;
channel
=
(
enb_agent_
channel
_t
*
)
channel_info
;
return
message_put
(
channel
->
send_queue
,
data
,
size
,
priority
);
}
int
enb_agent_async_msg_recv
(
void
**
data
,
int
*
size
,
int
*
priority
,
void
*
channel_info
)
{
enb_agent_
instance
_t
*
channel
;
channel
=
(
enb_agent_
instance
_t
*
)
channel_info
;
enb_agent_
async_channel
_t
*
channel
;
channel
=
(
enb_agent_
async_channel
_t
*
)
channel_info
;
return
message_get
(
channel
->
receive_queue
,
data
,
size
,
priority
);
}
void
enb_agent_async_release
(
enb_agent_channel_t
*
channel
)
{
enb_agent_
instance
_t
*
channel_info
;
channel_info
=
(
enb_agent_
instance
_t
*
)
channel
->
channel_info
;
enb_agent_
async_channel
_t
*
channel_info
;
channel_info
=
(
enb_agent_
async_channel
_t
*
)
channel
->
channel_info
;
destroy_link_manager
(
channel_info
->
manager
);
...
...
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/enb_agent_async.h
+
9
−
1
View file @
dec1c93c
...
...
@@ -39,7 +39,15 @@
#include
"enb_agent_net_comm.h"
enb_agent_instance_t
*
enb_agent_async_channel_info
(
mid_t
mod_id
,
char
*
dst_ip
,
uint16_t
dst_port
);
typedef
struct
{
mid_t
enb_id
;
socket_link_t
*
link
;
message_queue_t
*
send_queue
;
message_queue_t
*
receive_queue
;
link_manager_t
*
manager
;
}
enb_agent_async_channel_t
;
enb_agent_async_channel_t
*
enb_agent_async_channel_info
(
mid_t
mod_id
,
char
*
dst_ip
,
uint16_t
dst_port
);
int
enb_agent_async_msg_send
(
void
*
data
,
int
size
,
int
priority
,
void
*
channel_info
);
...
...
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/enb_agent_net_comm.c
+
3
−
3
View file @
dec1c93c
...
...
@@ -37,7 +37,7 @@
#include
"enb_agent_net_comm.h"
#include
"log.h"
enb_agent_channel_t
*
agent_channel
[
NUM_MAX_ENB
_AGENT
][
ENB_AGENT_MAX
];
enb_agent_channel_t
*
agent_channel
[
NUM_MAX_ENB
][
ENB_AGENT_MAX
];
enb_agent_channel_instance_t
channel_instance
;
int
enb_agent_channel_id
=
0
;
...
...
@@ -146,7 +146,7 @@ int enb_agent_destroy_channel(int channel_id) {
}
/*Unregister the channel from all agents*/
for
(
i
=
0
;
i
<
NUM_MAX_ENB
_AGENT
;
i
++
)
{
for
(
i
=
0
;
i
<
NUM_MAX_ENB
;
i
++
)
{
for
(
j
=
0
;
j
<
ENB_AGENT_MAX
;
j
++
)
{
if
(
agent_channel
[
i
][
j
]
!=
NULL
)
{
if
(
agent_channel
[
i
][
j
]
->
channel_id
==
e
->
channel_id
)
{
...
...
@@ -170,7 +170,7 @@ err_code_t enb_agent_init_channel_container(void) {
RB_INIT
(
&
channel_instance
.
enb_agent_head
);
for
(
i
=
0
;
i
<
NUM_MAX_ENB
_AGENT
;
i
++
)
{
for
(
i
=
0
;
i
<
NUM_MAX_ENB
;
i
++
)
{
for
(
j
=
0
;
j
<
ENB_AGENT_MAX
;
j
++
)
{
agent_channel
[
i
][
j
]
==
NULL
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment