Revert "Getting rid of pthread warning and fixing nfapi"
This reverts commit 9a78b58927.
This commit is contained in:
+2
-1
@@ -18,7 +18,7 @@
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <openair1/PHY/impl_defs_top.h>
|
||||
#include "executables/nr-uesoftmodem.h"
|
||||
#include "PHY/phy_extern_nr_ue.h"
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "LAYER2/nr_pdcp/nr_pdcp_entity.h"
|
||||
#include "SCHED_NR_UE/pucch_uci_ue_nr.h"
|
||||
#include "openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h"
|
||||
#include <pthread.h>
|
||||
|
||||
/*
|
||||
* NR SLOT PROCESSING SEQUENCE
|
||||
|
||||
@@ -1530,7 +1530,7 @@ uint8_t is_nr_p7_request_in_window(uint16_t sfn,uint16_t slot, const char* name,
|
||||
|
||||
else
|
||||
{
|
||||
in_window = 1;
|
||||
|
||||
NFAPI_TRACE(NFAPI_TRACE_NOTE, "[%d] %s is out of window %d (delta:%d) [max:%d]\n", current_sfn_slot_dec, name, recv_sfn_slot_dec, (current_sfn_slot_dec - recv_sfn_slot_dec), timing_window);
|
||||
|
||||
}//Need to add more cases
|
||||
@@ -1615,15 +1615,25 @@ void pnf_handle_dl_tti_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_p7)
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_nr_p7_request_in_window(req->SFN,req->Slot, "dl_tti_request", pnf_p7))
|
||||
{
|
||||
uint32_t sfn_slot_dec = NFAPI_SFNSLOT2DEC(req->SFN,req->Slot);
|
||||
uint8_t buffer_index = sfn_slot_dec % 20;
|
||||
if(is_nr_p7_request_in_window(req->SFN,req->Slot, "dl_tti_request", pnf_p7))
|
||||
{
|
||||
uint32_t sfn_slot_dec = NFAPI_SFNSLOT2DEC(req->SFN,req->Slot);
|
||||
uint8_t buffer_index = sfn_slot_dec % 20;
|
||||
|
||||
struct timespec t;
|
||||
clock_gettime(CLOCK_MONOTONIC, &t);
|
||||
struct timespec t;
|
||||
clock_gettime(CLOCK_MONOTONIC, &t);
|
||||
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO,"%s() %ld.%09ld POPULATE DL_TTI_REQ current tx sfn/slot:%d.%d p7 msg sfn/slot: %d.%d buffer_index:%d\n", __FUNCTION__, t.tv_sec, t.tv_nsec, pnf_p7->sfn,pnf_p7->slot, req->SFN, req->Slot, buffer_index);
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO,"%s() %ld.%09ld POPULATE DL_TTI_REQ current tx sfn/slot:%d.%d p7 msg sfn/slot: %d.%d buffer_index:%d\n", __FUNCTION__, t.tv_sec, t.tv_nsec, pnf_p7->sfn,pnf_p7->slot, req->SFN, req->Slot, buffer_index);
|
||||
|
||||
// if there is already an dl_tti_req make sure we free it.
|
||||
if(pnf_p7->slot_buffer[buffer_index].dl_tti_req != 0)
|
||||
{
|
||||
NFAPI_TRACE(NFAPI_TRACE_NOTE, "%s() is_nr_p7_request_in_window()=TRUE buffer_index occupied - free it first sfn_slot:%d buffer_index:%d\n", __FUNCTION__, NFAPI_SFNSLOT2DEC(req->SFN,req->Slot), buffer_index);
|
||||
//NFAPI_TRACE(NFAPI_TRACE_NOTE, "[%d] Freeing dl_config_req at index %d (%d/%d)",
|
||||
// pMyPhyInfo->sfnSf, bufferIdx,
|
||||
// SFNSF2SFN(dreq->sfn_sf), SFNSF2SF(dreq->sfn_sf));
|
||||
deallocate_nfapi_dl_tti_request(pnf_p7->slot_buffer[buffer_index].dl_tti_req, pnf_p7);
|
||||
}
|
||||
|
||||
// filling dl_tti_request in slot buffer
|
||||
pnf_p7->slot_buffer[buffer_index].sfn = req->SFN;
|
||||
@@ -2066,6 +2076,23 @@ void pnf_handle_tx_data_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_p7
|
||||
struct timespec t;
|
||||
clock_gettime(CLOCK_MONOTONIC, &t);
|
||||
|
||||
//NFAPI_TRACE(NFAPI_TRACE_INFO,"%s() %ld.%09ld POPULATE TX_DATA_REQ sfn_sf:%d buffer_index:%d\n", __FUNCTION__, t.tv_sec, t.tv_nsec, sfn_slot_dec, buffer_index);
|
||||
#if 0
|
||||
if (0 && NFAPI_SFNSF2DEC(req->sfn_sf)%100==0) NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() TX_REQ.req sfn_sf:%d pdus:%d - TX_REQ is within window\n",
|
||||
__FUNCTION__,
|
||||
NFAPI_SFNSF2DEC(req->sfn_sf),
|
||||
req->tx_request_body.number_of_pdus);
|
||||
#endif
|
||||
|
||||
if(pnf_p7->slot_buffer[buffer_index].tx_data_req != 0)
|
||||
{
|
||||
//NFAPI_TRACE(NFAPI_TRACE_NOTE, "[%d] Freeing tx_req at index %d (%d/%d)",
|
||||
// pMyPhyInfo->sfnSf, bufferIdx,
|
||||
// SFNSF2SFN(dreq->sfn_sf), SFNSF2SF(dreq->sfn_sf));
|
||||
|
||||
deallocate_nfapi_tx_data_request(pnf_p7->slot_buffer[buffer_index].tx_data_req, pnf_p7);
|
||||
}
|
||||
|
||||
pnf_p7->slot_buffer[buffer_index].sfn = req->SFN;
|
||||
pnf_p7->slot_buffer[buffer_index].slot = req->Slot;
|
||||
pnf_p7->slot_buffer[buffer_index].tx_data_req = req;
|
||||
|
||||
Reference in New Issue
Block a user