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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG-RAN
Commits
24ac96cd
Commit
24ac96cd
authored
Oct 20, 2023
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/Fix_FAPI_PDU_Length' into integration_2023_w42
parents
470ea731
bfd12e4a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
12 deletions
+24
-12
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
+6
-4
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+8
-0
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
+2
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+4
-4
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+2
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+2
-2
No files found.
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
View file @
24ac96cd
...
...
@@ -1466,12 +1466,14 @@ typedef enum {
//table 3-58
#define NFAPI_NR_MAX_TX_REQUEST_TLV 2
typedef
struct
{
uint16_t
PDU_length
;
typedef
struct
{
uint16_t
PDU_length
;
// SCF 222.10.02 The total length (in bytes) of the PDU description and PDU data, without the padding bytes.
// (2 bytes PDU_Length + 2 bytes PDU_Index + 4 bytes num_TLV + TLV size ( 2 bytes tag + 2 bytes length +
// value size without padding))
// TBS + 12
uint16_t
PDU_index
;
uint32_t
num_TLV
;
nfapi_nr_tx_data_request_tlv_t
TLVs
[
NFAPI_NR_MAX_TX_REQUEST_TLV
];
nfapi_nr_tx_data_request_tlv_t
TLVs
[
NFAPI_NR_MAX_TX_REQUEST_TLV
];
}
nfapi_nr_pdu_t
;
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
24ac96cd
...
...
@@ -5364,3 +5364,11 @@ uint16_t nr_get_csi_bitlen(nr_csi_report_t *csi_report_template, uint8_t csi_rep
return
csi_bitlen
;
}
uint16_t
compute_PDU_length
(
uint32_t
num_TLV
,
uint16_t
total_length
)
{
uint8_t
pdu_length
=
8
;
// 2 bytes PDU_Length + 2 bytes PDU_Index + 4 bytes num_TLV
// For each TLV, add 2 bytes tag + 2 bytes length + value size without padding
pdu_length
+=
(
num_TLV
*
4
)
+
total_length
;
return
pdu_length
;
}
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
View file @
24ac96cd
...
...
@@ -307,4 +307,6 @@ void compute_csi_bitlen(NR_CSI_MeasConfig_t *csi_MeasConfig, nr_csi_report_t *cs
uint16_t
nr_get_csi_bitlen
(
nr_csi_report_t
*
csi_report_template
,
uint8_t
csi_report_id
);
uint16_t
compute_PDU_length
(
uint32_t
num_TLV
,
uint16_t
total_length
);
#endif
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
24ac96cd
...
...
@@ -1399,10 +1399,10 @@ static void nr_generate_Msg2(module_id_t module_idP,
T
(
T_GNB_MAC_DL_RAR_PDU_WITH_DATA
,
T_INT
(
module_idP
),
T_INT
(
CC_id
),
T_INT
(
ra
->
RA_rnti
),
T_INT
(
frameP
),
T_INT
(
slotP
),
T_INT
(
0
),
T_BUFFER
(
&
tx_req
->
TLVs
[
0
].
value
.
direct
[
0
],
tx_req
->
TLVs
[
0
].
length
));
tx_req
->
PDU_length
=
pdsch_pdu_rel15
->
TBSize
[
0
];
tx_req
->
PDU_index
=
pduindex
;
tx_req
->
num_TLV
=
1
;
tx_req
->
TLVs
[
0
].
length
=
tx_req
->
PDU_length
+
2
;
tx_req
->
TLVs
[
0
].
length
=
pdsch_pdu_rel15
->
TBSize
[
0
];
tx_req
->
PDU_length
=
compute_PDU_length
(
tx_req
->
num_TLV
,
pdsch_pdu_rel15
->
TBSize
[
0
]);
TX_req
->
SFN
=
frameP
;
TX_req
->
Number_of_PDUs
++
;
TX_req
->
Slot
=
slotP
;
...
...
@@ -1845,10 +1845,10 @@ static void nr_generate_Msg4(module_id_t module_idP,
// DL TX request
nfapi_nr_pdu_t
*
tx_req
=
&
TX_req
->
pdu_list
[
TX_req
->
Number_of_PDUs
];
memcpy
(
tx_req
->
TLVs
[
0
].
value
.
direct
,
harq
->
transportBlock
,
sizeof
(
uint8_t
)
*
harq
->
tb_size
);
tx_req
->
PDU_length
=
harq
->
tb_size
;
tx_req
->
PDU_index
=
pduindex
;
tx_req
->
num_TLV
=
1
;
tx_req
->
TLVs
[
0
].
length
=
harq
->
tb_size
+
2
;
tx_req
->
TLVs
[
0
].
length
=
harq
->
tb_size
;
tx_req
->
PDU_length
=
compute_PDU_length
(
tx_req
->
num_TLV
,
tx_req
->
TLVs
[
0
].
length
);
TX_req
->
SFN
=
frameP
;
TX_req
->
Number_of_PDUs
++
;
TX_req
->
Slot
=
slotP
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
View file @
24ac96cd
...
...
@@ -601,10 +601,10 @@ void schedule_nr_sib1(module_id_t module_idP,
// Data to be transmitted
memcpy
(
tx_req
->
TLVs
[
0
].
value
.
direct
,
cc
->
sib1_bcch_pdu
,
TBS
);
tx_req
->
PDU_length
=
TBS
;
tx_req
->
PDU_index
=
pdu_index
;
tx_req
->
num_TLV
=
1
;
tx_req
->
TLVs
[
0
].
length
=
TBS
+
2
;
tx_req
->
TLVs
[
0
].
length
=
TBS
;
tx_req
->
PDU_length
=
compute_PDU_length
(
tx_req
->
num_TLV
,
tx_req
->
TLVs
[
0
].
length
);
TX_req
->
Number_of_PDUs
++
;
TX_req
->
SFN
=
frameP
;
TX_req
->
Slot
=
slotP
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
24ac96cd
...
...
@@ -1367,10 +1367,10 @@ void nr_schedule_ue_spec(module_id_t module_id,
const
int
ntx_req
=
TX_req
->
Number_of_PDUs
;
nfapi_nr_pdu_t
*
tx_req
=
&
TX_req
->
pdu_list
[
ntx_req
];
tx_req
->
PDU_length
=
TBS
;
tx_req
->
PDU_index
=
pduindex
;
tx_req
->
num_TLV
=
1
;
tx_req
->
TLVs
[
0
].
length
=
TBS
+
2
;
tx_req
->
TLVs
[
0
].
length
=
TBS
;
tx_req
->
PDU_length
=
compute_PDU_length
(
tx_req
->
num_TLV
,
tx_req
->
TLVs
[
0
].
length
);
memcpy
(
tx_req
->
TLVs
[
0
].
value
.
direct
,
harq
->
transportBlock
,
TBS
);
TX_req
->
Number_of_PDUs
++
;
TX_req
->
SFN
=
frame
;
...
...
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