Merge remote-tracking branch 'origin/compile-improvements' into integration_2025_w34 (!3555)

Remove dead code and variables, simplify code
This commit is contained in:
Robert Schmidt
2025-08-20 13:11:28 +02:00
45 changed files with 64 additions and 331 deletions
+3 -2
View File
@@ -285,7 +285,9 @@ add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace" ON)
add_boolean_option(TRACY_ENABLE OFF "Enable tracy instrumentation" ON)
if (TRACY_ENABLE)
CPMAddPackage("gh:wolfpld/tracy#v0.11.1")
# the tracy version here should match the tracy server version
# below is latest release as of this commit
CPMAddPackage("gh:wolfpld/tracy#0.12.2")
endif()
set (OCP_ITTI ${OPENAIR_DIR}/common/utils/ocp_itti)
@@ -337,7 +339,6 @@ target_link_libraries(nr_rrc PUBLIC asn1_nr_rrc asn1_lte_rrc)
set(S1AP_DIR ${OPENAIR3_DIR}/S1AP)
include_directories ("${S1AP_DIR}")
add_library(s1ap
${S1AP_DIR}/s1ap_common.c
${S1AP_DIR}/s1ap_eNB.c
${S1AP_DIR}/s1ap_eNB_context_management_procedures.c
${S1AP_DIR}/s1ap_eNB_decoder.c
-1
View File
@@ -1021,7 +1021,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/S1AP/s1ap_eNB_ue_context.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/S1AP/s1ap_eNB_management_procedures.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/S1AP/s1ap_eNB_context_management_procedures.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/S1AP/s1ap_common.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/S1AP/s1ap_eNB_decoder.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/S1AP/s1ap_eNB_management_procedures.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/S1AP/s1ap_eNB_handlers.h \
-49
View File
@@ -204,55 +204,6 @@ void nr_slot_select() {};
void NR_UL_indication(NR_UL_IND_t *UL_INFO) {};
void gNB_dlsch_ulsch_scheduler() {};
/*---------------------BMC: timespec helpers -----------------------------*/
struct timespec min_diff_time = { .tv_sec = 0, .tv_nsec = 0 };
struct timespec max_diff_time = { .tv_sec = 0, .tv_nsec = 0 };
struct timespec clock_difftime(struct timespec start, struct timespec end) {
struct timespec temp;
if ((end.tv_nsec-start.tv_nsec)<0) {
temp.tv_sec = end.tv_sec-start.tv_sec-1;
temp.tv_nsec = 1000000000+end.tv_nsec-start.tv_nsec;
} else {
temp.tv_sec = end.tv_sec-start.tv_sec;
temp.tv_nsec = end.tv_nsec-start.tv_nsec;
}
return temp;
}
void print_difftimes(void) {
#ifdef DEBUG
printf("difftimes min = %lu ns ; max = %lu ns\n", min_diff_time.tv_nsec, max_diff_time.tv_nsec);
#else
LOG_I(HW,"difftimes min = %lu ns ; max = %lu ns\n", min_diff_time.tv_nsec, max_diff_time.tv_nsec);
#endif
}
void update_difftimes(struct timespec start, struct timespec end) {
struct timespec diff_time = { .tv_sec = 0, .tv_nsec = 0 };
int changed = 0;
diff_time = clock_difftime(start, end);
if ((min_diff_time.tv_nsec == 0) || (diff_time.tv_nsec < min_diff_time.tv_nsec)) {
min_diff_time.tv_nsec = diff_time.tv_nsec;
changed = 1;
}
if ((max_diff_time.tv_nsec == 0) || (diff_time.tv_nsec > max_diff_time.tv_nsec)) {
max_diff_time.tv_nsec = diff_time.tv_nsec;
changed = 1;
}
#if 1
if (changed) print_difftimes();
#endif
}
/*------------------------------------------------------------------------*/
unsigned int build_rflocal(int txi, int txq, int rxi, int rxq) {
+2 -50
View File
@@ -174,55 +174,6 @@ instance_t CUuniqInstance=0;
/* forward declarations */
void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]);
/*---------------------BMC: timespec helpers -----------------------------*/
struct timespec min_diff_time = { .tv_sec = 0, .tv_nsec = 0 };
struct timespec max_diff_time = { .tv_sec = 0, .tv_nsec = 0 };
struct timespec clock_difftime(struct timespec start, struct timespec end) {
struct timespec temp;
if ((end.tv_nsec-start.tv_nsec)<0) {
temp.tv_sec = end.tv_sec-start.tv_sec-1;
temp.tv_nsec = 1000000000+end.tv_nsec-start.tv_nsec;
} else {
temp.tv_sec = end.tv_sec-start.tv_sec;
temp.tv_nsec = end.tv_nsec-start.tv_nsec;
}
return temp;
}
void print_difftimes(void) {
#ifdef DEBUG
printf("difftimes min = %lu ns ; max = %lu ns\n", min_diff_time.tv_nsec, max_diff_time.tv_nsec);
#else
LOG_I(HW,"difftimes min = %lu ns ; max = %lu ns\n", min_diff_time.tv_nsec, max_diff_time.tv_nsec);
#endif
}
void update_difftimes(struct timespec start, struct timespec end) {
struct timespec diff_time = { .tv_sec = 0, .tv_nsec = 0 };
int changed = 0;
diff_time = clock_difftime(start, end);
if ((min_diff_time.tv_nsec == 0) || (diff_time.tv_nsec < min_diff_time.tv_nsec)) {
min_diff_time.tv_nsec = diff_time.tv_nsec;
changed = 1;
}
if ((max_diff_time.tv_nsec == 0) || (diff_time.tv_nsec > max_diff_time.tv_nsec)) {
max_diff_time.tv_nsec = diff_time.tv_nsec;
changed = 1;
}
#if 1
if (changed) print_difftimes();
#endif
}
/*------------------------------------------------------------------------*/
unsigned int build_rflocal(int txi, int txq, int rxi, int rxq) {
@@ -384,7 +335,8 @@ void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) {
}
}
void init_openair0(LTE_DL_FRAME_PARMS *frame_parms,int rxgain) {
static void init_openair0(LTE_DL_FRAME_PARMS *frame_parms, int rxgain)
{
int card;
int i;
-1
View File
@@ -37,7 +37,6 @@ RAN_CONTEXT_t RC;
THREAD_STRUCT thread_struct;
uint64_t downlink_frequency[MAX_NUM_CCs][4];
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
int asn1_xer_print;
int oai_exit = 0;
instance_t CUuniqInstance = 0;
-47
View File
@@ -24,7 +24,6 @@
#include "common/config/config_userapi.h"
#include "common/utils/load_module_shlib.h"
#include "RRC/LTE/rrc_vars.h"
#ifdef SMBV
#include "PHY/TOOLS/smbv.h"
unsigned short config_frames[4] = {2,9,11,13};
@@ -130,52 +129,6 @@ void pdcp_run(const protocol_ctxt_t *const ctxt_pP)
abort();
}
/*---------------------BMC: timespec helpers -----------------------------*/
struct timespec min_diff_time = { .tv_sec = 0, .tv_nsec = 0 };
struct timespec max_diff_time = { .tv_sec = 0, .tv_nsec = 0 };
struct timespec clock_difftime(struct timespec start, struct timespec end) {
struct timespec temp;
if ((end.tv_nsec-start.tv_nsec)<0) {
temp.tv_sec = end.tv_sec-start.tv_sec-1;
temp.tv_nsec = 1000000000+end.tv_nsec-start.tv_nsec;
} else {
temp.tv_sec = end.tv_sec-start.tv_sec;
temp.tv_nsec = end.tv_nsec-start.tv_nsec;
}
return temp;
}
void print_difftimes(void)
{
LOG_I(HW, "difftimes min = %lu ns ; max = %lu ns\n", min_diff_time.tv_nsec, max_diff_time.tv_nsec);
}
void update_difftimes(struct timespec start, struct timespec end) {
struct timespec diff_time = { .tv_sec = 0, .tv_nsec = 0 };
int changed = 0;
diff_time = clock_difftime(start, end);
if ((min_diff_time.tv_nsec == 0) || (diff_time.tv_nsec < min_diff_time.tv_nsec)) {
min_diff_time.tv_nsec = diff_time.tv_nsec;
changed = 1;
}
if ((max_diff_time.tv_nsec == 0) || (diff_time.tv_nsec > max_diff_time.tv_nsec)) {
max_diff_time.tv_nsec = diff_time.tv_nsec;
changed = 1;
}
#if 1
if (changed) print_difftimes();
#endif
}
/*------------------------------------------------------------------------*/
unsigned int build_rflocal(int txi, int txq, int rxi, int rxq) {
+1 -2
View File
@@ -249,7 +249,7 @@ void set_options(int CC_id, PHY_VARS_NR_UE *UE){
}
void init_openair0()
static void init_openair0()
{
int card;
int freq_off = 0;
@@ -261,7 +261,6 @@ void init_openair0()
for (card=0; card<MAX_CARDS; card++) {
uint64_t dl_carrier, ul_carrier;
openair0_cfg[card].configFilename = NULL;
openair0_cfg[card].threequarter_fs = frame_parms->threequarter_fs;
openair0_cfg[card].sample_rate = frame_parms->samples_per_subframe * 1e3;
openair0_cfg[card].samples_per_frame = frame_parms->samples_per_frame;
-1
View File
@@ -88,7 +88,6 @@ extern int nfapi_sync_var;
extern int sync_var;
nfapi_tx_request_pdu_t *tx_request_pdu[1023][10][10]; // [frame][subframe][max_num_pdus]
nfapi_nr_pdu_t *tx_data_request[1023][20][10]; //[frame][slot][max_num_pdus]
uint8_t tx_pdus[32][8][4096];
nfapi_ue_release_request_body_t release_rntis;
-1
View File
@@ -131,7 +131,6 @@ void phy_init_nr_gNB(PHY_VARS_gNB *gNB)
crcTableInit();
init_byte2m128i();
init_byte2bit16();
init_pucch2_luts();
nr_init_fde(); // Init array for frequency equalization of transform precoding of PUSCH
+3 -4
View File
@@ -69,8 +69,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
uint32_t preamble_shift2;
uint16_t preamble_index0=0,n_shift_ra=0,n_shift_ra_bar;
uint16_t d_start=0;
uint16_t numshift=0;
uint16_t *prach_root_sequence_map;
uint16_t numshift = 0;
uint8_t not_found;
int k=0;
uint16_t u;
@@ -221,7 +220,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
if (eNB) start_meas(&eNB->rx_prach);
prach_root_sequence_map = (prach_fmt < 4) ? prach_root_sequence_map0_3 : prach_root_sequence_map4;
const uint16_t *prach_root_sequence_map = (prach_fmt < 4) ? prach_root_sequence_map0_3 : prach_root_sequence_map4;
// PDP is oversampled, e.g. 1024 sample instead of 839
// Adapt the NCS (zero-correlation zones) with oversampling factor e.g. 1024/839
NCS2 = (N_ZC==839) ? ((NCS<<10)/839) : ((NCS<<8)/139);
@@ -495,7 +494,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
new_dft = 0;
if (br_flag == 1) {
Xu=(c16_t *)eNB->X_u_br[ce_level][preamble_offset-first_nonzero_root_idx];
Xu = eNB->X_u_br[ce_level][preamble_offset - first_nonzero_root_idx];
prach_ifft = prach_ifftp[prach_ifft_cnt++];
if (eNB->prach_vars_br.repetition_number[ce_level]==1) memset(prach_ifft,0,((N_ZC==839)?2048:256)*sizeof(int32_t));
+7 -6
View File
@@ -35,12 +35,13 @@
#include "PHY/phy_extern_ue.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "common/utils/lte/prach_utils.h"
#include "openair1/PHY/LTE_TRANSPORT/prach_extern.h"
const uint16_t NCS_unrestricted[16] = {0, 13, 15, 18, 22, 26, 32, 38, 46, 59, 76, 93, 119, 167, 279, 419};
const uint16_t NCS_restricted[15] = {15, 18, 22, 26, 32, 38, 46, 55, 68, 82, 100, 128, 158, 202, 237}; // high-speed case
const uint16_t NCS_4[7] = {2, 4, 6, 8, 10, 12, 15};
int16_t ru[2*839]; // quantized roots of unity
c16_t root_unit[839]; // quantized roots of unity
static uint32_t ZC_inv[839]; // multiplicative inverse for roots u
uint16_t du[838];
@@ -367,13 +368,13 @@ int is_prach_subframe(LTE_DL_FRAME_PARMS *frame_parms, uint32_t frame, uint8_t s
return(prach_mask);
}
void compute_prach_seq(uint16_t rootSequenceIndex,
uint8_t prach_ConfigIndex,
uint8_t zeroCorrelationZoneConfig,
uint8_t highSpeedFlag,
frame_type_t frame_type,
uint32_t X_u[64][839]) {
c16_t X_u[64][839])
{
// Compute DFT of x_u => X_u[k] = x_u(inv(u)*k)^* X_u[k] = exp(j\pi u*inv(u)*k*(inv(u)*k+1)/N_ZC)
unsigned int k,inv_u,i,NCS=0,num_preambles;
int N_ZC;
@@ -495,7 +496,7 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
for (k=0; k<N_ZC; k++) {
// 420 is the multiplicative inverse of 2 (required since ru is exp[j 2\pi n])
X_u[i][k] = ((uint32_t *)ru)[(((k*(1+(inv_u*k)))%N_ZC)*420)%N_ZC];
X_u[i][k] = root_unit[(((k * (1 + (inv_u * k))) % N_ZC) * 420) % N_ZC];
}
}
@@ -525,8 +526,8 @@ void init_prach_tables(int N_ZC) {
// Compute quantized roots of unity
for (i=0; i<N_ZC; i++) {
ru[i<<1] = (int16_t)(floor(32767.0*cos(2*M_PI*(double)i/N_ZC)));
ru[1+(i<<1)] = (int16_t)(floor(32767.0*sin(2*M_PI*(double)i/N_ZC)));
root_unit[i].r = (int16_t)(floor(32767.0 * cos(2 * M_PI * (double)i / N_ZC)));
root_unit[i].i = (int16_t)(floor(32767.0 * sin(2 * M_PI * (double)i / N_ZC)));
#ifdef PRACH_DEBUG
if (i<16)
+3 -11
View File
@@ -43,22 +43,14 @@
extern const uint16_t NCS_unrestricted[16];
extern const uint16_t NCS_restricted[15];
extern const uint16_t NCS_4[7];
extern int16_t ru[2 * 839]; // quantized roots of unity
extern c16_t root_unit[839]; // quantized roots of unity
extern uint16_t du[838];
// This is table 5.7.1-4 from 36.211
extern PRACH_TDD_PREAMBLE_MAP tdd_preamble_map[64][7];
extern const uint16_t prach_root_sequence_map0_3[838];
extern uint16_t prach_root_sequence_map0_3[838];
extern uint16_t prach_root_sequence_map4[138];
extern const uint16_t prach_root_sequence_map4[138];
void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe);
+17 -30
View File
@@ -63,7 +63,6 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
int16_t Ncp;
uint8_t n_ra_prb;
uint16_t NCS;
uint16_t *prach_root_sequence_map;
uint16_t preamble_offset,preamble_shift;
uint16_t preamble_index0,n_shift_ra,n_shift_ra_bar;
uint16_t d_start=-1,numshift;
@@ -72,11 +71,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
//uint8_t f_ra,t1_ra;
uint16_t N_ZC = (prach_fmt<4)?839:139;
uint8_t not_found;
int k;
int16_t *Xu;
uint16_t u;
int32_t Xu_re,Xu_im;
uint16_t offset,offset2;
int prach_start;
int i, prach_len;
uint16_t first_nonzero_root_idx=0;
@@ -109,7 +104,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
ue->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
ue->frame_parms.prach_config_common.prach_ConfigInfo.prach_FreqOffset,
tdd_mapindex, Nf);
prach_root_sequence_map = (prach_fmt<4) ? prach_root_sequence_map0_3 : prach_root_sequence_map4;
const uint16_t *prach_root_sequence_map = (prach_fmt < 4) ? prach_root_sequence_map0_3 : prach_root_sequence_map4;
/*
// this code is not part of get_prach_prb_offset
if (frame_type == TDD) { // TDD
@@ -215,20 +210,6 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
#endif
// nsymb = (frame_parms->Ncp==0) ? 14:12;
// subframe_offset = (unsigned int)frame_parms->ofdm_symbol_size*subframe*nsymb;
k = (12*n_ra_prb) - 6*ue->frame_parms.N_RB_UL;
if (k<0)
k+=ue->frame_parms.ofdm_symbol_size;
k*=12;
k+=13;
Xu = (int16_t *)ue->X_u[preamble_offset-first_nonzero_root_idx];
/*
k+=(12*ue->frame_parms.first_carrier_offset);
if (k>(12*ue->frame_parms.ofdm_symbol_size))
k-=(12*ue->frame_parms.ofdm_symbol_size);
*/
k*=2;
switch (ue->frame_parms.N_RB_UL) {
case 6:
@@ -259,20 +240,26 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
break;
}
{
int k = (12 * n_ra_prb) - 6 * ue->frame_parms.N_RB_UL;
for (offset=0,offset2=0; offset<N_ZC; offset++,offset2+=preamble_shift) {
if (offset2 >= N_ZC)
offset2 -= N_ZC;
if (k < 0)
k += ue->frame_parms.ofdm_symbol_size;
Xu_re = (((int32_t)Xu[offset<<1]*amp)>>15);
Xu_im = (((int32_t)Xu[1+(offset<<1)]*amp)>>15);
prachF[k++]= ((Xu_re*ru[offset2<<1]) - (Xu_im*ru[1+(offset2<<1)]))>>15;
prachF[k++]= ((Xu_im*ru[offset2<<1]) + (Xu_re*ru[1+(offset2<<1)]))>>15;
k *= 12;
k += 13;
c16_t *Xu_ue = ue->X_u[preamble_offset - first_nonzero_root_idx];
c16_t *complex_prachF = (c16_t *)prachF;
for (int offset = 0, offset2 = 0; offset < N_ZC; offset++, offset2 += preamble_shift) {
if (offset2 >= N_ZC)
offset2 -= N_ZC;
c16_t Xu = c16mulRealShift(*Xu_ue++, amp, 15);
complex_prachF[k++] = c16mulShift(Xu, root_unit[offset2], 15);
if (k==(12*2*ue->frame_parms.ofdm_symbol_size))
k=0;
if (k == 12 * ue->frame_parms.ofdm_symbol_size)
k = 0;
}
}
switch (prach_fmt) {
case 0:
Ncp = 3168;
@@ -1649,8 +1649,7 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
uint8_t zeroCorrelationZoneConfig,
uint8_t highSpeedFlag,
frame_type_t frame_type,
uint32_t X_u[64][839]);
c16_t X_u[64][839]);
void init_prach_tables(int N_ZC);
+1 -1
View File
@@ -640,7 +640,7 @@ typedef struct {
/// mbsfn reference symbols
uint32_t lte_gold_mbsfn_khz_1dot25_table[10][150];
uint32_t X_u[64][839];
c16_t X_u[64][839];
uint32_t high_speed_flag;
uint32_t perfect_ce;
+2 -2
View File
@@ -600,8 +600,8 @@ typedef struct PHY_VARS_eNB_s {
// PUCCH1a/b energy detection parameters for eMTC per CE-level
int pucch1ab_DTX_threshold_emtc[4];
uint32_t X_u[64][839];
uint32_t X_u_br[4][64][839];
c16_t X_u[64][839];
c16_t X_u_br[4][64][839];
uint8_t pbch_configured;
uint8_t pbch_pdu[4]; //PBCH_PDU_SIZE
char eNB_generate_rar;
@@ -26,15 +26,8 @@
#include "PHY/NR_REFSIG/nr_refsig_common.h"
#include "PHY/MODULATION/nr_modulation.h"
extern simde__m128i byte2bit16_lut[256];
void init_byte2bit16(void);
void init_byte2m128i(void);
static inline simde__m128i byte2bit16(uint8_t b)
{
return byte2bit16_lut[b];
}
typedef struct {
int size;
int ports;
@@ -26,22 +26,6 @@
#endif
#define PEAK_DETECT_THRESHOLD 15
simde__m128i byte2bit16_lut[256];
void init_byte2bit16(void)
{
for (int s = 0; s < 256; s++) {
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], s & 1, 0);
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 1) & 1, 1);
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 2) & 1, 2);
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 3) & 1, 3);
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 4) & 1, 4);
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 5) & 1, 5);
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 6) & 1, 6);
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 7) & 1, 7);
}
}
simde__m128i byte2m128i[256];
void init_byte2m128i(void)
{
+4 -2
View File
@@ -237,6 +237,8 @@ int main(int argc, char *argv[])
int max_ldpc_iterations = 5;
int num_antennas_per_thread = 1;
uint32_t log_format = 0;
int threequarter_fs = 0;
if ((uniqCfg = load_configmodule(argc, argv, CONFIG_ENABLECMDLINEONLY)) == 0) {
exit_fun("[NR_ULSIM] Error, configuration module init failed\n");
}
@@ -351,7 +353,7 @@ int main(int argc, char *argv[])
case 'k':
printf("Setting threequarter_fs_flag\n");
openair0_cfg[0].threequarter_fs= 1;
threequarter_fs = 1;
break;
case 'm':
@@ -584,7 +586,7 @@ int main(int argc, char *argv[])
uint32_t samples;
get_samplerate_and_bw(mu,
N_RB_DL,
openair0_cfg[0].threequarter_fs,
threequarter_fs,
&sampling_frequency,
&samples,
&tx_bandwidth,
-2
View File
@@ -41,8 +41,6 @@ typedef struct e1ap_upcp_inst_s {
e1ap_net_config_t net_config;
} e1ap_upcp_inst_t;
extern int asn1_xer_print;
// forward declaration so we don't require E1AP ASN.1 when including this
// header
struct E1AP_E1AP_PDU;
-3
View File
@@ -49,9 +49,6 @@
#define GNB_CONF_STRING_OTG_APP_TYPE "app_type"
#define GNB_CONF_STRING_OTG_BG_TRAFFIC "bg_traffic"
extern int asn_debug;
extern int asn1_xer_print;
#ifdef LIBCONFIG_LONG
#define libconfig_int long
#else
+2 -2
View File
@@ -47,7 +47,7 @@ ssize_t m2ap_generate_initiating_message(
pdu.choice.initiatingMessage.criticality = criticality;
ANY_fromType_aper((ANY_t *)&pdu.choice.initiatingMessage.value, td, sptr);
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_M2AP_M2AP_PDU, (void *)&pdu);
}
@@ -80,7 +80,7 @@ ssize_t m2ap_generate_unsuccessfull_outcome(
pdu.choice.successfulOutcome.criticality = criticality;
ANY_fromType_aper((ANY_t *)&pdu.choice.successfulOutcome.value, td, sptr);
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_M2AP_M2AP_PDU, (void *)&pdu);
}
-2
View File
@@ -50,8 +50,6 @@
# define M2AP_PORT 36423
#endif
extern int asn1_xer_print;
#include "common/utils/LOG/log.h"
#include "m2ap_default_values.h"
#define M2AP_INFO(x, args...) LOG_I(M2AP, x, ##args)
+1 -1
View File
@@ -165,7 +165,7 @@ int m2ap_decode_pdu(M2AP_M2AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t
length,
0,
0);
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_M2AP_M2AP_PDU, pdu);
}
+1 -1
View File
@@ -44,7 +44,7 @@ int m2ap_encode_pdu(M2AP_M2AP_PDU_t *pdu, uint8_t **buffer, uint32_t *len)
DevAssert(buffer != NULL);
DevAssert(len != NULL);
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_M2AP_M2AP_PDU, (void *)pdu);
}
+3 -3
View File
@@ -47,7 +47,7 @@ ssize_t x2ap_generate_initiating_message(
pdu.choice.initiatingMessage.criticality = criticality;
ANY_fromType_aper((ANY_t *)&pdu.choice.initiatingMessage.value, td, sptr);
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_X2AP_X2AP_PDU, (void *)&pdu);
}
@@ -79,7 +79,7 @@ ssize_t x2ap_generate_successfull_outcome(
pdu.choice.successfulOutcome.criticality = criticality;
ANY_fromType_aper((ANY_t *)&pdu.choice.successfulOutcome.value, td, sptr);
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_X2AP_X2AP_PDU, (void *)&pdu);
}
@@ -111,7 +111,7 @@ ssize_t x2ap_generate_unsuccessfull_outcome(
pdu.choice.successfulOutcome.criticality = criticality;
ANY_fromType_aper((ANY_t *)&pdu.choice.successfulOutcome.value, td, sptr);
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_X2AP_X2AP_PDU, (void *)&pdu);
}
-2
View File
@@ -49,8 +49,6 @@
# define X2AP_PORT 36422
#endif
extern int asn1_xer_print;
#include "common/utils/LOG/log.h"
#define X2AP_INFO(x, args...) LOG_I(X2AP, x, ##args)
#define X2AP_ERROR(x, args...) LOG_E(X2AP, x, ##args)
+1 -1
View File
@@ -156,7 +156,7 @@ int x2ap_eNB_decode_pdu(X2AP_X2AP_PDU_t *pdu, const uint8_t *const buffer, uint3
length,
0,
0);
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_X2AP_X2AP_PDU, pdu);
}
+1 -1
View File
@@ -44,7 +44,7 @@ int x2ap_eNB_encode_pdu(X2AP_X2AP_PDU_t *pdu, uint8_t **buffer, uint32_t *len)
DevAssert(buffer != NULL);
DevAssert(len != NULL);
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_X2AP_X2AP_PDU, (void *)pdu);
}
+2 -2
View File
@@ -47,7 +47,7 @@ ssize_t m3ap_generate_initiating_message(
pdu.choice.initiatingMessage.criticality = criticality;
ANY_fromType_aper((ANY_t *)&pdu.choice.initiatingMessage.value, td, sptr);
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_M3AP_M3AP_PDU, (void *)&pdu);
}
@@ -80,7 +80,7 @@ ssize_t m3ap_generate_unsuccessfull_outcome(
pdu.choice.successfulOutcome.criticality = criticality;
ANY_fromType_aper((ANY_t *)&pdu.choice.successfulOutcome.value, td, sptr);
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_M3AP_M3AP_PDU, (void *)&pdu);
}
-2
View File
@@ -48,8 +48,6 @@
# define M3AP_PORT 36444
#endif
extern int asn1_xer_print;
#include "common/utils/LOG/log.h"
#include "m3ap_default_values.h"
#define M3AP_INFO(x, args...) LOG_I(M3AP, x, ##args)
+1 -1
View File
@@ -188,7 +188,7 @@ int m3ap_decode_pdu(M3AP_M3AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t
length,
0,
0);
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_M3AP_M3AP_PDU, pdu);
}
+1 -1
View File
@@ -44,7 +44,7 @@ int m3ap_encode_pdu(M3AP_M3AP_PDU_t *pdu, uint8_t **buffer, uint32_t *len)
DevAssert(buffer != NULL);
DevAssert(len != NULL);
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_M3AP_M3AP_PDU, (void *)pdu);
}
+1 -1
View File
@@ -303,7 +303,7 @@ void ComputeOPc(const u8 op[16], u8 op_c_pP[16])
return;
} /* end of function ComputeOPc */
/*-------------------- Rijndael round subkeys ---------------------*/
u8 roundKeys[11][4][4];
static u8 roundKeys[11][4][4];
/*--------------------- Rijndael S box table ----------------------*/
const u8 S[256] = {
99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240,
-2
View File
@@ -31,8 +31,6 @@
#include "conversions.h"
#include "ngap_common.h"
int asn1_xer_print = 0;
void encode_ngap_cause(NGAP_Cause_t *out, const ngap_cause_t *in)
{
switch (in->type) {
-3
View File
@@ -48,9 +48,6 @@
#define NGAP_UE_ID_FMT "0x%06"PRIX32
extern int asn_debug;
extern int asn1_xer_print;
# include "common/utils/LOG/log.h"
# include "ngap_gNB_default_values.h"
# define NGAP_ERROR(x, args...) LOG_E(NGAP, x, ##args)
+1 -1
View File
@@ -115,7 +115,7 @@ int ngap_gNB_encode_pdu(NGAP_NGAP_PDU_t *pdu, uint8_t **buffer, uint32_t *len)
DevAssert(pdu != NULL);
DevAssert(buffer != NULL);
DevAssert(len != NULL);
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_NGAP_NGAP_PDU, (void *)pdu);
}
switch (pdu->present) {
+2 -2
View File
@@ -690,7 +690,7 @@ int ngap_gNB_initial_ctxt_resp(instance_t instance, ngap_initial_context_setup_r
// ie->value.choice.CriticalityDiagnostics =;
}
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_NGAP_NGAP_PDU, &pdu);
}
@@ -772,7 +772,7 @@ int ngap_gNB_initial_ctxt_fail(instance_t instance, ngap_initial_context_setup_f
ie->value.present = NGAP_InitialContextSetupFailureIEs__value_PR_Cause;
encode_ngap_cause(&ie->value.choice.Cause, &initial_ctxt_fail->cause);
}
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_NGAP_NGAP_PDU, &pdu);
}
if (ngap_gNB_encode_pdu(&pdu, &buffer, &length) < 0) {
-41
View File
@@ -1,41 +0,0 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file s1ap_common.c
* \brief s1ap procedures for both eNB and MME
* \author Sebastien ROUX and Navid Nikaein
* \email navid.nikaein@eurecom.fr
* \date 2012-2015
* \version 0.1
*/
#include <stdint.h>
#include "s1ap_common.h"
#include "S1AP_S1AP-PDU.h"
int asn1_xer_print = 0;
void s1ap_handle_criticality(S1AP_Criticality_t criticality)
{
}
-8
View File
@@ -52,8 +52,6 @@
#define S1AP_UE_ID_FMT "0x%06"PRIX32
extern int asn1_xer_print;
#include "common/utils/LOG/log.h"
#include "s1ap_eNB_default_values.h"
#define S1AP_ERROR(x, args...) LOG_E(S1AP, x, ##args)
@@ -89,10 +87,4 @@ extern int asn1_xer_print;
**/
typedef int (*s1ap_message_decoded_callback)(sctp_assoc_t assoc_id, uint32_t stream, S1AP_S1AP_PDU_t *pdu);
/** \brief Handle criticality
\param criticality Criticality of the IE
@returns void
**/
void s1ap_handle_criticality(S1AP_Criticality_t criticality);
/** @}*/
#endif /* S1AP_COMMON_H_ */
+3 -3
View File
@@ -129,7 +129,7 @@ int s1ap_eNB_encode_initiating(S1AP_S1AP_PDU_t *pdu,
return -1;
}
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_S1AP_S1AP_PDU, (void *)pdu);
}
@@ -183,7 +183,7 @@ int s1ap_eNB_encode_successfull_outcome(S1AP_S1AP_PDU_t *pdu,
return -1;
}
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_S1AP_S1AP_PDU, (void *)pdu);
}
@@ -214,7 +214,7 @@ int s1ap_eNB_encode_unsuccessfull_outcome(S1AP_S1AP_PDU_t *pdu,
return -1;
}
if (asn1_xer_print) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_S1AP_S1AP_PDU, (void *)pdu);
}
-4
View File
@@ -154,10 +154,6 @@ void doit (void)
{
int i;
break_on_error = 1;
// asn1_xer_print = 1;
// asn_debug = 1;
for (i = 0; i < sizeof(s1ap_test) / sizeof(s1ap_test_t); i++) {
S1AP_S1AP_PDU_t pdu;
uint8_t *buffer;
-4
View File
@@ -204,8 +204,6 @@ typedef struct split7_config {
typedef struct openair0_config {
//! Module ID for this configuration
int Mod_id;
//! device log level
int log_level;
//! duplexing mode
duplex_mode_t duplex_mode;
//! number of downlink resource blocks
@@ -292,8 +290,6 @@ typedef struct openair0_config {
double rx_sample_rate;
//! the sample rate for transmit.
double tx_sample_rate;
//! check for threequarter sampling rate
int8_t threequarter_fs;
//! Flag to indicate this configuration is for NR
int nr_flag;
//! NR band number
-1
View File
@@ -617,7 +617,6 @@ void dump_dev(openair0_device *device)
eth_state_t *eth = (eth_state_t*)device->priv;
printf("Ethernet device interface %i configuration:\n" ,device->openair0_cfg->Mod_id);
printf(" Log level is %i :\n" ,device->openair0_cfg->log_level);
printf(" RB number: %i, sample rate: %lf \n" ,
device->openair0_cfg->num_rb_dl, device->openair0_cfg->sample_rate);
printf(" RAU configured for %i tx/%i rx channels)\n",
-2
View File
@@ -884,8 +884,6 @@ static bool set_fh_config(void *mplane_api, int ru_idx, int num_rus, enum xran_c
for (int i = 1; i < oai0->rx_num_channels; ++i)
DevAssert(oai0->rx_freq[0] == oai0->rx_freq[i]);
DevAssert(oai0->nr_band > 0);
AssertFatal(oai0->threequarter_fs == 0, "cannot use three-quarter sampling with O-RAN 7.2 split\n");
paramdef_t FHconfigs[] = ORAN_FH_DESC;
paramlist_def_t FH_ConfigList = {CONFIG_STRING_ORAN_FH};
char aprefix[MAX_OPTNAME_SIZE] = {0};