+ }
+ break;
+
+ case XRAN_CP_SECTIONEXTCMD_6:
+ m_extcfgs[i].u.ext6.rbgSize = get_input_parameter<uint8_t> ("extensions", i, "rbgSize");
+ m_extcfgs[i].u.ext6.rbgMask = get_input_parameter<uint32_t>("extensions", i, "rbgMask");
+ m_extcfgs[i].u.ext6.symbolMask = get_input_parameter<uint16_t>("extensions", i, "symbolMask");
+ break;
+
+ case XRAN_CP_SECTIONEXTCMD_10:
+ m_extcfgs[i].u.ext10.numPortc = get_input_parameter<uint8_t> ("extensions", i, "numPortc");
+ m_extcfgs[i].u.ext10.beamGrpType= get_input_parameter<uint8_t> ("extensions", i, "beamGrpType");
+ switch(m_extcfgs[i].u.ext10.beamGrpType) {
+ case XRAN_BEAMGT_COMMON:
+ case XRAN_BEAMGT_MATRIXIND:
+ break;
+ case XRAN_BEAMGT_VECTORLIST:
+ beamIDs = get_input_parameter<std::vector<uint16_t>>("extensions", i, "beamID");
+ for(j=0; j < m_extcfgs[i].u.ext10.numPortc; j++)
+ m_extcfgs[i].u.ext10.beamID[j] = beamIDs[j];
+ break;
+ default:
+ FAIL() << "Invalid Beam Group Type - " << m_extcfgs[i].u.ext10.beamGrpType << std::endl;
+ }
+ break;
+
+ case XRAN_CP_SECTIONEXTCMD_11:
+ {
+ int temp;
+ /* if section extension type 11 is present, then ignore other extensions */
+ if(i != 0 && m_nextcfgs != 1) {
+ std::cout << "### Extension 11 configuration, ignore other extensions !!\n" << std::endl;
+ }
+ flag_skip = true;
+ m_nextcfgs = 1;
+ i = 0;
+
+ m_extcfgs[i].u.ext11.RAD = get_input_parameter<uint8_t> ("extensions", i, "RAD");
+ m_extcfgs[i].u.ext11.disableBFWs = get_input_parameter<uint8_t> ("extensions", i, "disableBFWs");
+ m_extcfgs[i].u.ext11.numBundPrb = get_input_parameter<uint8_t> ("extensions", i, "numBundPrb");
+ m_extcfgs[i].u.ext11.bfwCompMeth = get_input_parameter<uint8_t> ("extensions", i, "bfwCompMeth");
+ m_extcfgs[i].u.ext11.bfwIqWidth = get_input_parameter<uint8_t> ("extensions", i, "bfwIqWidth");
+ m_extcfgs[i].u.ext11.numSetBFWs = get_input_parameter<uint8_t> ("extensions", i, "numSetBFWs");
+ m_antElmTRx = get_input_parameter<uint8_t> ("extensions", i, "antelm_trx");
+ beamIDs = get_input_parameter<std::vector<uint16_t>>("extensions", i, "beamID");
+
+ /* Allocate buffers */
+ m_extcfgs[i].u.ext11.maxExtBufSize = MAX_RX_LEN;
+ m_pBfwIQ_ext = (uint8_t *)xran_malloc(m_extcfgs[i].u.ext11.maxExtBufSize);
+ m_extcfgs[i].u.ext11.pExtBuf = m_pBfwIQ_ext;
+
+ for(j = 0; j < XRAN_MAX_SET_BFWS; j++) {
+ m_pBfw_src[j] = new int16_t [XRAN_MAX_BFW_N];
+ memset(m_pBfw_src[j], j+1, XRAN_MAX_BFW_N);
+ }
+
+ for(j=0; j < m_extcfgs[i].u.ext11.numSetBFWs; j++) {
+ m_bfwInfo[j].pBFWs = (uint8_t *)(m_pBfw_src[j]);
+ m_bfwInfo[j].beamId = beamIDs[j];
+ }
+
+ /* Initialize Shared information for external buffer */
+ m_extSharedInfo.free_cb = NULL;
+ m_extSharedInfo.fcb_opaque = NULL;
+ rte_mbuf_ext_refcnt_update(&m_extSharedInfo, 0);
+ m_extcfgs[i].u.ext11.pExtBufShinfo = &m_extSharedInfo;
+
+ /* Check all BFWs can be fit with given buffer */
+ temp = xran_cp_estimate_max_set_bfws(m_antElmTRx, m_extcfgs[i].u.ext11.bfwIqWidth,
+ m_extcfgs[i].u.ext11.bfwCompMeth, m_extcfgs[i].u.ext11.maxExtBufSize);
+ if(m_extcfgs[i].u.ext11.numSetBFWs > temp) {
+ FAIL() << "Too many sets of BFWs - " << m_extcfgs[i].u.ext11.numSetBFWs
+ << " (max " << temp << " for " << m_extcfgs[i].u.ext11.maxExtBufSize << std::endl;
+ }
+
+ temp = xran_cp_prepare_ext11_bfws(m_extcfgs[i].u.ext11.numSetBFWs, m_antElmTRx,
+ m_extcfgs[i].u.ext11.bfwIqWidth, m_extcfgs[i].u.ext11.bfwCompMeth,
+ m_pBfwIQ_ext, XRAN_MAX_BUFLEN_EXT11, m_bfwInfo);
+ if(temp < 0) {
+ FAIL() << "Fail to prepare BFWs!" << std::endl;
+ };
+ m_extcfgs[i].u.ext11.totalBfwIQLen = temp;
+ }