Commit f67a5aa0 authored by Aniq's avatar Aniq

linked the new unpack message fns in check_unpack_length()

parent 3d401150
...@@ -133,7 +133,8 @@ ...@@ -133,7 +133,8 @@
"/home/glab/NR_nfapi/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf", "/home/glab/NR_nfapi/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf",
"--rfsim", "--rfsim",
"--rfsimulator.serveraddr", "--rfsimulator.serveraddr",
"server"], "server",
"--phy-test"],
"stopAtEntry": false, "stopAtEntry": false,
"cwd": "${workspaceFolder}", "cwd": "${workspaceFolder}",
"environment": [], "environment": [],
......
...@@ -39,20 +39,36 @@ sudo <oai_codebase>/cmake_targets/ran_build/build/nr-softmodem -O <oai_codebase> ...@@ -39,20 +39,36 @@ sudo <oai_codebase>/cmake_targets/ran_build/build/nr-softmodem -O <oai_codebase>
* `unpack_tx_data_request` * `unpack_tx_data_request`
* Similarly change all the `unpack` functions within the switch-case block. * Similarly change all the `unpack` functions within the switch-case block.
* Modify the behaviour of `check_unpack_length()` for the new `TAGS` * Modify the behaviour of `check_unpack_length()` for the new `TAGS`
* this is where the unpack functions are called
* `dl_tti_request` [x]
* `ul_tti_request`
* `ul_dci_request`
* `tx_data_request`
### Task-C ### Task-C
* Write the `dl_tti` alternative for `nfapi_vnf_p7_dl_config_req()` in `vnf_p7_interface.c` and other such functions. * Write the `ul_tti` alternative for `nfapi_vnf_p7_ul_config_req()` in `vnf_p7_interface.c` and other such functions.
* Also check the function `vnf_p7_pack_and_send_p7_msg()` in `vnf_p7.c` for upgrade. * `dl_tti` is present as `nr_dl_config` [x]
* Write the `dl_tti` equivalent for `oai_nfapi_dl_config_req` in `nfapi_vnf.c` and other such functions. * `ul_tti`
* Check if `nr_schedule_response()` needs to be upgraded * `ul_dci`
* `tx_data`
* Resolve the hard-coded areas in source code. [`HIGH-PRIORITY`] [x] * Resolve the hard-coded areas in source code. [`HIGH-PRIORITY`] [x]
* Check whether the code can support latency of 0.5 ms for oai_slot_indication * 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]
* `ul_tti`
* `ul_dci`
* `tx_data`
* 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
* we need to add `NFAPI_MODE!=MONOLITHIC` checks before `oai_nfapi_dl_config_req` and other such fns [x]
* Sync with the latest stable commit in `develop` branch [`LOW-PRIORITY`]
* check deviations
### Testing ### Testing
* Test by running VNF on a terminal and PNF in rfsim parallely * Test by running VNF on a terminal and PNF in rfsim parallely
* If all works fine, move to UE testing. * If all works fine, move to UE testing.
* Check if the `FAPI` core functionality is not broken by running gNB in monolithic mode * Check if the `FAPI` core functionality is not broken by running gNB in monolithic mode
* Sync with the latest stable commit in `develop` branch [`HIGH-PRIORITY`] * Check whether the code can support latency of 0.5 ms for oai_slot_indication
* Testing with a UE * Testing with a UE
* Run VNF * Run VNF
......
...@@ -6859,13 +6859,20 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn ...@@ -6859,13 +6859,20 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
// look for the specific message // look for the specific message
switch (pMessageHeader->message_id) switch (pMessageHeader->message_id)
{ {
case NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST:
if (check_unpack_length(NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST, unpackedBufLen))
result = unpack_dl_tti_request(&pReadPackedMessage, end, pMessageHeader, config);
else
return -1;
break;
#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))
result = unpack_dl_config_request(&pReadPackedMessage, end, pMessageHeader, config); result = unpack_dl_config_request(&pReadPackedMessage, end, pMessageHeader, config);
else else
return -1; return -1;
break; break;
#endif
case NFAPI_UL_CONFIG_REQUEST: case NFAPI_UL_CONFIG_REQUEST:
if (check_unpack_length(NFAPI_UL_CONFIG_REQUEST, unpackedBufLen)) if (check_unpack_length(NFAPI_UL_CONFIG_REQUEST, unpackedBufLen))
result = unpack_ul_config_request(&pReadPackedMessage, end, pMessageHeader, config); result = unpack_ul_config_request(&pReadPackedMessage, end, pMessageHeader, config);
......
...@@ -875,7 +875,7 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl ...@@ -875,7 +875,7 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl
// If we ever need to "send" a dummy ul_config this won't work!!! // If we ever need to "send" a dummy ul_config this won't work!!!
// send_dummy_subframe(pnf_p7, sfn_sf_tx); // send_dummy_subframe(pnf_p7, sfn_sf_tx);
send_dummy_slot(pnf_p7, sfn_tx, slot_tx); // send_dummy_slot(pnf_p7, sfn_tx, slot_tx);
} }
......
...@@ -168,7 +168,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){ ...@@ -168,7 +168,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
switch (dl_tti_pdu->PDUType) { switch (dl_tti_pdu->PDUType) {
case NFAPI_NR_DL_TTI_SSB_PDU_TYPE: case NFAPI_NR_DL_TTI_SSB_PDU_TYPE:
gNB->pbch_configured=1; gNB->pbch_configured=1;
// if (NFAPI_MODE!=NFAPI_MODE_VNF) ?
handle_nr_nfapi_ssb_pdu(gNB,frame,slot, handle_nr_nfapi_ssb_pdu(gNB,frame,slot,
dl_tti_pdu); dl_tti_pdu);
...@@ -176,6 +176,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){ ...@@ -176,6 +176,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
case NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE: case NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE:
AssertFatal(pdcch_received == 0, "pdcch_received is not 0, we can only handle one PDCCH PDU per slot\n"); AssertFatal(pdcch_received == 0, "pdcch_received is not 0, we can only handle one PDCCH PDU per slot\n");
// if (NFAPI_MODE!=NFAPI_MODE_VNF) ?
handle_nfapi_nr_pdcch_pdu(gNB, handle_nfapi_nr_pdcch_pdu(gNB,
frame, slot, frame, slot,
&dl_tti_pdu->pdcch_pdu); &dl_tti_pdu->pdcch_pdu);
...@@ -191,13 +192,16 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){ ...@@ -191,13 +192,16 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
AssertFatal(TX_req->pdu_list[pduIndex].num_TLV == 1, "TX_req->pdu_list[%d].num_TLV %d != 1\n", AssertFatal(TX_req->pdu_list[pduIndex].num_TLV == 1, "TX_req->pdu_list[%d].num_TLV %d != 1\n",
pduIndex,TX_req->pdu_list[pduIndex].num_TLV); pduIndex,TX_req->pdu_list[pduIndex].num_TLV);
uint8_t *sdu = (uint8_t *)TX_req->pdu_list[pduIndex].TLVs[0].value.direct; uint8_t *sdu = (uint8_t *)TX_req->pdu_list[pduIndex].TLVs[0].value.direct;
// if (NFAPI_MODE!=NFAPI_MODE_VNF) ?
handle_nr_nfapi_pdsch_pdu(gNB,frame,slot,&dl_tti_pdu->pdsch_pdu, sdu); handle_nr_nfapi_pdsch_pdu(gNB,frame,slot,&dl_tti_pdu->pdsch_pdu, sdu);
} }
} }
} }
if (UL_tti_req!=NULL) memcpy(&gNB->UL_tti_req,UL_tti_req,sizeof(nfapi_nr_ul_tti_request_t)); if (UL_tti_req!=NULL)
memcpy(&gNB->UL_tti_req,UL_tti_req,sizeof(nfapi_nr_ul_tti_request_t));
// if (NFAPI_MODE!=NFAPI_MODE_VNF) //should we enclose the for in this?
for (int i=0;i<number_ul_dci_pdu;i++) { for (int i=0;i<number_ul_dci_pdu;i++) {
handle_nfapi_nr_ul_dci_pdu(gNB, handle_nfapi_nr_ul_dci_pdu(gNB,
frame, slot, frame, slot,
......
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