Merge remote-tracking branch 'origin/fixes-itti-gtp-config' into integration_2025_w24 (!3473)
Fix various bugs and inconsistencies in config read, SCTP, ITTI, GTP Fix bugs across various layers, mostly layer 3, including memory leaks. See the commits for more details.
This commit is contained in:
@@ -169,7 +169,6 @@ typedef struct paramlist_def {
|
||||
|
||||
/* Macros to get parameters with the config module API */
|
||||
#define GET_PARAMS(param_def, param_desc, prefix) \
|
||||
printf("Reading '%s' section from the config file\n", #param_def); \
|
||||
paramdef_t param_def[] = param_desc; \
|
||||
config_get(config_get_if(), param_def, sizeofArray(param_def), prefix);
|
||||
|
||||
|
||||
@@ -475,41 +475,5 @@ typedef struct timer_elm_s {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void log_scheduler(const char* label)
|
||||
{
|
||||
int policy = sched_getscheduler(0);
|
||||
struct sched_param param;
|
||||
if (sched_getparam(0, ¶m) == -1)
|
||||
{
|
||||
LOG_E(HW, "sched_getparam: %s\n", strerror(errno));
|
||||
abort();
|
||||
}
|
||||
|
||||
cpu_set_t cpu_set;
|
||||
if (sched_getaffinity(0, sizeof(cpu_set), &cpu_set) == -1)
|
||||
{
|
||||
LOG_E(HW, "sched_getaffinity: %s\n", strerror(errno));
|
||||
abort();
|
||||
}
|
||||
int num_cpus = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
if (num_cpus < 1)
|
||||
{
|
||||
LOG_E(HW, "sysconf(_SC_NPROCESSORS_ONLN): %s\n", strerror(errno));
|
||||
abort();
|
||||
}
|
||||
char buffer[num_cpus];
|
||||
for (int i = 0; i < num_cpus; i++)
|
||||
{
|
||||
buffer[i] = CPU_ISSET(i, &cpu_set) ? 'Y' : '-';
|
||||
}
|
||||
|
||||
LOG_A(HW, "Scheduler policy=%d priority=%d affinity=[%d]%.*s label=%s\n",
|
||||
policy,
|
||||
param.sched_priority,
|
||||
num_cpus,
|
||||
num_cpus,
|
||||
buffer,
|
||||
label);
|
||||
}
|
||||
} // extern "C"
|
||||
|
||||
|
||||
@@ -566,7 +566,6 @@ int timer_remove(long timer_id);
|
||||
int signal_handle(int *end);
|
||||
int signal_mask(void);
|
||||
|
||||
void log_scheduler(const char *label);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1740,8 +1740,6 @@ void *UE_thread(void *arg) {
|
||||
oai_exit=1;
|
||||
}
|
||||
|
||||
log_scheduler(__func__);
|
||||
|
||||
while (!oai_exit) {
|
||||
AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), "");
|
||||
int instance_cnt_synch = UE->proc.instance_cnt_synch;
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#define _GNU_SOURCE /* See feature_test_macros(7) */
|
||||
|
||||
#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"
|
||||
|
||||
@@ -90,9 +90,6 @@
|
||||
#include "LAYER2/NR_MAC_COMMON/nr_mac_common.h"
|
||||
#include "NR_TAG.h"
|
||||
|
||||
#include <openair3/UICC/usim_interface.h>
|
||||
|
||||
|
||||
/* Defs */
|
||||
#define MAX_NUM_BWP 5
|
||||
#define MAX_NUM_CORESET 12
|
||||
@@ -101,7 +98,6 @@
|
||||
#define NR_NB_RA_PROC_MAX 4
|
||||
#define MAX_NUM_OF_SSB 64
|
||||
#define MAX_NUM_NR_PRACH_PREAMBLES 64
|
||||
#define MIN_NUM_PRBS_TO_SCHEDULE 5
|
||||
|
||||
uint8_t nr_get_rv(int rel_round);
|
||||
|
||||
@@ -678,10 +674,6 @@ typedef struct {
|
||||
float pdcch_cl_adjust;
|
||||
} NR_UE_sched_ctrl_t;
|
||||
|
||||
typedef struct {
|
||||
uicc_t *uicc;
|
||||
} NRUEcontext_t;
|
||||
|
||||
typedef struct NR_mac_dir_stats {
|
||||
uint64_t lc_bytes[64];
|
||||
uint64_t rounds[8];
|
||||
|
||||
@@ -464,7 +464,7 @@ static void sctp_handle_new_association_req(const instance_t instance,
|
||||
char port[12];
|
||||
snprintf(port, sizeof(port), "%d", req->port);
|
||||
int status = getaddrinfo(remote, port, &hints, &serv);
|
||||
AssertFatal(status == 0, "getaddrinfo() failed: %s\n", gai_strerror(status));
|
||||
AssertFatal(status == 0, "getaddrinfo(node %s service %s) failed: %s\n", remote, port, gai_strerror(status));
|
||||
|
||||
struct addrinfo *p = NULL;
|
||||
for (p = serv; p != NULL; p = p->ai_next) {
|
||||
|
||||
@@ -224,6 +224,7 @@ static int gtpv1uCreateAndSendMsg(int h,
|
||||
uint8_t extensionHeader_length) {
|
||||
LOG_D(GTPU, "Peer IP:%u peer port:%u outgoing teid:%u \n", peerIp, peerPort, teid);
|
||||
|
||||
DevAssert(msgLen + HDR_MAX < 65536); // maximum size of UDP packet
|
||||
uint8_t buffer[msgLen+HDR_MAX];
|
||||
uint8_t *curPtr=buffer;
|
||||
Gtpv1uMsgHeaderT *msgHdr = (Gtpv1uMsgHeaderT *)buffer ;
|
||||
@@ -525,14 +526,14 @@ static int udpServerSocket(openAddr_s addr) {
|
||||
break; // if we get here, we must have connected successfully
|
||||
}
|
||||
|
||||
freeaddrinfo(servinfo); // all done with this structure
|
||||
|
||||
if (p == NULL) {
|
||||
// looped off the end of the list with no successful bind
|
||||
LOG_E(GTPU,"failed to bind socket: %s %s \n", addr.originHost, addr.originService);
|
||||
return -1;
|
||||
}
|
||||
|
||||
freeaddrinfo(servinfo); // all done with this structure
|
||||
|
||||
int sendbuff = 1000*1000*10;
|
||||
AssertFatal(0==setsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, &sendbuff, sizeof(sendbuff)),"");
|
||||
LOG_D(GTPU,"[%d] Created listener for paquets to: %s:%s, send buffer size: %d\n", sockfd, addr.originHost, addr.originService,sendbuff);
|
||||
|
||||
Reference in New Issue
Block a user