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
wangjie
OpenXG-RAN
Commits
fe7c416e
Commit
fe7c416e
authored
Aug 03, 2020
by
Aniq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TX_DATA_REQUEST COMPLETED
parent
5406c167
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
83 additions
and
13 deletions
+83
-13
nfapi/README.md
nfapi/README.md
+4
-4
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
+79
-9
No files found.
nfapi/README.md
View file @
fe7c416e
...
@@ -29,7 +29,7 @@ sudo <oai_codebase>/cmake_targets/ran_build/build/nr-softmodem -O <oai_codebase>
...
@@ -29,7 +29,7 @@ sudo <oai_codebase>/cmake_targets/ran_build/build/nr-softmodem -O <oai_codebase>
*
`pack_dl_config_request`
becomes
`pack_dl_tti_request`
[x]
*
`pack_dl_config_request`
becomes
`pack_dl_tti_request`
[x]
*
`pack_ul_config_request`
becomes
`pack_ul_tti_request`
[x]
*
`pack_ul_config_request`
becomes
`pack_ul_tti_request`
[x]
*
`pack_hi_dci0_request`
becomes
`pack_ul_dci_request`
*
`pack_hi_dci0_request`
becomes
`pack_ul_dci_request`
*
`pack_tx_request`
becomes
`pack_tx_data_request`
*
`pack_tx_request`
becomes
`pack_tx_data_request`
[x]
### Task-B [unpacking]
### Task-B [unpacking]
*
Modify
`nfapi_p7_message_unpack()`
in
`nfapi_p7.c`
*
Modify
`nfapi_p7_message_unpack()`
in
`nfapi_p7.c`
...
@@ -52,15 +52,15 @@ sudo <oai_codebase>/cmake_targets/ran_build/build/nr-softmodem -O <oai_codebase>
...
@@ -52,15 +52,15 @@ sudo <oai_codebase>/cmake_targets/ran_build/build/nr-softmodem -O <oai_codebase>
*
`dl_tti`
is present as
`nr_dl_config`
[x]
*
`dl_tti`
is present as
`nr_dl_config`
[x]
*
`ul_tti`
[x]
*
`ul_tti`
[x]
*
`ul_dci`
*
`ul_dci`
*
`tx_data`
*
`tx_data`
[x]
*
Resolve the hard-coded areas in source code. [
`HIGH-PRIORITY`
] [x]
*
Resolve the hard-coded areas in source code. [
`HIGH-PRIORITY`
] [x]
*
Write the
`ul_tti`
equivalent for
`oai_nfapi_dl_config_req`
in
`nfapi_vnf.c`
and other such functions.
*
Write the
`ul_tti`
equivalent for
`oai_nfapi_dl_config_req`
in
`nfapi_vnf.c`
and other such functions.
*
`dl_tti`
is present as
`nr_dl_config`
[x]
*
`dl_tti`
is present as
`nr_dl_config`
[x]
*
`ul_tti`
is present as
`oai_nfapi_ul_tti_req()`
[x]
*
`ul_tti`
is present as
`oai_nfapi_ul_tti_req()`
[x]
*
`ul_dci`
*
`ul_dci`
*
`tx_data`
*
`tx_data`
is present as
`oai_nfapi_tx_data_req()`
[x]
*
Check if
`nr_schedule_response()`
needs to be upgraded [x]
*
Check if
`nr_schedule_response()`
needs to be upgraded [x]
*
only a couple of
`NFAPI_MODE!=VNF_MODE`
checks
*can be added*
before calling the functions to handle PDUs
*
only a couple of
`NFAPI_MODE!=VNF_MODE`
checks
*can be added*
before calling the functions to handle PDUs
...
...
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
View file @
fe7c416e
...
@@ -2123,7 +2123,6 @@ static uint8_t pack_tx_data_pdu_list_value(void* tlv, uint8_t **ppWritePackedMsg
...
@@ -2123,7 +2123,6 @@ static uint8_t pack_tx_data_pdu_list_value(void* tlv, uint8_t **ppWritePackedMsg
}
}
case
1
:
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
,
value
->
TLVs
[
i
].
length
,
ppWritePackedMsg
,
end
))
...
@@ -2134,7 +2133,7 @@ static uint8_t pack_tx_data_pdu_list_value(void* tlv, uint8_t **ppWritePackedMsg
...
@@ -2134,7 +2133,7 @@ static uint8_t pack_tx_data_pdu_list_value(void* tlv, uint8_t **ppWritePackedMsg
default:
default:
{
{
// NFAPI_TRACE
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"FIXME : Invalid tag value %d
\n
"
,
value
->
TLVs
[
i
].
tag
);
break
;
break
;
}
}
...
@@ -5789,6 +5788,72 @@ static uint8_t unpack_hi_dci0_request(uint8_t **ppReadPackedMsg, uint8_t *end, v
...
@@ -5789,6 +5788,72 @@ static uint8_t unpack_hi_dci0_request(uint8_t **ppReadPackedMsg, uint8_t *end, v
unpack_p7_tlv_list
(
unpack_fns
,
sizeof
(
unpack_fns
)
/
sizeof
(
unpack_tlv_t
),
ppReadPackedMsg
,
end
,
config
,
&
pNfapiMsg
->
vendor_extension
));
unpack_p7_tlv_list
(
unpack_fns
,
sizeof
(
unpack_fns
)
/
sizeof
(
unpack_tlv_t
),
ppReadPackedMsg
,
end
,
config
,
&
pNfapiMsg
->
vendor_extension
));
}
}
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
(
!
(
pull32
(
ppReadPackedMsg
,
&
pNfapiMsg
->
num_TLV
,
end
)
&&
pull16
(
ppReadPackedMsg
,
&
pNfapiMsg
->
PDU_index
,
end
)
&&
pull16
(
ppReadPackedMsg
,
&
pNfapiMsg
->
PDU_length
,
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
].
length
,
end
)
&&
pull16
(
ppReadPackedMsg
,
&
pNfapiMsg
->
TLVs
[
i
].
tag
,
end
)))
return
0
;
switch
(
pNfapiMsg
->
TLVs
[
i
].
tag
){
case
0
:
{
if
(
!
pullarray32
(
ppReadPackedMsg
,
&
pNfapiMsg
->
TLVs
[
i
].
value
.
direct
,
16384
,
pNfapiMsg
->
TLVs
[
i
].
length
,
end
))
return
0
;
break
;
}
case
1
:
{
if
(
!
pullarray32
(
ppReadPackedMsg
,
&
pNfapiMsg
->
TLVs
[
i
].
value
.
ptr
,
pNfapiMsg
->
TLVs
[
i
].
length
,
pNfapiMsg
->
TLVs
[
i
].
length
,
end
))
return
0
;
break
;
}
default:
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"FIXME : Invalid tag value %d
\n
"
,
pNfapiMsg
->
TLVs
[
i
].
tag
);
break
;
}
}
}
return
1
;
}
static
uint8_t
unpack_tx_data_request
(
uint8_t
**
ppReadPackedMsg
,
uint8_t
*
end
,
void
*
msg
,
nfapi_p7_codec_config_t
*
config
)
{
nfapi_nr_tx_data_request_t
*
pNfapiMsg
=
(
nfapi_nr_tx_data_request_t
*
)
msg
;
if
(
!
(
pull16
(
ppReadPackedMsg
,
&
pNfapiMsg
->
SFN
,
end
)
&&
pull16
(
ppReadPackedMsg
,
&
pNfapiMsg
->
Slot
,
end
)
&&
pull16
(
ppReadPackedMsg
,
&
pNfapiMsg
->
Number_of_PDUs
,
end
)))
return
0
;
for
(
int
i
=
0
;
i
<
pNfapiMsg
->
Number_of_PDUs
;
i
++
)
{
if
(
!
unpack_tx_data_pdu_list_value
(
ppReadPackedMsg
,
end
,
&
pNfapiMsg
->
pdu_list
[
i
]))
return
0
;
}
return
1
;
}
static
uint8_t
unpack_tx_request
(
uint8_t
**
ppReadPackedMsg
,
uint8_t
*
end
,
void
*
msg
,
nfapi_p7_codec_config_t
*
config
)
static
uint8_t
unpack_tx_request
(
uint8_t
**
ppReadPackedMsg
,
uint8_t
*
end
,
void
*
msg
,
nfapi_p7_codec_config_t
*
config
)
{
{
...
@@ -7525,6 +7590,12 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
...
@@ -7525,6 +7590,12 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
else
else
return
-
1
;
return
-
1
;
break
;
break
;
case
NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST
:
if
(
check_unpack_length
(
NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST
,
unpackedBufLen
))
result
=
unpack_tx_data_request
(
&
pReadPackedMessage
,
end
,
pMessageHeader
,
config
);
else
return
-
1
;
break
;
#if 0
#if 0
case NFAPI_DL_CONFIG_REQUEST:
case NFAPI_DL_CONFIG_REQUEST:
if (check_unpack_length(NFAPI_DL_CONFIG_REQUEST, unpackedBufLen))
if (check_unpack_length(NFAPI_DL_CONFIG_REQUEST, unpackedBufLen))
...
@@ -7539,6 +7610,12 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
...
@@ -7539,6 +7610,12 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
else
else
return -1;
return -1;
break;
break;
case NFAPI_TX_REQUEST:
if (check_unpack_length(NFAPI_TX_REQUEST, unpackedBufLen))
result = unpack_tx_request(&pReadPackedMessage, end, pMessageHeader, config);
else
return -1;
break;
#endif
#endif
case
NFAPI_HI_DCI0_REQUEST
:
case
NFAPI_HI_DCI0_REQUEST
:
if
(
check_unpack_length
(
NFAPI_HI_DCI0_REQUEST
,
unpackedBufLen
))
if
(
check_unpack_length
(
NFAPI_HI_DCI0_REQUEST
,
unpackedBufLen
))
...
@@ -7547,13 +7624,6 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
...
@@ -7547,13 +7624,6 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
return
-
1
;
return
-
1
;
break
;
break
;
case
NFAPI_TX_REQUEST
:
if
(
check_unpack_length
(
NFAPI_TX_REQUEST
,
unpackedBufLen
))
result
=
unpack_tx_request
(
&
pReadPackedMessage
,
end
,
pMessageHeader
,
config
);
else
return
-
1
;
break
;
case
NFAPI_UE_RELEASE_REQUEST
:
case
NFAPI_UE_RELEASE_REQUEST
:
if
(
check_unpack_length
(
NFAPI_UE_RELEASE_REQUEST
,
unpackedBufLen
))
if
(
check_unpack_length
(
NFAPI_UE_RELEASE_REQUEST
,
unpackedBufLen
))
result
=
unpack_ue_release_request
(
&
pReadPackedMessage
,
end
,
pMessageHeader
,
config
);
result
=
unpack_ue_release_request
(
&
pReadPackedMessage
,
end
,
pMessageHeader
,
config
);
...
...
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