New address port setup

This commit is contained in:
Andrew Burger
2020-07-07 16:11:50 -07:00
parent 3936ceaa36
commit ddca335b5e
6 changed files with 103 additions and 45 deletions
+21 -3
View File
@@ -166,6 +166,9 @@ typedef struct {
} vnf_info;
bool is_rx = false;
bool is_crc = false;
int vnf_pack_vendor_extension_tlv(void *ve, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t *codec) {
//NFAPI_TRACE(NFAPI_TRACE_INFO, "vnf_pack_vendor_extension_tlv\n");
nfapi_tl_t *tlv = (nfapi_tl_t *)ve;
@@ -406,10 +409,21 @@ int phy_subframe_indication(struct nfapi_vnf_p7_config *config, uint16_t phy_id,
first_time = 0;
}
if(UL_RCC_INFO.rx_ind->sfn_sf != 0 && !is_rx)
{
LOG_E(MAC, "Test1 phy_subframe_ind sfn_sf: %u rx_ind sfn_sf: %u\n", sfn_sf, UL_RCC_INFO.rx_ind->sfn_sf);
is_rx = true;
}
if(UL_RCC_INFO.crc_ind->sfn_sf != 0 && !is_crc)
{
LOG_E(MAC, "Test1 phy_subframe_ind sfn_sf: %u crc_ind sfn_sf: %u\n", sfn_sf, UL_RCC_INFO.crc_ind->sfn_sf);
is_crc = true;
}
if (RC.eNB && RC.eNB[0][0]->configured) {
uint16_t sfn = NFAPI_SFNSF2SFN(sfn_sf);
uint16_t sf = NFAPI_SFNSF2SF(sfn_sf);
//LOG_D(PHY,"[VNF] subframe indication sfn_sf:%d sfn:%d sf:%d\n", sfn_sf, sfn, sf);
LOG_D(PHY,"[VNF] subframe indication sfn_sf:%d sfn:%d sf:%d\n", sfn_sf, sfn, sf);
wake_eNB_rxtx(RC.eNB[0][0], sfn, sf);
} else {
printf("[VNF] %s() RC.eNB:%p\n", __FUNCTION__, RC.eNB);
@@ -491,6 +505,7 @@ int phy_rach_indication(struct nfapi_vnf_p7_config *config, nfapi_rach_indicatio
int phy_harq_indication(struct nfapi_vnf_p7_config *config, nfapi_harq_indication_t *ind) {
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
LOG_D(MAC, "%s() NFAPI SFN/SF:%d number_of_harqs:%u\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->harq_indication_body.number_of_harqs);
LOG_E(MAC, "%s entered\n", __func__);
pthread_mutex_lock(&eNB->UL_INFO_mutex);
if(NFAPI_MODE == NFAPI_MODE_VNF){
int8_t index = -1;
@@ -529,7 +544,8 @@ int phy_crc_indication(struct nfapi_vnf_p7_config *config, nfapi_crc_indication_
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
pthread_mutex_lock(&eNB->UL_INFO_mutex);
LOG_E(MAC, "%s entered\n", __func__);
LOG_E(MAC, "%s entered sfn: %u sf: %u\n", __func__, NFAPI_SFNSF2SFN(ind->sfn_sf),
NFAPI_SFNSF2SF(ind->sfn_sf));
if(NFAPI_MODE == NFAPI_MODE_VNF){
int8_t index = -1;
@@ -595,7 +611,8 @@ int phy_rx_indication(struct nfapi_vnf_p7_config *config, nfapi_rx_indication_t
LOG_D(MAC, "%s() NFAPI SFN/SF:%d number_of_pdus:%u\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->rx_indication_body.number_of_pdus);
}
LOG_E(MAC, "%s entered\n", __func__);
LOG_E(MAC, "%s entered sfn: %u sf: %u\n", __func__, NFAPI_SFNSF2SFN(ind->sfn_sf),
NFAPI_SFNSF2SF(ind->sfn_sf));
pthread_mutex_lock(&eNB->UL_INFO_mutex);
if(NFAPI_MODE == NFAPI_MODE_VNF){
int8_t index = -1;
@@ -733,6 +750,7 @@ int phy_cqi_indication(struct nfapi_vnf_p7_config *config, nfapi_cqi_indication_
//mac_cqi_ind(p7_vnf->mac, ind);
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
LOG_D(MAC, "%s() NFAPI SFN/SF:%d number_of_cqis:%u\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->cqi_indication_body.number_of_cqis);
LOG_E(MAC, "%s entered\n", __func__);
pthread_mutex_lock(&eNB->UL_INFO_mutex);
if(NFAPI_MODE == NFAPI_MODE_VNF){
int8_t index = -1;