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
spbro
OpenXG-RAN
Commits
8035cad7
Commit
8035cad7
authored
Jun 26, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/Fix_Aerial_TBSize' into integration_2024_w26
parents
3b69bc27
8159abdc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
48 deletions
+58
-48
nfapi/oai_integration/aerial/fapi_vnf_p7.c
nfapi/oai_integration/aerial/fapi_vnf_p7.c
+30
-27
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
+5
-4
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
+20
-14
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+2
-2
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
+1
-1
No files found.
nfapi/oai_integration/aerial/fapi_vnf_p7.c
View file @
8035cad7
...
...
@@ -1074,7 +1074,11 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf,
for
(;
k
<
total_number_of_tlvs
;
++
k
)
{
if
(
value
->
TLVs
[
k
].
length
>
0
)
{
if
(
value
->
TLVs
[
k
].
length
%
4
!=
0
)
{
if
(
!
pusharray32
(
value
->
TLVs
[
k
].
value
.
direct
,
16384
,
((
value
->
TLVs
[
k
].
length
+
3
)
/
4
)
-
1
,
ppWriteData
,
data_end
))
{
if
(
!
pusharray32
(
value
->
TLVs
[
k
].
value
.
direct
,
(
dataBufLen
+
3
)
/
4
,
((
value
->
TLVs
[
k
].
length
+
3
)
/
4
)
-
1
,
ppWriteData
,
data_end
))
{
return
0
;
}
int
bytesToAdd
=
4
-
(
4
-
(
value
->
TLVs
[
k
].
length
%
4
))
%
4
;
...
...
@@ -1088,7 +1092,11 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf,
}
}
else
{
// no padding needed
if
(
!
pusharray32
(
value
->
TLVs
[
k
].
value
.
direct
,
16384
,
((
value
->
TLVs
[
k
].
length
+
3
)
/
4
),
ppWriteData
,
data_end
))
{
if
(
!
pusharray32
(
value
->
TLVs
[
k
].
value
.
direct
,
(
dataBufLen
+
3
)
/
4
,
((
value
->
TLVs
[
k
].
length
+
3
)
/
4
),
ppWriteData
,
data_end
))
{
return
0
;
}
}
...
...
@@ -1109,7 +1117,7 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf,
uintptr_t
msgEnd
=
(
uintptr_t
)
pPacketBodyField
;
uint32_t
packedMsgLen
=
msgEnd
-
msgHead
;
uint16_t
packedMsgLen16
;
if
(
packedMsgLen
>
0xFFFF
||
packedMsgLen
>
packed
BufLen
)
{
if
(
packedMsgLen
>
packedBufLen
+
data
BufLen
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"Packed message length error %d, buffer supplied %d
\n
"
,
packedMsgLen
,
packedBufLen
);
return
0
;
}
else
{
...
...
@@ -1123,17 +1131,6 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf,
if
(
!
push32
(
packedMsgLen
,
&
pPackedLengthField
,
pPackMessageEnd
))
return
0
;
if
(
1
)
{
// quick test
if
(
pMessageHeader
->
message_length
!=
packedMsgLen
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"nfapi packedMsgLen(%d) != message_length(%d) id %d
\n
"
,
packedMsgLen
,
pMessageHeader
->
message_length
,
pMessageHeader
->
message_id
);
}
}
return
(
packedMsgLen16
);
}
...
...
@@ -1289,23 +1286,29 @@ int fapi_nr_pack_and_send_p7_message(vnf_p7_t *vnf_p7, nfapi_p7_message_header_t
{
uint8_t
FAPI_buffer
[
1024
*
64
];
// Check if TX_DATA request, if true, need to pack to data_buf
if
(
header
->
message_id
==
NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST
)
{
uint8_t
FAPI_data_buffer
[
1024
*
64
];
if
(
header
->
message_id
==
NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST
)
{
nfapi_nr_tx_data_request_t
*
pNfapiMsg
=
(
nfapi_nr_tx_data_request_t
*
)
header
;
uint64_t
size
=
0
;
for
(
int
i
=
0
;
i
<
pNfapiMsg
->
Number_of_PDUs
;
++
i
)
{
size
+=
pNfapiMsg
->
pdu_list
[
i
].
PDU_length
;
}
AssertFatal
(
size
<=
1024
*
1024
*
2
,
"Message data larger than available buffer, tried to pack %"
PRId64
,
size
);
uint8_t
FAPI_data_buffer
[
1024
*
1024
*
2
];
// 2MB
uint32_t
data_len
=
0
;
int32_t
len_FAPI
=
aerial_pack_tx_data_request
(
header
,
FAPI_buffer
,
FAPI_data_buffer
,
sizeof
(
FAPI_buffer
),
sizeof
(
FAPI_data_buffer
),
&
vnf_p7
->
_public
.
codec_config
,
&
data_len
);
if
(
len_FAPI
<=
0
)
{
LOG_E
(
NFAPI_VNF
,
"Problem packing TX_DATA_request
\n
"
);
FAPI_buffer
,
FAPI_data_buffer
,
sizeof
(
FAPI_buffer
),
sizeof
(
FAPI_data_buffer
),
&
vnf_p7
->
_public
.
codec_config
,
&
data_len
);
if
(
len_FAPI
<=
0
)
{
LOG_E
(
NFAPI_VNF
,
"Problem packing TX_DATA_request
\n
"
);
return
len_FAPI
;
}
else
{
int
retval
=
aerial_send_P7_msg_with_data
(
FAPI_buffer
,
len_FAPI
,
FAPI_data_buffer
,
data_len
,
header
);
return
retval
;
}
else
return
aerial_send_P7_msg_with_data
(
FAPI_buffer
,
len_FAPI
,
FAPI_data_buffer
,
data_len
,
header
);
}
else
{
// Create and send FAPI P7 message
int
len_FAPI
=
fapi_nr_p7_message_pack
(
header
,
FAPI_buffer
,
sizeof
(
FAPI_buffer
),
&
vnf_p7
->
_public
.
codec_config
);
...
...
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
View file @
8035cad7
...
...
@@ -26,10 +26,11 @@
// Extension to the generic structures for single tlv values
typedef
struct
{
/// Value: 0 -> 1, 0: Payload is carried directly in the value field, 1: Pointer to payload is in the value field
uint16_t
tag
;
/// Length of the actual payload in bytes, without the padding bytes Value: 0 → 65535
uint16_t
length
;
/// Value: 0 -> 1, 0: Payload is carried directly in the value field, 1: Pointer to payload is in the value field
uint16_t
tag
;
/// Length of the actual payload in bytes, without the padding bytes Value: 0 → 0xFFFFFFFF
/// Note: This change to uint32_t is a deviation from version 10.02 of the SCF222 standard
uint32_t
length
;
union
{
uint32_t
*
ptr
;
uint32_t
direct
[
38016
];
...
...
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
View file @
8035cad7
...
...
@@ -2017,8 +2017,7 @@ static uint8_t pack_hi_dci0_request(void *msg, uint8_t **ppWritePackedMsg, uint8
static
uint8_t
pack_tx_data_pdu_list_value
(
void
*
tlv
,
uint8_t
**
ppWritePackedMsg
,
uint8_t
*
end
)
{
nfapi_nr_pdu_t
*
value
=
(
nfapi_nr_pdu_t
*
)
tlv
;
AssertFatal
(
value
->
PDU_length
<=
0xFFFF
,
"TX_DATA.request PDU_Length should be within 16 bit, according to SCF222.10.02"
);
if
(
!
(
push16
(
value
->
PDU_length
,
ppWritePackedMsg
,
end
)
&&
push16
(
value
->
PDU_index
,
ppWritePackedMsg
,
end
)
if
(
!
(
push32
(
value
->
PDU_length
,
ppWritePackedMsg
,
end
)
&&
push16
(
value
->
PDU_index
,
ppWritePackedMsg
,
end
)
&&
push32
(
value
->
num_TLV
,
ppWritePackedMsg
,
end
)))
return
0
;
...
...
@@ -2026,12 +2025,16 @@ static uint8_t pack_tx_data_pdu_list_value(void *tlv, uint8_t **ppWritePackedMsg
uint16_t
total_number_of_tlvs
=
value
->
num_TLV
;
for
(;
i
<
total_number_of_tlvs
;
++
i
)
{
if
(
!
(
push16
(
value
->
TLVs
[
i
].
tag
,
ppWritePackedMsg
,
end
)
&&
push
16
(
value
->
TLVs
[
i
].
length
,
ppWritePackedMsg
,
end
)))
if
(
!
(
push16
(
value
->
TLVs
[
i
].
tag
,
ppWritePackedMsg
,
end
)
&&
push
32
(
value
->
TLVs
[
i
].
length
,
ppWritePackedMsg
,
end
)))
return
0
;
switch
(
value
->
TLVs
[
i
].
tag
)
{
case
0
:
{
if
(
!
pusharray32
(
value
->
TLVs
[
i
].
value
.
direct
,
16384
,
(
value
->
TLVs
[
i
].
length
+
3
)
/
4
,
ppWritePackedMsg
,
end
))
{
if
(
!
pusharray32
(
value
->
TLVs
[
i
].
value
.
direct
,
(
value
->
TLVs
[
i
].
length
+
3
)
/
4
,
(
value
->
TLVs
[
i
].
length
+
3
)
/
4
,
ppWritePackedMsg
,
end
))
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s():%d. value->TLVs[i].length %d
\n
"
,
__FUNCTION__
,
__LINE__
,
value
->
TLVs
[
i
].
length
);
return
0
;
}
...
...
@@ -2039,7 +2042,11 @@ static uint8_t pack_tx_data_pdu_list_value(void *tlv, uint8_t **ppWritePackedMsg
}
case
1
:
{
if
(
!
pusharray32
(
value
->
TLVs
[
i
].
value
.
ptr
,
value
->
TLVs
[
i
].
length
,
value
->
TLVs
[
i
].
length
,
ppWritePackedMsg
,
end
))
{
if
(
!
pusharray32
(
value
->
TLVs
[
i
].
value
.
ptr
,
(
value
->
TLVs
[
i
].
length
+
3
)
/
4
,
(
value
->
TLVs
[
i
].
length
+
3
)
/
4
,
ppWritePackedMsg
,
end
))
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s():%d. value->TLVs[i].length %d
\n
"
,
__FUNCTION__
,
__LINE__
,
value
->
TLVs
[
i
].
length
);
return
0
;
}
...
...
@@ -5903,18 +5910,15 @@ static uint8_t unpack_hi_dci0_request(uint8_t **ppReadPackedMsg, uint8_t *end, v
static
uint8_t
unpack_tx_data_pdu_list_value
(
uint8_t
**
ppReadPackedMsg
,
uint8_t
*
end
,
void
*
msg
)
{
nfapi_nr_pdu_t
*
pNfapiMsg
=
(
nfapi_nr_pdu_t
*
)
msg
;
if
(
!
(
pull16
(
ppReadPackedMsg
,
(
uint16_t
*
)
&
pNfapiMsg
->
PDU_length
,
end
)
&&
pull16
(
ppReadPackedMsg
,
&
pNfapiMsg
->
PDU_index
,
end
)
&&
pull32
(
ppReadPackedMsg
,
&
pNfapiMsg
->
num_TLV
,
end
)
))
if
(
!
(
pull32
(
ppReadPackedMsg
,
&
pNfapiMsg
->
PDU_length
,
end
)
&&
pull16
(
ppReadPackedMsg
,
&
pNfapiMsg
->
PDU_index
,
end
)
&&
pull32
(
ppReadPackedMsg
,
&
pNfapiMsg
->
num_TLV
,
end
)))
return
0
;
uint16_t
i
=
0
;
uint16_t
total_number_of_tlvs
=
pNfapiMsg
->
num_TLV
;
for
(;
i
<
total_number_of_tlvs
;
++
i
)
{
if
(
!
(
pull16
(
ppReadPackedMsg
,
&
pNfapiMsg
->
TLVs
[
i
].
tag
,
end
)
&&
pull16
(
ppReadPackedMsg
,
&
pNfapiMsg
->
TLVs
[
i
].
length
,
end
)))
if
(
!
(
pull16
(
ppReadPackedMsg
,
&
pNfapiMsg
->
TLVs
[
i
].
tag
,
end
)
&&
pull32
(
ppReadPackedMsg
,
&
pNfapiMsg
->
TLVs
[
i
].
length
,
end
)))
return
0
;
switch
(
pNfapiMsg
->
TLVs
[
i
].
tag
)
{
...
...
@@ -5928,9 +5932,11 @@ static uint8_t unpack_tx_data_pdu_list_value(uint8_t **ppReadPackedMsg, uint8_t
}
case
1
:
{
if
(
!
pullarray32
(
ppReadPackedMsg
,
pNfapiMsg
->
TLVs
[
i
].
value
.
ptr
,
pNfapiMsg
->
TLVs
[
i
].
length
,
pNfapiMsg
->
TLVs
[
i
].
length
,
end
))
if
(
!
pullarray32
(
ppReadPackedMsg
,
pNfapiMsg
->
TLVs
[
i
].
value
.
ptr
,
(
pNfapiMsg
->
TLVs
[
i
].
length
+
3
)
/
4
,
(
pNfapiMsg
->
TLVs
[
i
].
length
+
3
)
/
4
,
end
))
return
0
;
break
;
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
8035cad7
...
...
@@ -5200,9 +5200,9 @@ bool supported_bw_comparison(int bw_mhz, NR_SupportedBandwidth_t *supported_BW,
return
false
;
}
uint
16
_t
compute_PDU_length
(
uint32_t
num_TLV
,
uint16_t
total_length
)
uint
32
_t
compute_PDU_length
(
uint32_t
num_TLV
,
uint16_t
total_length
)
{
uint
8
_t
pdu_length
=
8
;
// 2 bytes PDU_Length + 2 bytes PDU_Index + 4 bytes num_TLV
uint
32
_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 @
8035cad7
...
...
@@ -311,7 +311,7 @@ void compute_csi_bitlen(const NR_CSI_MeasConfig_t *csi_MeasConfig, nr_csi_report
uint16_t
nr_get_csi_bitlen
(
nr_csi_report_t
*
csi_report
);
uint
16
_t
compute_PDU_length
(
uint32_t
num_TLV
,
uint16_t
total_length
);
uint
32
_t
compute_PDU_length
(
uint32_t
num_TLV
,
uint16_t
total_length
);
rnti_t
nr_get_ra_rnti
(
uint8_t
s_id
,
uint8_t
t_id
,
uint8_t
f_id
,
uint8_t
ul_carrier_id
);
...
...
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