diff --git a/cmake_targets/tools/oran_fhi_integration_patches/E/oaioran_E.patch b/cmake_targets/tools/oran_fhi_integration_patches/E/oaioran_E.patch deleted file mode 100644 index 8d0610892a..0000000000 --- a/cmake_targets/tools/oran_fhi_integration_patches/E/oaioran_E.patch +++ /dev/null @@ -1,1336 +0,0 @@ -diff --git a/fhi_lib/app/src/common.h b/fhi_lib/app/src/common.h -index 7508117..318508b 100644 ---- a/fhi_lib/app/src/common.h -+++ b/fhi_lib/app/src/common.h -@@ -28,7 +28,7 @@ - #include - #include - --#define VERSIONX "oran_e_maintenance_release_v1.0" -+#define VERSIONX "oran_e_maintenance_release_v1.6" - - #define APP_O_DU 0 - #define APP_O_RU 1 -diff --git a/fhi_lib/lib/Makefile b/fhi_lib/lib/Makefile -index de141bf..c2a448d 100644 ---- a/fhi_lib/lib/Makefile -+++ b/fhi_lib/lib/Makefile -@@ -23,12 +23,25 @@ MYCUSTOMSPACE1='------------------------------------------------------------' - ############################################################## - # Tools configuration - ############################################################## --CC := icc --CPP := icpc -+# Default target architecture and compiler -+TARGET ?= x86 -+# Architecture and compiler-specific tools and flags -+ifeq ($(TARGET), x86) -+CC := gcc -+CPP := g++ - AS := as - AR := ar --LD := icc -+LD := gcc - OBJDUMP := objdump -+else ifeq ($(TARGET), armv8) # aarch64 -+CC := gcc -+CPP := g++ -+LD := gcc -+CFLAGS += -march=armv8-a -+LDFLAGS += -+else -+ $(error Unsupported target architecture: $(TARGET)) -+endif - - ifeq ($(SHELL),cmd.exe) - MD := mkdir.exe -p -@@ -57,7 +70,11 @@ endif - - RTE_TARGET ?= x86_64-native-linux-icc - --RTE_INC := $(shell PKG_CONFIG_PATH=/usr/lib64/pkgconfig:$(RTE_SDK)/build/meson-uninstalled pkgconf --cflags-only-I libdpdk) -+ifeq ($(TARGET), x86) -+RTE_INC := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH):/usr/lib64/pkgconfig:$(RTE_SDK)/build/meson-uninstalled pkg-config --cflags-only-I libdpdk) -+else ifeq ($(TARGET), armv8) -+RTE_INC := $(shell pkg-config --cflags-only-I libdpdk) -+endif - API_DIR := $(PROJECT_DIR)/api - SRC_DIR := $(PROJECT_DIR)/src - ETH_DIR := $(PROJECT_DIR)/ethernet -@@ -88,6 +105,7 @@ CC_SRC = $(ETH_DIR)/ethdi.c \ - $(SRC_DIR)/xran_main.c \ - $(SRC_DIR)/xran_delay_measurement.c - -+ifeq ($(TARGET), x86) - CPP_SRC = $(SRC_DIR)/xran_compression.cpp \ - $(SRC_DIR)/xran_bfp_ref.cpp \ - $(SRC_DIR)/xran_bfp_cplane8.cpp \ -@@ -95,15 +113,17 @@ CPP_SRC = $(SRC_DIR)/xran_compression.cpp \ - $(SRC_DIR)/xran_bfp_cplane32.cpp \ - $(SRC_DIR)/xran_bfp_cplane64.cpp \ - $(SRC_DIR)/xran_bfp_uplane_9b16rb.cpp \ -- $(SRC_DIR)/xran_bfp_uplane.cpp \ -- $(SRC_DIR)/xran_mod_compression.cpp -+ $(SRC_DIR)/xran_bfp_uplane.cpp -+endif - -+ifeq ($(TARGET), x86) - CPP_SRC_SNC = $(SRC_DIR)/xran_compression_snc.cpp \ - $(SRC_DIR)/xran_bfp_cplane8_snc.cpp \ - $(SRC_DIR)/xran_bfp_cplane16_snc.cpp \ - $(SRC_DIR)/xran_bfp_cplane32_snc.cpp \ - $(SRC_DIR)/xran_bfp_cplane64_snc.cpp \ - $(SRC_DIR)/xran_bfp_uplane_snc.cpp -+endif - - CC_FLAGS += -std=gnu11 -Wall -Wno-deprecated-declarations \ - -fdata-sections \ -@@ -112,14 +132,23 @@ CC_FLAGS += -std=gnu11 -Wall -Wno-deprecated-declarations \ - -fPIC \ - -Wall \ - -Wimplicit-function-declaration \ -- -g -O3 -wd1786 -mcmodel=large -+ -g -O - --CPP_FLAGS := -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D_GNU_SOURCE -D_REENTRANT -pipe -no-prec-div \ -- -no-prec-div -fp-model fast=2 -fPIC \ -- -no-prec-sqrt -falign-functions=16 -fast-transcendentals \ -- -Werror -Wno-unused-variable -std=c++14 -mcmodel=large -+ifeq ($(TARGET), x86) -+CC_FLAGS += -mavx512bw -march=skylake-avx512 -mtune=skylake-avx512#--wd1786 -mcmodel=large -+endif -+ -+ifeq ($(TARGET), x86) -+CPP_FLAGS := -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D_GNU_SOURCE -D_REENTRANT -pipe \ -+ -fPIC \ -+ -falign-functions=16 \ -+ -Werror -Wno-unused-variable -std=c++14 -mcmodel=large -mavx512bw -march=skylake-avx512 -mtune=skylake-avx512 -+else ifeq ($(TARGET), armv8) -+CPP_FLAGS := -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D_GNU_SOURCE -D_REENTRANT -pipe \ -+ -Werror -Wno-unused-variable -std=c++14 -+endif - --INC := -I$(API_DIR) -I$(ETH_DIR) -I$(SRC_DIR) -I$(RTE_INC) -+INC := -I$(API_DIR) -I$(ETH_DIR) -I$(SRC_DIR) $(RTE_INC) - DEF := - ifeq ($(MLOG),1) - INC += -I$(MLOG_DIR)/source -@@ -150,8 +179,13 @@ CPP_SNC_OBJTARGETS := $(addprefix $(PROJECT_OBJ_DIR)/,$(CPP_OBJS_SNC)) - - AS_OBJTARGETS := $(addprefix $(PROJECT_OBJ_DIR)/,$(AS_OBJS)) - #-qopt-report=5 -qopt-matmul -qopt-report-phase=all --CPP_COMP := -O3 -DNDEBUG -xcore-avx512 -fPIE -restrict -fasm-blocks --CPP_COMP_SNC := -O3 -DNDEBUG -march=icelake-server -fPIE -restrict -fasm-blocks -+ifeq ($(TARGET), x86) -+CPP_COMP := -O3 -DNDEBUG -fPIE -+CPP_COMP_SNC := -O3 -DNDEBUG -march=icelake-server -fPIE -+else ifeq ($(TARGET), armv8) -+CPP_COMP := -O3 -DNDEBUG -fPIE -Wrestrict -+CPP_COMP_SNC := -O3 -DNDEBUG -march=icelake-server -fPIE -Wrestrict -+endif - CC_FLAGS_FULL := $(CC_FLAGS) $(INC) $(DEF) - CPP_FLAGS_FULL := $(CPP_FLAGS) $(CPP_COMP) $(INC) $(DEF) - CPP_FLAGS_FULL_SNC := $(CPP_FLAGS) $(CPP_COMP_SNC) $(INC) $(DEF) -diff --git a/fhi_lib/lib/api/xran_fh_o_du.h b/fhi_lib/lib/api/xran_fh_o_du.h -index 7419ae1..a85f973 100644 ---- a/fhi_lib/lib/api/xran_fh_o_du.h -+++ b/fhi_lib/lib/api/xran_fh_o_du.h -@@ -1104,6 +1104,30 @@ int32_t xran_reg_physide_cb(void *pHandle, xran_fh_tti_callback_fn Cb, void *cbP - */ - int32_t xran_get_slot_idx (uint32_t PortId, uint32_t *nFrameIdx, uint32_t *nSubframeIdx, uint32_t *nSlotIdx, uint64_t *nSecond); - -+/** -+ * @ingroup xran -+ * -+ * Function returns Frame, Subframe, Slot Number based on rx_tti -+ * -+ * @param tti -+ * tti for which to compute Frame, Subframe, Slot -+ * -+ * @param nFrameIdx -+ * Pointer to Frame number [0-99] -+ * -+ * @param nSubframeIdx -+ * Pointer to Subframe number [0-10] -+ * -+ * @param nSlotIdx -+ * Pointer to Slot number [0-7] -+ * -+ * @param nSecond -+ * Pointer to current UTC second -+ * -+ * @return -+ * current TTI number [0-7999] -+ */ -+int32_t xran_get_slot_idx_from_tti (uint32_t tti, uint32_t *nFrameIdx, uint32_t *nSubframeIdx, uint32_t * nSlotIdx, uint64_t *nSecond); - /** - * @ingroup xran - * -diff --git a/fhi_lib/lib/api/xran_pkt_cp.h b/fhi_lib/lib/api/xran_pkt_cp.h -index 531c51f..bcb6541 100644 ---- a/fhi_lib/lib/api/xran_pkt_cp.h -+++ b/fhi_lib/lib/api/xran_pkt_cp.h -@@ -33,6 +33,14 @@ - extern "C" { - #endif - -+#include -+#if defined(__arm__) || defined(__aarch64__) -+#include -+typedef int32x4_t simd_data_t; -+#else -+#include -+typedef __m128i simd_data_t; -+#endif - - /********************************************************************** - * Common structures for C/U-plane -@@ -255,8 +263,8 @@ union xran_cp_radioapp_section_ext3_first { - uint64_t reserved2:16; - }all_bits; - -- struct{ -- __m128i data_field1; -+ struct { -+ simd_data_t data_field1; - }data_field; - } __attribute__((__packed__)); - -diff --git a/fhi_lib/lib/api/xran_up_api.h b/fhi_lib/lib/api/xran_up_api.h -index 7d3afc5..e2f1f21 100644 ---- a/fhi_lib/lib/api/xran_up_api.h -+++ b/fhi_lib/lib/api/xran_up_api.h -@@ -80,6 +80,7 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf, - uint8_t *subframe_id, - uint8_t *slot_id, - uint8_t *symb_id, -+ uint8_t *filter_id, - union ecpri_seq_id *seq_id, - uint16_t *num_prbu, - uint16_t *start_prbu, -@@ -89,7 +90,8 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf, - int8_t expect_comp, - enum xran_comp_hdr_type staticComp, - uint8_t *compMeth, -- uint8_t *iqWidth); -+ uint8_t *iqWidth, -+ uint8_t *is_prach); - - inline int xran_prepare_iq_symbol_portion( - struct rte_mbuf *mbuf, -diff --git a/fhi_lib/lib/ethernet/ethdi.c b/fhi_lib/lib/ethernet/ethdi.c -index b6ba257..07b7a38 100644 ---- a/fhi_lib/lib/ethernet/ethdi.c -+++ b/fhi_lib/lib/ethernet/ethdi.c -@@ -37,7 +37,10 @@ - #include - #include - #include -+#if defined(__arm__) || defined(__aarch64__) -+#else - #include -+#endif - #include - #include - #include -@@ -326,8 +329,8 @@ xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg, - char bbdev_wdev[32] = ""; - char bbdev_vdev[32] = ""; - char iova_mode[32] = "--iova-mode=pa"; -- char socket_mem[32] = "--socket-mem=8192"; -- char socket_limit[32] = "--socket-limit=8192"; -+ char socket_mem[32] = "--socket-mem=0"; -+ char socket_limit[32] = "--socket-limit=0"; - char ring_name[32] = ""; - int32_t xran_port = -1; - portid_t port_id; -@@ -335,6 +338,7 @@ xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg, - uint16_t count; - - char *argv[] = { name, core_mask, "-n2", iova_mode, socket_mem, socket_limit, "--proc-type=auto", -+ "--no-telemetry", - "--file-prefix", name, "-a0000:00:00.0", bbdev_wdev, bbdev_vdev}; - - -@@ -479,11 +483,13 @@ xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg, - ctx->tx_ring[i] = rte_ring_create(ring_name, NUM_MBUFS_RING_TRX, - rte_lcore_to_socket_id(*lcore_id), RING_F_SC_DEQ); - PANIC_ON(ctx->tx_ring[i] == NULL, "failed to allocate rx ring"); -+ printf("Created ring %s on core %d\n",ring_name,*lcore_id); - for(qi = 0; qi < io_cfg->num_rxq; qi++) { - snprintf(ring_name, RTE_DIM(ring_name), "%s_%d_%d", "rx_ring_cp", i, qi); - ctx->rx_ring[i][qi] = rte_ring_create(ring_name, NUM_MBUFS_RING_TRX, - rte_lcore_to_socket_id(*lcore_id), RING_F_SP_ENQ); - PANIC_ON(ctx->rx_ring[i][qi] == NULL, "failed to allocate rx ring"); -+ printf("Created ring %s on core %d\n",ring_name,*lcore_id); - } - } - } else { -@@ -553,7 +559,7 @@ xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg, - ctx->up_dl_pkt_gen_ring[i] = rte_ring_create(ring_name, NUM_MBUFS_RING, - rte_lcore_to_socket_id(*lcore_id), /*RING_F_SC_DEQ*/0); - PANIC_ON(ctx->up_dl_pkt_gen_ring[i] == NULL, "failed to allocate dl gen ring"); -- printf("created %s\n", ring_name); -+ printf("created %s on core %d\n", ring_name, *lcore_id); - } - - return 1; -diff --git a/fhi_lib/lib/ethernet/ethernet.c b/fhi_lib/lib/ethernet/ethernet.c -index 0930665..80e2e10 100644 ---- a/fhi_lib/lib/ethernet/ethernet.c -+++ b/fhi_lib/lib/ethernet/ethernet.c -@@ -37,7 +37,10 @@ - #include - #include - #include -+#if defined(__arm__) || defined(__aarch64__) -+#else - #include -+#endif - #include - #include - #include -diff --git a/fhi_lib/lib/src/xran_app_frag.c b/fhi_lib/lib/src/xran_app_frag.c -index cb526ee..90b2860 100644 ---- a/fhi_lib/lib/src/xran_app_frag.c -+++ b/fhi_lib/lib/src/xran_app_frag.c -@@ -27,7 +27,10 @@ - #include - #include - #include -+#if defined(__arm__) || defined(__aarch64__) -+#else - #include -+#endif - #include - #include - #include -diff --git a/fhi_lib/lib/src/xran_bfp_ref.cpp b/fhi_lib/lib/src/xran_bfp_ref.cpp -index e6d3067..8e0abee 100644 ---- a/fhi_lib/lib/src/xran_bfp_ref.cpp -+++ b/fhi_lib/lib/src/xran_bfp_ref.cpp -@@ -29,6 +29,7 @@ - #include - #include - #include -+#include - - static int16_t saturateAbs(int16_t inVal) - { -diff --git a/fhi_lib/lib/src/xran_bfp_uplane.cpp b/fhi_lib/lib/src/xran_bfp_uplane.cpp -index a345df4..2a94e01 100644 ---- a/fhi_lib/lib/src/xran_bfp_uplane.cpp -+++ b/fhi_lib/lib/src/xran_bfp_uplane.cpp -@@ -90,7 +90,7 @@ namespace BFP_UPlane - { - const __m512i* rawData = reinterpret_cast(dataIn.dataExpanded); - /// Abs -- const auto rawDataAbs = _mm512_abs_epi16(rawData[0]); -+ const auto rawDataAbs = _mm512_abs_epi16(_mm512_loadu_epi16(rawData)); - /// No need to do a full horizontal max operation here, just do a max IQ step, - /// compute the exponents and then use a reduce max over all exponent values. This - /// is the fastest way to handle a single RB. -@@ -116,7 +116,7 @@ namespace BFP_UPlane - /// Get AVX512 pointer aligned to desired RB - const __m512i* rawDataIn = reinterpret_cast(dataIn.dataExpanded + numREOffset); - /// Apply the exponent shift -- const auto compData = _mm512_srai_epi16(*rawDataIn, thisExp); -+ const auto compData = _mm512_srai_epi16(_mm512_loadu_epi16(rawDataIn), thisExp); - /// Pack compressed data network byte order - const auto compDataBytePacked = networkBytePack(compData); - /// Store exponent first -@@ -201,7 +201,7 @@ namespace BFP_UPlane - /// Get AVX512 pointer aligned to desired RB - const __m512i* rawDataIn = reinterpret_cast(dataIn.dataExpanded + numREOffset); - /// Apply the exponent shift -- const auto compData = _mm512_srai_epi16(*rawDataIn, thisExp); -+ const auto compData = _mm512_srai_epi16(_mm512_loadu_epi16(rawDataIn), thisExp); - /// Store exponent first - dataOut->dataCompressed[thisRBExpAddr] = thisExp; - /// Now have 1 RB worth of bytes separated into 3 chunks (1 per lane) -diff --git a/fhi_lib/lib/src/xran_cb_proc.c b/fhi_lib/lib/src/xran_cb_proc.c -index b35d55c..2e7ec05 100644 ---- a/fhi_lib/lib/src/xran_cb_proc.c -+++ b/fhi_lib/lib/src/xran_cb_proc.c -@@ -25,7 +25,10 @@ - - #include - #include -+#if defined(__arm__) || defined(__aarch64__) -+#else - #include -+#endif - #include - #include - #include -diff --git a/fhi_lib/lib/src/xran_common.c b/fhi_lib/lib/src/xran_common.c -index baa673f..7bdc475 100644 ---- a/fhi_lib/lib/src/xran_common.c -+++ b/fhi_lib/lib/src/xran_common.c -@@ -31,7 +31,10 @@ - #include - #include - #include -+#if defined(__arm__) || defined(__aarch64__) -+#else - #include -+#endif - #include - - #include "xran_common.h" -@@ -650,12 +653,15 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid) - uint8_t compMeth = 0; - uint8_t iqWidth = 0; - -+ uint8_t is_prach = 0; -+ - void *pHandle = NULL; - int ret = MBUF_FREE; - uint32_t mb_free = 0; - int32_t valid_res = 0; - int expect_comp = (p_dev_ctx->fh_cfg.ru_conf.compMeth != XRAN_COMPMETHOD_NONE); - enum xran_comp_hdr_type staticComp = p_dev_ctx->fh_cfg.ru_conf.xranCompHdrType; -+ uint8_t filter_id; - - if (staticComp == XRAN_COMP_HDR_TYPE_STATIC) - { -@@ -674,6 +680,7 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid) - &subframe_id, - &slot_id, - &symb_id, -+ &filter_id, - &seq, - &num_prbu, - &start_prbu, -@@ -683,28 +690,15 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid) - expect_comp, - staticComp, - &compMeth, -- &iqWidth); -+ &iqWidth, -+ &is_prach); - if (num_bytes <= 0){ - print_err("num_bytes is wrong [%d]\n", num_bytes); - return MBUF_FREE; - } -- -- valid_res = xran_pkt_validate(p_dev_ctx, -- pkt, -- iq_samp_buf, -- num_bytes, -- CC_ID, -- Ant_ID, -- frame_id, -- subframe_id, -- slot_id, -- symb_id, -- &seq, -- num_prbu, -- start_prbu, -- sym_inc, -- rb, -- sect_id); -+ pCnt->rx_counter++; -+ pCnt->Rx_on_time++; -+ pCnt->Total_msgs_rcvd++; - #ifndef FCN_ADAPT - if(valid_res != 0) { - print_dbg("valid_res is wrong [%d] ant %u (%u : %u : %u : %u) seq %u num_bytes %d\n", valid_res, Ant_ID, frame_id, subframe_id, slot_id, symb_id, seq.seq_id, num_bytes); -@@ -756,7 +750,7 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid) - print_dbg("Transport layer fragmentation (eCPRI) is not supported\n"); - } - -- } else if (Ant_ID >= p_dev_ctx->PrachCPConfig.eAxC_offset && p_dev_ctx->fh_cfg.prachEnable) { -+ } else if (/*Ant_ID >= p_dev_ctx->PrachCPConfig.eAxC_offset && */p_dev_ctx->fh_cfg.prachEnable && is_prach) { - /* PRACH packet has ruportid = num_eAxc + ant_id */ - Ant_ID -= p_dev_ctx->PrachCPConfig.eAxC_offset; - symbol_total_bytes[p_dev_ctx->xran_port_id][CC_ID][Ant_ID] += num_bytes; -@@ -1189,7 +1183,7 @@ int generate_cpmsg_prach(void *pHandle, struct xran_cp_gen_params *params, struc - timeOffset += startSymId * (2048 + 144); - } - timeOffset = timeOffset >> nNumerology; //original number is Tc, convert to Ts based on mu -- if ((slot_id == 0) || (slot_id == (SLOTNUM_PER_SUBFRAME(pxran_lib_ctx->interval_us_local) >> 1))) -+ if (startSymId > 0 && ((slot_id == 0) || (slot_id == (SLOTNUM_PER_SUBFRAME(pxran_lib_ctx->interval_us_local) >> 1)))) - timeOffset += 16; - - params->dir = XRAN_DIR_UL; -@@ -1295,8 +1289,7 @@ int32_t ring_processing_func(void* args) - - for (i = 0; i < ctx->io_cfg.num_vfs && i < XRAN_VF_MAX; i++){ - for(qi = 0; qi < ctx->rxq_per_port[i]; qi++) { -- if (process_ring(ctx->rx_ring[i][qi], i, qi)) -- return 0; -+ process_ring(ctx->rx_ring[i][qi],i,qi); - } - } - -diff --git a/fhi_lib/lib/src/xran_common.h b/fhi_lib/lib/src/xran_common.h -index 3ed75cd..d61fe7f 100644 ---- a/fhi_lib/lib/src/xran_common.h -+++ b/fhi_lib/lib/src/xran_common.h -@@ -221,7 +221,7 @@ int generate_cpmsg_prach(void *pHandle, struct xran_cp_gen_params *params, struc - struct xran_eaxcid_config *xran_get_conf_eAxC(void *pHandle); - int xran_register_cb_mbuf2ring(xran_ethdi_mbuf_send_fn mbuf_send_cp, xran_ethdi_mbuf_send_fn mbuf_send_up); - --uint16_t xran_alloc_sectionid(void *pHandle, uint8_t dir, uint8_t cc_id, uint8_t ant_id, uint8_t slot_id); -+//uint16_t xran_alloc_sectionid(void *pHandle, uint8_t dir, uint8_t cc_id, uint8_t ant_id, uint8_t slot_id); - uint8_t xran_get_seqid(void *pHandle, uint8_t dir, uint8_t cc_id, uint8_t ant_id, uint8_t slot_id); - int32_t ring_processing_func(void* arg); - int xran_init_prach(struct xran_fh_config* pConf, struct xran_device_ctx * p_xran_dev_ctx); -diff --git a/fhi_lib/lib/src/xran_compression.cpp b/fhi_lib/lib/src/xran_compression.cpp -index 112caae..7c74342 100644 ---- a/fhi_lib/lib/src/xran_compression.cpp -+++ b/fhi_lib/lib/src/xran_compression.cpp -@@ -62,7 +62,7 @@ xranlib_compress(const struct xranlib_compress_request *request, - return xranlib_5gnr_mod_compression(&mod_request, &mod_response); - } - else{ -- if(_may_i_use_cpu_feature(_FEATURE_AVX512IFMA52)) { -+ if(false) { - return xranlib_compress_avxsnc(request,response); - } else { - return xranlib_compress_avx512(request,response); -@@ -89,7 +89,7 @@ xranlib_decompress(const struct xranlib_decompress_request *request, - return xranlib_5gnr_mod_decompression(&mod_request, &mod_response); - } - else{ -- if(_may_i_use_cpu_feature(_FEATURE_AVX512IFMA52)) { -+ if(false) { - return xranlib_decompress_avxsnc(request,response); - } else { - return xranlib_decompress_avx512(request,response); -@@ -101,7 +101,7 @@ int32_t - xranlib_compress_bfw(const struct xranlib_compress_request *request, - struct xranlib_compress_response *response) - { -- if(_may_i_use_cpu_feature(_FEATURE_AVX512IFMA52)) { -+ if(false) { - return xranlib_compress_avxsnc_bfw(request,response); - } else { - return xranlib_compress_avx512_bfw(request,response); -@@ -112,7 +112,7 @@ int32_t - xranlib_decompress_bfw(const struct xranlib_decompress_request *request, - struct xranlib_decompress_response *response) - { -- if(_may_i_use_cpu_feature(_FEATURE_AVX512IFMA52)) { -+ if(false) { - return xranlib_decompress_avxsnc_bfw(request,response); - } else { - return xranlib_decompress_avx512_bfw(request,response); -diff --git a/fhi_lib/lib/src/xran_cp_api.c b/fhi_lib/lib/src/xran_cp_api.c -index 02ba81c..74ef600 100644 ---- a/fhi_lib/lib/src/xran_cp_api.c -+++ b/fhi_lib/lib/src/xran_cp_api.c -@@ -25,7 +25,11 @@ - * @author Intel Corporation - * - **/ -+#if defined(__arm__) || defined(__aarch64__) -+#include -+#else - #include -+#endif - #include - #include - -@@ -821,7 +825,11 @@ xran_prepare_sectionext_3(struct rte_mbuf *mbuf, struct xran_sectionext3_info *p - | (params->layerId << xran_cp_radioapp_sec_ext3_LayerId) - | (params->numLayers << xran_cp_radioapp_sec_ext3_NumLayers); - data_fourth_byte = params->beamIdAP1; -+#if defined(__arm__) || defined(__aarch64__) -+ ext3_f->data_field.data_field1 = (int32x4_t){data_first_byte, data_second_byte, data_third_byte, data_fourth_byte}; -+#else - ext3_f->data_field.data_field1 = _mm_set_epi32(data_fourth_byte, data_third_byte, data_second_byte, data_first_byte); -+#endif - - /* convert byte order */ - tmp = (uint64_t *)ext3_f; -diff --git a/fhi_lib/lib/src/xran_cp_proc.c b/fhi_lib/lib/src/xran_cp_proc.c -index e40ce72..b2c6ea6 100644 ---- a/fhi_lib/lib/src/xran_cp_proc.c -+++ b/fhi_lib/lib/src/xran_cp_proc.c -@@ -35,7 +35,10 @@ - #include - #include - #include -+#if defined(__arm__) || defined(__aarch64__) -+#else - #include -+#endif - - #include - #include -diff --git a/fhi_lib/lib/src/xran_delay_measurement.c b/fhi_lib/lib/src/xran_delay_measurement.c -index 931aceb..a3b53fc 100644 ---- a/fhi_lib/lib/src/xran_delay_measurement.c -+++ b/fhi_lib/lib/src/xran_delay_measurement.c -@@ -23,7 +23,10 @@ - * @author Intel Corporation - **/ - #define _GNU_SOURCE -+#if defined(__arm__) || defined(__aarch64__) -+#else - #include -+#endif - #include - #include - #include -diff --git a/fhi_lib/lib/src/xran_dev.c b/fhi_lib/lib/src/xran_dev.c -index fef64c8..612445d 100644 ---- a/fhi_lib/lib/src/xran_dev.c -+++ b/fhi_lib/lib/src/xran_dev.c -@@ -35,7 +35,10 @@ - #include - #include - #include -+#if defined(__arm__) || defined(__aarch64__) -+#else - #include -+#endif - #include - #include - #include -@@ -55,6 +58,27 @@ - - static struct xran_device_ctx *g_xran_dev_ctx[XRAN_PORTS_NUM] = {NULL, NULL, NULL, NULL}; - -+struct xran_device_ctx *allocate_device_ctx(size_t xran_ports_num, size_t alignment) { -+ void *ptr = NULL; -+ -+#if defined(__arm__) || defined(__aarch64__) -+ // ARM-specific memory allocation -+ if (posix_memalign(&ptr, alignment, sizeof(struct xran_device_ctx) * xran_ports_num) != 0) { -+ print_err("posix_memalign: pCtx allocation error\n"); -+ return NULL; -+ } -+#else -+ // Intel-specific memory allocation -+ ptr = _mm_malloc(sizeof(struct xran_device_ctx) * xran_ports_num, alignment); -+ if (ptr == NULL) { -+ print_err("_mm_malloc: pCtx allocation error\n"); -+ return NULL; -+ } -+#endif -+ -+ return (struct xran_device_ctx *)ptr; -+} -+ - int32_t - xran_dev_create_ctx(uint32_t xran_ports_num) - { -@@ -64,7 +88,7 @@ xran_dev_create_ctx(uint32_t xran_ports_num) - if (xran_ports_num > XRAN_PORTS_NUM) - return -1; - -- pCtx = (struct xran_device_ctx *) _mm_malloc(sizeof(struct xran_device_ctx)*xran_ports_num, 64); -+ pCtx = allocate_device_ctx(xran_ports_num, 64); - if(pCtx){ - for(i = 0; i < xran_ports_num; i++){ - g_xran_dev_ctx[i] = pCtx; -diff --git a/fhi_lib/lib/src/xran_main.c b/fhi_lib/lib/src/xran_main.c -index 89dcc1f..ded4116 100644 ---- a/fhi_lib/lib/src/xran_main.c -+++ b/fhi_lib/lib/src/xran_main.c -@@ -35,7 +35,11 @@ - #include - #include - #include -+#if defined(__arm__) || defined(__aarch64__) -+#include -+#else - #include -+#endif - - #include - #include -@@ -102,6 +106,25 @@ void tti_to_phy_cb(struct rte_timer *tim, void *arg); - - int32_t xran_pkt_gen_process_ring(struct rte_ring *r); - -+void *mm_allocate_handle(size_t size, size_t alignment) { -+ void *ptr = NULL; -+#if defined(__arm__) || defined(__aarch64__) -+ // ARM-specific memory allocation -+ if (posix_memalign(&ptr, alignment, size) != 0) { -+ fprintf(stderr, "posix_memalign: allocation error\n"); -+ return NULL; -+ } -+#else -+ // Intel-specific memory allocation -+ ptr = _mm_malloc(size, alignment); -+ if (ptr == NULL) { -+ fprintf(stderr, "_mm_malloc: allocation error\n"); -+ return NULL; -+ } -+#endif -+ return ptr; -+} -+ - void - xran_updateSfnSecStart(void) - { -@@ -272,7 +295,7 @@ xran_init_prach(struct xran_fh_config* pConf, struct xran_device_ctx * p_xran_de - printf("PRACH start symbol %u lastsymbol %u\n", p_xran_dev_ctx->prach_start_symbol[0], p_xran_dev_ctx->prach_last_symbol[0]); - } - -- pPrachCPConfig->eAxC_offset = xran_get_num_eAxc(p_xran_dev_ctx); -+ pPrachCPConfig->eAxC_offset = pPRACHConfig->eAxC_offset; - print_dbg("PRACH eAxC_offset %d\n", pPrachCPConfig->eAxC_offset); - - /* Save some configs for app */ -@@ -844,7 +867,7 @@ tx_cp_ul_cb(struct rte_timer *tim, void *arg) - struct xran_cp_gen_params params; - struct xran_section_gen_info sect_geninfo[8]; - struct rte_mbuf *mbuf = xran_ethdi_mbuf_alloc(); -- prach_port_id = ant_id + num_eAxc; -+ prach_port_id = ant_id + pPrachCPConfig->eAxC_offset; - /* start new section information list */ - xran_cp_reset_section_info(pHandle, XRAN_DIR_UL, cc_id, prach_port_id, ctx_id); - -@@ -1059,6 +1082,7 @@ int32_t handle_ecpri_ethertype(struct rte_mbuf* pkt_q[], uint16_t xport_id, stru - { - case ECPRI_IQ_DATA: - pkt_data[num_data++] = pkt; -+ uint8_t *pkt_bytes=rte_pktmbuf_mtod(pkt,uint8_t*); - break; - // For RU emulation - case ECPRI_RT_CONTROL_DATA: -@@ -1076,7 +1100,7 @@ int32_t handle_ecpri_ethertype(struct rte_mbuf* pkt_q[], uint16_t xport_id, stru - break; - default: - if (p_dev_ctx->fh_init.io_cfg.id == O_DU) { -- print_err("Invalid eCPRI message type - %d", ecpri_hdr->cmnhdr.bits.ecpri_mesg_type); -+ rte_pktmbuf_free(pkt); - } - break; - } -@@ -1366,8 +1390,7 @@ xran_sector_get_instances (uint32_t xran_port, void * pDevHandle, uint16_t nNumI - for (i = 0; i < nNumInstances; i++) { - - /* Allocate Memory for CC handles */ -- pCcHandle = (XranSectorHandleInfo *) _mm_malloc( /*"xran_cc_handles",*/ sizeof (XranSectorHandleInfo), 64); -- -+ pCcHandle = (XranSectorHandleInfo *)mm_allocate_handle(/*"xran_cc_handles",*/ sizeof(XranSectorHandleInfo), 64); - if(pCcHandle == NULL) - return XRAN_STATUS_RESOURCE; - -@@ -1771,8 +1794,7 @@ ring_processing_func_per_port(void* args) - for (i = 0; i < ctx->io_cfg.num_vfs && i < XRAN_VF_MAX; i = i+1) { - if (ctx->vf2xran_port[i] == port_id) { - for(qi = 0; qi < ctx->rxq_per_port[port_id]; qi++){ -- if (process_ring(ctx->rx_ring[i][qi], i, qi)) -- return 0; -+ process_ring(ctx->rx_ring[i][qi],i,qi); - } - } - } -@@ -1837,8 +1859,6 @@ xran_spawn_workers(void) - nWorkerCore = nWorkerCore << 1; - } - -- extern int _may_i_use_cpu_feature(unsigned __int64); -- icx_cpu = _may_i_use_cpu_feature(_FEATURE_AVX512IFMA52); - - printf("O-XU %d\n", eth_ctx->io_cfg.id); - printf("HW %d\n", icx_cpu); -@@ -1876,7 +1896,7 @@ xran_spawn_workers(void) - eth_ctx->time_wrk_cfg.arg = NULL; - eth_ctx->time_wrk_cfg.state = 1; - -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -1898,7 +1918,7 @@ xran_spawn_workers(void) - - /* workers */ - /** 0 **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -1925,7 +1945,7 @@ xran_spawn_workers(void) - } - - /** 1 - CP GEN **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -1956,7 +1976,7 @@ xran_spawn_workers(void) - - p_dev->tx_sym_gen_func = xran_process_tx_sym_cp_on_opt; - -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -1979,7 +1999,7 @@ xran_spawn_workers(void) - - /* workers */ - /** 0 **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2006,7 +2026,7 @@ xran_spawn_workers(void) - } - - /** 1 - CP GEN **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2033,7 +2053,7 @@ xran_spawn_workers(void) - - /* workers */ - /** 0 **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2048,7 +2068,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 1 - CP GEN **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2063,7 +2083,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 2 UP GEN **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2102,7 +2122,7 @@ xran_spawn_workers(void) - - /* workers */ - /** 0 **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2117,7 +2137,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 1 - CP GEN **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2132,7 +2152,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 2 UP GEN **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2147,7 +2167,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 3 UP GEN **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2186,7 +2206,7 @@ xran_spawn_workers(void) - - /* workers */ - /** 0 **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2201,7 +2221,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 1 Eth Tx **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); -@@ -2217,7 +2237,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 2 - CP GEN **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2232,7 +2252,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 3 UP GEN **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2247,7 +2267,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 4 UP GEN **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2281,7 +2301,7 @@ xran_spawn_workers(void) - - /* workers */ - /** 0 Eth RX */ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2296,7 +2316,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 1 FH RX and BBDEV */ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2311,7 +2331,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 2 FH RX and BBDEV */ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2326,7 +2346,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 3 FH RX and BBDEV */ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2341,7 +2361,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** FH TX and BBDEV */ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2379,7 +2399,7 @@ xran_spawn_workers(void) - - /* workers */ - /** 0 **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2406,7 +2426,7 @@ xran_spawn_workers(void) - } - - /** 1 - CP GEN **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2433,7 +2453,7 @@ xran_spawn_workers(void) - - /* workers */ - /** 0 **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2448,7 +2468,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 1 - CP GEN **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2463,7 +2483,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 2 UP GEN **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2501,7 +2521,7 @@ xran_spawn_workers(void) - - /* workers */ - /** 0 FH RX and BBDEV */ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2516,7 +2536,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 1 - CP GEN **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2531,7 +2551,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 2 UP GEN **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2546,7 +2566,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 3 UP GEN **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2569,7 +2589,7 @@ xran_spawn_workers(void) - - /* workers */ - /** 0 **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2584,7 +2604,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 1 - CP GEN **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2599,7 +2619,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 2 UP GEN **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2614,7 +2634,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 3 UP GEN **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2629,7 +2649,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 4 UP GEN **/ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2651,7 +2671,7 @@ xran_spawn_workers(void) - - /* workers */ - /** 0 Eth RX */ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2666,7 +2686,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 1 FH RX and BBDEV */ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2681,7 +2701,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 2 FH RX and BBDEV */ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2696,7 +2716,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** 3 FH RX and BBDEV */ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -2711,7 +2731,7 @@ xran_spawn_workers(void) - eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx; - - /** FH TX and BBDEV */ -- pThCtx = (struct xran_worker_th_ctx*) _mm_malloc(sizeof(struct xran_worker_th_ctx), 64); -+ pThCtx = (struct xran_worker_th_ctx *)mm_allocate_handle(sizeof(struct xran_worker_th_ctx), 64); - if(pThCtx == NULL){ - print_err("pThCtx allocation error\n"); - return XRAN_STATUS_FAIL; -@@ -3074,6 +3094,24 @@ xran_get_slot_idx (uint32_t PortId, uint32_t *nFrameIdx, uint32_t *nSubframeIdx, - return tti; - } - -+int32_t -+xran_get_slot_idx_from_tti (uint32_t tti, uint32_t *nFrameIdx, uint32_t *nSubframeIdx, uint32_t *nSlotIdx, uint64_t *nSecond) -+{ -+ struct xran_device_ctx * p_xran_dev_ctx = xran_dev_get_ctx_by_id(0); -+ if (!p_xran_dev_ctx) -+ { -+ print_err("Null xRAN context on port id %u!!\n", 0); -+ return 0; -+ } -+ -+ *nSlotIdx = (uint32_t)XranGetSlotNum(tti, SLOTNUM_PER_SUBFRAME(p_xran_dev_ctx->interval_us_local)); -+ *nSubframeIdx = (uint32_t)XranGetSubFrameNum(tti,SLOTNUM_PER_SUBFRAME(p_xran_dev_ctx->interval_us_local), SUBFRAMES_PER_SYSTEMFRAME); -+ *nFrameIdx = (uint32_t)XranGetFrameNum(tti,0/*xran_getSfnSecStart()*/,SUBFRAMES_PER_SYSTEMFRAME, SLOTNUM_PER_SUBFRAME(p_xran_dev_ctx->interval_us_local)); -+ *nSecond = timing_get_current_second(); -+ -+ return tti; -+} -+ - int32_t - xran_set_debug_stop(int32_t value, int32_t count) - { -diff --git a/fhi_lib/lib/src/xran_mem_mgr.c b/fhi_lib/lib/src/xran_mem_mgr.c -index 3e401e6..566490d 100644 ---- a/fhi_lib/lib/src/xran_mem_mgr.c -+++ b/fhi_lib/lib/src/xran_mem_mgr.c -@@ -35,7 +35,11 @@ - #include - #include - #include -+#if defined(__arm__) || defined(__aarch64__) -+#include -+#else - #include -+#endif - - #include - #include -diff --git a/fhi_lib/lib/src/xran_mod_compression.cpp b/fhi_lib/lib/src/xran_mod_compression.cpp -index 7d4a5d0..87bdbd5 100644 ---- a/fhi_lib/lib/src/xran_mod_compression.cpp -+++ b/fhi_lib/lib/src/xran_mod_compression.cpp -@@ -747,10 +747,11 @@ int xranlib_5gnr_mod_compression(const struct xranlib_5gnr_mod_compression_reque - #ifdef C_Module_Used - return (xranlib_5gnr_mod_compression_c(request, response)); - #else -- if(_may_i_use_cpu_feature(_FEATURE_AVX512IFMA52)) -+ if (false) { - return (xranlib_5gnr_mod_compression_snc(request, response)); -- else -+ } else { - return (xranlib_5gnr_mod_compression_avx512(request, response)); -+ } - #endif - } - -diff --git a/fhi_lib/lib/src/xran_rx_proc.c b/fhi_lib/lib/src/xran_rx_proc.c -index 36bd72c..4d57898 100644 ---- a/fhi_lib/lib/src/xran_rx_proc.c -+++ b/fhi_lib/lib/src/xran_rx_proc.c -@@ -35,7 +35,11 @@ - #include - #include - #include -+#if defined(__arm__) || defined(__aarch64__) -+#include -+#else - #include -+#endif - - #include - #include -@@ -107,6 +111,10 @@ int xran_process_prach_sym(void *arg, - if(mb) - rte_pktmbuf_free(mb); - -+ mb = p_xran_dev_ctx->sFHPrachRxBbuIoBufCtrlDecomp[tti % XRAN_N_FE_BUF_LEN][CC_ID][Ant_ID].sBufferList.pBuffers[symb_id_offset].pCtrl; -+ if(mb) -+ rte_pktmbuf_free(mb); -+ - if(p_xran_dev_ctx->fh_cfg.ru_conf.byteOrder == XRAN_CPU_LE_BYTE_ORDER) { - int idx = 0; - uint16_t *psrc = (uint16_t *)iq_data_start; -diff --git a/fhi_lib/lib/src/xran_timer.c b/fhi_lib/lib/src/xran_timer.c -index b13101a..6d46298 100644 ---- a/fhi_lib/lib/src/xran_timer.c -+++ b/fhi_lib/lib/src/xran_timer.c -@@ -29,7 +29,11 @@ - #include - #include - #include -+#if defined(__arm__) || defined(__aarch64__) -+#include -+#else - #include -+#endif - #include "xran_timer.h" - #include "xran_printf.h" - #include "xran_mlog_lnx.h" -@@ -141,12 +145,30 @@ void timing_adjust_gps_second(struct timespec* p_time) - - return; - } -+#if defined(__x86_64__) - uint64_t xran_tick(void) - { - uint32_t hi, lo; - __asm volatile ("rdtsc" : "=a"(lo), "=d"(hi)); - return ( (uint64_t)lo)|( ((uint64_t)hi)<<32 ); - } -+#elif defined(__aarch64__) -+#include -+uint64_t xran_tick(void) { -+ struct timeval tv; -+ gettimeofday(&tv, NULL); -+ return (uint64_t)tv.tv_sec * 1000000 + tv.tv_usec; -+} -+#elif defined(__arm__) -+#include -+uint64_t xran_tick(void) { -+ struct timespec ts; -+ clock_gettime(CLOCK_MONOTONIC, &ts); -+ return (uint64_t)ts.tv_sec * 1000000000LL + ts.tv_nsec; -+} -+#else -+#error "Unsupported architecture" -+#endif - - unsigned long get_ticks_diff(unsigned long curr_tick, unsigned long last_tick) - { -diff --git a/fhi_lib/lib/src/xran_transport.c b/fhi_lib/lib/src/xran_transport.c -index 881f6f6..dbea6a8 100644 ---- a/fhi_lib/lib/src/xran_transport.c -+++ b/fhi_lib/lib/src/xran_transport.c -@@ -27,7 +27,10 @@ - - #include - #include -+#if defined(__arm__) || defined(__aarch64__) -+#else - #include -+#endif - #include - #include - -diff --git a/fhi_lib/lib/src/xran_tx_proc.c b/fhi_lib/lib/src/xran_tx_proc.c -index 3cfb2be..eb02195 100644 ---- a/fhi_lib/lib/src/xran_tx_proc.c -+++ b/fhi_lib/lib/src/xran_tx_proc.c -@@ -35,7 +35,11 @@ - #include - #include - #include -+#if defined(__arm__) || defined(__aarch64__) -+#include -+#else - #include -+#endif - - #include - #include -diff --git a/fhi_lib/lib/src/xran_up_api.c b/fhi_lib/lib/src/xran_up_api.c -index 397853a..14266de 100644 ---- a/fhi_lib/lib/src/xran_up_api.c -+++ b/fhi_lib/lib/src/xran_up_api.c -@@ -25,7 +25,10 @@ - * - **/ - #include -+#if defined(__arm__) || defined(__aarch64__) -+#else - #include -+#endif - #include - - #include "xran_fh_o_du.h" -@@ -329,6 +332,7 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf, - uint8_t *subframe_id, - uint8_t *slot_id, - uint8_t *symb_id, -+ uint8_t *filter_id, - union ecpri_seq_id *seq_id, - uint16_t *num_prbu, - uint16_t *start_prbu, -@@ -338,7 +342,8 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf, - int8_t expect_comp, - enum xran_comp_hdr_type staticComp, - uint8_t *compMeth, -- uint8_t *iqWidth) -+ uint8_t *iqWidth, -+ uint8_t *is_prach) - { - #if XRAN_MLOG_VAR - uint32_t mlogVar[10]; -@@ -374,6 +379,8 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf, - return 0; /* packet too short */ - - radio_hdr->sf_slot_sym.value = rte_be_to_cpu_16(radio_hdr->sf_slot_sym.value); -+ if (radio_hdr->data_feature.filter_id > 0) *is_prach = 1; -+ else *is_prach = 0; - - if (frame_id) - *frame_id = radio_hdr->frame_id; -@@ -387,6 +394,8 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf, - if (symb_id) - *symb_id = radio_hdr->sf_slot_sym.symb_id; - -+ if (filter_id) -+ *filter_id = radio_hdr->data_feature.filter_id; - /* Process data section hdr */ - struct data_section_hdr *data_hdr = - (void *)rte_pktmbuf_adj(mbuf, sizeof(*radio_hdr)); -@@ -401,6 +410,7 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf, - *sym_inc = data_hdr->fields.sym_inc; - *rb = data_hdr->fields.rb; - *sect_id = data_hdr->fields.sect_id; -+ if (*num_prbu == 0) *num_prbu=273; - - if(expect_comp) { - const struct data_section_compression_hdr *data_compr_hdr; diff --git a/doc/ORAN_FHI7.2_Tutorial.md b/doc/ORAN_FHI7.2_Tutorial.md index b02f2973a6..c90f9c72a5 100644 --- a/doc/ORAN_FHI7.2_Tutorial.md +++ b/doc/ORAN_FHI7.2_Tutorial.md @@ -69,11 +69,10 @@ Tested libxran releases: | Vendor | |-----------------------------------------| -| `oran_e_maintenance_release_v1.0` | | `oran_f_release_v1.0` | -**Note**: The libxran driver of OAI identifies the above E release version as "5.1.0" (E is fifth letter, then 1.0), and the above F release as "6.1.0". +**Note**: The libxran driver of OAI identifies the above F release version as "6.1.0" (F is the sixth letter, then 1.0). ### Configure your server @@ -375,14 +374,6 @@ cd ~/openairinterface5g/ Download ORAN FHI DU library, checkout the correct version, and apply the correct patch (available in `oai_folder/cmake_targets/tools/oran_fhi_integration_patches`). -#### E release -```bash -git clone https://gerrit.o-ran-sc.org/r/o-du/phy.git ~/phy -cd ~/phy -git checkout oran_e_maintenance_release_v1.0 -git apply ~/openairinterface5g/cmake_targets/tools/oran_fhi_integration_patches/E/oaioran_E.patch -``` - #### F release ```bash git clone https://gerrit.o-ran-sc.org/r/o-du/phy.git ~/phy @@ -404,7 +395,6 @@ This feature is intended to enable experiments and future improvements on Arm sy ```bash cd ~/phy/fhi_lib/lib make clean -RTE_SDK=~/dpdk-stable-20.11.9/ XRAN_DIR=~/phy/fhi_lib make XRAN_LIB_SO=1 # E release WIRELESS_SDK_TOOLCHAIN=gcc RTE_SDK=~/dpdk-stable-20.11.9/ XRAN_DIR=~/phy/fhi_lib make XRAN_LIB_SO=1 # F release ... [AR] build/libxran.so @@ -967,7 +957,7 @@ Sample configuration files for OAI gNB, specific to the manufacturer of the radi 4. Benetel 550 RU: [`gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf) [`gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf) -[`gnb.sa.band78.273prb.fhi72.2x2-benetel550-16b.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.2x2-benetel550-16b.conf) - only with E release; with F, UL U-plane fragmentation is not correct +[`gnb.sa.band78.273prb.fhi72.2x2-benetel550-16b.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.2x2-benetel550-16b.conf) - tested successfully with E release; with F, UL U-plane fragmentation is not correct 5. Metanoia RU: [`gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf) diff --git a/radio/fhi_72/CMakeLists.txt b/radio/fhi_72/CMakeLists.txt index e7e87560f9..0fb5605662 100644 --- a/radio/fhi_72/CMakeLists.txt +++ b/radio/fhi_72/CMakeLists.txt @@ -16,16 +16,15 @@ add_library(oran_fhlib_5g MODULE oran-init.c ) -set(E_VERSION 5.1.6) set(F_VERSION 6.1.8) find_package(xran REQUIRED) -if(xran_VERSION VERSION_EQUAL E_VERSION) - target_compile_definitions(oran_fhlib_5g PRIVATE E_RELEASE) +if(xran_VERSION MATCHES "5.*") + message(FATAL_ERROR "xran E release not supported starting from tag 2026.w08.\nPlease switch to F version ${F_VERSION}") elseif(xran_VERSION VERSION_EQUAL F_VERSION) target_compile_definitions(oran_fhlib_5g PRIVATE F_RELEASE) else() - message(FATAL_ERROR "Found xran version ${xran_VERSION} but needed ${E_VERSION} (E release) or ${F_VERSION} (F release)") + message(FATAL_ERROR "Found xran version ${xran_VERSION} but needed ${F_VERSION} (F release)") endif() # Ignore xran-specific warning: we don't care/can't change the following warning, so suppress diff --git a/radio/fhi_72/mplane/CMakeLists.txt b/radio/fhi_72/mplane/CMakeLists.txt index 26bbb7939e..3a4af9afae 100644 --- a/radio/fhi_72/mplane/CMakeLists.txt +++ b/radio/fhi_72/mplane/CMakeLists.txt @@ -6,8 +6,8 @@ add_library(oran_fhlib_5g_mplane MODULE ) add_dependencies(oran_fhlib_5g_mplane oran_fhlib_5g) -if(xran_VERSION VERSION_EQUAL E_VERSION) - target_compile_definitions(oran_fhlib_5g_mplane PRIVATE E_RELEASE) +if(xran_VERSION MATCHES "5.*") + message(FATAL_ERROR "xran E release not supported starting from tag 2026.w08.\nPlease switch to F version ${F_VERSION}") elseif(xran_VERSION VERSION_EQUAL F_VERSION) target_compile_definitions(oran_fhlib_5g_mplane PRIVATE F_RELEASE) endif() diff --git a/radio/fhi_72/oaioran.c b/radio/fhi_72/oaioran.c index 0b5eb0e3a2..de14b775e2 100644 --- a/radio/fhi_72/oaioran.c +++ b/radio/fhi_72/oaioran.c @@ -415,22 +415,7 @@ int xran_fh_rx_read_slot(ru_info_t *ru, int *frame, int *slot) uint8_t *pData; struct xran_section_desc *p_sec_desc = NULL; struct xran_prb_elm *pRbElm = &pRbMap->prbMap[idxElm]; -#ifdef E_RELEASE - uint32_t one_rb_size = - (((pRbElm->iqWidth == 0) || (pRbElm->iqWidth == 16)) ? (N_SC_PER_PRB * 2 * 2) : (3 * pRbElm->iqWidth + 1)); - if (fh_init->mtu < num_totalRB * one_rb_size) - pData = bufs->dst[ant_id % nb_rx_per_ru][tti % XRAN_N_FE_BUF_LEN] - .pBuffers[sym_idx % XRAN_NUM_OF_SYMBOL_PER_SLOT] - .pData; - else { - p_sec_desc = pRbElm->p_sec_desc[sym_idx][0]; - pData = p_sec_desc->pData; - } - numRB = num_totalRB; - startRB = start_totalRB; - { - { -#elif defined F_RELEASE +#if defined F_RELEASE // UP_nRBSize & UP_nRBStart are for DL U-plane only LOG_D(HW, "[%d.%d] idxElm[%d] startSym[%d]:numSym[%d] UP_startRB[%d]:UP_numRB[%d] sym_idx[%d] ant_id[%d] pRbElm->nRBStart[%d]:pRbElm->nRBSize[%d]\n", *frame, *slot, idxElm, pRbElm->nStartSymb, pRbElm->numSymb, pRbElm->UP_nRBStart, pRbElm->UP_nRBSize, sym_idx, ant_id, pRbElm->nRBStart, pRbElm->nRBSize); for (int idxDesc = 0; idxDesc < XRAN_MAX_FRAGMENT; idxDesc++) { @@ -578,10 +563,7 @@ int xran_fh_tx_send_slot(ru_info_t *ru, int frame, int slot, uint64_t timestamp) for (uint32_t idxElm = 0; idxElm < pPrbMap->nPrbElm; idxElm++) { struct xran_prb_elm *pRbElm = &pPrbMap->prbMap[idxElm]; int numRB, startRB; -#ifdef E_RELEASE - numRB = pRbElm->nRBSize; - startRB = pRbElm->nRBStart; -#elif F_RELEASE +#if defined F_RELEASE numRB = pRbElm->UP_nRBSize; startRB = pRbElm->UP_nRBStart; #endif @@ -662,15 +644,11 @@ int xran_fh_tx_send_slot(ru_info_t *ru, int frame, int slot, uint64_t timestamp) p_prbMapElm->nBeamIndex = 0; } - // radio-transport fragmentation is not supported in both E and F releases; + // radio-transport fragmentation is not supported in xran F release; // E-bit = 1 => each ethernet frame is considered as the last fragment; // a group of PRBs per each symbol is encapsulated in one ethernet frame. // => seems that the RUs don't check for E-bit -#ifdef E_RELEASE - p_sec_desc = p_prbMapElm->p_sec_desc[sym_idx][0]; - int16_t startRB = p_prbMapElm->nRBStart; - int16_t numRB = p_prbMapElm->nRBSize; -#elif F_RELEASE +#if defined F_RELEASE p_sec_desc = &p_prbMapElm->sec_desc[sym_idx][0]; int16_t startRB = p_prbMapElm->UP_nRBStart; int16_t numRB = p_prbMapElm->UP_nRBSize; diff --git a/radio/fhi_72/oran-config.c b/radio/fhi_72/oran-config.c index 89fd2e56db..356d57c916 100644 --- a/radio/fhi_72/oran-config.c +++ b/radio/fhi_72/oran-config.c @@ -512,9 +512,6 @@ static bool set_fh_io_cfg(struct xran_io_cfg *io_cfg, const paramdef_t *fhip, in } else { io_cfg->bbdev_mode = XRAN_BBDEV_NOT_USED; // DPDK for BBDev } -#elif defined(E_RELEASE) - io_cfg->bbdev_dev[0] = NULL; // BBDev dev name; max devices = 1 - io_cfg->bbdev_mode = XRAN_BBDEV_NOT_USED; // DPDK for BBDev #endif int dpdk_iova_mode_idx = config_paramidx_fromname((paramdef_t *)fhip, nump, ORAN_CONFIG_DPDK_IOVA_MODE); AssertFatal(dpdk_iova_mode_idx >= 0,"Index for dpdk_iova_mode config option not found!"); diff --git a/radio/fhi_72/oran-init.c b/radio/fhi_72/oran-init.c index 4de6d00f20..3f05672bda 100644 --- a/radio/fhi_72/oran-init.c +++ b/radio/fhi_72/oran-init.c @@ -208,17 +208,6 @@ static void oran_allocate_cplane_buffers(void *instHandle, { xran_status_t status; uint32_t count1 = 0; - -#ifdef E_RELEASE - uint32_t count2 = 0; - uint32_t poolSec; - uint32_t numBufsSec = next_power_2(XRAN_N_FE_BUF_LEN * ant * XRAN_NUM_OF_SYMBOL_PER_SLOT * sect * XRAN_MAX_FRAGMENT); - uint32_t bufSizeSec = sizeof(struct xran_section_desc); - status = xran_bm_init(instHandle, &poolSec, numBufsSec, bufSizeSec); - AssertFatal(XRAN_STATUS_SUCCESS == status, "Failed at xran_bm_init(), status %d\n", status); - printf("xran_bm_init() hInstance %p poolIdx %u elements %u size %u\n", instHandle, poolSec, numBufsSec, bufSizeSec); -#endif - uint32_t poolPrb; uint32_t numBufsPrb = next_power_2(XRAN_N_FE_BUF_LEN * ant * XRAN_NUM_OF_SYMBOL_PER_SLOT) - 1; uint32_t bufSizePrb = size_of_prb_map; @@ -247,34 +236,7 @@ static void oran_allocate_cplane_buffers(void *instHandle, // get mixed slot map if in TDD and in mixed slot if (prb_conf->nTddPeriod != 0 && (j % prb_conf->nTddPeriod) == prb_conf->mixed_slot_index) src = &prb_conf->mixedSlotMap; -#ifdef E_RELEASE - /* as per E release sample app, the memory is copied up to size_of_prb_map - which translates to >= sizeof(struct xran_prb_map) + sizeof(struct xran_prb_elm)*5, - but we assume that RB allocation is done as 1 RE/UE so the total memory size is sizeof(struct xran_prb_map); - this is improved in F release */ - struct xran_prb_map *p_rb_map = (struct xran_prb_map *)ptr; - memcpy(p_rb_map, src, sizeof(*src)); - - for (uint32_t elm_id = 0; elm_id < p_rb_map->nPrbElm; ++elm_id) { - struct xran_prb_elm *pPrbElem = &p_rb_map->prbMap[elm_id]; - for (uint32_t k = 0; k < XRAN_NUM_OF_SYMBOL_PER_SLOT; ++k) { - for (uint32_t m = 0; m < XRAN_MAX_FRAGMENT; ++m) { - void *sd_ptr; - void *sd_mb; - status = xran_bm_allocate_buffer(instHandle, poolSec, &sd_ptr, &sd_mb); - AssertFatal(XRAN_STATUS_SUCCESS == status, - "Failed at xran_bm_allocate_buffer(), status %d m %d k %d elm_id %d\n", - status, - m, - k, - elm_id); - count2++; - pPrbElem->p_sec_desc[k][m] = sd_ptr; - memset(sd_ptr, 0, sizeof(struct xran_section_desc)); - } - } - } -#elif defined F_RELEASE +#if defined F_RELEASE if (fh_config->RunSlotPrbMapBySymbolEnable) { xran_init_PrbMap_by_symbol_from_cfg(src, ptr, mtu, fh_config->nDLRBs); } else { @@ -284,9 +246,6 @@ static void oran_allocate_cplane_buffers(void *instHandle, } } printf("xran_bm_allocate_buffer() hInstance %p poolIdx %u count %u\n", instHandle, poolPrb, count1); -#ifdef E_RELEASE - printf("xran_bm_allocate_buffer() hInstance %p poolIdx %u count %u\n", instHandle, poolSec, count2); -#endif } /* callback not actively used */ @@ -355,9 +314,7 @@ static void oran_allocate_buffers(void *handle, .mixedSlotMap = ulPmMixed, }; -#ifdef E_RELEASE - uint32_t size_of_prb_map = sizeof(struct xran_prb_map) + sizeof(struct xran_prb_elm) * (xran_max_sections_per_slot - 1); -#elif defined F_RELEASE +#if defined F_RELEASE uint32_t size_of_prb_map; if (fh_config->RunSlotPrbMapBySymbolEnable) { // For Liteon FR2 with RunSlotPrbMapBySymbolEnable, xran_prb_map will have xran_prb_elm prbMap[14] @@ -462,10 +419,7 @@ int *oai_oran_initialize(struct xran_fh_init *xran_fh_init, struct xran_fh_confi struct xran_cb_tag tag = {.cellId = sector, .oXuId = o_xu_id}; pi->prach_tag = tag; pi->pusch_tag = tag; -#ifdef E_RELEASE - LOG_W(HW, "Please be aware that E release support will be removed in the future. Consider switching to F release.\n"); - oran_allocate_buffers(gxran_handle, o_xu_id, 1, pi, &xran_fh_config[o_xu_id]); -#elif defined F_RELEASE +#if defined F_RELEASE oran_allocate_buffers(gxran_handle, o_xu_id, 1, pi, xran_fh_init->mtu, &xran_fh_config[o_xu_id]); #endif