Commit fe7c416e authored by Aniq's avatar Aniq

TX_DATA_REQUEST COMPLETED

parent 5406c167
Branches unavailable
2024.w43 2024.w42 2024.w41 2024.w40 2024.w39 2024.w38 2024.w36 2024.w35 2024.w34 2024.w33 2024.w32 2024.w31 2024.w30 2024.w29 2024.w28 2024.w27 2024.w26 2024.w25 2024.w24 2024.w23 2024.w22 2024.w21 2024.w18 2024.w17 2024.w16 2024.w15 2024.w14 2024.w13 2024.w12 2024.w11 2024.w10 2024.w09 2024.w08 2024.w06 2024.w05 2024.w04 2024.w03 2024.w02 2024.w01 2023.w51 2023.w50 2023.w49 2023.w48 2023.w47 2023.w45 2023.w43 2023.w42 2023.w41 2023.w40 2023.w39 2023.w38 2023.w37 2023.w36 2023.w34 2023.w33 2023.w32 2023.w31 2023.w30 2023.w29 2023.w28 2023.w27 2023.w26 2023.w25 2023.w24 2023.w23 2023.w22 2023.w21 2023.w20 2023.w19 2023.w18 2023.w18b 2023.w16 2023.w15 2023.w14 2023.w13 2023.w12 2023.w11 2023.w11b 2023.w10 2023.w10b 2023.w09 2023.w08 2023.w08b 2023.w07 2023.w06 2023.w05 2023.w03 2023.w02 2022.42 2022.41 2022.w51 2022.w50 2022.w49 2022.w48 2022.w47 2022.w46 2022.w45 2022.w43 2022.w42 2022.w42b 2022.w41 2022.w40 2022.w39 2022.w38 2022.w37 2022.w37b 2022.w36 2022.w35 2022.w33 2022.w32 2022.w31 2022.w31b 2022.w30 2022.w29 2022.w26 2022.w25 2022.w24 2022.w24b 2022.w23 2022.w22 2022.w21 2022.w20 2022.w19 2022.w18 2022.w17 2022.w15 2022.w15b 2022.w14a 2022.w13 2022.w13b 2022.w13a 2022.w12 2022.w10 2022.w09 2022.w09b 2022.w08 2022.w08b 2022.w07 2022.w07b 2022.w06 2022.w06a 2022.w05 2022.w05b 2022.w03_hotfix 2022.w03_b 2022.w02 2022.w01 2021.wk46 2021.wk14_a 2021.wk13_d 2021.wk13_c 2021.w51_c 2021.w51_a 2021.w50_a 2021.w49_b 2021.w49_a 2021.w48 2021.w47 2021.w46 2021.w46-powder 2021.w45 2021.w45_b 2021.w44 2021.w43 2021.w42 2021.w37 2021.w36 2021.w35 2021.w34 2021.w33 2021.w32 2021.w31 2021.w30 2021.w29 2021.w28 2021.w27 2021.w26 2021.w25 2021.w24 2021.w23 2021.w22 2021.w20 2021.w19 2021.w18_b 2021.w18_a 2021.w17_b 2021.w16 2021.w15 2021.w14 2021.w13_a 2021.w12 2021.w11 2021.w10 2021.w09 2021.w08 v2.1.0 v2.0.0 setparam flexran-eol benetel_gnb_rel_2.0 benetel_gnb_rel_1.0 benetel_enb_rel_2.0 ARC_1.3
No related merge requests found
......@@ -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_ul_config_request` becomes `pack_ul_tti_request` [x]
* `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]
* Modify `nfapi_p7_message_unpack()` in `nfapi_p7.c`
......@@ -52,7 +52,7 @@ sudo <oai_codebase>/cmake_targets/ran_build/build/nr-softmodem -O <oai_codebase>
* `dl_tti` is present as `nr_dl_config` [x]
* `ul_tti` [x]
* `ul_dci`
* `tx_data`
* `tx_data` [x]
* Resolve the hard-coded areas in source code. [`HIGH-PRIORITY`] [x]
......@@ -60,7 +60,7 @@ sudo <oai_codebase>/cmake_targets/ran_build/build/nr-softmodem -O <oai_codebase>
* `dl_tti` is present as `nr_dl_config` [x]
* `ul_tti` is present as `oai_nfapi_ul_tti_req()` [x]
* `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]
* only a couple of `NFAPI_MODE!=VNF_MODE` checks *can be added* before calling the functions to handle PDUs
......
......@@ -2123,7 +2123,6 @@ 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))
......@@ -2134,7 +2133,7 @@ static uint8_t pack_tx_data_pdu_list_value(void* tlv, uint8_t **ppWritePackedMsg
default:
{
// NFAPI_TRACE
NFAPI_TRACE(NFAPI_TRACE_ERROR, "FIXME : Invalid tag value %d \n", value->TLVs[i].tag );
break;
}
......@@ -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));
}
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)
{
......@@ -7525,6 +7590,12 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
else
return -1;
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
case NFAPI_DL_CONFIG_REQUEST:
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
else
return -1;
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
case NFAPI_HI_DCI0_REQUEST:
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
return -1;
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:
if (check_unpack_length(NFAPI_UE_RELEASE_REQUEST, unpackedBufLen))
result = unpack_ue_release_request(&pReadPackedMessage, end, pMessageHeader, config);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment