Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-RAN
Commits
ec3bde2c
Commit
ec3bde2c
authored
Aug 30, 2022
by
Sakthivel Velumani
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug in pdcp config and GTP instance
UL iperf still not works. Can see packets in wireshark.
parent
be8df443
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
65 additions
and
25 deletions
+65
-25
executables/nr-softmodem.c
executables/nr-softmodem.c
+7
-0
openair2/E1AP/e1ap.c
openair2/E1AP/e1ap.c
+21
-0
openair2/GNB_APP/gnb_app.c
openair2/GNB_APP/gnb_app.c
+1
-2
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+12
-11
openair2/GNB_APP/gnb_config.h
openair2/GNB_APP/gnb_config.h
+1
-1
openair2/RRC/NR/nr_rrc_defs.h
openair2/RRC/NR/nr_rrc_defs.h
+3
-0
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+14
-10
openair2/SDAP/nr_sdap/nr_sdap_entity.c
openair2/SDAP/nr_sdap/nr_sdap_entity.c
+3
-1
openair2/SDAP/nr_sdap/nr_sdap_entity.h
openair2/SDAP/nr_sdap/nr_sdap_entity.h
+3
-0
No files found.
executables/nr-softmodem.c
View file @
ec3bde2c
...
...
@@ -80,6 +80,7 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "gnb_paramdef.h"
#include <openair3/ocp-gtpu/gtp_itf.h>
#include "nfapi/oai_integration/vendor_ext.h"
#include "gnb_config.h"
pthread_cond_t
nfapi_sync_cond
;
pthread_mutex_t
nfapi_sync_mutex
;
...
...
@@ -405,6 +406,12 @@ int create_gNB_tasks(void) {
return
-
1
;
}
// If CU
if
((
RC
.
nrrrc
[
gnb_id_start
]
->
node_type
==
ngran_gNB_CU
)
||
(
RC
.
nrrrc
[
gnb_id_start
]
->
node_type
==
ngran_gNB
))
{
RC
.
nrrrc
[
gnb_id_start
]
->
gtpInstN3
=
RCconfig_nr_gtpu
();
}
//Use check on x2ap to consider the NSA scenario
if
((
is_x2ap_enabled
()
||
get_softmodem_params
()
->
sa
)
&&
(
RC
.
nrrrc
[
0
]
->
node_type
!=
ngran_gNB_CUCP
)
)
{
if
(
itti_create_task
(
TASK_GTPV1_U
,
&
gtpv1uTask
,
NULL
)
<
0
)
{
...
...
openair2/E1AP/e1ap.c
View file @
ec3bde2c
...
...
@@ -23,6 +23,8 @@
#include "e1ap.h"
#include "e1ap_common.h"
#include "gnb_config.h"
#include "openair2/SDAP/nr_sdap/nr_sdap_entity.h"
#define E1AP_NUM_MSG_HANDLERS 14
typedef
int
(
*
e1ap_message_processing_t
)(
...
...
@@ -1429,6 +1431,13 @@ int e1apCUCP_handle_send_DATA_USAGE_REPORT(instance_t instance,
return
-
1
;
}
static
instance_t
cuup_task_create_gtpu_instance_to_du
(
eth_params_t
*
IPaddrs
)
{
openAddr_t
tmp
=
{
0
};
strncpy
(
tmp
.
originHost
,
IPaddrs
->
my_addr
,
sizeof
(
tmp
.
originHost
)
-
1
);
sprintf
(
tmp
.
originService
,
"%d"
,
IPaddrs
->
my_portd
);
return
gtpv1Init
(
tmp
);
}
void
cuup_task_send_sctp_association_req
(
instance_t
instance
,
e1ap_setup_req_t
*
e1ap_setup_req
)
{
DevAssert
(
e1ap_setup_req
!=
NULL
);
MessageDef
*
message_p
=
NULL
;
...
...
@@ -1468,6 +1477,18 @@ void cuup_task_handle_sctp_association_resp(instance_t instance, sctp_new_associ
e1ap_cuup_setup_req
->
sctp_out_streams
=
sctp_new_association_resp
->
out_streams
;
e1ap_cuup_setup_req
->
default_sctp_stream_id
=
0
;
eth_params_t
IPaddr
;
IPaddr
.
my_addr
=
e1ap_cuup_setup_req
->
CUUP_e1_ip_address
.
ipv4_address
;
IPaddr
.
my_portd
=
e1ap_cuup_setup_req
->
port_cuup
;
getCxtE1
(
UPtype
,
instance
)
->
gtpInstF1U
=
cuup_task_create_gtpu_instance_to_du
(
&
IPaddr
);
AssertFatal
(
getCxtE1
(
UPtype
,
instance
)
->
gtpInstF1U
>
0
,
"Failed to create CUUP F1-U UDP listener"
);
extern
instance_t
CUuniqInstance
;
CUuniqInstance
=
getCxtE1
(
UPtype
,
instance
)
->
gtpInstF1U
;
getCxtE1
(
UPtype
,
instance
)
->
gtpInstN3
=
RCconfig_nr_gtpu
();
AssertFatal
(
getCxtE1
(
UPtype
,
instance
)
->
gtpInstN3
>
0
,
"Failed to create CUUP N3 UDP listener"
);
N3GTPUInst
=
&
getCxtE1
(
UPtype
,
instance
)
->
gtpInstN3
;
e1apCUUP_send_SETUP_REQUEST
(
instance
);
}
...
...
openair2/GNB_APP/gnb_app.c
View file @
ec3bde2c
...
...
@@ -35,7 +35,6 @@
#include <split_headers.h>
#include "gnb_app.h"
#include "gnb_config.h"
#include "assertions.h"
#include "common/ran_context.h"
...
...
@@ -53,6 +52,7 @@
#include <openair2/LAYER2/nr_pdcp/nr_pdcp.h>
#include "openair2/LAYER2/PDCP_v10.1.0/pdcp.h"
#include "openair2/E1AP/e1ap.h"
#include "gnb_config.h"
extern
unsigned
char
NB_gNB_INST
;
extern
RAN_CONTEXT_t
RC
;
...
...
@@ -103,7 +103,6 @@ uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//, const E
itti_send_msg_to_task
(
TASK_NGAP
,
GNB_MODULE_ID_TO_INSTANCE
(
gnb_id
),
msg_p
);
}
if
(
gnb_id
==
0
)
RCconfig_nr_gtpu
();
}
LOG_I
(
GNB_APP
,
"[gNB %d] gNB_app_register for instance %d
\n
"
,
gnb_id
,
GNB_MODULE_ID_TO_INSTANCE
(
gnb_id
));
...
...
openair2/GNB_APP/gnb_config.c
View file @
ec3bde2c
...
...
@@ -1250,7 +1250,7 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
config_security
(
rrc
);
}
//End RCconfig_NRRRC function
in
t
RCconfig_nr_gtpu
(
void
)
{
in
stance_t
RCconfig_nr_gtpu
(
void
)
{
int
num_gnbs
=
0
;
char
*
gnb_ipv4_address_for_NGU
=
NULL
;
...
...
@@ -1273,6 +1273,7 @@ int RCconfig_nr_gtpu(void ) {
config_get
(
NETParams
,
sizeof
(
NETParams
)
/
sizeof
(
paramdef_t
),
gtpupath
);
char
*
cidr
=
NULL
,
*
address
=
NULL
;
int
port
;
instance_t
ret_inst
;
if
(
NETParams
[
1
].
strptr
!=
NULL
)
{
LOG_I
(
GTPU
,
"SA mode
\n
"
);
address
=
strtok_r
(
gnb_ipv4_address_for_NGU
,
"/"
,
&
cidr
);
...
...
@@ -1284,19 +1285,19 @@ int RCconfig_nr_gtpu(void ) {
}
if
(
address
)
{
MessageDef
*
message
;
message
=
itti_alloc_new_message
(
TASK_GNB_APP
,
0
,
GTPV1U_REQ
)
;
AssertFatal
(
message
!=
NULL
,
""
)
;
IPV4_STR_ADDR_TO_INT_NWBO
(
address
,
GTPV1U_REQ
(
message
).
localAddr
,
"BAD IP ADDRESS FORMAT FOR gNB NG_U !
\n
"
)
;
LOG_I
(
GTPU
,
"Configuring GTPu address : %s -> %x
\n
"
,
address
,
GTPV1U_REQ
(
message
).
localAddr
);
GTPV1U_REQ
(
message
).
localPort
=
port
;
strcpy
(
GTPV1U_REQ
(
message
).
localAddrStr
,
address
);
sprintf
(
GTPV1U_REQ
(
message
).
localPortStr
,
"%d"
,
port
);
itti_send_msg_to_task
(
TASK_GTPV1_U
,
0
,
message
);
// data model is wrong: gtpu doesn't have enb_id (or module_id)
eth_params_t
IPaddr
;
IPaddr
.
my_addr
=
address
;
IPaddr
.
my_portd
=
port
;
openAddr_t
tmp
=
{
0
}
;
strncpy
(
tmp
.
originHost
,
IPaddr
.
my_addr
,
sizeof
(
tmp
.
originHost
)
-
1
);
sprintf
(
tmp
.
originService
,
"%d"
,
IPaddr
.
my_portd
)
;
strcpy
(
tmp
.
destinationService
,
tmp
.
originService
);
LOG_I
(
GTPU
,
"Configuring GTPu address : %s, port : %s
\n
"
,
tmp
.
originHost
,
tmp
.
originService
);
ret_inst
=
gtpv1Init
(
tmp
);
}
else
LOG_E
(
GTPU
,
"invalid address for NGU or S1U
\n
"
);
return
0
;
return
ret_inst
;
}
int
RCconfig_NR_NG
(
MessageDef
*
msg_p
,
uint32_t
i
)
{
...
...
openair2/GNB_APP/gnb_config.h
View file @
ec3bde2c
...
...
@@ -95,7 +95,7 @@ extern void NRRCconfig_RU(void);
extern
void
RCconfig_nr_flexran
(
void
);
extern
void
RCconfig_NR_L1
(
void
);
extern
void
RCconfig_nr_macrlc
(
void
);
extern
in
t
RCconfig_nr_gtpu
(
void
);
extern
in
stance_t
RCconfig_nr_gtpu
(
void
);
extern
void
NRRCConfig
(
void
);
//void enb_config_display(void);
...
...
openair2/RRC/NR/nr_rrc_defs.h
View file @
ec3bde2c
...
...
@@ -500,6 +500,9 @@ typedef struct gNB_RRC_INST_s {
// RRC configuration
gNB_RrcConfigurationReq
configuration
;
// gNB N3 GTPU instance
instance_t
gtpInstN3
;
// other PLMN parameters
/// Mobile country code
int
mcc
;
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
ec3bde2c
...
...
@@ -103,6 +103,7 @@
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_e1_api.h"
#include "openair2/F1AP/f1ap_common.h"
#include "openair2/E1AP/e1ap_common.h"
#include "openair2/SDAP/nr_sdap/nr_sdap_entity.h"
#include "BIT_STRING.h"
#include "assertions.h"
...
...
@@ -253,6 +254,8 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu
rrc
->
ngap_id2_ngap_ids
=
hashtable_create
(
NUMBER_OF_UE_MAX
*
2
,
NULL
,
NULL
);
rrc
->
configuration
=
*
configuration
;
rrc
->
carrier
.
servingcellconfigcommon
=
configuration
->
scc
;
extern
instance_t
*
N3GTPUInst
;
N3GTPUInst
=
&
rrc
->
gtpInstN3
;
rrc
->
carrier
.
servingcellconfig
=
configuration
->
scd
;
nr_rrc_config_ul_tda
(
configuration
->
scc
,
configuration
->
minRXTXTIME
);
/// System Information INIT
...
...
@@ -3618,7 +3621,7 @@ static void update_UL_UP_tunnel_info(e1ap_bearer_setup_req_t *req, instance_t in
sizeof
(
in_addr_t
));
GtpuUpdateTunnelOutgoingPair
(
instance
,
ue_id
,
(
ue_id
&
0xFFFF
)
,
(
ebi_t
)
drb_p
->
id
,
drb_p
->
DlUpParamList
[
0
].
teId
,
newRemoteAddr
);
...
...
@@ -4117,15 +4120,15 @@ int drb_config_N3gtpu_create_e1(e1ap_bearer_setup_req_t *req,
uint8_t
*
kUPenc
=
NULL
;
uint8_t
*
kUPint
=
NULL
;
nr_derive_key_
rrc
_enc
(
req
->
cipheringAlgorithm
,
(
uint8_t
*
)
req
->
encryptionKey
,
&
kUPenc
);
nr_derive_key_
up
_enc
(
req
->
cipheringAlgorithm
,
(
uint8_t
*
)
req
->
encryptionKey
,
&
kUPenc
);
nr_derive_key_
rrc
_int
(
req
->
integrityProtectionAlgorithm
,
(
uint8_t
*
)
req
->
integrityProtectionKey
,
&
kUPint
);
nr_derive_key_
up
_int
(
req
->
integrityProtectionAlgorithm
,
(
uint8_t
*
)
req
->
integrityProtectionKey
,
&
kUPint
);
nr_pdcp_e1_add_drbs
(
false
,
nr_pdcp_e1_add_drbs
(
true
,
// set this to notify PDCP that his not UE
create_tunnel_req
.
ue_id
,
&
DRB_configList
,
(
req
->
integrityProtectionAlgorithm
<<
4
)
|
req
->
cipheringAlgorithm
,
...
...
@@ -4153,7 +4156,7 @@ void gNB_CU_create_up_ul_tunnel(e1ap_bearer_setup_resp_t *resp,
drbSetup
->
numUpParam
=
1
;
drbSetup
->
UpParamList
[
0
].
tlAddress
=
my_addr
;
drbSetup
->
UpParamList
[
0
].
teId
=
newGtpuCreateTunnel
(
gtpInst
,
ue_id
,
(
ue_id
&
0xFFFF
)
,
drb2Setup
->
id
,
drb2Setup
->
id
,
0xFFFF
,
// We will set the right value from DU answer
...
...
@@ -4266,13 +4269,14 @@ void bearer_context_setup_direct(e1ap_bearer_setup_req_t *req, instance_t instan
fill_DRB_configList
(
&
ctxt
,
ue_context_p
);
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
ctxt
.
module_id
];
// GTP tunnel for UL
int
ret
=
drb_config_gtpu_create
(
&
ctxt
,
ue_context_p
,
req
,
ue_context_p
->
ue_context
.
DRB_configList
,
ue_context_p
->
ue_context
.
SRB_configList
,
instance
);
rrc
->
gtpInstN3
);
if
(
ret
<
0
)
AssertFatal
(
false
,
"Unable to configure DRB or to create GTP Tunnel
\n
"
);
if
(
!
NODE_IS_CU
(
RC
.
nrrrc
[
ctxt
.
module_id
]
->
node_type
))
{
...
...
openair2/SDAP/nr_sdap/nr_sdap_entity.c
View file @
ec3bde2c
...
...
@@ -35,6 +35,8 @@ typedef struct {
static
nr_sdap_entity_info
sdap_info
;
instance_t
*
N3GTPUInst
=
NULL
;
nr_pdcp_ue_manager_t
*
nr_pdcp_sdap_get_ue_manager
(
void
);
void
nr_pdcp_submit_sdap_ctrl_pdu
(
int
rnti
,
rb_id_t
sdap_ctrl_pdu_drb
,
nr_sdap_ul_hdr_t
ctrl_pdu
){
...
...
@@ -212,7 +214,7 @@ static void nr_sdap_rx_entity(nr_sdap_entity_t *entity,
req
->
ue_id
=
ue_id
;
req
->
bearer_id
=
pdusession_id
;
LOG_D
(
SDAP
,
"%s() sending message to gtp size %d
\n
"
,
__func__
,
size
-
offset
);
itti_send_msg_to_task
(
TASK_GTPV1_U
,
INSTANCE_DEFAULT
,
message_p
);
itti_send_msg_to_task
(
TASK_GTPV1_U
,
*
N3GTPUInst
,
message_p
);
}
else
{
//nrUE
/*
* TS 37.324 5.2 Data transfer
...
...
openair2/SDAP/nr_sdap/nr_sdap_entity.h
View file @
ec3bde2c
...
...
@@ -50,6 +50,9 @@
* the GTP-U Extension Header. Inside the DL PDU SESSION INFORMATION frame.
* TS 38.415 Fig. 5.5.2.1-1
*/
extern
instance_t
*
N3GTPUInst
;
typedef
struct
nr_sdap_dl_hdr_s
{
uint8_t
QFI
:
6
;
uint8_t
RQI
:
1
;
...
...
FANG WANG
@wf
mentioned in commit
553f1d1a
·
Feb 11, 2023
mentioned in commit
553f1d1a
mentioned in commit 553f1d1a52845911be4ba61ec2bcc5c60ad42ae7
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment