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
alex037yang
OpenXG-RAN
Commits
eb269754
Commit
eb269754
authored
Feb 19, 2019
by
frtabu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
attempt to fix l2 simulator issue
parent
3f61d5f7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
113 additions
and
172 deletions
+113
-172
openair1/SIMULATION/ETH_TRANSPORT/netlink_init.c
openair1/SIMULATION/ETH_TRANSPORT/netlink_init.c
+50
-47
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+18
-52
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
+26
-50
openair2/LAYER2/RLC/rlc.c
openair2/LAYER2/RLC/rlc.c
+6
-16
openair3/NAS/UE/ESM/esm_ebr_context.c
openair3/NAS/UE/ESM/esm_ebr_context.c
+12
-6
targets/RT/USER/lte-uesoftmodem.c
targets/RT/USER/lte-uesoftmodem.c
+1
-1
No files found.
openair1/SIMULATION/ETH_TRANSPORT/netlink_init.c
View file @
eb269754
...
@@ -56,7 +56,7 @@ struct nlmsghdr *nas_nlh_rx = NULL;
...
@@ -56,7 +56,7 @@ struct nlmsghdr *nas_nlh_rx = NULL;
struct
iovec
nas_iov_tx
;
struct
iovec
nas_iov_tx
;
struct
iovec
nas_iov_rx
=
{
nl_rx_buf
,
sizeof
(
nl_rx_buf
)};
struct
iovec
nas_iov_rx
=
{
nl_rx_buf
,
sizeof
(
nl_rx_buf
)};
int
nas_sock_fd
;
int
nas_sock_fd
[
MAX_MOBILES_PER_ENB
]
;
struct
msghdr
nas_msg_tx
;
struct
msghdr
nas_msg_tx
;
struct
msghdr
nas_msg_rx
;
struct
msghdr
nas_msg_rx
;
...
@@ -96,72 +96,75 @@ static int tun_alloc(char *dev) {
...
@@ -96,72 +96,75 @@ static int tun_alloc(char *dev) {
int
netlink_init_tun
(
void
)
{
int
netlink_init_tun
(
void
)
{
int
ret
;
int
ret
;
char
ifname
[
64
];
char
ifname
[
64
];
sprintf
(
ifname
,
"oip1"
);
nas_sock_fd
=
tun_alloc
(
ifname
);
if
(
nas_sock_fd
==
-
1
)
{
for
(
int
i
=
0
;
i
<
NUMBER_OF_UE_MAX
;
i
++
)
{
printf
(
"[NETLINK] Error opening socket %d (%d:%s)
\n
"
,
nas_sock_fd
,
errno
,
strerror
(
errno
));
sprintf
(
ifname
,
"oaitun_ue%d"
,
i
+
1
);
exit
(
1
);
nas_sock_fd
[
i
]
=
tun_alloc
(
ifname
);
}
printf
(
"[NETLINK]Opened socket with fd %d
\n
"
,
nas_sock_fd
);
if
(
nas_sock_fd
[
i
]
==
-
1
)
{
ret
=
fcntl
(
nas_sock_fd
,
F_SETFL
,
O_NONBLOCK
);
printf
(
"[NETLINK] Error opening socket %s (%d:%s)
\n
"
,
ifname
,
errno
,
strerror
(
errno
));
exit
(
1
);
}
if
(
ret
==
-
1
)
{
printf
(
"[NETLINK]Opened socket %s with fd %d
\n
"
,
ifname
,
nas_sock_fd
[
i
]);
printf
(
"[NETLINK] Error fcntl (%d:%s)
\n
"
,
errno
,
strerror
(
errno
)
);
ret
=
fcntl
(
nas_sock_fd
[
i
],
F_SETFL
,
O_NONBLOCK
);
if
(
LINK_ENB_PDCP_TO_IP_DRIVER
)
{
if
(
ret
==
-
1
)
{
exit
(
1
);
printf
(
"[NETLINK] Error fcntl (%d:%s)
\n
"
,
errno
,
strerror
(
errno
));
if
(
LINK_ENB_PDCP_TO_IP_DRIVER
)
{
exit
(
1
);
}
}
}
}
memset
(
&
nas_src_addr
,
0
,
sizeof
(
nas_src_addr
));
memset
(
&
nas_src_addr
,
0
,
sizeof
(
nas_src_addr
));
nas_src_addr
.
nl_family
=
AF_NETLINK
;
nas_src_addr
.
nl_family
=
AF_NETLINK
;
nas_src_addr
.
nl_pid
=
1
;
//getpid(); /* self pid */
nas_src_addr
.
nl_pid
=
1
;
//getpid(); /* self pid */
nas_src_addr
.
nl_groups
=
0
;
/* not in mcast groups */
nas_src_addr
.
nl_groups
=
0
;
/* not in mcast groups */
ret
=
bind
(
nas_sock_fd
,
(
struct
sockaddr
*
)
&
nas_src_addr
,
sizeof
(
nas_src_addr
));
ret
=
bind
(
nas_sock_fd
[
i
]
,
(
struct
sockaddr
*
)
&
nas_src_addr
,
sizeof
(
nas_src_addr
));
memset
(
&
nas_dest_addr
,
0
,
sizeof
(
nas_dest_addr
));
memset
(
&
nas_dest_addr
,
0
,
sizeof
(
nas_dest_addr
));
nas_dest_addr
.
nl_family
=
AF_NETLINK
;
nas_dest_addr
.
nl_family
=
AF_NETLINK
;
nas_dest_addr
.
nl_pid
=
0
;
/* For Linux Kernel */
nas_dest_addr
.
nl_pid
=
0
;
/* For Linux Kernel */
nas_dest_addr
.
nl_groups
=
0
;
/* unicast */
nas_dest_addr
.
nl_groups
=
0
;
/* unicast */
// TX PART
// TX PART
nas_nlh_tx
=
(
struct
nlmsghdr
*
)
malloc
(
NLMSG_SPACE
(
NL_MAX_PAYLOAD
));
nas_nlh_tx
=
(
struct
nlmsghdr
*
)
malloc
(
NLMSG_SPACE
(
NL_MAX_PAYLOAD
));
memset
(
nas_nlh_tx
,
0
,
NLMSG_SPACE
(
NL_MAX_PAYLOAD
));
memset
(
nas_nlh_tx
,
0
,
NLMSG_SPACE
(
NL_MAX_PAYLOAD
));
/* Fill the netlink message header */
/* Fill the netlink message header */
nas_nlh_tx
->
nlmsg_len
=
NLMSG_SPACE
(
NL_MAX_PAYLOAD
);
nas_nlh_tx
->
nlmsg_len
=
NLMSG_SPACE
(
NL_MAX_PAYLOAD
);
nas_nlh_tx
->
nlmsg_pid
=
1
;
//getpid(); /* self pid */
nas_nlh_tx
->
nlmsg_pid
=
1
;
//getpid(); /* self pid */
nas_nlh_tx
->
nlmsg_flags
=
0
;
nas_nlh_tx
->
nlmsg_flags
=
0
;
nas_iov_tx
.
iov_base
=
(
void
*
)
nas_nlh_tx
;
nas_iov_tx
.
iov_base
=
(
void
*
)
nas_nlh_tx
;
nas_iov_tx
.
iov_len
=
nas_nlh_tx
->
nlmsg_len
;
nas_iov_tx
.
iov_len
=
nas_nlh_tx
->
nlmsg_len
;
memset
(
&
nas_msg_tx
,
0
,
sizeof
(
nas_msg_tx
));
memset
(
&
nas_msg_tx
,
0
,
sizeof
(
nas_msg_tx
));
nas_msg_tx
.
msg_name
=
(
void
*
)
&
nas_dest_addr
;
nas_msg_tx
.
msg_name
=
(
void
*
)
&
nas_dest_addr
;
nas_msg_tx
.
msg_namelen
=
sizeof
(
nas_dest_addr
);
nas_msg_tx
.
msg_namelen
=
sizeof
(
nas_dest_addr
);
nas_msg_tx
.
msg_iov
=
&
nas_iov_tx
;
nas_msg_tx
.
msg_iov
=
&
nas_iov_tx
;
nas_msg_tx
.
msg_iovlen
=
1
;
nas_msg_tx
.
msg_iovlen
=
1
;
// RX PART
// RX PART
memset
(
&
nas_msg_rx
,
0
,
sizeof
(
nas_msg_rx
));
memset
(
&
nas_msg_rx
,
0
,
sizeof
(
nas_msg_rx
));
nas_msg_rx
.
msg_name
=
(
void
*
)
&
nas_src_addr
;
nas_msg_rx
.
msg_name
=
(
void
*
)
&
nas_src_addr
;
nas_msg_rx
.
msg_namelen
=
sizeof
(
nas_src_addr
);
nas_msg_rx
.
msg_namelen
=
sizeof
(
nas_src_addr
);
nas_msg_rx
.
msg_iov
=
&
nas_iov_rx
;
nas_msg_rx
.
msg_iov
=
&
nas_iov_rx
;
nas_msg_rx
.
msg_iovlen
=
1
;
nas_msg_rx
.
msg_iovlen
=
1
;
}
/* for */
return
1
;
return
1
;
}
}
int
netlink_init
(
void
)
{
int
netlink_init
(
void
)
{
int
ret
;
int
ret
;
nas_sock_fd
=
socket
(
PF_NETLINK
,
SOCK_RAW
,
GRAAL_NETLINK_ID
);
nas_sock_fd
[
0
]
=
socket
(
PF_NETLINK
,
SOCK_RAW
,
GRAAL_NETLINK_ID
);
if
(
nas_sock_fd
==
-
1
)
{
if
(
nas_sock_fd
[
0
]
==
-
1
)
{
printf
(
"[NETLINK] Error opening socket %d (%d:%s)
\n
"
,
nas_sock_fd
,
errno
,
strerror
(
errno
));
printf
(
"[NETLINK] Error opening socket %d (%d:%s)
\n
"
,
nas_sock_fd
[
0
]
,
errno
,
strerror
(
errno
));
if
(
LINK_ENB_PDCP_TO_IP_DRIVER
)
{
if
(
LINK_ENB_PDCP_TO_IP_DRIVER
)
{
exit
(
1
);
exit
(
1
);
}
}
}
}
printf
(
"[NETLINK]Opened socket with fd %d
\n
"
,
nas_sock_fd
);
printf
(
"[NETLINK]Opened socket with fd %d
\n
"
,
nas_sock_fd
[
0
]
);
ret
=
fcntl
(
nas_sock_fd
,
F_SETFL
,
O_NONBLOCK
);
ret
=
fcntl
(
nas_sock_fd
[
0
]
,
F_SETFL
,
O_NONBLOCK
);
if
(
ret
==
-
1
)
{
if
(
ret
==
-
1
)
{
printf
(
"[NETLINK] Error fcntl (%d:%s)
\n
"
,
errno
,
strerror
(
errno
));
printf
(
"[NETLINK] Error fcntl (%d:%s)
\n
"
,
errno
,
strerror
(
errno
));
...
@@ -175,7 +178,7 @@ int netlink_init(void) {
...
@@ -175,7 +178,7 @@ int netlink_init(void) {
nas_src_addr
.
nl_family
=
AF_NETLINK
;
nas_src_addr
.
nl_family
=
AF_NETLINK
;
nas_src_addr
.
nl_pid
=
1
;
//getpid(); /* self pid */
nas_src_addr
.
nl_pid
=
1
;
//getpid(); /* self pid */
nas_src_addr
.
nl_groups
=
0
;
/* not in mcast groups */
nas_src_addr
.
nl_groups
=
0
;
/* not in mcast groups */
ret
=
bind
(
nas_sock_fd
,
(
struct
sockaddr
*
)
&
nas_src_addr
,
sizeof
(
nas_src_addr
));
ret
=
bind
(
nas_sock_fd
[
0
]
,
(
struct
sockaddr
*
)
&
nas_src_addr
,
sizeof
(
nas_src_addr
));
memset
(
&
nas_dest_addr
,
0
,
sizeof
(
nas_dest_addr
));
memset
(
&
nas_dest_addr
,
0
,
sizeof
(
nas_dest_addr
));
nas_dest_addr
.
nl_family
=
AF_NETLINK
;
nas_dest_addr
.
nl_family
=
AF_NETLINK
;
nas_dest_addr
.
nl_pid
=
0
;
/* For Linux Kernel */
nas_dest_addr
.
nl_pid
=
0
;
/* For Linux Kernel */
...
@@ -200,6 +203,6 @@ int netlink_init(void) {
...
@@ -200,6 +203,6 @@ int netlink_init(void) {
nas_msg_rx
.
msg_namelen
=
sizeof
(
nas_src_addr
);
nas_msg_rx
.
msg_namelen
=
sizeof
(
nas_src_addr
);
nas_msg_rx
.
msg_iov
=
&
nas_iov_rx
;
nas_msg_rx
.
msg_iov
=
&
nas_iov_rx
;
nas_msg_rx
.
msg_iovlen
=
1
;
nas_msg_rx
.
msg_iovlen
=
1
;
return
(
nas_sock_fd
);
return
(
nas_sock_fd
[
0
]
);
}
}
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
View file @
eb269754
...
@@ -100,11 +100,9 @@ boolean_t pdcp_data_req(
...
@@ -100,11 +100,9 @@ boolean_t pdcp_data_req(
const
confirm_t
confirmP
,
const
confirm_t
confirmP
,
const
sdu_size_t
sdu_buffer_sizeP
,
const
sdu_size_t
sdu_buffer_sizeP
,
unsigned
char
*
const
sdu_buffer_pP
,
unsigned
char
*
const
sdu_buffer_pP
,
const
pdcp_transmission_mode_t
modeP
const
pdcp_transmission_mode_t
modeP
,
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
const
uint32_t
*
const
sourceL2Id
,
,
const
uint32_t
*
const
sourceL2Id
const
uint32_t
*
const
destinationL2Id
,
const
uint32_t
*
const
destinationL2Id
#endif
)
)
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
{
{
...
@@ -189,19 +187,12 @@ boolean_t pdcp_data_req(
...
@@ -189,19 +187,12 @@ boolean_t pdcp_data_req(
LOG_UI
(
PDCP
,
"Before rlc_data_req 1, srb_flagP: %d, rb_idP: %d
\n
"
,
srb_flagP
,
rb_idP
);
LOG_UI
(
PDCP
,
"Before rlc_data_req 1, srb_flagP: %d, rb_idP: %d
\n
"
,
srb_flagP
,
rb_idP
);
}
}
rlc_status
=
rlc_data_req
(
ctxt_pP
,
srb_flagP
,
MBMS_FLAG_YES
,
rb_idP
,
muiP
,
confirmP
,
sdu_buffer_sizeP
,
pdcp_pdu_p
rlc_status
=
rlc_data_req
(
ctxt_pP
,
srb_flagP
,
MBMS_FLAG_YES
,
rb_idP
,
muiP
,
confirmP
,
sdu_buffer_sizeP
,
pdcp_pdu_p
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
NULL
,
NULL
,
NULL
,
NULL
#endif
);
);
}
else
{
}
else
{
rlc_status
=
RLC_OP_STATUS_OUT_OF_RESSOURCES
;
rlc_status
=
RLC_OP_STATUS_OUT_OF_RESSOURCES
;
LOG_
W
(
PDCP
,
PROTOCOL_CTXT_FMT
" PDCP_DATA_REQ SDU DROPPED, OUT OF MEMORY
\n
"
,
LOG_
E
(
PDCP
,
PROTOCOL_CTXT_FMT
" PDCP_DATA_REQ SDU DROPPED, OUT OF MEMORY
\n
"
,
PROTOCOL_CTXT_ARGS
(
ctxt_pP
));
PROTOCOL_CTXT_ARGS
(
ctxt_pP
));
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
AssertFatal
(
0
,
PROTOCOL_CTXT_FMT
"[RB %u] PDCP_DATA_REQ SDU DROPPED, OUT OF MEMORY
\n
"
,
PROTOCOL_CTXT_ARGS
(
ctxt_pP
),
rb_idP
);
#endif
}
}
}
else
{
}
else
{
// calculate the pdcp header and trailer size
// calculate the pdcp header and trailer size
...
@@ -344,14 +335,11 @@ boolean_t pdcp_data_req(
...
@@ -344,14 +335,11 @@ boolean_t pdcp_data_req(
stop_meas
(
&
UE_pdcp_stats
[
ctxt_pP
->
module_id
].
data_req
);
stop_meas
(
&
UE_pdcp_stats
[
ctxt_pP
->
module_id
].
data_req
);
}
}
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
LOG_E
(
PDCP
,
"[FRAME %5u][%s][PDCP][MOD %u][RB %u] PDCP_DATA_REQ SDU DROPPED, OUT OF MEMORY
\n
"
,
AssertFatal
(
0
,
"[FRAME %5u][%s][PDCP][MOD %u/%u][RB %u] PDCP_DATA_REQ SDU DROPPED, OUT OF MEMORY
\n
"
,
ctxt_pP
->
frame
,
ctxt_pP
->
frame
,
(
ctxt_pP
->
enb_flag
)
?
"eNB"
:
"UE"
,
(
ctxt_pP
->
enb_flag
)
?
"eNB"
:
"UE"
,
ctxt_pP
->
enb_module_id
,
ctxt_pP
->
module_id
,
ctxt_pP
->
ue_module_id
,
rb_idP
);
rb_idP
);
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ
,
VCD_FUNCTION_OUT
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ
,
VCD_FUNCTION_OUT
);
return
FALSE
;
return
FALSE
;
}
}
...
@@ -364,10 +352,8 @@ boolean_t pdcp_data_req(
...
@@ -364,10 +352,8 @@ boolean_t pdcp_data_req(
"[MSG] PDCP DL %s PDU on rb_id %d
\n
"
,(
srb_flagP
)
?
"CONTROL"
:
"DATA"
,
rb_idP
);
"[MSG] PDCP DL %s PDU on rb_id %d
\n
"
,(
srb_flagP
)
?
"CONTROL"
:
"DATA"
,
rb_idP
);
LOG_D
(
PDCP
,
"Before rlc_data_req 2, srb_flagP: %d, rb_idP: %d
\n
"
,
srb_flagP
,
rb_idP
);
LOG_D
(
PDCP
,
"Before rlc_data_req 2, srb_flagP: %d, rb_idP: %d
\n
"
,
srb_flagP
,
rb_idP
);
rlc_status
=
rlc_data_req
(
ctxt_pP
,
srb_flagP
,
MBMS_FLAG_NO
,
rb_idP
,
muiP
,
confirmP
,
pdcp_pdu_size
,
pdcp_pdu_p
rlc_status
=
rlc_data_req
(
ctxt_pP
,
srb_flagP
,
MBMS_FLAG_NO
,
rb_idP
,
muiP
,
confirmP
,
pdcp_pdu_size
,
pdcp_pdu_p
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
sourceL2Id
,
sourceL2Id
,
destinationL2Id
,
destinationL2Id
#endif
);
);
}
}
...
@@ -832,19 +818,15 @@ pdcp_data_ind(
...
@@ -832,19 +818,15 @@ pdcp_data_ind(
Pdcp_stats_rx_bytes_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
+=
(
sdu_buffer_sizeP
-
payload_offset
);
Pdcp_stats_rx_bytes_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
+=
(
sdu_buffer_sizeP
-
payload_offset
);
Pdcp_stats_rx_sn
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
=
sequence_number
;
Pdcp_stats_rx_sn
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
=
sequence_number
;
if
(
oo_flag
==
1
)
if
(
oo_flag
==
1
)
{
Pdcp_stats_rx_outoforder
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
++
;
Pdcp_stats_rx_outoforder
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
++
;
}
else
{
LOG_E
(
PDCP
,
PROTOCOL_PDCP_CTXT_FMT
" PDCP_DATA_IND SDU DROPPED, OUT OF ORDER
\n
"
,
PROTOCOL_PDCP_CTXT_ARGS
(
ctxt_pP
,
pdcp_p
));
}
Pdcp_stats_rx_aiat
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
+=
(
pdcp_enb
[
ctxt_pP
->
module_id
].
sfn
-
Pdcp_stats_rx_iat
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]);
Pdcp_stats_rx_aiat
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
+=
(
pdcp_enb
[
ctxt_pP
->
module_id
].
sfn
-
Pdcp_stats_rx_iat
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]);
Pdcp_stats_rx_aiat_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
+=
(
pdcp_enb
[
ctxt_pP
->
module_id
].
sfn
-
Pdcp_stats_rx_iat
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]);
Pdcp_stats_rx_aiat_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
+=
(
pdcp_enb
[
ctxt_pP
->
module_id
].
sfn
-
Pdcp_stats_rx_iat
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]);
Pdcp_stats_rx_iat
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
=
pdcp_enb
[
ctxt_pP
->
module_id
].
sfn
;
Pdcp_stats_rx_iat
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
=
pdcp_enb
[
ctxt_pP
->
module_id
].
sfn
;
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
else
{
AssertFatal
(
0
,
PROTOCOL_PDCP_CTXT_FMT
" PDCP_DATA_IND SDU DROPPED, OUT OF MEMORY
\n
"
,
PROTOCOL_PDCP_CTXT_ARGS
(
ctxt_pP
,
pdcp_p
));
}
#endif
}
}
free_mem_block
(
sdu_buffer_pP
,
__func__
);
free_mem_block
(
sdu_buffer_pP
,
__func__
);
...
@@ -962,10 +944,8 @@ pdcp_run (
...
@@ -962,10 +944,8 @@ pdcp_run (
RRC_DCCH_DATA_REQ
(
msg_p
).
confirmp
,
RRC_DCCH_DATA_REQ
(
msg_p
).
confirmp
,
RRC_DCCH_DATA_REQ
(
msg_p
).
sdu_size
,
RRC_DCCH_DATA_REQ
(
msg_p
).
sdu_size
,
RRC_DCCH_DATA_REQ
(
msg_p
).
sdu_p
,
RRC_DCCH_DATA_REQ
(
msg_p
).
sdu_p
,
RRC_DCCH_DATA_REQ
(
msg_p
).
mode
RRC_DCCH_DATA_REQ
(
msg_p
).
mode
,
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
NULL
,
NULL
,
NULL
,
NULL
#endif
);
);
if
(
result
!=
TRUE
)
if
(
result
!=
TRUE
)
...
@@ -1117,11 +1097,9 @@ rrc_pdcp_config_asn1_req (
...
@@ -1117,11 +1097,9 @@ rrc_pdcp_config_asn1_req (
const
uint8_t
security_modeP
,
const
uint8_t
security_modeP
,
uint8_t
*
const
kRRCenc_pP
,
uint8_t
*
const
kRRCenc_pP
,
uint8_t
*
const
kRRCint_pP
,
uint8_t
*
const
kRRCint_pP
,
uint8_t
*
const
kUPenc_pP
uint8_t
*
const
kUPenc_pP
,
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
LTE_PMCH_InfoList_r9_t
*
const
pmch_InfoList_r9_pP
,
,
LTE_PMCH_InfoList_r9_t
*
const
pmch_InfoList_r9_pP
rb_id_t
*
const
defaultDRB
#endif
,
rb_id_t
*
const
defaultDRB
)
)
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
{
{
...
@@ -1144,11 +1122,10 @@ rrc_pdcp_config_asn1_req (
...
@@ -1144,11 +1122,10 @@ rrc_pdcp_config_asn1_req (
hashtable_rc_t
h_rc
;
hashtable_rc_t
h_rc
;
hash_key_t
key_defaultDRB
=
HASHTABLE_NOT_A_KEY_VALUE
;
hash_key_t
key_defaultDRB
=
HASHTABLE_NOT_A_KEY_VALUE
;
hashtable_rc_t
h_defaultDRB_rc
;
hashtable_rc_t
h_defaultDRB_rc
;
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
int
i
,
j
;
int
i
,
j
;
LTE_MBMS_SessionInfoList_r9_t
*
mbms_SessionInfoList_r9_p
=
NULL
;
LTE_MBMS_SessionInfoList_r9_t
*
mbms_SessionInfoList_r9_p
=
NULL
;
LTE_MBMS_SessionInfo_r9_t
*
MBMS_SessionInfo_p
=
NULL
;
LTE_MBMS_SessionInfo_r9_t
*
MBMS_SessionInfo_p
=
NULL
;
#endif
LOG_T
(
PDCP
,
PROTOCOL_CTXT_FMT
" %s() SRB2ADD %p DRB2ADD %p DRB2RELEASE %p
\n
"
,
LOG_T
(
PDCP
,
PROTOCOL_CTXT_FMT
" %s() SRB2ADD %p DRB2ADD %p DRB2RELEASE %p
\n
"
,
PROTOCOL_CTXT_ARGS
(
ctxt_pP
),
PROTOCOL_CTXT_ARGS
(
ctxt_pP
),
__FUNCTION__
,
__FUNCTION__
,
...
@@ -1438,7 +1415,6 @@ rrc_pdcp_config_asn1_req (
...
@@ -1438,7 +1415,6 @@ rrc_pdcp_config_asn1_req (
}
}
}
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
if
(
pmch_InfoList_r9_pP
!=
NULL
)
{
if
(
pmch_InfoList_r9_pP
!=
NULL
)
{
for
(
i
=
0
;
i
<
pmch_InfoList_r9_pP
->
list
.
count
;
i
++
)
{
for
(
i
=
0
;
i
<
pmch_InfoList_r9_pP
->
list
.
count
;
i
++
)
{
...
@@ -1501,7 +1477,6 @@ rrc_pdcp_config_asn1_req (
...
@@ -1501,7 +1477,6 @@ rrc_pdcp_config_asn1_req (
}
}
}
}
#endif
return
0
;
return
0
;
}
}
...
@@ -1665,7 +1640,6 @@ pdcp_config_req_asn1 (
...
@@ -1665,7 +1640,6 @@ pdcp_config_req_asn1 (
memset
(
pdcp_pP
,
0
,
sizeof
(
pdcp_t
));
memset
(
pdcp_pP
,
0
,
sizeof
(
pdcp_t
));
break
;
break
;
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
case
CONFIG_ACTION_MBMS_ADD
:
case
CONFIG_ACTION_MBMS_ADD
:
case
CONFIG_ACTION_MBMS_MODIFY
:
case
CONFIG_ACTION_MBMS_MODIFY
:
...
@@ -1685,7 +1659,6 @@ pdcp_config_req_asn1 (
...
@@ -1685,7 +1659,6 @@ pdcp_config_req_asn1 (
}
}
break
;
break
;
#endif
case
CONFIG_ACTION_SET_SECURITY_MODE
:
case
CONFIG_ACTION_SET_SECURITY_MODE
:
pdcp_config_set_security
(
pdcp_config_set_security
(
...
@@ -1958,10 +1931,9 @@ void pdcp_layer_init(void)
...
@@ -1958,10 +1931,9 @@ void pdcp_layer_init(void)
{
{
module_id_t
instance
;
module_id_t
instance
;
int
i
,
j
;
int
i
,
j
;
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
mbms_session_id_t
session_id
;
mbms_session_id_t
session_id
;
mbms_service_id_t
service_id
;
mbms_service_id_t
service_id
;
#endif
/*
/*
* Initialize SDU list
* Initialize SDU list
*/
*/
...
@@ -1970,7 +1942,6 @@ void pdcp_layer_init(void)
...
@@ -1970,7 +1942,6 @@ void pdcp_layer_init(void)
AssertFatal
(
pdcp_coll_p
!=
NULL
,
"UNRECOVERABLE error, PDCP hashtable_create failed"
);
AssertFatal
(
pdcp_coll_p
!=
NULL
,
"UNRECOVERABLE error, PDCP hashtable_create failed"
);
for
(
instance
=
0
;
instance
<
MAX_MOBILES_PER_ENB
;
instance
++
)
{
for
(
instance
=
0
;
instance
<
MAX_MOBILES_PER_ENB
;
instance
++
)
{
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
for
(
service_id
=
0
;
service_id
<
LTE_maxServiceCount
;
service_id
++
)
{
for
(
service_id
=
0
;
service_id
<
LTE_maxServiceCount
;
service_id
++
)
{
for
(
session_id
=
0
;
session_id
<
LTE_maxSessionPerPMCH
;
session_id
++
)
{
for
(
session_id
=
0
;
session_id
<
LTE_maxSessionPerPMCH
;
session_id
++
)
{
...
@@ -1978,22 +1949,17 @@ void pdcp_layer_init(void)
...
@@ -1978,22 +1949,17 @@ void pdcp_layer_init(void)
}
}
}
}
#endif
pdcp_eNB_UE_instance_to_rnti
[
instance
]
=
NOT_A_RNTI
;
pdcp_eNB_UE_instance_to_rnti
[
instance
]
=
NOT_A_RNTI
;
}
}
pdcp_eNB_UE_instance_to_rnti_index
=
0
;
pdcp_eNB_UE_instance_to_rnti_index
=
0
;
for
(
instance
=
0
;
instance
<
NUMBER_OF_eNB_MAX
;
instance
++
)
{
for
(
instance
=
0
;
instance
<
NUMBER_OF_eNB_MAX
;
instance
++
)
{
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
for
(
service_id
=
0
;
service_id
<
LTE_maxServiceCount
;
service_id
++
)
{
for
(
service_id
=
0
;
service_id
<
LTE_maxServiceCount
;
service_id
++
)
{
for
(
session_id
=
0
;
session_id
<
LTE_maxSessionPerPMCH
;
session_id
++
)
{
for
(
session_id
=
0
;
session_id
<
LTE_maxSessionPerPMCH
;
session_id
++
)
{
memset
(
&
pdcp_mbms_array_eNB
[
instance
][
service_id
][
session_id
],
0
,
sizeof
(
pdcp_mbms_t
));
memset
(
&
pdcp_mbms_array_eNB
[
instance
][
service_id
][
session_id
],
0
,
sizeof
(
pdcp_mbms_t
));
}
}
}
}
#endif
}
}
#ifdef MBMS_MULTICAST_OUT
#ifdef MBMS_MULTICAST_OUT
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
View file @
eb269754
...
@@ -74,16 +74,16 @@ extern struct nlmsghdr *nas_nlh_rx;
...
@@ -74,16 +74,16 @@ extern struct nlmsghdr *nas_nlh_rx;
extern
struct
iovec
nas_iov_tx
;
extern
struct
iovec
nas_iov_tx
;
extern
struct
iovec
nas_iov_rx
;
extern
struct
iovec
nas_iov_rx
;
extern
int
nas_sock_fd
;
extern
int
nas_sock_fd
[
MAX_MOBILES_PER_ENB
]
;
extern
struct
msghdr
nas_msg_tx
;
extern
struct
msghdr
nas_msg_tx
;
extern
struct
msghdr
nas_msg_rx
;
extern
struct
msghdr
nas_msg_rx
;
extern
uint8_t
nfapi_mode
;
extern
uint8_t
nfapi_mode
;
#ifdef UESIM_EXPANSION
#ifdef UESIM_EXPANSION
extern
uint16_t
inst_pdcp_list
[
NUMBER_OF_UE_MAX
];
extern
uint16_t
inst_pdcp_list
[
NUMBER_OF_UE_MAX
];
#endif
#endif
extern
Packet_OTG_List_t
*
otg_pdcp_buffer
;
extern
Packet_OTG_List_t
*
otg_pdcp_buffer
;
...
@@ -124,11 +124,11 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) {
...
@@ -124,11 +124,11 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) {
ret
=
sendto
(
pdcp_pc5_sockfd
,
&
(
sdu_p
->
data
[
sizeof
(
pdcp_data_ind_header_t
)]),
ret
=
sendto
(
pdcp_pc5_sockfd
,
&
(
sdu_p
->
data
[
sizeof
(
pdcp_data_ind_header_t
)]),
sizeof
(
sidelink_pc5s_element
),
0
,
(
struct
sockaddr
*
)
&
prose_pdcp_addr
,
sizeof
(
prose_pdcp_addr
)
);
sizeof
(
sidelink_pc5s_element
),
0
,
(
struct
sockaddr
*
)
&
prose_pdcp_addr
,
sizeof
(
prose_pdcp_addr
)
);
}
else
if
(
UE_NAS_USE_TUN
)
{
}
else
if
(
UE_NAS_USE_TUN
)
{
ret
=
write
(
nas_sock_fd
,
&
(
sdu_p
->
data
[
sizeof
(
pdcp_data_ind_header_t
)]),
sizeToWrite
);
ret
=
write
(
nas_sock_fd
[
ctxt_pP
->
module_id
]
,
&
(
sdu_p
->
data
[
sizeof
(
pdcp_data_ind_header_t
)]),
sizeToWrite
);
}
else
if
(
PDCP_USE_NETLINK
)
{
//UE_NAS_USE_TUN
}
else
if
(
PDCP_USE_NETLINK
)
{
//UE_NAS_USE_TUN
memcpy
(
NLMSG_DATA
(
nas_nlh_tx
),
(
uint8_t
*
)
sdu_p
->
data
,
sizeToWrite
);
memcpy
(
NLMSG_DATA
(
nas_nlh_tx
),
(
uint8_t
*
)
sdu_p
->
data
,
sizeToWrite
);
nas_nlh_tx
->
nlmsg_len
=
sizeToWrite
;
nas_nlh_tx
->
nlmsg_len
=
sizeToWrite
;
ret
=
sendmsg
(
nas_sock_fd
,
&
nas_msg_tx
,
0
);
ret
=
sendmsg
(
nas_sock_fd
[
0
]
,
&
nas_msg_tx
,
0
);
}
// PDCP_USE_NETLINK
}
// PDCP_USE_NETLINK
AssertFatal
(
ret
>=
0
,
"[PDCP_FIFOS] pdcp_fifo_flush_sdus (errno: %d %s)
\n
"
,
errno
,
strerror
(
errno
));
AssertFatal
(
ret
>=
0
,
"[PDCP_FIFOS] pdcp_fifo_flush_sdus (errno: %d %s)
\n
"
,
errno
,
strerror
(
errno
));
...
@@ -155,7 +155,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
...
@@ -155,7 +155,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
do
{
do
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER
,
1
);
len
=
read
(
nas_sock_fd
,
&
nl_rx_buf
,
NL_MAX_PAYLOAD
);
len
=
read
(
nas_sock_fd
[
ctxt_pP
->
module_id
]
,
&
nl_rx_buf
,
NL_MAX_PAYLOAD
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER
,
0
);
if
(
len
<=
0
)
continue
;
if
(
len
<=
0
)
continue
;
...
@@ -180,9 +180,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
...
@@ -180,9 +180,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
pdcp_data_req
(
&
ctxt
,
SRB_FLAG_NO
,
rab_id
,
RLC_MUI_UNDEFINED
,
pdcp_data_req
(
&
ctxt
,
SRB_FLAG_NO
,
rab_id
,
RLC_MUI_UNDEFINED
,
RLC_SDU_CONFIRM_NO
,
len
,
(
unsigned
char
*
)
nl_rx_buf
,
RLC_SDU_CONFIRM_NO
,
len
,
(
unsigned
char
*
)
nl_rx_buf
,
PDCP_TRANSMISSION_MODE_DATA
PDCP_TRANSMISSION_MODE_DATA
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
NULL
,
NULL
,
NULL
,
NULL
#endif
);
);
}
else
{
}
else
{
MSC_LOG_RX_DISCARDED_MESSAGE
(
MSC_LOG_RX_DISCARDED_MESSAGE
(
...
@@ -214,7 +212,6 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
...
@@ -214,7 +212,6 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
module_id_t
ue_id
=
0
;
module_id_t
ue_id
=
0
;
pdcp_t
*
pdcp_p
=
NULL
;
pdcp_t
*
pdcp_p
=
NULL
;
//TTN for D2D (PC5S)
//TTN for D2D (PC5S)
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int
prose_addr_len
;
int
prose_addr_len
;
char
send_buf
[
BUFSIZE
],
receive_buf
[
BUFSIZE
];
char
send_buf
[
BUFSIZE
],
receive_buf
[
BUFSIZE
];
//int optval;
//int optval;
...
@@ -225,14 +222,12 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
...
@@ -225,14 +222,12 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
//uint32_t groupL2Id;
//uint32_t groupL2Id;
//module_id_t module_id = 0;
//module_id_t module_id = 0;
pc5s_header_t
*
pc5s_header
;
pc5s_header_t
*
pc5s_header
;
#endif
static
unsigned
char
pdcp_read_state_g
=
0
;
static
unsigned
char
pdcp_read_state_g
=
0
;
int
len
=
1
;
int
len
=
1
;
int
msg_len
;
int
msg_len
;
rb_id_t
rab_id
=
0
;
rb_id_t
rab_id
=
0
;
int
rlc_data_req_flag
=
3
;
int
rlc_data_req_flag
=
3
;
//TTN for D2D (PC5S)
//TTN for D2D (PC5S)
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
prose_addr_len
=
sizeof
(
prose_pdcp_addr
);
prose_addr_len
=
sizeof
(
prose_pdcp_addr
);
// receive a message from ProSe App
// receive a message from ProSe App
memset
(
receive_buf
,
0
,
BUFSIZE
);
memset
(
receive_buf
,
0
,
BUFSIZE
);
...
@@ -368,11 +363,9 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
...
@@ -368,11 +363,9 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
RLC_SDU_CONFIRM_NO
,
RLC_SDU_CONFIRM_NO
,
pc5s_header
->
data_size
,
pc5s_header
->
data_size
,
(
unsigned
char
*
)
receive_buf
,
(
unsigned
char
*
)
receive_buf
,
PDCP_TRANSMISSION_MODE_DATA
PDCP_TRANSMISSION_MODE_DATA
,
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
&
pc5s_header
->
sourceL2Id
,
,
&
pc5s_header
->
sourceL2Id
&
pc5s_header
->
destinationL2Id
,
&
pc5s_header
->
destinationL2Id
#endif
);
);
}
else
{
}
else
{
MSC_LOG_RX_DISCARDED_MESSAGE
(
MSC_LOG_RX_DISCARDED_MESSAGE
(
...
@@ -425,11 +418,9 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
...
@@ -425,11 +418,9 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
RLC_SDU_CONFIRM_NO
,
RLC_SDU_CONFIRM_NO
,
pc5s_header
->
data_size
,
pc5s_header
->
data_size
,
(
unsigned
char
*
)
receive_buf
,
(
unsigned
char
*
)
receive_buf
,
PDCP_TRANSMISSION_MODE_DATA
PDCP_TRANSMISSION_MODE_DATA
,
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
&
pc5s_header
->
sourceL2Id
,
,
&
pc5s_header
->
sourceL2Id
&
pc5s_header
->
destinationL2Id
,
&
pc5s_header
->
destinationL2Id
#endif
);
);
}
}
}
}
...
@@ -439,12 +430,11 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
...
@@ -439,12 +430,11 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
}
}
}
}
#endif
while
((
len
>
0
)
&&
(
rlc_data_req_flag
!=
0
))
{
while
((
len
>
0
)
&&
(
rlc_data_req_flag
!=
0
))
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER
,
1
);
len
=
recvmsg
(
nas_sock_fd
,
&
nas_msg_rx
,
0
);
len
=
recvmsg
(
nas_sock_fd
[
0
]
,
&
nas_msg_rx
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER
,
0
);
if
(
len
<=
0
)
{
if
(
len
<=
0
)
{
...
@@ -570,9 +560,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
...
@@ -570,9 +560,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
pdcp_read_header_g
.
data_size
,
pdcp_read_header_g
.
data_size
,
(
unsigned
char
*
)
NLMSG_DATA
(
nas_nlh_rx
),
(
unsigned
char
*
)
NLMSG_DATA
(
nas_nlh_rx
),
PDCP_TRANSMISSION_MODE_DATA
PDCP_TRANSMISSION_MODE_DATA
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
NULL
,
NULL
,
NULL
,
NULL
#endif
);
);
}
else
{
}
else
{
LOG_D
(
PDCP
,
"[FRAME %5u][eNB][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %u][RB %u] NON INSTANCIATED INSTANCE, DROPPED
\n
"
,
LOG_D
(
PDCP
,
"[FRAME %5u][eNB][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %u][RB %u] NON INSTANCIATED INSTANCE, DROPPED
\n
"
,
...
@@ -607,9 +595,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
...
@@ -607,9 +595,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
pdcp_read_header_g
.
data_size
,
pdcp_read_header_g
.
data_size
,
(
unsigned
char
*
)
NLMSG_DATA
(
nas_nlh_rx
),
(
unsigned
char
*
)
NLMSG_DATA
(
nas_nlh_rx
),
PDCP_TRANSMISSION_MODE_DATA
PDCP_TRANSMISSION_MODE_DATA
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
NULL
,
NULL
,
NULL
,
NULL
#endif
);
);
}
}
}
}
...
@@ -672,11 +658,9 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
...
@@ -672,11 +658,9 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
RLC_SDU_CONFIRM_NO
,
RLC_SDU_CONFIRM_NO
,
pdcp_read_header_g
.
data_size
,
pdcp_read_header_g
.
data_size
,
(
unsigned
char
*
)
NLMSG_DATA
(
nas_nlh_rx
),
(
unsigned
char
*
)
NLMSG_DATA
(
nas_nlh_rx
),
PDCP_TRANSMISSION_MODE_DATA
PDCP_TRANSMISSION_MODE_DATA
,
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
NULL
,
,
NULL
NULL
,
NULL
#endif
);
);
}
else
{
}
else
{
pdcp_data_req
(
pdcp_data_req
(
...
@@ -687,11 +671,9 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
...
@@ -687,11 +671,9 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
RLC_SDU_CONFIRM_NO
,
RLC_SDU_CONFIRM_NO
,
pdcp_read_header_g
.
data_size
,
pdcp_read_header_g
.
data_size
,
(
unsigned
char
*
)
NLMSG_DATA
(
nas_nlh_rx
),
(
unsigned
char
*
)
NLMSG_DATA
(
nas_nlh_rx
),
PDCP_TRANSMISSION_MODE_DATA
PDCP_TRANSMISSION_MODE_DATA
,
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
&
pdcp_read_header_g
.
sourceL2Id
,
,
&
pdcp_read_header_g
.
sourceL2Id
&
pdcp_read_header_g
.
destinationL2Id
,
&
pdcp_read_header_g
.
destinationL2Id
#endif
);
);
}
}
}
else
{
}
else
{
...
@@ -747,11 +729,9 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
...
@@ -747,11 +729,9 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
RLC_SDU_CONFIRM_NO
,
RLC_SDU_CONFIRM_NO
,
pdcp_read_header_g
.
data_size
,
pdcp_read_header_g
.
data_size
,
(
unsigned
char
*
)
NLMSG_DATA
(
nas_nlh_rx
),
(
unsigned
char
*
)
NLMSG_DATA
(
nas_nlh_rx
),
PDCP_TRANSMISSION_MODE_DATA
PDCP_TRANSMISSION_MODE_DATA
,
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
NULL
,
,
NULL
NULL
,
NULL
#endif
);
);
}
else
{
}
else
{
pdcp_data_req
(
pdcp_data_req
(
...
@@ -762,11 +742,9 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
...
@@ -762,11 +742,9 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t *const ctxt_pP) {
RLC_SDU_CONFIRM_NO
,
RLC_SDU_CONFIRM_NO
,
pdcp_read_header_g
.
data_size
,
pdcp_read_header_g
.
data_size
,
(
unsigned
char
*
)
NLMSG_DATA
(
nas_nlh_rx
),
(
unsigned
char
*
)
NLMSG_DATA
(
nas_nlh_rx
),
PDCP_TRANSMISSION_MODE_DATA
PDCP_TRANSMISSION_MODE_DATA
,
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
&
pdcp_read_header_g
.
sourceL2Id
,
,
&
pdcp_read_header_g
.
sourceL2Id
&
pdcp_read_header_g
.
destinationL2Id
,
&
pdcp_read_header_g
.
destinationL2Id
#endif
);
);
}
}
}
}
...
@@ -808,7 +786,6 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t *const ctxt_pP)
...
@@ -808,7 +786,6 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t *const ctxt_pP)
}
}
//TTN for D2D (PC5S)
//TTN for D2D (PC5S)
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void
void
pdcp_pc5_socket_init
()
{
pdcp_pc5_socket_init
()
{
...
@@ -841,4 +818,3 @@ pdcp_pc5_socket_init() {
...
@@ -841,4 +818,3 @@ pdcp_pc5_socket_init() {
}
}
}
}
#endif
openair2/LAYER2/RLC/rlc.c
View file @
eb269754
...
@@ -640,8 +640,6 @@ rlc_module_init (void) {
...
@@ -640,8 +640,6 @@ rlc_module_init (void) {
}
}
for
(
module_id1
=
0
;
module_id1
<
MAX_MOBILES_PER_ENB
;
module_id1
++
)
{
for
(
module_id1
=
0
;
module_id1
<
MAX_MOBILES_PER_ENB
;
module_id1
++
)
{
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
for
(
k
=
0
;
k
<
RLC_MAX_MBMS_LC
;
k
++
)
{
for
(
k
=
0
;
k
<
RLC_MAX_MBMS_LC
;
k
++
)
{
rlc_mbms_lcid2service_session_id_ue
[
module_id1
][
k
].
service_id
=
0
;
rlc_mbms_lcid2service_session_id_ue
[
module_id1
][
k
].
service_id
=
0
;
rlc_mbms_lcid2service_session_id_ue
[
module_id1
][
k
].
session_id
=
0
;
rlc_mbms_lcid2service_session_id_ue
[
module_id1
][
k
].
session_id
=
0
;
...
@@ -650,23 +648,15 @@ rlc_module_init (void) {
...
@@ -650,23 +648,15 @@ rlc_module_init (void) {
for
(
k
=
0
;
k
<
NB_RB_MBMS_MAX
;
k
++
)
{
for
(
k
=
0
;
k
<
NB_RB_MBMS_MAX
;
k
++
)
{
rlc_mbms_rbid2lcid_ue
[
module_id1
][
k
]
=
RLC_LC_UNALLOCATED
;
rlc_mbms_rbid2lcid_ue
[
module_id1
][
k
]
=
RLC_LC_UNALLOCATED
;
}
}
#endif
}
}
for
(
module_id1
=
0
;
module_id1
<
NUMBER_OF_eNB_MAX
;
module_id1
++
)
{
for
(
k
=
0
;
k
<
RLC_MAX_MBMS_LC
;
k
++
)
{
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
rlc_mbms_lcid2service_session_id_eNB
[
0
][
k
].
service_id
=
0
;
rlc_mbms_lcid2service_session_id_eNB
[
0
][
k
].
session_id
=
0
;
for
(
k
=
0
;
k
<
RLC_MAX_MBMS_LC
;
k
++
)
{
}
rlc_mbms_lcid2service_session_id_eNB
[
module_id1
][
k
].
service_id
=
0
;
rlc_mbms_lcid2service_session_id_eNB
[
module_id1
][
k
].
session_id
=
0
;
}
for
(
k
=
0
;
k
<
NB_RB_MBMS_MAX
;
k
++
)
{
rlc_mbms_rbid2lcid_eNB
[
module_id1
][
k
]
=
RLC_LC_UNALLOCATED
;
}
#endif
for
(
k
=
0
;
k
<
NB_RB_MBMS_MAX
;
k
++
)
{
rlc_mbms_rbid2lcid_eNB
[
0
][
k
]
=
RLC_LC_UNALLOCATED
;
}
}
pool_buffer_init
();
pool_buffer_init
();
...
...
openair3/NAS/UE/ESM/esm_ebr_context.c
View file @
eb269754
...
@@ -282,37 +282,43 @@ int esm_ebr_context_create(
...
@@ -282,37 +282,43 @@ int esm_ebr_context_create(
#ifdef UESIM_EXPANSION
#ifdef UESIM_EXPANSION
uint16_t
inst_nic
=
(
pdn
->
ip_addr
[
3
]
&
0x000000FF
)
-
2
;
uint16_t
inst_nic
=
(
pdn
->
ip_addr
[
3
]
&
0x000000FF
)
-
2
;
res
=
sprintf
(
command_line
,
res
=
sprintf
(
command_line
,
"ifconfig
oip
%d %s netmask %s broadcast %s up && "
"ifconfig
%s
%d %s netmask %s broadcast %s up && "
"ip rule add from %s/24 table %d && "
"ip rule add from %s/24 table %d && "
"ip rule add to %s/24 table %d && "
"ip rule add to %s/24 table %d && "
"ip route add default dev oip%d table %d"
,
"ip route add default dev %s%d table %d"
,
UE_NAS_USE_TUN
?
"oaitun_ue"
:
"oip"
,
inst_nic
+
1
,
ipv4_addr
,
netmask
,
broadcast
,
inst_nic
+
1
,
ipv4_addr
,
netmask
,
broadcast
,
ipv4_addr
,
201
,
ipv4_addr
,
201
,
ipv4_addr
,
201
,
ipv4_addr
,
201
,
UE_NAS_USE_TUN
?
"oaitun_ue"
:
"oip"
,
inst_nic
+
1
,
201
);
inst_nic
+
1
,
201
);
inst_pdcp_list
[
inst_nic
]
=
ueid
;
inst_pdcp_list
[
inst_nic
]
=
ueid
;
#else
#else
res
=
sprintf
(
command_line
,
res
=
sprintf
(
command_line
,
"ifconfig
oip
%d %s netmask %s broadcast %s up && "
"ifconfig
%s
%d %s netmask %s broadcast %s up && "
"ip rule add from %s/32 table %d && "
"ip rule add from %s/32 table %d && "
"ip rule add to %s/32 table %d && "
"ip rule add to %s/32 table %d && "
"ip route add default dev oip%d table %d"
,
"ip route add default dev %s%d table %d"
,
UE_NAS_USE_TUN
?
"oaitun_ue"
:
"oip"
,
ueid
+
1
,
ipv4_addr
,
netmask
,
broadcast
,
ueid
+
1
,
ipv4_addr
,
netmask
,
broadcast
,
ipv4_addr
,
ueid
+
201
,
ipv4_addr
,
ueid
+
201
,
ipv4_addr
,
ueid
+
201
,
ipv4_addr
,
ueid
+
201
,
UE_NAS_USE_TUN
?
"oaitun_ue"
:
"oip"
,
ueid
+
1
,
ueid
+
201
);
ueid
+
1
,
ueid
+
201
);
#endif
#endif
}
// PDCP_USE_NETLINK
}
// PDCP_USE_NETLINK
}
else
{
}
else
{
res
=
sprintf
(
command_line
,
res
=
sprintf
(
command_line
,
"ifconfig
oip
%d %s netmask %s broadcast %s up && "
"ifconfig
%s
%d %s netmask %s broadcast %s up && "
"ip rule add from %s/32 table %d && "
"ip rule add from %s/32 table %d && "
"ip rule add to %s/32 table %d && "
"ip rule add to %s/32 table %d && "
"ip route add default dev oip%d table %d"
,
"ip route add default dev %s%d table %d"
,
UE_NAS_USE_TUN
?
"oaitun_ue"
:
"oip"
,
ueid
+
1
,
ipv4_addr
,
netmask
,
broadcast
,
ueid
+
1
,
ipv4_addr
,
netmask
,
broadcast
,
ipv4_addr
,
ueid
+
201
,
ipv4_addr
,
ueid
+
201
,
ipv4_addr
,
ueid
+
201
,
ipv4_addr
,
ueid
+
201
,
UE_NAS_USE_TUN
?
"oaitun_ue"
:
"oip"
,
ueid
+
1
,
ueid
+
201
);
ueid
+
1
,
ueid
+
201
);
}
}
if
(
res
<
0
)
{
if
(
res
<
0
)
{
...
...
targets/RT/USER/lte-uesoftmodem.c
View file @
eb269754
...
@@ -772,7 +772,7 @@ int main( int argc, char **argv ) {
...
@@ -772,7 +772,7 @@ int main( int argc, char **argv ) {
init_opt
();
init_opt
();
uint32_t
pdcp_initmask
=
((
!
IS_SOFTMODEM_NOS1
)
||
IS_SOFTMODEM_NOKRNMOD
)
?
LINK_ENB_PDCP_TO_GTPV1U_BIT
:
(
LINK_ENB_PDCP_TO_GTPV1U_BIT
|
PDCP_USE_NETLINK_BIT
|
LINK_ENB_PDCP_TO_IP_DRIVER_BIT
);
uint32_t
pdcp_initmask
=
((
!
IS_SOFTMODEM_NOS1
)
||
IS_SOFTMODEM_NOKRNMOD
)
?
LINK_ENB_PDCP_TO_GTPV1U_BIT
:
(
LINK_ENB_PDCP_TO_GTPV1U_BIT
|
PDCP_USE_NETLINK_BIT
|
LINK_ENB_PDCP_TO_IP_DRIVER_BIT
);
if
(
IS_SOFTMODEM_BASICSIM
)
{
if
(
IS_SOFTMODEM_BASICSIM
||
(
nfapi_mode
==
3
)
)
{
pdcp_initmask
=
pdcp_initmask
|
UE_NAS_USE_TUN_BIT
;
pdcp_initmask
=
pdcp_initmask
|
UE_NAS_USE_TUN_BIT
;
}
}
...
...
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