Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
openairinterface-6g
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
OpenXG
openairinterface-6g
Commits
8411a428
Commit
8411a428
authored
Oct 03, 2025
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prevent faulty behavior of nr_compute_tbs when null input is not producing TBS = 0
parent
55a56002
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
openair2/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c
+5
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+1
-2
No files found.
openair2/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c
View file @
8411a428
...
@@ -59,6 +59,11 @@ uint32_t nr_compute_tbs(uint16_t Qm,
...
@@ -59,6 +59,11 @@ uint32_t nr_compute_tbs(uint16_t Qm,
tb_scaling
,
tb_scaling
,
Nl
);
Nl
);
if
(
Qm
==
0
||
R
==
0
||
nb_rb
==
0
||
Nl
==
0
)
{
LOG_E
(
NR_MAC
,
"Error in compute TBS with a NULL input, returning NULL TBS
\n
"
);
return
0
;
}
const
int
nb_subcarrier_per_rb
=
12
;
const
int
nb_subcarrier_per_rb
=
12
;
const
uint32_t
nbp_re
=
nb_subcarrier_per_rb
*
nb_symb_sch
-
nb_dmrs_prb
-
nb_rb_oh
;
const
uint32_t
nbp_re
=
nb_subcarrier_per_rb
*
nb_symb_sch
-
nb_dmrs_prb
-
nb_rb_oh
;
const
uint32_t
nb_re
=
min
(
156
,
nbp_re
)
*
nb_rb
;
const
uint32_t
nb_re
=
min
(
156
,
nbp_re
)
*
nb_rb
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
8411a428
...
@@ -673,8 +673,7 @@ bool nr_find_nb_rb(uint16_t Qm,
...
@@ -673,8 +673,7 @@ bool nr_find_nb_rb(uint16_t Qm,
uint16_t
*
nb_rb
)
uint16_t
*
nb_rb
)
{
{
// for transform precoding only RB = 2^a_2 * 3^a_3 * 5^a_5 is allowed with a non-negative
// for transform precoding only RB = 2^a_2 * 3^a_3 * 5^a_5 is allowed with a non-negative
while
(
transform_precoding
==
NR_PUSCH_Config__transformPrecoder_enabled
&&
while
(
transform_precoding
==
NR_PUSCH_Config__transformPrecoder_enabled
&&
!
multiple_2_3_5
(
nb_rb_max
))
!
multiple_2_3_5
(
nb_rb_max
))
nb_rb_max
--
;
nb_rb_max
--
;
/* is the maximum (not even) enough? */
/* is the maximum (not even) enough? */
...
...
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