Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Michael Black
OpenXG UE
Commits
803a3233
Commit
803a3233
authored
Nov 06, 2020
by
yaojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix process NGAP_INITIAL_CONTEXT_SETUP_REQ
parent
073a1b67
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
24 deletions
+52
-24
openair2/COMMON/platform_constants.h
openair2/COMMON/platform_constants.h
+2
-0
openair2/RRC/NR/nr_rrc_defs.h
openair2/RRC/NR/nr_rrc_defs.h
+16
-4
openair2/RRC/NR/rrc_gNB_NGAP.c
openair2/RRC/NR/rrc_gNB_NGAP.c
+24
-10
openair2/RRC/NR/rrc_gNB_UE_context.c
openair2/RRC/NR/rrc_gNB_UE_context.c
+1
-1
openair2/RRC/NR/rrc_gNB_nsa.c
openair2/RRC/NR/rrc_gNB_nsa.c
+9
-9
No files found.
openair2/COMMON/platform_constants.h
View file @
803a3233
...
...
@@ -29,6 +29,7 @@
***************************************************************************/
#include "LTE_asn_constant.h"
#include "NR_asn_constant.h"
#ifndef __PLATFORM_CONSTANTS_H__
# define __PLATFORM_CONSTANTS_H__
...
...
@@ -116,6 +117,7 @@
#define DEFAULT_RAB_ID 1
#define NB_RB_MAX (LTE_maxDRB + 3)
/* was 11, now 14, maxDRB comes from asn1_constants.h, + 3 because of 3 SRB, one invisible id 0, then id 1 and 2 */
#define NR_NB_RB_MAX (NR_maxDRB + 3)
#define NB_RB_MBMS_MAX (LTE_maxSessionPerPMCH*LTE_maxServiceCount)
...
...
openair2/RRC/NR/nr_rrc_defs.h
View file @
803a3233
...
...
@@ -257,6 +257,19 @@ typedef struct nr_rrc_guami_s {
uint8_t
amf_pointer
;
}
nr_rrc_guami_t
;
typedef
enum
pdu_session_satus_e
{
PDU_SESSION_STATUS_NEW
//TODO
}
pdu_session_status_t
;
typedef
struct
pdu_session_param_s
{
pdusession_t
param
;
uint8_t
status
;
uint8_t
xid
;
// transaction_id
ngap_Cause_t
cause
;
uint8_t
cause_value
;
}
__attribute__
((
__packed__
))
pdu_session_param_t
;
typedef
struct
gNB_RRC_UE_s
{
uint8_t
primaryCC_id
;
LTE_SCellToAddMod_r10_t
sCell_config
[
2
];
...
...
@@ -323,14 +336,14 @@ typedef struct gNB_RRC_UE_s {
/* Total number of e_rab already setup in the list */
uint8_t
setup_e_rabs
;
/* Number of
e_rab
to be setup in the list */
uint8_t
nb_of_
e_rab
s
;
/* Number of
pdu session
to be setup in the list */
uint8_t
nb_of_
pdusession
s
;
/* Number of e_rab to be modified in the list */
uint8_t
nb_of_modify_e_rabs
;
uint8_t
nb_of_failed_e_rabs
;
e_rab_param_t
modify_e_rab
[
NB_RB_MAX
];
//[S1AP_MAX_E_RAB];
/* list of e_rab to be setup by RRC layers */
e_rab_param_t
e_rab
[
NB_RB_MAX
];
//[S1AP_MAX_E_RAB
];
pdu_session_param_t
pdusession
[
NR_NB_RB_MAX
];
//[NGAP_MAX_PDU_SESSION
];
//release e_rabs
uint8_t
nb_release_of_e_rabs
;
e_rab_failed_t
e_rabs_release_failed
[
S1AP_MAX_E_RAB
];
...
...
@@ -446,7 +459,6 @@ typedef struct gNB_RRC_INST_s {
}
gNB_RRC_INST
;
#include "nr_rrc_proto.h" //should be put here otherwise compilation error
#endif
...
...
openair2/RRC/NR/rrc_gNB_NGAP.c
View file @
803a3233
...
...
@@ -470,7 +470,21 @@ rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(
ue_context_p
->
ue_context
.
amf_ue_ngap_id
=
NGAP_INITIAL_CONTEXT_SETUP_REQ
(
msg_p
).
amf_ue_ngap_id
;
ue_context_p
->
ue_context
.
nas_pdu_flag
=
NGAP_INITIAL_CONTEXT_SETUP_REQ
(
msg_p
).
nas_pdu_flag
;
ue_context_p
->
ue_context
.
nb_of_pdusessions
=
NGAP_INITIAL_CONTEXT_SETUP_REQ
(
msg_p
).
nb_of_pdusessions
;
for
(
int
i
=
0
;
i
<
ue_context_p
->
ue_context
.
nb_of_pdusessions
;
i
++
)
{
ue_context_p
->
ue_context
.
pdusession
[
i
].
status
=
PDU_SESSION_STATUS_NEW
;
ue_context_p
->
ue_context
.
pdusession
[
i
].
param
=
NGAP_INITIAL_CONTEXT_SETUP_REQ
(
msg_p
).
pdusession_param
[
i
];
//create_tunnel_req.eps_bearer_id[i] = NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).e_rab_param[i].e_rab_id;
//create_tunnel_req.sgw_S1u_teid[i] = NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).e_rab_param[i].gtp_teid;
//memcpy(&create_tunnel_req.sgw_addr[i],
// &S1AP_INITIAL_CONTEXT_SETUP_REQ (msg_p).e_rab_param[i].sgw_addr,
// sizeof(transport_layer_addr_t));
//inde_list[create_tunnel_req.num_tunnels]= i;
//create_tunnel_req.num_tunnels++;
}
/* NAS PDU */
ue_context_p
->
ue_context
.
nas_pdu_flag
=
NGAP_INITIAL_CONTEXT_SETUP_REQ
(
msg_p
).
nas_pdu_flag
;
if
(
ue_context_p
->
ue_context
.
nas_pdu_flag
==
1
)
{
ue_context_p
->
ue_context
.
nas_pdu
.
length
=
NGAP_INITIAL_CONTEXT_SETUP_REQ
(
msg_p
).
nas_pdu
.
length
;
ue_context_p
->
ue_context
.
nas_pdu
.
buffer
=
NGAP_INITIAL_CONTEXT_SETUP_REQ
(
msg_p
).
nas_pdu
.
buffer
;
...
...
@@ -518,25 +532,25 @@ rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP(
//------------------------------------------------------------------------------
{
MessageDef
*
msg_p
=
NULL
;
int
e_rab
;
int
pdusession
;
int
e_rabs_done
=
0
;
int
e_rabs_failed
=
0
;
msg_p
=
itti_alloc_new_message
(
TASK_RRC_ENB
,
NGAP_INITIAL_CONTEXT_SETUP_RESP
);
NGAP_INITIAL_CONTEXT_SETUP_RESP
(
msg_p
).
gNB_ue_ngap_id
=
ue_context_pP
->
ue_context
.
gNB_ue_ngap_id
;
for
(
e_rab
=
0
;
e_rab
<
ue_context_pP
->
ue_context
.
nb_of_e_rabs
;
e_rab
++
)
{
if
(
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
status
==
E_RAB_STATUS_DONE
)
{
for
(
pdusession
=
0
;
pdusession
<
ue_context_pP
->
ue_context
.
nb_of_pdusessions
;
pdusession
++
)
{
if
(
ue_context_pP
->
ue_context
.
pdusession
[
pdusession
].
status
==
E_RAB_STATUS_DONE
)
{
e_rabs_done
++
;
NGAP_INITIAL_CONTEXT_SETUP_RESP
(
msg_p
).
pdusessions
[
e_rab
].
pdusession_id
=
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
param
.
e_rab
_id
;
NGAP_INITIAL_CONTEXT_SETUP_RESP
(
msg_p
).
pdusessions
[
pdusession
].
pdusession_id
=
ue_context_pP
->
ue_context
.
pdusession
[
pdusession
].
param
.
pdusession
_id
;
// TODO add other information from S1-U when it will be integrated
NGAP_INITIAL_CONTEXT_SETUP_RESP
(
msg_p
).
pdusessions
[
e_rab
].
gtp_teid
=
ue_context_pP
->
ue_context
.
gnb_gtp_teid
[
e_rab
];
memcpy
(
NGAP_INITIAL_CONTEXT_SETUP_RESP
(
msg_p
).
pdusessions
[
e_rab
].
gNB_addr
.
buffer
,
ue_context_pP
->
ue_context
.
gnb_gtp_addrs
[
e_rab
].
buffer
,
20
);
NGAP_INITIAL_CONTEXT_SETUP_RESP
(
msg_p
).
pdusessions
[
e_rab
].
gNB_addr
.
length
=
4
;
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
status
=
E_RAB_STATUS_ESTABLISHED
;
NGAP_INITIAL_CONTEXT_SETUP_RESP
(
msg_p
).
pdusessions
[
pdusession
].
gtp_teid
=
ue_context_pP
->
ue_context
.
gnb_gtp_teid
[
pdusession
];
memcpy
(
NGAP_INITIAL_CONTEXT_SETUP_RESP
(
msg_p
).
pdusessions
[
pdusession
].
gNB_addr
.
buffer
,
ue_context_pP
->
ue_context
.
gnb_gtp_addrs
[
pdusession
].
buffer
,
20
);
NGAP_INITIAL_CONTEXT_SETUP_RESP
(
msg_p
).
pdusessions
[
pdusession
].
gNB_addr
.
length
=
4
;
ue_context_pP
->
ue_context
.
pdusession
[
pdusession
].
status
=
E_RAB_STATUS_ESTABLISHED
;
}
else
{
e_rabs_failed
++
;
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
status
=
E_RAB_STATUS_FAILED
;
NGAP_INITIAL_CONTEXT_SETUP_RESP
(
msg_p
).
pdusessions_failed
[
e_rab
].
pdusession_id
=
ue_context_pP
->
ue_context
.
e_rab
[
e_rab
].
param
.
e_rab
_id
;
ue_context_pP
->
ue_context
.
pdusession
[
pdusession
].
status
=
E_RAB_STATUS_FAILED
;
NGAP_INITIAL_CONTEXT_SETUP_RESP
(
msg_p
).
pdusessions_failed
[
pdusession
].
pdusession_id
=
ue_context_pP
->
ue_context
.
pdusession
[
pdusession
].
param
.
pdusession
_id
;
// TODO add cause when it will be integrated
}
}
...
...
openair2/RRC/NR/rrc_gNB_UE_context.c
View file @
803a3233
...
...
@@ -134,7 +134,7 @@ rrc_gNB_allocate_new_UE_context(
new_p
->
local_uid
=
nr_uid_linear_allocator_new
(
rrc_instance_pP
);
for
(
int
i
=
0
;
i
<
NB_RB_MAX
;
i
++
)
{
new_p
->
ue_context
.
e_rab
[
i
].
xid
=
-
1
;
new_p
->
ue_context
.
pdusession
[
i
].
xid
=
-
1
;
new_p
->
ue_context
.
modify_e_rab
[
i
].
xid
=
-
1
;
}
...
...
openair2/RRC/NR/rrc_gNB_nsa.c
View file @
803a3233
...
...
@@ -186,14 +186,14 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
if
(
m
->
nb_e_rabs_tobeadded
>
0
)
{
for
(
int
i
=
0
;
i
<
m
->
nb_e_rabs_tobeadded
;
i
++
)
{
// Add the new E-RABs at the corresponding rrc ue context of the gNB
ue_context_p
->
ue_context
.
e_rab
[
i
].
param
.
e_rab
_id
=
m
->
e_rabs_tobeadded
[
i
].
e_rab_id
;
ue_context_p
->
ue_context
.
e_rab
[
i
].
param
.
gtp_teid
=
m
->
e_rabs_tobeadded
[
i
].
gtp_teid
;
memcpy
(
&
ue_context_p
->
ue_context
.
e_rab
[
i
].
param
.
sgw
_addr
,
&
m
->
e_rabs_tobeadded
[
i
].
sgw_addr
,
sizeof
(
transport_layer_addr_t
));
ue_context_p
->
ue_context
.
nb_of_
e_rab
s
++
;
ue_context_p
->
ue_context
.
pdusession
[
i
].
param
.
pdusession
_id
=
m
->
e_rabs_tobeadded
[
i
].
e_rab_id
;
ue_context_p
->
ue_context
.
pdusession
[
i
].
param
.
gtp_teid
=
m
->
e_rabs_tobeadded
[
i
].
gtp_teid
;
memcpy
(
&
ue_context_p
->
ue_context
.
pdusession
[
i
].
param
.
upf
_addr
,
&
m
->
e_rabs_tobeadded
[
i
].
sgw_addr
,
sizeof
(
transport_layer_addr_t
));
ue_context_p
->
ue_context
.
nb_of_
pdusession
s
++
;
//Fill the required E-RAB specific information for the creation of the S1-U tunnel between the gNB and the SGW
create_tunnel_req
.
eps_bearer_id
[
i
]
=
ue_context_p
->
ue_context
.
e_rab
[
i
].
param
.
e_rab
_id
;
create_tunnel_req
.
sgw_S1u_teid
[
i
]
=
ue_context_p
->
ue_context
.
e_rab
[
i
].
param
.
gtp_teid
;
memcpy
(
&
create_tunnel_req
.
sgw_addr
[
i
],
&
ue_context_p
->
ue_context
.
e_rab
[
i
].
param
.
sgw
_addr
,
sizeof
(
transport_layer_addr_t
));
create_tunnel_req
.
eps_bearer_id
[
i
]
=
ue_context_p
->
ue_context
.
pdusession
[
i
].
param
.
pdusession
_id
;
create_tunnel_req
.
sgw_S1u_teid
[
i
]
=
ue_context_p
->
ue_context
.
pdusession
[
i
].
param
.
gtp_teid
;
memcpy
(
&
create_tunnel_req
.
sgw_addr
[
i
],
&
ue_context_p
->
ue_context
.
pdusession
[
i
].
param
.
upf
_addr
,
sizeof
(
transport_layer_addr_t
));
inde_list
[
i
]
=
i
;
LOG_I
(
RRC
,
"S1-U tunnel: index %d target sgw ip %d.%d.%d.%d length %d gtp teid %u
\n
"
,
i
,
...
...
@@ -220,8 +220,8 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
msg
).
nb_e_rabs_admitted_tobeadded
=
m
->
nb_e_rabs_tobeadded
;
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
msg
).
target_assoc_id
=
m
->
target_assoc_id
;
for
(
int
i
=
0
;
i
<
ue_context_p
->
ue_context
.
nb_of_
e_rab
s
;
i
++
)
{
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
msg
).
e_rabs_admitted_tobeadded
[
i
].
e_rab_id
=
ue_context_p
->
ue_context
.
e_rab
[
i
].
param
.
e_rab
_id
;
for
(
int
i
=
0
;
i
<
ue_context_p
->
ue_context
.
nb_of_
pdusession
s
;
i
++
)
{
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
msg
).
e_rabs_admitted_tobeadded
[
i
].
e_rab_id
=
ue_context_p
->
ue_context
.
pdusession
[
i
].
param
.
pdusession
_id
;
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
msg
).
e_rabs_admitted_tobeadded
[
i
].
gtp_teid
=
create_tunnel_resp
.
enb_S1u_teid
[
i
];
memcpy
(
&
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
msg
).
e_rabs_admitted_tobeadded
[
i
].
gnb_addr
,
&
create_tunnel_resp
.
enb_addr
,
sizeof
(
transport_layer_addr_t
));
//The length field in the X2AP targetting structure is expected in bits but the create_tunnel_resp returns the address length in bytes
...
...
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