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
916cf4e0
Commit
916cf4e0
authored
Nov 19, 2020
by
Navid Nikaein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update pdcp status when the UE and RB is configured
parent
da6ae0f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
37 deletions
+52
-37
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+50
-37
openair2/LAYER2/PDCP_v10.1.0/pdcp.h
openair2/LAYER2/PDCP_v10.1.0/pdcp.h
+2
-0
No files found.
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
View file @
916cf4e0
...
...
@@ -164,11 +164,15 @@ boolean_t pdcp_data_req(
PROTOCOL_CTXT_ARGS
(
ctxt_pP
),
rb_idP
);
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
;
}
}
else
{
// instance for a given RB is configured
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
)
{
...
...
@@ -1063,48 +1067,53 @@ pdcp_data_ind(
void
pdcp_update_stats
(
const
protocol_ctxt_t
*
const
ctxt_pP
)
{
uint16_t
pdcp_uid
=
0
;
uint8_t
rb_id
=
0
;
// these stats are measured for both eNB and UE on per seond basis
for
(
rb_id
=
0
;
rb_id
<
NB_RB_MAX
;
rb_id
++
)
{
for
(
pdcp_uid
=
0
;
pdcp_uid
<
MAX_MOBILES_PER_ENB
;
pdcp_uid
++
)
{
//printf("frame %d and subframe %d \n", pdcp_enb[ctxt_pP->module_id].frame, pdcp_enb[ctxt_pP->module_id].subframe);
// tx stats
if
(
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_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_bytes_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
Pdcp_stats_tx_bytes_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
];
if
(
Pdcp_stats_tx_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
>
0
)
{
Pdcp_stats_tx_aiat_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
(
Pdcp_stats_tx_aiat_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
/
Pdcp_stats_tx_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]);
}
else
{
Pdcp_stats_tx_aiat_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
0
;
}
// reset the tmp vars
Pdcp_stats_tx_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
0
;
Pdcp_stats_tx_bytes_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
&&
pdcp_enb
[
ctxt_pP
->
module_id
].
sfn
%
Pdcp_stats_rx_window_ms
[
ctxt_pP
->
module_id
][
pdcp_uid
]
==
0
)
{
// 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_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_bytes_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
Pdcp_stats_rx_bytes_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
];
if
(
Pdcp_stats_rx_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
>
0
)
{
Pdcp_stats_rx_aiat_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
(
Pdcp_stats_rx_aiat_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
/
Pdcp_stats_rx_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]);
}
else
{
Pdcp_stats_rx_aiat_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
0
;
}
// reset the tmp vars
Pdcp_stats_rx_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
0
;
Pdcp_stats_rx_bytes_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
0
;
Pdcp_stats_rx_aiat_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
0
;
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
&&
pdcp_enb
[
ctxt_pP
->
module_id
].
sfn
%
Pdcp_stats_tx_window_ms
[
ctxt_pP
->
module_id
][
pdcp_uid
]
==
0
)
{
// 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_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
];
if
(
Pdcp_stats_tx_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
>
0
)
{
Pdcp_stats_tx_aiat_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
(
Pdcp_stats_tx_aiat_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
/
Pdcp_stats_tx_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]);
}
else
{
Pdcp_stats_tx_aiat_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
0
;
}
// reset the tmp vars
Pdcp_stats_tx_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
0
;
Pdcp_stats_tx_bytes_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
&&
pdcp_enb
[
ctxt_pP
->
module_id
].
sfn
%
Pdcp_stats_rx_window_ms
[
ctxt_pP
->
module_id
][
pdcp_uid
]
==
0
)
{
// 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_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_bytes_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
Pdcp_stats_rx_bytes_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
];
if
(
Pdcp_stats_rx_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
>
0
)
{
Pdcp_stats_rx_aiat_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
(
Pdcp_stats_rx_aiat_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
/
Pdcp_stats_rx_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]);
}
else
{
Pdcp_stats_rx_aiat_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
0
;
}
// reset the tmp vars
Pdcp_stats_rx_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
0
;
Pdcp_stats_rx_bytes_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
0
;
Pdcp_stats_rx_aiat_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_id
]
=
0
;
}
}
}
}
...
...
@@ -1460,6 +1469,7 @@ pdcp_remove_UE(
pdcp_enb
[
ctxt_pP
->
module_id
].
rnti
[
i
]);
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
].
num_ues
--
;
break
;
}
...
...
@@ -1778,6 +1788,9 @@ rrc_pdcp_config_asn1_req (
kRRCenc_pP
,
kRRCint_pP
,
kUPenc_pP
);
pdcp_enb
[
ctxt_pP
->
module_id
].
rb_id
[
lc_id
]
=
0
;
h_rc
=
hashtable_remove
(
pdcp_coll_p
,
key
);
if
((
defaultDRB
!=
NULL
)
&&
(
*
defaultDRB
==
drb_id
))
{
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp.h
View file @
916cf4e0
...
...
@@ -130,6 +130,8 @@ typedef struct pdcp_enb_s {
// used for eNB stats generation
uint16_t
uid
[
MAX_MOBILES_PER_ENB
];
rnti_t
rnti
[
MAX_MOBILES_PER_ENB
];
rb_id_t
rb_id
[
NB_RB_MAX
];
uint16_t
num_ues
;
uint64_t
sfn
;
...
...
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