From 5a339d66f28bb3985664cb9893bf9b48d0414791 Mon Sep 17 00:00:00 2001 From: Teodora Date: Tue, 17 Feb 2026 10:09:23 +0100 Subject: [PATCH] Use the same pattern for checking the existance of F_RELEASE definition In general, `#ifdef` and `#if defined` are the same. Note: `#elif` is not the same as `#elif defined`. --- radio/fhi_72/oaioran.c | 4 ++-- radio/fhi_72/oran-config.c | 24 ++++++++++++------------ radio/fhi_72/oran-init.c | 8 ++++---- radio/fhi_72/oran_isolate.c | 4 ++-- radio/fhi_72/oran_isolate.h | 4 ++-- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/radio/fhi_72/oaioran.c b/radio/fhi_72/oaioran.c index de14b775e2..047c216898 100644 --- a/radio/fhi_72/oaioran.c +++ b/radio/fhi_72/oaioran.c @@ -94,7 +94,7 @@ void oai_xran_fh_rx_callback(void *pCallbackTag, xran_status_t status) LOG_D(HW, "rx_callback at %4d.%3d (subframe %d), rx_sym %d ru_id %d\n", frame, slot, subframe, rx_sym, ru_id); if (rx_sym == 7) { // in F release this value is defined as XRAN_FULL_CB_SYM (full slot (offset + 7)) -#ifdef F_RELEASE +#if defined F_RELEASE for (int ru_idx = 0; ru_idx < num_ports; ru_idx++) { struct xran_fh_config *fh_config = get_xran_fh_config(ru_idx); oran_buf_list_t *bufs = get_xran_buffers(ru_idx); @@ -722,7 +722,7 @@ int xran_fh_tx_send_slot(ru_info_t *ru, int frame, int slot, uint64_t timestamp) return (0); } -#ifdef F_RELEASE +#if defined F_RELEASE /** @details Read PRACH and PUSCH data from xran buffers. If * I/Q compression (bitwidth < 16 bits) is configured, deccompresses the data * before writing. Prints ON TIME counters every 128 frames. diff --git a/radio/fhi_72/oran-config.c b/radio/fhi_72/oran-config.c index 356d57c916..6f8afc092f 100644 --- a/radio/fhi_72/oran-config.c +++ b/radio/fhi_72/oran-config.c @@ -124,7 +124,7 @@ static void print_fh_init_io_cfg(const struct xran_io_cfg *io_cfg) io_cfg->one_vf_cu_plane); print_fh_eowd_cmn(io_cfg->id, &io_cfg->eowd_cmn[io_cfg->id]); printf("eowd_port (filled within xran library)\n"); -#ifdef F_RELEASE +#if defined F_RELEASE printf("\ bbu_offload %d\n", io_cfg->bbu_offload); @@ -189,7 +189,7 @@ void print_fh_init(const struct xran_fh_init *fh_init) printf("\ totalBfWeights %d\n", fh_init->totalBfWeights); -#ifdef F_RELEASE +#if defined F_RELEASE printf("\ mlogxranenable %d\n\ dlCpProcBurst %d\n", @@ -232,7 +232,7 @@ static void print_prach_config(const struct xran_prach_config *prach_conf) prach_conf->timeOffset, prach_conf->freqOffset, prach_conf->eAxC_offset); -#ifdef F_RELEASE +#if defined F_RELEASE printf("\ nPrachConfIdxLTE %d\n", prach_conf->nPrachConfIdxLTE); @@ -396,7 +396,7 @@ void print_fh_config(const struct xran_fh_config *fh_config) fh_config->GPS_Alpha, fh_config->GPS_Beta); -#ifdef F_RELEASE +#if defined F_RELEASE printf("\ srsEnableCp %d\n\ SrsDelaySym %d\n", @@ -429,7 +429,7 @@ void print_fh_config(const struct xran_fh_config *fh_config) fh_config->max_sections_per_slot, fh_config->max_sections_per_symbol); -#ifdef F_RELEASE +#if defined F_RELEASE printf("\ RunSlotPrbMapBySymbolEnable %d\n\ LiteOnIgnoreUPSectionIdEnable %d\n\ @@ -456,7 +456,7 @@ static uint64_t get_u64_mask(const paramdef_t *pd) return mask; } -#ifdef F_RELEASE +#if defined F_RELEASE char bbdev_dev[32] = ""; char bbdev_vfio_vf_token[64] = ""; #endif @@ -478,7 +478,7 @@ static bool set_fh_io_cfg(struct xran_io_cfg *io_cfg, const paramdef_t *fhip, in for (int i = 0; i < num_dev; ++i) { io_cfg->dpdk_dev[i] = strdup(gpd(fhip, nump, ORAN_CONFIG_DPDK_DEVICES)->strlistptr[i]); // VFs devices } -#ifdef F_RELEASE +#if defined F_RELEASE io_cfg->bbdev_dev[0] = NULL; // BBDev dev name; max devices = 1 io_cfg->bbdev_vfio_vf_token[0] = NULL; // BBDev dev token; max devices = 1 char *shlibversion = NULL; // version of the LDPC coding library @@ -556,7 +556,7 @@ static bool set_fh_io_cfg(struct xran_io_cfg *io_cfg, const paramdef_t *fhip, in /* eCPRI OWDM per port variables for O-DU; this parameter is filled within xran library */ // eowd_port[0][XRAN_VF_MAX] -#ifdef F_RELEASE +#if defined F_RELEASE io_cfg->bbu_offload = 0; // enable packet handling on BBU cores #endif @@ -756,7 +756,7 @@ static bool set_fh_init(void *mplane_api, struct xran_fh_init *fh_init, enum xra fh_init->filePrefix = strdup(*gpd(fhip, nump, ORAN_CONFIG_FILE_PREFIX)->strptr); fh_init->totalBfWeights = 0; // only used if id = O_RU (for emulation); C-plane extension types; section 5.4.6 of CUS spec -#ifdef F_RELEASE +#if defined F_RELEASE fh_init->mlogxranenable = 0; // enable mlog; 0 -> disabled fh_init->dlCpProcBurst = 0; /* 1 -> DL CP processing will be done on single symbol, 0 -> DL CP processing will be spread across all allowed symbols and multiple cores to reduce burstiness */ @@ -801,7 +801,7 @@ static bool set_fh_prach_config(void *mplane_api, prach_config->numPrbc = 0; prach_config->timeOffset = 0; prach_config->freqOffset = 0; -#ifdef F_RELEASE +#if defined F_RELEASE prach_config->nPrachConfIdxLTE = 0; // used only if DSS enabled and technology is XRAN_RAN_LTE #endif @@ -966,7 +966,7 @@ static bool set_fh_config(void *mplane_api, int ru_idx, int num_rus, enum xran_c fh_config->srsEnable = 0; // enable SRS; used only if XRAN_CATEGORY_B // For LiteOn E release, no need to take care of prach eAxC_offset. xran lib is hacked to handle it. bool liteon_prach_eAxC_offset = false; -#ifdef F_RELEASE +#if defined F_RELEASE fh_config->srsEnableCp = 0; // enable SRS CP; used only if XRAN_CATEGORY_B fh_config->SrsDelaySym = 0; // number of SRS delay symbols; used only if XRAN_CATEGORY_B fh_config->RunSlotPrbMapBySymbolEnable = *gpd(fhp, nfh, ORAN_CONFIG_RunSlotPrbMapBySymbol)->uptr; // enable RunSlotPrbMapBySymbol @@ -1014,7 +1014,7 @@ static bool set_fh_config(void *mplane_api, int ru_idx, int num_rus, enum xran_c fh_config->max_sections_per_slot = 0; // not used in xran fh_config->max_sections_per_symbol = 0; // not used in xran -#ifdef F_RELEASE +#if defined F_RELEASE fh_config->dssEnable = 0; // enable DSS (extension-9) fh_config->dssPeriod = 0; // DSS pattern period for LTE/NR // fh_config->technology[XRAN_MAX_DSS_PERIODICITY] // technology array represents slot is LTE(0)/NR(1); used only if DSS enabled diff --git a/radio/fhi_72/oran-init.c b/radio/fhi_72/oran-init.c index 3f05672bda..00c0e30746 100644 --- a/radio/fhi_72/oran-init.c +++ b/radio/fhi_72/oran-init.c @@ -199,7 +199,7 @@ static void oran_allocate_cplane_buffers(void *instHandle, struct xran_flat_buffer buf[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN], uint32_t ant, uint32_t sect, - #ifdef F_RELEASE + #if defined F_RELEASE uint32_t mtu, const struct xran_fh_config *fh_config, #endif @@ -258,7 +258,7 @@ static void oran_allocate_buffers(void *handle, int xran_inst, int num_sectors, oran_port_instance_t *portInstances, - #ifdef F_RELEASE + #if defined F_RELEASE uint32_t mtu, #endif const struct xran_fh_config *fh_config) @@ -335,7 +335,7 @@ static void oran_allocate_buffers(void *handle, bl->bufs.tx_prbmap, xran_max_antenna_nr, xran_max_sections_per_slot, - #ifdef F_RELEASE + #if defined F_RELEASE mtu, fh_config, #endif @@ -350,7 +350,7 @@ static void oran_allocate_buffers(void *handle, bl->bufs.rx_prbmap, xran_max_antenna_nr, xran_max_sections_per_slot, - #ifdef F_RELEASE + #if defined F_RELEASE mtu, fh_config, #endif diff --git a/radio/fhi_72/oran_isolate.c b/radio/fhi_72/oran_isolate.c index c9991549b1..0ec4867299 100644 --- a/radio/fhi_72/oran_isolate.c +++ b/radio/fhi_72/oran_isolate.c @@ -229,7 +229,7 @@ void oran_fh_if4p5_south_in(RU_t *ru, int *frame, int *slot) start_meas(&ru->rx_fhaul); struct xran_fh_config *fh_cfg = get_xran_fh_config(0); int ret = 0; -#ifdef F_RELEASE +#if defined F_RELEASE if (fh_cfg->RunSlotPrbMapBySymbolEnable) ret = xran_fh_rx_read_slot_BySymbol(&ru_info, &f, &sl); else @@ -291,7 +291,7 @@ void oran_fh_if4p5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp) struct xran_fh_config *fh_cfg = get_xran_fh_config(0); int ret = 0; -#ifdef F_RELEASE +#if defined F_RELEASE if (fh_cfg->RunSlotPrbMapBySymbolEnable) ret = xran_fh_tx_send_slot_BySymbol(&ru_info, frame, slot, timestamp); else diff --git a/radio/fhi_72/oran_isolate.h b/radio/fhi_72/oran_isolate.h index dfd315dd29..4f62ff5340 100644 --- a/radio/fhi_72/oran_isolate.h +++ b/radio/fhi_72/oran_isolate.h @@ -60,12 +60,12 @@ typedef struct ru_info_s { * @param frame output of the frame which has been read. * @param slot output of the slot which has been read. */ int xran_fh_rx_read_slot(ru_info_t *ru, int *frame, int *slot); -#ifdef F_RELEASE +#if defined F_RELEASE int xran_fh_rx_read_slot_BySymbol(ru_info_t *ru, int *frame, int *slot); #endif /** @brief Writes TX data (PDSCH) of given slot. */ int xran_fh_tx_send_slot(ru_info_t *ru, int frame, int slot, uint64_t timestamp); -#ifdef F_RELEASE +#if defined F_RELEASE int xran_fh_tx_send_slot_BySymbol(ru_info_t *ru, int frame, int slot, uint64_t timestamp); #endif