Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
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
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Worker.N
openairinterface5G
Commits
ec9e70a0
Commit
ec9e70a0
authored
6 years ago
by
Robert Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
FlexRAN: provide better error messages in async channel
parent
d7948d04
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
openair2/ENB_APP/flexran_agent.c
+8
-1
8 additions, 1 deletion
openair2/ENB_APP/flexran_agent.c
openair2/ENB_APP/flexran_agent_async.c
+17
-7
17 additions, 7 deletions
openair2/ENB_APP/flexran_agent_async.c
with
25 additions
and
8 deletions
openair2/ENB_APP/flexran_agent.c
+
8
−
1
View file @
ec9e70a0
...
@@ -201,6 +201,11 @@ int flexran_agent_start(mid_t mod_id)
...
@@ -201,6 +201,11 @@ int flexran_agent_start(mid_t mod_id)
/*Create the async channel info*/
/*Create the async channel info*/
flexran_agent_async_channel_t
*
channel_info
=
flexran_agent_async_channel_info
(
mod_id
,
in_ip
,
in_port
);
flexran_agent_async_channel_t
*
channel_info
=
flexran_agent_async_channel_info
(
mod_id
,
in_ip
,
in_port
);
if
(
!
channel_info
)
{
LOG_E
(
FLEXRAN_AGENT
,
"could not create channel_info
\n
"
);
exit
(
1
);
}
/*Create a channel using the async channel info*/
/*Create a channel using the async channel info*/
channel_id
=
flexran_agent_create_channel
((
void
*
)
channel_info
,
channel_id
=
flexran_agent_create_channel
((
void
*
)
channel_info
,
flexran_agent_async_msg_send
,
flexran_agent_async_msg_send
,
...
@@ -209,12 +214,14 @@ int flexran_agent_start(mid_t mod_id)
...
@@ -209,12 +214,14 @@ int flexran_agent_start(mid_t mod_id)
if
(
channel_id
<=
0
)
{
if
(
channel_id
<=
0
)
{
LOG_E
(
FLEXRAN_AGENT
,
"could not create channel
\n
"
);
goto
error
;
goto
error
;
}
}
flexran_agent_channel_t
*
channel
=
get_channel
(
channel_id
);
flexran_agent_channel_t
*
channel
=
get_channel
(
channel_id
);
if
(
channel
==
NULL
)
{
if
(
channel
==
NULL
)
{
LOG_E
(
FLEXRAN_AGENT
,
"could not get channel for channel_id %d
\n
"
,
channel_id
);
goto
error
;
goto
error
;
}
}
...
@@ -307,7 +314,7 @@ int flexran_agent_start(mid_t mod_id)
...
@@ -307,7 +314,7 @@ int flexran_agent_start(mid_t mod_id)
return
0
;
return
0
;
error:
error:
LOG_
I
(
FLEXRAN_AGENT
,
"
there was an error
\n
"
);
LOG_
E
(
FLEXRAN_AGENT
,
"%s():
there was an error
\n
"
,
__func__
);
return
1
;
return
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/flexran_agent_async.c
+
17
−
7
View file @
ec9e70a0
...
@@ -36,13 +36,18 @@ flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, c
...
@@ -36,13 +36,18 @@ flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, c
flexran_agent_async_channel_t
*
channel
;
flexran_agent_async_channel_t
*
channel
;
channel
=
(
flexran_agent_async_channel_t
*
)
malloc
(
sizeof
(
flexran_agent_channel_t
));
channel
=
(
flexran_agent_async_channel_t
*
)
malloc
(
sizeof
(
flexran_agent_channel_t
));
if
(
channel
==
NULL
)
if
(
channel
==
NULL
)
{
goto
error
;
LOG_E
(
FLEXRAN_AGENT
,
"could not allocate memory for flexran_agent_async_channel_t
\n
"
);
return
NULL
;
}
channel
->
enb_id
=
mod_id
;
channel
->
enb_id
=
mod_id
;
/*Create a socket*/
/*Create a socket*/
channel
->
link
=
new_link_client
(
dst_ip
,
dst_port
);
channel
->
link
=
new_link_client
(
dst_ip
,
dst_port
);
if
(
channel
->
link
==
NULL
)
goto
error
;
if
(
channel
->
link
==
NULL
)
{
LOG_E
(
FLEXRAN_AGENT
,
"could not create new link client
\n
"
);
goto
error
;
}
LOG_I
(
FLEXRAN_AGENT
,
"starting enb agent client for module id %d on ipv4 %s, port %d
\n
"
,
LOG_I
(
FLEXRAN_AGENT
,
"starting enb agent client for module id %d on ipv4 %s, port %d
\n
"
,
channel
->
enb_id
,
channel
->
enb_id
,
...
@@ -56,12 +61,17 @@ flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, c
...
@@ -56,12 +61,17 @@ flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, c
// channel->send_queue = new_message_queue(500);
// channel->send_queue = new_message_queue(500);
// not using the circular buffer: affects the PDCP split
// not using the circular buffer: affects the PDCP split
channel
->
send_queue
=
new_message_queue
();
channel
->
send_queue
=
new_message_queue
();
if
(
channel
->
send_queue
==
NULL
)
{
if
(
channel
->
send_queue
==
NULL
)
goto
error
;
LOG_E
(
FLEXRAN_AGENT
,
"could not create send_queue
\n
"
);
goto
error
;
}
// not using the circular buffer: affects the PDCP split
// not using the circular buffer: affects the PDCP split
//channel->receive_queue = new_message_queue(500);
//channel->receive_queue = new_message_queue(500);
channel
->
send_queue
=
new_message_queue
();
channel
->
send_queue
=
new_message_queue
();
if
(
channel
->
receive_queue
==
NULL
)
goto
error
;
if
(
channel
->
receive_queue
==
NULL
)
{
LOG_E
(
FLEXRAN_AGENT
,
"could not create send_queue
\n
"
);
goto
error
;
}
/*
/*
* create a link manager
* create a link manager
...
@@ -81,7 +91,7 @@ flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, c
...
@@ -81,7 +91,7 @@ flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, c
return
channel
;
return
channel
;
error:
error:
LOG_I
(
FLEXRAN_AGENT
,
"
there was an error
\n
"
);
LOG_I
(
FLEXRAN_AGENT
,
"%s():
there was an error
\n
"
,
__func__
);
return
NULL
;
return
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