Merge branch 'develop'
This commit is contained in:
@@ -29,7 +29,7 @@ typedef struct {
|
||||
nfapi_mode_t nfapi_mode;
|
||||
} nfapi_params_t;
|
||||
|
||||
static nfapi_params_t nfapi_params;
|
||||
static nfapi_params_t nfapi_params = {0};
|
||||
|
||||
void set_thread_priority(int priority) {
|
||||
//printf("%s(priority:%d)\n", __FUNCTION__, priority);
|
||||
|
||||
@@ -691,13 +691,14 @@ void pnf_phy_deallocate_p7_vendor_ext(nfapi_p7_message_header_t *header) {
|
||||
free(header);
|
||||
}
|
||||
|
||||
int pnf_phy_hi_dci0_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_hi_dci0_request_t *req) {
|
||||
int pnf_phy_hi_dci0_req(L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7, nfapi_hi_dci0_request_t *req) {
|
||||
if (req->hi_dci0_request_body.number_of_dci == 0 && req->hi_dci0_request_body.number_of_hi == 0)
|
||||
LOG_D(PHY,"[PNF] HI_DCI0_REQUEST SFN/SF:%05d dci:%d hi:%d\n", NFAPI_SFNSF2DEC(req->sfn_sf), req->hi_dci0_request_body.number_of_dci, req->hi_dci0_request_body.number_of_hi);
|
||||
|
||||
//phy_info* phy = (phy_info*)(pnf_p7->user_data);
|
||||
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
|
||||
L1_rxtx_proc_t *proc = &eNB->proc.L1_proc;
|
||||
if (proc ==NULL)
|
||||
proc = &eNB->proc.L1_proc;
|
||||
|
||||
for (int i=0; i<req->hi_dci0_request_body.number_of_dci + req->hi_dci0_request_body.number_of_hi; i++) {
|
||||
//LOG_D(PHY,"[PNF] HI_DCI0_REQ sfn_sf:%d PDU[%d]\n", NFAPI_SFNSF2DEC(req->sfn_sf), i);
|
||||
@@ -718,7 +719,7 @@ int pnf_phy_hi_dci0_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_hi_dci0_request_t *
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_dl_config_request_t *req) {
|
||||
int pnf_phy_dl_config_req(L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7, nfapi_dl_config_request_t *req) {
|
||||
if (RC.ru == 0) {
|
||||
return -1;
|
||||
}
|
||||
@@ -739,7 +740,8 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_dl_config_request
|
||||
int sfn = NFAPI_SFNSF2SFN(req->sfn_sf);
|
||||
int sf = NFAPI_SFNSF2SF(req->sfn_sf);
|
||||
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
|
||||
L1_rxtx_proc_t *proc = &eNB->proc.L1_proc;
|
||||
if (proc==NULL)
|
||||
proc = &eNB->proc.L1_proc;
|
||||
nfapi_dl_config_request_pdu_t *dl_config_pdu_list = req->dl_config_request_body.dl_config_pdu_list;
|
||||
LTE_eNB_PDCCH *pdcch_vars = &eNB->pdcch_vars[sf&1];
|
||||
pdcch_vars->num_pdcch_symbols = req->dl_config_request_body.number_pdcch_ofdm_symbols;
|
||||
@@ -796,7 +798,7 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_dl_config_request
|
||||
uint8_t *dlsch_sdu = tx_pdus[UE_id][harq_pid];
|
||||
memcpy(dlsch_sdu, tx_pdu->segments[0].segment_data, tx_pdu->segments[0].segment_length);
|
||||
//NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() DLSCH:pdu_index:%d handle_nfapi_dlsch_pdu(eNB, proc_rxtx, dlsch_pdu, transport_blocks:%d sdu:%p) eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols:%d\n", __FUNCTION__, rel8_pdu->pdu_index, rel8_pdu->transport_blocks, dlsch_sdu, eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols);
|
||||
handle_nfapi_dlsch_pdu( eNB, sfn,sf, &eNB->proc.L1_proc, &dl_config_pdu_list[i], rel8_pdu->transport_blocks-1, dlsch_sdu);
|
||||
handle_nfapi_dlsch_pdu( eNB, sfn,sf, proc, &dl_config_pdu_list[i], rel8_pdu->transport_blocks-1, dlsch_sdu);
|
||||
} else {
|
||||
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s() DLSCH NULL TX PDU SFN/SF:%d PDU_INDEX:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(req->sfn_sf), rel8_pdu->pdu_index);
|
||||
}
|
||||
@@ -836,7 +838,7 @@ int pnf_phy_tx_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_tx_request_t *req) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pnf_phy_ul_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_ul_config_request_t *req) {
|
||||
int pnf_phy_ul_config_req(L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7, nfapi_ul_config_request_t *req) {
|
||||
if (0)LOG_D(PHY,"[PNF] UL_CONFIG_REQ %s() sfn_sf:%d pdu:%d rach_prach_frequency_resources:%d srs_present:%u\n",
|
||||
__FUNCTION__,
|
||||
NFAPI_SFNSF2DEC(req->sfn_sf),
|
||||
@@ -865,7 +867,8 @@ int pnf_phy_ul_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_ul_config_request
|
||||
uint16_t curr_sfn = NFAPI_SFNSF2SFN(req->sfn_sf);
|
||||
uint16_t curr_sf = NFAPI_SFNSF2SF(req->sfn_sf);
|
||||
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
|
||||
L1_rxtx_proc_t *proc = &eNB->proc.L1_proc;
|
||||
if (proc==NULL)
|
||||
proc = &eNB->proc.L1_proc;
|
||||
nfapi_ul_config_request_pdu_t *ul_config_pdu_list = req->ul_config_request_body.ul_config_pdu_list;
|
||||
|
||||
for (int i=0; i<req->ul_config_request_body.number_of_pdus; i++) {
|
||||
|
||||
@@ -23,5 +23,5 @@
|
||||
#define NFAPI_PNF_H__
|
||||
int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
|
||||
void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port);
|
||||
|
||||
void oai_subframe_ind(uint16_t sfn, uint16_t sf);
|
||||
#endif
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#define _NFAPI_NR_INTERFACE_H_
|
||||
|
||||
#include "nfapi_interface.h"
|
||||
#include <nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h>
|
||||
|
||||
#define NFAPI_NR_MAX_NB_CCE_AGGREGATION_LEVELS 5
|
||||
#define NFAPI_NR_MAX_NB_TCI_STATES_PDCCH 64
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#define NFAPI_MAX_NUM_UL_UE_PER_GROUP 6
|
||||
#define NFAPI_MAX_NUM_UL_PDU 8
|
||||
#define NFAPI_MAX_NUM_UCI_INDICATION 8
|
||||
#define NFAPI_MAX_NUM_GROUPS 8
|
||||
#define NFAPI_MAX_NUM_CB 8
|
||||
|
||||
@@ -1519,8 +1520,8 @@ typedef struct
|
||||
uint8_t ul_cqi;
|
||||
uint16_t timing_advance;
|
||||
uint16_t rssi;
|
||||
nfapi_nr_sr_pdu_0_1_t sr;//67
|
||||
nfapi_nr_harq_pdu_0_1_t harq;//68
|
||||
nfapi_nr_sr_pdu_0_1_t *sr;//67
|
||||
nfapi_nr_harq_pdu_0_1_t *harq;//68
|
||||
|
||||
|
||||
}nfapi_nr_uci_pucch_pdu_format_0_1_t;
|
||||
@@ -1542,28 +1543,22 @@ typedef struct
|
||||
|
||||
}nfapi_nr_uci_pucch_pdu_format_2_3_4_t;
|
||||
|
||||
//for SR, HARQ and CSI Part 1/ 2 PDUs
|
||||
typedef enum {
|
||||
NFAPI_NR_UCI_PDCCH_PDU_TYPE = 0,
|
||||
NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE = 1,
|
||||
NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE = 2,
|
||||
} nfapi_nr_uci_pdu_type_e;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
nfapi_nr_uci_pusch_pdu_t* pusch_pdu;
|
||||
nfapi_nr_uci_pucch_pdu_format_0_1_t* pucch_pdu_format_0_1;
|
||||
nfapi_nr_uci_pucch_pdu_format_2_3_4_t* pucch_pdu_format_2_3_4;
|
||||
nfapi_nr_sr_pdu_0_1_t* sr_pdu_0_1;
|
||||
nfapi_nr_sr_pdu_2_3_4_t* sr_pdu_2_3_4;
|
||||
nfapi_nr_harq_pdu_0_1_t* harq_pdu_0_1;
|
||||
nfapi_nr_harq_pdu_2_3_4_t* harq_pdu_2_3_4;
|
||||
nfapi_nr_csi_part1_pdu_t* csi_part1_pdu;
|
||||
nfapi_nr_csi_part2_pdu_t* csi_part2_pdu;
|
||||
|
||||
} nfapi_nr_uci_pdu_information_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t pdu_type;
|
||||
uint16_t pdu_type; // 0 for PDU on PUSCH, 1 for PUCCH format 0 or 1, 2 for PUCCH format 2 to 4
|
||||
uint16_t pdu_size;
|
||||
nfapi_nr_uci_pdu_information_t uci_pdu;
|
||||
|
||||
union
|
||||
{
|
||||
nfapi_nr_uci_pusch_pdu_t pusch_pdu;
|
||||
nfapi_nr_uci_pucch_pdu_format_0_1_t pucch_pdu_format_0_1;
|
||||
nfapi_nr_uci_pucch_pdu_format_2_3_4_t pucch_pdu_format_2_3_4;
|
||||
};
|
||||
} nfapi_nr_uci_t;
|
||||
|
||||
typedef struct
|
||||
@@ -1571,7 +1566,7 @@ typedef struct
|
||||
uint16_t sfn;
|
||||
uint16_t slot;
|
||||
uint16_t num_ucis;
|
||||
nfapi_nr_uci_t* uci_list;
|
||||
nfapi_nr_uci_t uci_list[NFAPI_MAX_NUM_UCI_INDICATION];
|
||||
|
||||
} nfapi_nr_uci_indication_t;
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ extern "C" {
|
||||
|
||||
#include "nfapi_interface.h"
|
||||
#include "debug.h"
|
||||
#include <openair2/PHY_INTERFACE/IF_Module.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
@@ -619,21 +620,21 @@ typedef struct nfapi_pnf_p7_config
|
||||
* \param req A pointer to the dl config request message structure
|
||||
* \return not currently used
|
||||
*/
|
||||
int (*dl_config_req)(nfapi_pnf_p7_config_t* config, nfapi_dl_config_request_t* req);
|
||||
int (*dl_config_req)(L1_rxtx_proc_t *proc,nfapi_pnf_p7_config_t* config, nfapi_dl_config_request_t* req);
|
||||
|
||||
/*! A callback for the UL_CONFIG.request
|
||||
* \param config A poiner to the PNF P7 config
|
||||
* \param req A pointer to the ul config request message structure
|
||||
* \return not currently used
|
||||
*/
|
||||
int (*ul_config_req)(nfapi_pnf_p7_config_t* config, nfapi_ul_config_request_t* req);
|
||||
int (*ul_config_req)(L1_rxtx_proc_t *proc,nfapi_pnf_p7_config_t* config, nfapi_ul_config_request_t* req);
|
||||
|
||||
/*! A callback for the HI_DCI0.request
|
||||
* \param config A poiner to the PNF P7 config
|
||||
* \param req A pointer to the hi dci0 request message structure
|
||||
* \return not currently used
|
||||
*/
|
||||
int (*hi_dci0_req)(nfapi_pnf_p7_config_t* config, nfapi_hi_dci0_request_t* req);
|
||||
int (*hi_dci0_req)(L1_rxtx_proc_t *proc,nfapi_pnf_p7_config_t* config, nfapi_hi_dci0_request_t* req);
|
||||
|
||||
/*! A callback for the TX_REQ.request
|
||||
* \param config A poiner to the PNF P7 config
|
||||
|
||||
@@ -39,7 +39,7 @@ nfapi_pnf_config_t* nfapi_pnf_config_create()
|
||||
_this->_public.codec_config.allocate = &malloc;
|
||||
_this->_public.codec_config.deallocate = &free;
|
||||
|
||||
return &(_this->_public);
|
||||
return (nfapi_pnf_config_t* )_this;
|
||||
}
|
||||
|
||||
void nfapi_pnf_config_destory(nfapi_pnf_config_t* config)
|
||||
|
||||
@@ -576,20 +576,20 @@ void send_dummy_subframe(pnf_p7_t* pnf_p7, uint16_t sfn_sf)
|
||||
{
|
||||
pnf_p7->_public.dummy_subframe.dl_config_req->sfn_sf = sfn_sf;
|
||||
//NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy dl_config_req - enter\n");
|
||||
(pnf_p7->_public.dl_config_req)(&(pnf_p7->_public), pnf_p7->_public.dummy_subframe.dl_config_req);
|
||||
(pnf_p7->_public.dl_config_req)(NULL, &(pnf_p7->_public), pnf_p7->_public.dummy_subframe.dl_config_req);
|
||||
//NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy dl_config_req - exit\n");
|
||||
}
|
||||
if(pnf_p7->_public.ul_config_req && pnf_p7->_public.dummy_subframe.ul_config_req)
|
||||
{
|
||||
pnf_p7->_public.dummy_subframe.ul_config_req->sfn_sf = sfn_sf;
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy ul_config_req - enter\n");
|
||||
(pnf_p7->_public.ul_config_req)(&pnf_p7->_public, pnf_p7->_public.dummy_subframe.ul_config_req);
|
||||
(pnf_p7->_public.ul_config_req)(NULL, &pnf_p7->_public, pnf_p7->_public.dummy_subframe.ul_config_req);
|
||||
}
|
||||
if(pnf_p7->_public.hi_dci0_req && pnf_p7->_public.dummy_subframe.hi_dci0_req)
|
||||
{
|
||||
pnf_p7->_public.dummy_subframe.hi_dci0_req->sfn_sf = sfn_sf;
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy hi_dci0 - enter\n");
|
||||
(pnf_p7->_public.hi_dci0_req)(&pnf_p7->_public, pnf_p7->_public.dummy_subframe.hi_dci0_req);
|
||||
(pnf_p7->_public.hi_dci0_req)(NULL, &pnf_p7->_public, pnf_p7->_public.dummy_subframe.hi_dci0_req);
|
||||
}
|
||||
if(pnf_p7->_public.lbt_dl_config_req && pnf_p7->_public.dummy_subframe.lbt_dl_config_req)
|
||||
{
|
||||
@@ -699,7 +699,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
|
||||
if(tx_subframe_buffer->dl_config_req != 0)
|
||||
{
|
||||
if(pnf_p7->_public.dl_config_req)
|
||||
(pnf_p7->_public.dl_config_req)(&(pnf_p7->_public), tx_subframe_buffer->dl_config_req);
|
||||
(pnf_p7->_public.dl_config_req)(NULL, &(pnf_p7->_public), tx_subframe_buffer->dl_config_req);
|
||||
|
||||
//deallocate_nfapi_dl_config_request(subframe_buffer->dl_config_req, pnf_p7);
|
||||
}
|
||||
@@ -709,14 +709,14 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
|
||||
if(pnf_p7->_public.dl_config_req && pnf_p7->_public.dummy_subframe.dl_config_req)
|
||||
{
|
||||
pnf_p7->_public.dummy_subframe.dl_config_req->sfn_sf = sfn_sf_tx;
|
||||
(pnf_p7->_public.dl_config_req)(&(pnf_p7->_public), pnf_p7->_public.dummy_subframe.dl_config_req);
|
||||
(pnf_p7->_public.dl_config_req)(NULL, &(pnf_p7->_public), pnf_p7->_public.dummy_subframe.dl_config_req);
|
||||
}
|
||||
}
|
||||
|
||||
if(tx_subframe_buffer->hi_dci0_req != 0)
|
||||
{
|
||||
if(pnf_p7->_public.hi_dci0_req)
|
||||
(pnf_p7->_public.hi_dci0_req)(&(pnf_p7->_public), tx_subframe_buffer->hi_dci0_req);
|
||||
(pnf_p7->_public.hi_dci0_req)(NULL, &(pnf_p7->_public), tx_subframe_buffer->hi_dci0_req);
|
||||
|
||||
//deallocate_nfapi_hi_dci0_request(subframe_buffer->hi_dci0_req, pnf_p7);
|
||||
}
|
||||
@@ -726,7 +726,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
|
||||
if(pnf_p7->_public.hi_dci0_req && pnf_p7->_public.dummy_subframe.hi_dci0_req)
|
||||
{
|
||||
pnf_p7->_public.dummy_subframe.hi_dci0_req->sfn_sf = sfn_sf_tx;
|
||||
(pnf_p7->_public.hi_dci0_req)(&(pnf_p7->_public), pnf_p7->_public.dummy_subframe.hi_dci0_req);
|
||||
(pnf_p7->_public.hi_dci0_req)(NULL, &(pnf_p7->_public), pnf_p7->_public.dummy_subframe.hi_dci0_req);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -777,7 +777,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
|
||||
if(subframe_buffer->ul_config_req != 0)
|
||||
{
|
||||
if(pnf_p7->_public.ul_config_req)
|
||||
(pnf_p7->_public.ul_config_req)(&(pnf_p7->_public), subframe_buffer->ul_config_req);
|
||||
(pnf_p7->_public.ul_config_req)(NULL, &(pnf_p7->_public), subframe_buffer->ul_config_req);
|
||||
|
||||
//deallocate_nfapi_ul_config_request(subframe_buffer->ul_config_req, pnf_p7);
|
||||
}
|
||||
@@ -787,7 +787,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
|
||||
if(pnf_p7->_public.ul_config_req && pnf_p7->_public.dummy_subframe.ul_config_req)
|
||||
{
|
||||
pnf_p7->_public.dummy_subframe.ul_config_req->sfn_sf = sfn_sf;
|
||||
(pnf_p7->_public.ul_config_req)(&(pnf_p7->_public), pnf_p7->_public.dummy_subframe.ul_config_req);
|
||||
(pnf_p7->_public.ul_config_req)(NULL, &(pnf_p7->_public), pnf_p7->_public.dummy_subframe.ul_config_req);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ nfapi_vnf_config_t* nfapi_vnf_config_create()
|
||||
_this->_public.codec_config.deallocate = &free;
|
||||
|
||||
|
||||
return &(_this->_public);
|
||||
return (nfapi_vnf_config_t* )_this;
|
||||
}
|
||||
|
||||
void nfapi_vnf_config_destory(nfapi_vnf_config_t* config)
|
||||
|
||||
@@ -47,7 +47,7 @@ nfapi_vnf_p7_config_t* nfapi_vnf_p7_config_create()
|
||||
_this->_public.codec_config.deallocate = &free;
|
||||
|
||||
|
||||
return &(_this->_public);
|
||||
return (nfapi_vnf_p7_config_t*)_this;
|
||||
}
|
||||
|
||||
void nfapi_vnf_p7_config_destory(nfapi_vnf_p7_config_t* config)
|
||||
|
||||
Reference in New Issue
Block a user