Merge remote-tracking branch 'origin/cuup-load-tester' into integration_2025_w32 (!3547)

Add a CU-UP load tester and improve GTP performance

This adds a simple tester program for the CU-UP. It sets up a number of
UEs/bearers in the CU-UP via the E1 interface, then streams data in
downlink/uplink (as seen by the CU-UP). More information is available in
tests/nr-cuup/README.md.

Includes some fixes to properly verify that SCTP is installed, and use
"the right cmake way" to use it in cmake code (see commit for details).
This commit is contained in:
Jaroslava Fiedlerova
2025-08-04 23:59:05 +02:00
37 changed files with 1431 additions and 1016 deletions
File diff suppressed because it is too large Load Diff
+27 -10
View File
@@ -1,16 +1,40 @@
#ifndef __GTPUNEW_ITF_H__
#define __GTPUNEW_ITF_H__
#include <stdint.h>
#include <limits.h>
#include <sys/socket.h>
#include <netinet/in.h>
#define GTPNOK -1
# define GTPU_HEADER_OVERHEAD_MAX 64
#include "openair2/COMMON/gtpv1_u_messages_types.h"
#include "common/utils/hashtable/hashtable.h"
#include "common/platform_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/* forward declaration */
struct protocol_ctxt_s;
typedef struct protocol_ctxt_s protocol_ctxt_t;
struct gtpv1u_enb_create_tunnel_req_s;
typedef struct gtpv1u_enb_create_tunnel_req_s gtpv1u_enb_create_tunnel_req_t;
struct gtpv1u_enb_create_tunnel_resp_s;
typedef struct gtpv1u_enb_create_tunnel_resp_s gtpv1u_enb_create_tunnel_resp_t;
struct gtpv1u_enb_delete_tunnel_req_s;
typedef struct gtpv1u_enb_delete_tunnel_req_s gtpv1u_enb_delete_tunnel_req_t;
struct gtpv1u_enb_create_x2u_tunnel_req_s;
typedef struct gtpv1u_enb_create_x2u_tunnel_req_s gtpv1u_enb_create_x2u_tunnel_req_t;
struct gtpv1u_enb_create_x2u_tunnel_resp_s;
typedef struct gtpv1u_enb_create_x2u_tunnel_resp_s gtpv1u_enb_create_x2u_tunnel_resp_t;
struct gtpv1u_gnb_create_tunnel_req_s;
typedef struct gtpv1u_gnb_create_tunnel_req_s gtpv1u_gnb_create_tunnel_req_t;
struct gtpv1u_gnb_create_tunnel_resp_s;
typedef struct gtpv1u_gnb_create_tunnel_resp_s gtpv1u_gnb_create_tunnel_resp_t;
struct gtpv1u_gnb_delete_tunnel_req_s;
typedef struct gtpv1u_gnb_delete_tunnel_req_s gtpv1u_gnb_delete_tunnel_req_t;
typedef bool (*gtpCallback)(protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP,
@@ -52,7 +76,6 @@ extern "C" {
// the init function create a gtp instance and return the gtp instance id
// the parameter originInstance will be sent back in each message from gtp to the creator
void gtpv1uReceiver(int h);
void gtpv1uProcessTimeout(int handle,void *arg);
int gtpv1u_create_s1u_tunnel(const instance_t instance,
const gtpv1u_enb_create_tunnel_req_t *create_tunnel_req,
@@ -91,7 +114,6 @@ extern "C" {
teid_t teid,
int outgoing_qfi,
transport_layer_addr_t remoteAddr,
int port,
gtpCallback callBack,
gtpCallbackSDAP callBackSDAP);
@@ -110,13 +132,8 @@ extern "C" {
instance_t gtpv1Init(openAddr_t context);
void *gtpv1uTask(void *args);
// Legacy to fix
typedef struct gtpv1u_data_s {
/* RB tree of UEs */
hash_table_t *ue_mapping;
} gtpv1u_data_t;
#define GTPV1U_BEARER_OFFSET 3
#define GTPV1U_MAX_BEARERS_ID (max_val_LTE_DRB_Identity - GTPV1U_BEARER_OFFSET)
#define GTPV1U_MAX_BEARERS_ID (32 - GTPV1U_BEARER_OFFSET) /* max_val_LTE_DRB_Identity */
typedef enum {
BEARER_DOWN = 0,
BEARER_IN_CONFIG,