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
73691de7
Commit
73691de7
authored
Feb 08, 2018
by
Nikos Makris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes that were affecting the communication between PDCP and RLC, cleanup
parent
fc43139e
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
84 deletions
+68
-84
openair2/LAYER2/PROTO_AGENT/proto_agent.c
openair2/LAYER2/PROTO_AGENT/proto_agent.c
+46
-47
openair2/LAYER2/PROTO_AGENT/proto_agent_common.c
openair2/LAYER2/PROTO_AGENT/proto_agent_common.c
+10
-21
openair2/UTIL/ASYNC_IF/socket_link.c
openair2/UTIL/ASYNC_IF/socket_link.c
+9
-13
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf
...TS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf
+3
-3
No files found.
openair2/LAYER2/PROTO_AGENT/proto_agent.c
View file @
73691de7
This diff is collapsed.
Click to expand it.
openair2/LAYER2/PROTO_AGENT/proto_agent_common.c
View file @
73691de7
...
@@ -190,7 +190,7 @@ int proto_agent_serialize_message(Protocol__FlexsplitMessage *msg, void **buf, i
...
@@ -190,7 +190,7 @@ int proto_agent_serialize_message(Protocol__FlexsplitMessage *msg, void **buf, i
return
0
;
return
0
;
error:
error:
LOG_E
(
PROTO_AGENT
,
"an error occured
\n
"
);
LOG_E
(
MAC
,
"an error occured
\n
"
);
return
-
1
;
return
-
1
;
}
}
...
@@ -344,7 +344,7 @@ int proto_agent_pdcp_data_req(mid_t mod_id, const void *params, Protocol__Flexsp
...
@@ -344,7 +344,7 @@ int proto_agent_pdcp_data_req(mid_t mod_id, const void *params, Protocol__Flexsp
free
(
data_req
);
free
(
data_req
);
if
(
*
msg
!=
NULL
)
if
(
*
msg
!=
NULL
)
free
(
*
msg
);
free
(
*
msg
);
LOG_E
(
PROTO_AGENT
,
"%s: an error occured
\n
"
,
__FUNCTION__
);
LOG_E
(
MAC
,
"%s: an error occured
\n
"
,
__FUNCTION__
);
return
-
1
;
return
-
1
;
}
}
...
@@ -363,7 +363,7 @@ int proto_agent_destroy_pdcp_data_req(Protocol__FlexsplitMessage *msg) {
...
@@ -363,7 +363,7 @@ int proto_agent_destroy_pdcp_data_req(Protocol__FlexsplitMessage *msg) {
return
0
;
return
0
;
error:
error:
LOG_E
(
PROTO_AGENT
,
"%s: an error occured
\n
"
,
__FUNCTION__
);
LOG_E
(
MAC
,
"%s: an error occured
\n
"
,
__FUNCTION__
);
return
-
1
;
return
-
1
;
}
}
...
@@ -372,10 +372,11 @@ int proto_agent_get_ack_result(mid_t mod_id, const void *params, Protocol__Flexs
...
@@ -372,10 +372,11 @@ int proto_agent_get_ack_result(mid_t mod_id, const void *params, Protocol__Flexs
Protocol__FspHeader
*
header
;
Protocol__FspHeader
*
header
;
xid_t
xid
;
xid_t
xid
;
rlc_op_status_t
result
=
0
;
rlc_op_status_t
result
=
0
;
LOG_D
(
PROTO_AGENT
,
"
handling the data_req_ack message
\n
"
);
//printf("PROTO_AGENT:
handling the data_req_ack message\n");
Protocol__FlexsplitMessage
*
input
=
(
Protocol__FlexsplitMessage
*
)
params
;
Protocol__FlexsplitMessage
*
input
=
(
Protocol__FlexsplitMessage
*
)
params
;
Protocol__FspRlcDataReqAck
*
data_ack
=
input
->
data_req_ack
;
Protocol__FspRlcDataReqAck
*
data_ack
=
input
->
data_req_ack
;
result
=
data_ack
->
result
;
result
=
data_ack
->
result
;
//printf("PROTO_AGENT: ACK RESULT IS %u\n", result);
ack_result
=
result
;
ack_result
=
result
;
return
0
;
return
0
;
...
@@ -485,7 +486,7 @@ int proto_agent_destroy_pdcp_data_req_ack(Protocol__FlexsplitMessage *msg) {
...
@@ -485,7 +486,7 @@ int proto_agent_destroy_pdcp_data_req_ack(Protocol__FlexsplitMessage *msg) {
return
0
;
return
0
;
error:
error:
LOG_E
(
PROTO_AGENT
,
"%s: an error occured
\n
"
,
__FUNCTION__
);
LOG_E
(
MAC
,
"%s: an error occured
\n
"
,
__FUNCTION__
);
return
-
1
;
return
-
1
;
}
}
...
@@ -500,7 +501,7 @@ int proto_agent_destroy_pdcp_data_ind(Protocol__FlexsplitMessage *msg) {
...
@@ -500,7 +501,7 @@ int proto_agent_destroy_pdcp_data_ind(Protocol__FlexsplitMessage *msg) {
return
0
;
return
0
;
error:
error:
LOG_E
(
PROTO_AGENT
,
"%s: an error occured
\n
"
,
__FUNCTION__
);
LOG_E
(
MAC
,
"%s: an error occured
\n
"
,
__FUNCTION__
);
return
-
1
;
return
-
1
;
}
}
...
@@ -611,7 +612,7 @@ int proto_agent_pdcp_data_ind(mid_t mod_id, const void *params, Protocol__Flexsp
...
@@ -611,7 +612,7 @@ int proto_agent_pdcp_data_ind(mid_t mod_id, const void *params, Protocol__Flexsp
free
(
data_ind
);
free
(
data_ind
);
if
(
*
msg
!=
NULL
)
if
(
*
msg
!=
NULL
)
free
(
*
msg
);
free
(
*
msg
);
LOG_E
(
PROTO_AGENT
,
"%s: an error occured
\n
"
,
__FUNCTION__
);
LOG_E
(
MAC
,
"%s: an error occured
\n
"
,
__FUNCTION__
);
return
-
1
;
return
-
1
;
}
}
...
@@ -623,7 +624,7 @@ int proto_agent_pdcp_data_ind_ack(mid_t mod_id, const void *params, Protocol__Fl
...
@@ -623,7 +624,7 @@ int proto_agent_pdcp_data_ind_ack(mid_t mod_id, const void *params, Protocol__Fl
xid_t
xid
;
xid_t
xid
;
rlc_op_status_t
result
=
0
;
rlc_op_status_t
result
=
0
;
LOG_I
(
PROTO_AGENT
,
"
creating the data_ind_ack message
\n
"
);
//printf("PROTO_AGENT:
creating the data_ind_ack message\n");
Protocol__FlexsplitMessage
*
input
=
(
Protocol__FlexsplitMessage
*
)
params
;
Protocol__FlexsplitMessage
*
input
=
(
Protocol__FlexsplitMessage
*
)
params
;
Protocol__FspPdcpDataInd
*
data_ind
=
input
->
data_ind_msg
;
Protocol__FspPdcpDataInd
*
data_ind
=
input
->
data_ind_msg
;
...
@@ -696,18 +697,6 @@ int proto_agent_pdcp_data_ind_ack(mid_t mod_id, const void *params, Protocol__Fl
...
@@ -696,18 +697,6 @@ int proto_agent_pdcp_data_ind_ack(mid_t mod_id, const void *params, Protocol__Fl
(
*
msg
)
->
has_msg_dir
=
1
;
(
*
msg
)
->
has_msg_dir
=
1
;
(
*
msg
)
->
data_req_ack
=
ack
;
(
*
msg
)
->
data_req_ack
=
ack
;
//pdcp_control_plane_data_pdu_header* pdcp_header = (pdcp_control_plane_data_pdu_header*) pdcp_pdu_p;
// int sequence_number = pdcp_get_sequence_number_of_pdu_with_long_sn((unsigned char*)pdcp_pdu_p);
// LOG_I(PROTO_AGENT,"RECEIVED DATA IND WITH SEQ NO %d\n", sequence_number);
return
0
;
return
0
;
error:
error:
...
@@ -736,7 +725,7 @@ int proto_agent_destroy_pdcp_data_ind_ack(Protocol__FlexsplitMessage *msg) {
...
@@ -736,7 +725,7 @@ int proto_agent_destroy_pdcp_data_ind_ack(Protocol__FlexsplitMessage *msg) {
return
0
;
return
0
;
error:
error:
LOG_E
(
PROTO_AGENT
,
"%s: an error occured
\n
"
,
__FUNCTION__
);
LOG_E
(
MAC
,
"%s: an error occured
\n
"
,
__FUNCTION__
);
return
-
1
;
return
-
1
;
}
}
...
...
openair2/UTIL/ASYNC_IF/socket_link.c
View file @
73691de7
...
@@ -61,7 +61,7 @@ socket_link_t *new_link_server(int port)
...
@@ -61,7 +61,7 @@ socket_link_t *new_link_server(int port)
ret
->
socket_fd
=
-
1
;
ret
->
socket_fd
=
-
1
;
printf
(
"MAC create a new link server socket at port %d
\n
"
,
port
);
//
printf("MAC create a new link server socket at port %d\n", port);
socket_server
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
socket_server
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
if
(
socket_server
==
-
1
)
{
if
(
socket_server
==
-
1
)
{
...
@@ -103,9 +103,7 @@ socket_link_t *new_link_server(int port)
...
@@ -103,9 +103,7 @@ socket_link_t *new_link_server(int port)
goto
error
;
goto
error
;
}
}
close
(
socket_server
);
//printf("MAC connection from %s:%d\n", inet_ntoa(addr.sin_addr), ntohs(addr.sin_port));
printf
(
"MAC connection from %s:%d
\n
"
,
inet_ntoa
(
addr
.
sin_addr
),
ntohs
(
addr
.
sin_port
));
return
ret
;
return
ret
;
error:
error:
...
@@ -180,7 +178,7 @@ socket_link_t *new_link_udp_server(int port){
...
@@ -180,7 +178,7 @@ socket_link_t *new_link_udp_server(int port){
}
}
ret
->
socket_fd
=
-
1
;
ret
->
socket_fd
=
-
1
;
LOG_I
(
PROTO_AGENT
,
"
create a new udp link server socket at port %d
\n
"
,
port
);
//printf("PROTO_AGENT:
create a new udp link server socket at port %d\n", port);
//create a UDP socket
//create a UDP socket
if
((
socket_server
=
socket
(
AF_INET
,
SOCK_DGRAM
,
IPPROTO_UDP
))
==
-
1
)
{
if
((
socket_server
=
socket
(
AF_INET
,
SOCK_DGRAM
,
IPPROTO_UDP
))
==
-
1
)
{
...
@@ -206,7 +204,7 @@ error:
...
@@ -206,7 +204,7 @@ error:
close
(
socket_server
);
close
(
socket_server
);
if
(
ret
!=
NULL
)
close
(
ret
->
socket_fd
);
if
(
ret
!=
NULL
)
close
(
ret
->
socket_fd
);
free
(
ret
);
free
(
ret
);
LOG_E
(
PROTO_AGENT
,
"
ERROR in new_link_udp_server (see above), returning NULL
\n
"
);
//printf("\n\n\nERROR PROTO_AGENT:
ERROR in new_link_udp_server (see above), returning NULL\n");
return
NULL
;
return
NULL
;
}
}
...
@@ -307,7 +305,7 @@ error:
...
@@ -307,7 +305,7 @@ error:
close
(
listenSock
);
close
(
listenSock
);
if
(
ret
!=
NULL
)
close
(
ret
->
socket_fd
);
if
(
ret
!=
NULL
)
close
(
ret
->
socket_fd
);
free
(
ret
);
free
(
ret
);
LOG_E
(
PROTO_AGENT
,
"ERROR in new_link_sctp_server (see above), returning NULL
\n
"
);
LOG_E
(
MAC
,
"ERROR in new_link_sctp_server (see above), returning NULL
\n
"
);
return
NULL
;
return
NULL
;
}
}
...
@@ -336,9 +334,9 @@ socket_link_t *new_link_sctp_client(char *server, int port)
...
@@ -336,9 +334,9 @@ socket_link_t *new_link_sctp_client(char *server, int port)
bzero
((
void
*
)
&
servaddr
,
sizeof
(
servaddr
));
bzero
((
void
*
)
&
servaddr
,
sizeof
(
servaddr
));
servaddr
.
sin_family
=
AF_INET
;
servaddr
.
sin_family
=
AF_INET
;
servaddr
.
sin_port
=
htons
(
port
);
servaddr
.
sin_port
=
htons
(
port
);
LOG_E
(
PROTO_AGENT
,
"invalid IP address '%s', use a.b.c.d notation
\n
"
,
server
);
if
(
inet_aton
(
server
,
&
servaddr
.
sin_addr
)
==
0
)
{
if
(
inet_aton
(
server
,
&
servaddr
.
sin_addr
)
==
0
)
{
LOG_E
(
PROTO_AGENT
,
"invalid IP address '%s', use a.b.c.d notation
\n
"
,
server
);
LOG_E
(
MAC
,
"invalid IP address '%s', use a.b.c.d notation
\n
"
,
server
);
goto
error
;
goto
error
;
}
}
...
@@ -385,14 +383,14 @@ static int socket_udp_send(int socket_fd, void *buf, int size, char *peer_addr,
...
@@ -385,14 +383,14 @@ static int socket_udp_send(int socket_fd, void *buf, int size, char *peer_addr,
while
(
size
)
{
while
(
size
)
{
l
=
sendto
(
my_socket
,
s
,
size
,
0
,
(
struct
sockaddr
*
)
&
si_other
,
slen
);
l
=
sendto
(
my_socket
,
s
,
size
,
0
,
(
struct
sockaddr
*
)
&
si_other
,
slen
);
if
(
l
==
-
1
)
goto
error
;
if
(
l
==
-
1
)
goto
error
;
if
(
l
==
0
)
{
LOG_E
(
PROTO_AGENT
,
"
%s:%d: this cannot happen, normally...
\n
"
,
__FILE__
,
__LINE__
);
abort
();
}
if
(
l
==
0
)
{
printf
(
"
\n\n\n
ERROR PROTO_AGENT:
%s:%d: this cannot happen, normally...
\n
"
,
__FILE__
,
__LINE__
);
abort
();
}
size
-=
l
;
size
-=
l
;
s
+=
l
;
s
+=
l
;
}
}
return
0
;
return
0
;
error:
error:
LOG_E
(
PROTO_AGENT
,
"socket_udp_send: ERROR: %s
\n
"
,
strerror
(
errno
));
LOG_E
(
MAC
,
"socket_udp_send: ERROR: %s
\n
"
,
strerror
(
errno
));
return
-
1
;
return
-
1
;
}
}
...
@@ -541,8 +539,6 @@ int link_receive_packet(socket_link_t *link, void **ret_data, int *ret_size, uin
...
@@ -541,8 +539,6 @@ int link_receive_packet(socket_link_t *link, void **ret_data, int *ret_size, uin
int
peer_port
=
0
;
int
peer_port
=
0
;
/* received the size first, maximum is 2^31 bytes */
/* received the size first, maximum is 2^31 bytes */
if
(
socket_receive
(
link
->
socket_fd
,
sizebuf
,
4
)
==
-
1
)
goto
error
;
if
((
proto_type
==
0
)
||
(
proto_type
==
2
))
if
((
proto_type
==
0
)
||
(
proto_type
==
2
))
{
{
if
(
socket_receive
(
link
->
socket_fd
,
sizebuf
,
4
)
==
-
1
)
if
(
socket_receive
(
link
->
socket_fd
,
sizebuf
,
4
)
==
-
1
)
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf
View file @
73691de7
...
@@ -140,7 +140,7 @@ eNBs =
...
@@ -140,7 +140,7 @@ eNBs =
//////////
MME
parameters
:
//////////
MME
parameters
:
mme_ip_address
= ( {
ipv4
=
"10.64.93.
26
"
;
mme_ip_address
= ( {
ipv4
=
"10.64.93.
19
"
;
ipv6
=
"192:168:30::17"
;
ipv6
=
"192:168:30::17"
;
active
=
"yes"
;
active
=
"yes"
;
preference
=
"ipv4"
;
preference
=
"ipv4"
;
...
@@ -164,7 +164,7 @@ DU = (
...
@@ -164,7 +164,7 @@ DU = (
{
{
DU_INTERFACE_NAME_FOR_F1U
=
"lo"
;
DU_INTERFACE_NAME_FOR_F1U
=
"lo"
;
DU_IPV4_ADDRESS_FOR_F1U
=
"127.0.0.1/16"
;
DU_IPV4_ADDRESS_FOR_F1U
=
"127.0.0.1/16"
;
DU_PORT_FOR_F1U
=
2210
;
DU_PORT_FOR_F1U
=
2210
0
;
F1_U_DU_TRANSPORT_TYPE
=
"TCP"
;
F1_U_DU_TRANSPORT_TYPE
=
"TCP"
;
}
}
);
);
...
@@ -173,7 +173,7 @@ CU = (
...
@@ -173,7 +173,7 @@ CU = (
{
{
CU_INTERFACE_NAME_FOR_F1U
=
"lo"
;
CU_INTERFACE_NAME_FOR_F1U
=
"lo"
;
CU_IPV4_ADDRESS_FOR_F1U
=
"127.0.0.1"
; //
Address
to
search
the
DU
CU_IPV4_ADDRESS_FOR_F1U
=
"127.0.0.1"
; //
Address
to
search
the
DU
CU_PORT_FOR_F1U
=
2210
;
CU_PORT_FOR_F1U
=
2210
0
;
F1_U_CU_TRANSPORT_TYPE
=
"TCP"
; //
One
of
TCP
/
UDP
/
SCTP
F1_U_CU_TRANSPORT_TYPE
=
"TCP"
; //
One
of
TCP
/
UDP
/
SCTP
DU_TYPE
=
"LTE"
;
DU_TYPE
=
"LTE"
;
}//,
}//,
...
...
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