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
canghaiwuhen
OpenXG-RAN
Commits
27f413ed
Commit
27f413ed
authored
Nov 22, 2020
by
Navid Nikaein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent UE to run pdcp_update_status
parent
916cf4e0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
60 deletions
+72
-60
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+64
-58
openair2/LAYER2/PDCP_v10.1.0/pdcp.h
openair2/LAYER2/PDCP_v10.1.0/pdcp.h
+8
-2
No files found.
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
View file @
27f413ed
...
@@ -164,15 +164,11 @@ boolean_t pdcp_data_req(
...
@@ -164,15 +164,11 @@ boolean_t pdcp_data_req(
PROTOCOL_CTXT_ARGS
(
ctxt_pP
),
PROTOCOL_CTXT_ARGS
(
ctxt_pP
),
rb_idP
);
rb_idP
);
ctxt_pP
->
configured
=
FALSE
;
ctxt_pP
->
configured
=
FALSE
;
// optimize stats collections to thos RB that are configured
pdcp_enb
[
ctxt_pP
->
module_id
].
rb_id
[
rb_idP
]
=
0
;
return
FALSE
;
return
FALSE
;
}
}
}
else
{
}
else
{
// instance for a given RB is configured
// instance for a given RB is configured
ctxt_pP
->
configured
=
TRUE
;
ctxt_pP
->
configured
=
TRUE
;
// optimize stats collections to thos RB that are configured
pdcp_enb
[
ctxt_pP
->
module_id
].
rb_id
[
rb_idP
]
=
1
;
}
}
if
(
ctxt_pP
->
enb_flag
==
ENB_FLAG_YES
)
{
if
(
ctxt_pP
->
enb_flag
==
ENB_FLAG_YES
)
{
...
@@ -481,6 +477,7 @@ boolean_t pdcp_data_req(
...
@@ -481,6 +477,7 @@ boolean_t pdcp_data_req(
}
}
//LOG_I(PDCP,"ueid %d lcid %d tx seq num %d\n", pdcp_uid, rb_idP+rb_offset, current_sn);
//LOG_I(PDCP,"ueid %d lcid %d tx seq num %d\n", pdcp_uid, rb_idP+rb_offset, current_sn);
pdcp_enb
[
ctxt_pP
->
module_id
].
uid_tx
[
pdcp_uid
]
=
1
;
Pdcp_stats_tx
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
++
;
Pdcp_stats_tx
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
++
;
Pdcp_stats_tx_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
++
;
Pdcp_stats_tx_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
++
;
Pdcp_stats_tx_bytes
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
+=
sdu_buffer_sizeP
;
Pdcp_stats_tx_bytes
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
+=
sdu_buffer_sizeP
;
...
@@ -1043,6 +1040,7 @@ pdcp_data_ind(
...
@@ -1043,6 +1040,7 @@ pdcp_data_ind(
}
}
}
}
pdcp_enb
[
ctxt_pP
->
module_id
].
uid_rx
[
pdcp_uid
]
=
1
;
Pdcp_stats_rx
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
++
;
Pdcp_stats_rx
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
++
;
Pdcp_stats_rx_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
++
;
Pdcp_stats_rx_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
++
;
Pdcp_stats_rx_bytes
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
+=
(
sdu_buffer_sizeP
-
payload_offset
);
Pdcp_stats_rx_bytes
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
+=
(
sdu_buffer_sizeP
-
payload_offset
);
...
@@ -1068,18 +1066,23 @@ void pdcp_update_stats(const protocol_ctxt_t *const ctxt_pP) {
...
@@ -1068,18 +1066,23 @@ void pdcp_update_stats(const protocol_ctxt_t *const ctxt_pP) {
uint16_t
pdcp_uid
=
0
;
uint16_t
pdcp_uid
=
0
;
uint8_t
rb_id
=
0
;
uint8_t
rb_id
=
0
;
// these stats are measured for both eNB and UE on per seond basis
// these stats are measured for both eNB and UE on per seond basis
for
(
pdcp_uid
=
0
;
pdcp_uid
<
pdcp_enb
[
ctxt_pP
->
module_id
].
num_ues
;
pdcp_uid
++
)
{
if
(
pdcp_enb
[
ctxt_pP
->
module_id
].
rnti
[
pdcp_uid
]
<=
0
)
continue
;
for
(
rb_id
=
0
;
rb_id
<
NB_RB_MAX
;
rb_id
++
)
{
for
(
rb_id
=
0
;
rb_id
<
NB_RB_MAX
;
rb_id
++
)
{
for
(
pdcp_uid
=
0
;
pdcp_uid
<
MAX_MOBILES_PER_ENB
;
pdcp_uid
++
)
{
if
(
pdcp_enb
[
ctxt_pP
->
module_id
].
rb_id
[
pdcp_uid
][
rb_id
]
<=
0
)
//printf("frame %d and subframe %d \n", pdcp_enb[ctxt_pP->module_id].frame, pdcp_enb[ctxt_pP->module_id].subframe);
continue
;
// tx stats
if
(
(
pdcp_enb
[
ctxt_pP
->
module_id
].
rnti
[
pdcp_uid
]
>
0
)
&&
(
pdcp_enb
[
ctxt_pP
->
module_id
].
rb_id
[
rb_id
]
>
0
)
)
{
if
(
Pdcp_stats_tx_window_ms
[
ctxt_pP
->
module_id
][
pdcp_uid
]
>
0
&&
if
(
pdcp_enb
[
ctxt_pP
->
module_id
].
uid_tx
[
pdcp_uid
]
&&
Pdcp_stats_tx_window_ms
[
ctxt_pP
->
module_id
][
pdcp_uid
]
>
0
&&
pdcp_enb
[
ctxt_pP
->
module_id
].
sfn
%
Pdcp_stats_tx_window_ms
[
ctxt_pP
->
module_id
][
pdcp_uid
]
==
0
)
{
pdcp_enb
[
ctxt_pP
->
module_id
].
sfn
%
Pdcp_stats_tx_window_ms
[
ctxt_pP
->
module_id
][
pdcp_uid
]
==
0
)
{
// unit: bit/s
pdcp_enb
[
ctxt_pP
->
module_id
].
uid_tx
[
pdcp_uid
]
=
0
;
// tx stats unit: bit/s
Pdcp_stats_tx_throughput_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
Pdcp_stats_tx_bytes_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
*
8
;
Pdcp_stats_tx_throughput_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
Pdcp_stats_tx_bytes_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
*
8
;
Pdcp_stats_tx_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
Pdcp_stats_tx_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
];
Pdcp_stats_tx_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
Pdcp_stats_tx_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
];
Pdcp_stats_tx_bytes_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
Pdcp_stats_tx_bytes_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
];
Pdcp_stats_tx_bytes_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
Pdcp_stats_tx_bytes_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
];
...
@@ -1096,8 +1099,12 @@ void pdcp_update_stats(const protocol_ctxt_t *const ctxt_pP) {
...
@@ -1096,8 +1099,12 @@ void pdcp_update_stats(const protocol_ctxt_t *const ctxt_pP) {
Pdcp_stats_tx_aiat_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
0
;
Pdcp_stats_tx_aiat_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
0
;
}
}
if
(
Pdcp_stats_rx_window_ms
[
ctxt_pP
->
module_id
][
pdcp_uid
]
>
0
&&
if
(
pdcp_enb
[
ctxt_pP
->
module_id
].
uid_rx
[
pdcp_uid
]
&&
Pdcp_stats_rx_window_ms
[
ctxt_pP
->
module_id
][
pdcp_uid
]
>
0
&&
pdcp_enb
[
ctxt_pP
->
module_id
].
sfn
%
Pdcp_stats_rx_window_ms
[
ctxt_pP
->
module_id
][
pdcp_uid
]
==
0
)
{
pdcp_enb
[
ctxt_pP
->
module_id
].
sfn
%
Pdcp_stats_rx_window_ms
[
ctxt_pP
->
module_id
][
pdcp_uid
]
==
0
)
{
pdcp_enb
[
ctxt_pP
->
module_id
].
uid_rx
[
pdcp_uid
]
=
0
;
// rx stats
// rx stats
Pdcp_stats_rx_goodput_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
Pdcp_stats_rx_bytes_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
*
8
;
Pdcp_stats_rx_goodput_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
Pdcp_stats_rx_bytes_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
*
8
;
Pdcp_stats_rx_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
Pdcp_stats_rx_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
];
Pdcp_stats_rx_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
Pdcp_stats_rx_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
];
...
@@ -1116,7 +1123,6 @@ void pdcp_update_stats(const protocol_ctxt_t *const ctxt_pP) {
...
@@ -1116,7 +1123,6 @@ void pdcp_update_stats(const protocol_ctxt_t *const ctxt_pP) {
}
}
}
}
}
}
}
}
}
...
@@ -1133,10 +1139,12 @@ pdcp_run (
...
@@ -1133,10 +1139,12 @@ pdcp_run (
start_meas
(
&
UE_pdcp_stats
[
ctxt_pP
->
module_id
].
pdcp_run
);
start_meas
(
&
UE_pdcp_stats
[
ctxt_pP
->
module_id
].
pdcp_run
);
}
}
if
(
ctxt_pP
->
enb_flag
)
{
pdcp_enb
[
ctxt_pP
->
module_id
].
sfn
++
;
// range: 0 to 18,446,744,073,709,551,615
pdcp_enb
[
ctxt_pP
->
module_id
].
sfn
++
;
// range: 0 to 18,446,744,073,709,551,615
pdcp_enb
[
ctxt_pP
->
module_id
].
frame
=
ctxt_pP
->
frame
;
// 1023
pdcp_enb
[
ctxt_pP
->
module_id
].
frame
=
ctxt_pP
->
frame
;
// 1023
pdcp_enb
[
ctxt_pP
->
module_id
].
subframe
=
ctxt_pP
->
subframe
;
pdcp_enb
[
ctxt_pP
->
module_id
].
subframe
=
ctxt_pP
->
subframe
;
pdcp_update_stats
(
ctxt_pP
);
pdcp_update_stats
(
ctxt_pP
);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_RUN
,
VCD_FUNCTION_IN
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_RUN
,
VCD_FUNCTION_IN
);
MessageDef
*
msg_p
;
MessageDef
*
msg_p
;
int
result
;
int
result
;
...
@@ -1401,7 +1409,7 @@ void pdcp_init_stats_UE(module_id_t mod, uint16_t uid) {
...
@@ -1401,7 +1409,7 @@ void pdcp_init_stats_UE(module_id_t mod, uint16_t uid) {
}
}
}
}
void
pdcp_add_UE
(
const
protocol_ctxt_t
*
const
ctxt_pP
)
{
void
pdcp_add_UE
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
rb_id_t
rb_idP
)
{
int
i
,
ue_flag
=
1
;
//, ret=-1; to be decied later
int
i
,
ue_flag
=
1
;
//, ret=-1; to be decied later
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
)
{
...
@@ -1410,12 +1418,13 @@ void pdcp_add_UE(const protocol_ctxt_t *const ctxt_pP) {
...
@@ -1410,12 +1418,13 @@ void pdcp_add_UE(const protocol_ctxt_t *const ctxt_pP) {
break
;
break
;
}
}
}
}
// need to add rb_id
if
(
ue_flag
==
1
)
{
if
(
ue_flag
==
1
)
{
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
)
{
if
(
pdcp_enb
[
ctxt_pP
->
module_id
].
rnti
[
i
]
==
0
)
{
if
(
pdcp_enb
[
ctxt_pP
->
module_id
].
rnti
[
i
]
==
0
)
{
pdcp_enb
[
ctxt_pP
->
module_id
].
rnti
[
i
]
=
ctxt_pP
->
rnti
;
pdcp_enb
[
ctxt_pP
->
module_id
].
rnti
[
i
]
=
ctxt_pP
->
rnti
;
pdcp_enb
[
ctxt_pP
->
module_id
].
uid
[
i
]
=
i
;
pdcp_enb
[
ctxt_pP
->
module_id
].
uid
[
i
]
=
i
;
pdcp_enb
[
ctxt_pP
->
module_id
].
rb_id
[
i
][
rb_idP
]
=
1
;
// this RB is active
pdcp_enb
[
ctxt_pP
->
module_id
].
num_ues
++
;
pdcp_enb
[
ctxt_pP
->
module_id
].
num_ues
++
;
printf
(
"add new uid is %d %x
\n\n
"
,
i
,
ctxt_pP
->
rnti
);
printf
(
"add new uid is %d %x
\n\n
"
,
i
,
ctxt_pP
->
rnti
);
pdcp_init_stats_UE
(
ctxt_pP
->
module_id
,
i
);
pdcp_init_stats_UE
(
ctxt_pP
->
module_id
,
i
);
...
@@ -1469,7 +1478,6 @@ pdcp_remove_UE(
...
@@ -1469,7 +1478,6 @@ pdcp_remove_UE(
pdcp_enb
[
ctxt_pP
->
module_id
].
rnti
[
i
]);
pdcp_enb
[
ctxt_pP
->
module_id
].
rnti
[
i
]);
pdcp_enb
[
ctxt_pP
->
module_id
].
uid
[
i
]
=
0
;
pdcp_enb
[
ctxt_pP
->
module_id
].
uid
[
i
]
=
0
;
pdcp_enb
[
ctxt_pP
->
module_id
].
rnti
[
i
]
=
0
;
pdcp_enb
[
ctxt_pP
->
module_id
].
rnti
[
i
]
=
0
;
pdcp_enb
[
ctxt_pP
->
module_id
].
rnti
[
i
]
=
0
;
pdcp_enb
[
ctxt_pP
->
module_id
].
num_ues
--
;
pdcp_enb
[
ctxt_pP
->
module_id
].
num_ues
--
;
break
;
break
;
}
}
...
@@ -1789,8 +1797,6 @@ rrc_pdcp_config_asn1_req (
...
@@ -1789,8 +1797,6 @@ rrc_pdcp_config_asn1_req (
kRRCint_pP
,
kRRCint_pP
,
kUPenc_pP
);
kUPenc_pP
);
pdcp_enb
[
ctxt_pP
->
module_id
].
rb_id
[
lc_id
]
=
0
;
h_rc
=
hashtable_remove
(
pdcp_coll_p
,
key
);
h_rc
=
hashtable_remove
(
pdcp_coll_p
,
key
);
if
((
defaultDRB
!=
NULL
)
&&
(
*
defaultDRB
==
drb_id
))
{
if
((
defaultDRB
!=
NULL
)
&&
(
*
defaultDRB
==
drb_id
))
{
...
@@ -1900,7 +1906,7 @@ pdcp_config_req_asn1 (
...
@@ -1900,7 +1906,7 @@ pdcp_config_req_asn1 (
if
(
ctxt_pP
->
enb_flag
==
ENB_FLAG_YES
)
{
if
(
ctxt_pP
->
enb_flag
==
ENB_FLAG_YES
)
{
pdcp_pP
->
is_ue
=
FALSE
;
pdcp_pP
->
is_ue
=
FALSE
;
pdcp_add_UE
(
ctxt_pP
);
pdcp_add_UE
(
ctxt_pP
,
rb_idP
);
//pdcp_eNB_UE_instance_to_rnti[ctxtP->module_id] = ctxt_pP->rnti;
//pdcp_eNB_UE_instance_to_rnti[ctxtP->module_id] = ctxt_pP->rnti;
// pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] = ctxt_pP->rnti;
// pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] = ctxt_pP->rnti;
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp.h
View file @
27f413ed
...
@@ -129,8 +129,14 @@ void pdcp_update_perioidical_stats(const protocol_ctxt_t *const ctxt_pP);
...
@@ -129,8 +129,14 @@ void pdcp_update_perioidical_stats(const protocol_ctxt_t *const ctxt_pP);
typedef
struct
pdcp_enb_s
{
typedef
struct
pdcp_enb_s
{
// used for eNB stats generation
// used for eNB stats generation
uint16_t
uid
[
MAX_MOBILES_PER_ENB
];
uint16_t
uid
[
MAX_MOBILES_PER_ENB
];
// flag indicating if UE sends packets
uint16_t
uid_tx
[
MAX_MOBILES_PER_ENB
];
// flag indicating if UE receives packets
uint16_t
uid_rx
[
MAX_MOBILES_PER_ENB
];
// UE RNTI
rnti_t
rnti
[
MAX_MOBILES_PER_ENB
];
rnti_t
rnti
[
MAX_MOBILES_PER_ENB
];
rb_id_t
rb_id
[
NB_RB_MAX
];
// UE active RABs
rb_id_t
rb_id
[
MAX_MOBILES_PER_ENB
][
NB_RB_MAX
];
uint16_t
num_ues
;
uint16_t
num_ues
;
...
@@ -364,7 +370,7 @@ boolean_t pdcp_config_req_asn1 (
...
@@ -364,7 +370,7 @@ boolean_t pdcp_config_req_asn1 (
* \param[in] ctxt_pP Running context.
* \param[in] ctxt_pP Running context.
* \return A status about the processing, OK or error code.
* \return A status about the processing, OK or error code.
*/
*/
void
pdcp_add_UE
(
const
protocol_ctxt_t
*
const
ctxt_pP
);
void
pdcp_add_UE
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
rb_id_t
rb_idP
);
/*! \fn boolean_t pdcp_remove_UE(const protocol_ctxt_t* const ctxt_pP)
/*! \fn boolean_t pdcp_remove_UE(const protocol_ctxt_t* const ctxt_pP)
* \brief Function for RRC to remove UE from PDCP module hashtable
* \brief Function for RRC to remove UE from PDCP module hashtable
...
...
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