/******************************************************************************
*
-* Copyright (c) 2019 Intel.
+* Copyright (c) 2020 Intel.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
class PrachPerf : public KernelTests
{
- private:
- struct xran_section_gen_info *m_pSectResult = NULL;
+ // private:
+ // struct xran_section_recv_info *m_pSectResult = NULL; /*Not used*/
protected:
struct xran_fh_config m_xranConf;
m_xranConf.frame_conf.nFrameDuplexType = get_input_parameter<uint8_t>("FrameDuplexType");
m_xranConf.log_level = get_input_parameter<uint32_t>("loglevel");
+ m_xran_dev_ctx.dssPeriod = get_input_parameter<uint8_t>("dssperiod");
m_pPRACHConfig->nPrachConfIdx = get_input_parameter<uint8_t>("PrachConfIdx");
m_pPRACHConfig->nPrachFreqStart = get_input_parameter<uint16_t>("PrachFreqStart");
m_pPRACHConfig->nPrachFreqOffset = get_input_parameter<int32_t>("PrachFreqOffset");
m_pSectGenInfo = new struct xran_section_gen_info[8];
ASSERT_NE(m_pSectGenInfo, nullptr);
m_params.sections = m_pSectGenInfo;
+ m_params.sections[0].info = new xran_section_info;
/* allocating an mbuf for packet generatrion */
m_pTestBuffer = (struct rte_mbuf*)rte_pktmbuf_alloc(_eth_mbuf_pool);
mbuf = (struct rte_mbuf*)rte_pktmbuf_alloc(_eth_mbuf_pool);
- generate_cpmsg_prach(pHandle, params, sect_geninfo, mbuf, pxran_lib_ctx,
- frame_id, subframe_id, slot_id,
- beam_id, cc_id, prach_port_id, seq_id);
+ generate_cpmsg_prach(pxran_lib_ctx, params, sect_geninfo, mbuf, pxran_lib_ctx,
+ frame_id, subframe_id, slot_id, 0,
+ beam_id, cc_id, prach_port_id, 0, seq_id);
seq_id++;
rte_pktmbuf_free(mbuf);
}
-TEST_P(PrachPerf, PacketGen)//TestCaseName TestName
+TEST_P(PrachPerf, PrachPerfPacketGen)//TestCaseName TestName
{
int ret;
void *pHandle = NULL;
/* Preparing input data for prach config */
- ret = xran_init_prach(&m_xranConf, &m_xran_dev_ctx);
+ ret = xran_init_prach(&m_xranConf, &m_xran_dev_ctx, XRAN_RAN_5GNR);
ASSERT_TRUE(ret == XRAN_STATUS_SUCCESS);
- ret = generate_cpmsg_prach(pHandle, &m_params, m_pSectGenInfo, m_pTestBuffer, &m_xran_dev_ctx,
- m_frameId, m_subframeId, m_slotId,
- m_beamId, m_ccId, m_antId, 0);
+ ret = generate_cpmsg_prach(&m_xran_dev_ctx, &m_params, m_pSectGenInfo, m_pTestBuffer, &m_xran_dev_ctx,
+ m_frameId, m_subframeId, m_slotId, 0,
+ m_beamId, m_ccId, m_antId, 0, 0);
ASSERT_TRUE(ret == XRAN_STATUS_SUCCESS);
&performance_cp, pHandle, &m_params, m_pSectGenInfo, &m_xran_dev_ctx,
m_frameId, m_subframeId, m_slotId,
m_beamId, m_ccId, m_antId, 0);
+
+ if(m_params.sections[0].info)
+ delete[] m_params.sections[0].info;
}