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
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
lizhongxiao
OpenXG-RAN
Commits
c70f0a1d
Commit
c70f0a1d
authored
May 29, 2023
by
laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup srb data structure
parent
ef06b145
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
167 additions
and
334 deletions
+167
-334
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+0
-9
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+8
-0
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+51
-125
openair2/RRC/NR/MESSAGES/asn1_msg.h
openair2/RRC/NR/MESSAGES/asn1_msg.h
+16
-15
openair2/RRC/NR/cucp_cuup_direct.c
openair2/RRC/NR/cucp_cuup_direct.c
+10
-23
openair2/RRC/NR/nr_rrc_common.c
openair2/RRC/NR/nr_rrc_common.c
+0
-11
openair2/RRC/NR/nr_rrc_common.h
openair2/RRC/NR/nr_rrc_common.h
+4
-19
openair2/RRC/NR/nr_rrc_defs.h
openair2/RRC/NR/nr_rrc_defs.h
+1
-3
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+75
-123
openair2/RRC/NR/rrc_gNB_NGAP.c
openair2/RRC/NR/rrc_gNB_NGAP.c
+0
-2
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+2
-4
No files found.
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
c70f0a1d
...
@@ -431,15 +431,6 @@ void configure_ss_coreset(NR_UE_MAC_INST_t *mac,
...
@@ -431,15 +431,6 @@ void configure_ss_coreset(NR_UE_MAC_INST_t *mac,
NR_ServingCellConfig_t
*
scd
,
NR_ServingCellConfig_t
*
scd
,
NR_BWP_Id_t
dl_bwp_id
);
NR_BWP_Id_t
dl_bwp_id
);
static
uint8_t
nr_extract_dci_info
(
NR_UE_MAC_INST_t
*
mac
,
nr_dci_format_t
dci_format
,
uint8_t
dci_size
,
uint16_t
rnti
,
int
ss_type
,
uint64_t
*
dci_pdu
,
dci_pdu_rel15_t
*
dci_pdu_rel15
,
int
slot
);
fapi_nr_ul_config_request_t
*
get_ul_config_request
(
NR_UE_MAC_INST_t
*
mac
,
int
slot
,
int
fb_time
);
fapi_nr_ul_config_request_t
*
get_ul_config_request
(
NR_UE_MAC_INST_t
*
mac
,
int
slot
,
int
fb_time
);
fapi_nr_dl_config_request_t
*
get_dl_config_request
(
NR_UE_MAC_INST_t
*
mac
,
int
slot
);
fapi_nr_dl_config_request_t
*
get_dl_config_request
(
NR_UE_MAC_INST_t
*
mac
,
int
slot
);
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
c70f0a1d
...
@@ -149,6 +149,14 @@ const initial_pucch_resource_t initial_pucch_resource[16] = {
...
@@ -149,6 +149,14 @@ const initial_pucch_resource_t initial_pucch_resource[16] = {
/* 14 */
{
1
,
0
,
14
,
4
,
4
,
{
0
,
3
,
6
,
9
}
},
/* 14 */
{
1
,
0
,
14
,
4
,
4
,
{
0
,
3
,
6
,
9
}
},
/* 15 */
{
1
,
0
,
14
,
0
,
4
,
{
0
,
3
,
6
,
9
}
},
/* 15 */
{
1
,
0
,
14
,
0
,
4
,
{
0
,
3
,
6
,
9
}
},
};
};
static
uint8_t
nr_extract_dci_info
(
NR_UE_MAC_INST_t
*
mac
,
nr_dci_format_t
dci_format
,
uint8_t
dci_size
,
uint16_t
rnti
,
int
ss_type
,
uint64_t
*
dci_pdu
,
dci_pdu_rel15_t
*
dci_pdu_rel15
,
int
slot
);
void
nr_ue_init_mac
(
module_id_t
module_idP
)
void
nr_ue_init_mac
(
module_id_t
module_idP
)
{
{
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
c70f0a1d
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/MESSAGES/asn1_msg.h
View file @
c70f0a1d
...
@@ -99,12 +99,13 @@ void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
...
@@ -99,12 +99,13 @@ void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
NR_DRB_ToAddModList_t
*
drb_configList
,
NR_DRB_ToAddModList_t
*
drb_configList
,
long
*
priority
);
long
*
priority
);
int
do_RRCSetup
(
rrc_gNB_ue_context_t
*
const
ue_context_pP
,
int
do_RRCSetup
(
rrc_gNB_ue_context_t
*
const
ue_context_pP
,
uint8_t
*
const
buffer
,
uint8_t
*
const
buffer
,
const
uint8_t
transaction_id
,
const
uint8_t
transaction_id
,
const
uint8_t
*
masterCellGroup
,
const
uint8_t
*
masterCellGroup
,
int
masterCellGroup_len
,
int
masterCellGroup_len
,
const
gNB_RrcConfigurationReq
*
configuration
);
const
gNB_RrcConfigurationReq
*
configuration
,
NR_SRB_ToAddModList_t
*
SRBs
);
uint8_t
do_NR_SecurityModeCommand
(
uint8_t
do_NR_SecurityModeCommand
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
protocol_ctxt_t
*
const
ctxt_pP
,
...
@@ -172,15 +173,15 @@ uint8_t do_NR_ULInformationTransfer(uint8_t **buffer,
...
@@ -172,15 +173,15 @@ uint8_t do_NR_ULInformationTransfer(uint8_t **buffer,
uint8_t
do_RRCReestablishmentRequest
(
uint8_t
Mod_id
,
uint8_t
*
buffer
,
uint16_t
c_rnti
);
uint8_t
do_RRCReestablishmentRequest
(
uint8_t
Mod_id
,
uint8_t
*
buffer
,
uint16_t
c_rnti
);
int
do_RRCReestablishment
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
int
do_RRCReestablishment
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
rrc_gNB_ue_context_t
*
const
ue_context_pP
,
rrc_gNB_ue_context_t
*
const
ue_context_pP
,
int
CC_id
,
int
CC_id
,
uint8_t
*
const
buffer
,
uint8_t
*
const
buffer
,
size_t
buffer_size
,
size_t
buffer_size
,
const
uint8_t
Transaction_id
,
const
uint8_t
Transaction_id
,
NR_SRB_ToAddModList_t
*
*
SRB_configList
,
NR_SRB_ToAddModList_t
*
SRB_configList
,
const
uint8_t
*
masterCellGroup_from_DU
,
const
uint8_t
*
masterCellGroup_from_DU
,
NR_ServingCellConfigCommon_t
*
scc
,
NR_ServingCellConfigCommon_t
*
scc
,
rrc_gNB_carrier_data_t
*
carrier
);
rrc_gNB_carrier_data_t
*
carrier
);
int
do_RRCReestablishmentComplete
(
uint8_t
*
buffer
,
size_t
buffer_size
,
int64_t
rrc_TransactionIdentifier
);
int
do_RRCReestablishmentComplete
(
uint8_t
*
buffer
,
size_t
buffer_size
,
int64_t
rrc_TransactionIdentifier
);
...
...
openair2/RRC/NR/cucp_cuup_direct.c
View file @
c70f0a1d
...
@@ -101,12 +101,11 @@ void CU_update_UP_DL_tunnel(e1ap_bearer_setup_req_t *const req, instance_t insta
...
@@ -101,12 +101,11 @@ void CU_update_UP_DL_tunnel(e1ap_bearer_setup_req_t *const req, instance_t insta
}
}
static
int
drb_config_gtpu_create
(
const
protocol_ctxt_t
*
const
ctxt_p
,
static
int
drb_config_gtpu_create
(
const
protocol_ctxt_t
*
const
ctxt_p
,
rrc_gNB_ue_context_t
*
ue_context_p
,
rrc_gNB_ue_context_t
*
ue_context_p
,
e1ap_bearer_setup_req_t
*
const
req
,
e1ap_bearer_setup_req_t
*
const
req
,
NR_DRB_ToAddModList_t
*
DRB_configList
,
NR_DRB_ToAddModList_t
*
DRB_configList
,
NR_SRB_ToAddModList_t
*
SRB_configList
,
instance_t
instance
)
instance_t
instance
)
{
{
gtpv1u_gnb_create_tunnel_req_t
create_tunnel_req
=
{
0
};
gtpv1u_gnb_create_tunnel_req_t
create_tunnel_req
=
{
0
};
gtpv1u_gnb_create_tunnel_resp_t
create_tunnel_resp
=
{
0
};
gtpv1u_gnb_create_tunnel_resp_t
create_tunnel_resp
=
{
0
};
gNB_RRC_UE_t
*
UE
=
&
ue_context_p
->
ue_context
;
gNB_RRC_UE_t
*
UE
=
&
ue_context_p
->
ue_context
;
...
@@ -153,7 +152,12 @@ static int drb_config_gtpu_create(const protocol_ctxt_t *const ctxt_p,
...
@@ -153,7 +152,12 @@ static int drb_config_gtpu_create(const protocol_ctxt_t *const ctxt_p,
LOG_D
(
NR_RRC
,
"Configuring PDCP DRBs/SRBs for UE %x
\n
"
,
UE
->
rnti
);
LOG_D
(
NR_RRC
,
"Configuring PDCP DRBs/SRBs for UE %x
\n
"
,
UE
->
rnti
);
nr_pdcp_add_srbs
(
ctxt_p
->
enb_flag
,
ctxt_p
->
rntiMaybeUEid
,
SRB_configList
,
(
UE
->
integrity_algorithm
<<
4
)
|
UE
->
ciphering_algorithm
,
kRRCenc
,
kRRCint
);
nr_pdcp_add_srbs
(
ctxt_p
->
enb_flag
,
ctxt_p
->
rntiMaybeUEid
,
NULL
,
(
UE
->
integrity_algorithm
<<
4
)
|
UE
->
ciphering_algorithm
,
kRRCenc
,
kRRCint
);
nr_pdcp_add_drbs
(
ctxt_p
->
enb_flag
,
nr_pdcp_add_drbs
(
ctxt_p
->
enb_flag
,
ctxt_p
->
rntiMaybeUEid
,
ctxt_p
->
rntiMaybeUEid
,
...
@@ -167,21 +171,6 @@ static int drb_config_gtpu_create(const protocol_ctxt_t *const ctxt_p,
...
@@ -167,21 +171,6 @@ static int drb_config_gtpu_create(const protocol_ctxt_t *const ctxt_p,
return
ret
;
return
ret
;
}
}
static
NR_SRB_ToAddModList_t
**
generateSRB2_confList
(
gNB_RRC_UE_t
*
ue
,
NR_SRB_ToAddModList_t
*
SRB_configList
,
uint8_t
xid
)
{
NR_SRB_ToAddModList_t
**
SRB_configList2
=
NULL
;
SRB_configList2
=
&
ue
->
SRB_configList2
[
xid
];
if
(
*
SRB_configList2
==
NULL
)
{
*
SRB_configList2
=
CALLOC
(
1
,
sizeof
(
**
SRB_configList2
));
NR_SRB_ToAddMod_t
*
SRB2_config
=
CALLOC
(
1
,
sizeof
(
*
SRB2_config
));
SRB2_config
->
srb_Identity
=
2
;
asn1cSeqAdd
(
&
(
*
SRB_configList2
)
->
list
,
SRB2_config
);
asn1cSeqAdd
(
&
SRB_configList
->
list
,
SRB2_config
);
}
return
SRB_configList2
;
}
static
void
cucp_cuup_bearer_context_setup_direct
(
e1ap_bearer_setup_req_t
*
const
req
,
instance_t
instance
,
uint8_t
xid
)
static
void
cucp_cuup_bearer_context_setup_direct
(
e1ap_bearer_setup_req_t
*
const
req
,
instance_t
instance
,
uint8_t
xid
)
{
{
rrc_gNB_ue_context_t
*
ue_context_p
=
rrc_gNB_get_ue_context_by_rnti
(
RC
.
nrrrc
[
instance
],
req
->
rnti
);
rrc_gNB_ue_context_t
*
ue_context_p
=
rrc_gNB_get_ue_context_by_rnti
(
RC
.
nrrrc
[
instance
],
req
->
rnti
);
...
@@ -205,10 +194,8 @@ static void cucp_cuup_bearer_context_setup_direct(e1ap_bearer_setup_req_t *const
...
@@ -205,10 +194,8 @@ static void cucp_cuup_bearer_context_setup_direct(e1ap_bearer_setup_req_t *const
}
}
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
ctxt
.
module_id
];
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
ctxt
.
module_id
];
// Fixme: xid not random, but almost!
NR_SRB_ToAddModList_t
**
SRB_configList2
=
generateSRB2_confList
(
UE
,
UE
->
SRB_configList
,
UE
->
pduSession
[
0
].
xid
);
// GTP tunnel for UL
// GTP tunnel for UL
int
ret
=
drb_config_gtpu_create
(
&
ctxt
,
ue_context_p
,
req
,
UE
->
DRB_configList
,
*
SRB_configList2
,
rrc
->
e1_inst
);
int
ret
=
drb_config_gtpu_create
(
&
ctxt
,
ue_context_p
,
req
,
UE
->
DRB_configList
,
rrc
->
e1_inst
);
if
(
ret
<
0
)
AssertFatal
(
false
,
"Unable to configure DRB or to create GTP Tunnel
\n
"
);
if
(
ret
<
0
)
AssertFatal
(
false
,
"Unable to configure DRB or to create GTP Tunnel
\n
"
);
// Used to store teids: if monolithic, will simply be NULL
// Used to store teids: if monolithic, will simply be NULL
...
...
openair2/RRC/NR/nr_rrc_common.c
View file @
c70f0a1d
...
@@ -54,14 +54,3 @@ void rrc_init_nr_srb_param(NR_LCHAN_DESC *chan)
...
@@ -54,14 +54,3 @@ void rrc_init_nr_srb_param(NR_LCHAN_DESC *chan)
chan
->
Delay_class
=
1
;
chan
->
Delay_class
=
1
;
return
;
return
;
}
}
//-----------------------------------------------------------------------------
void
rrc_config_nr_buffer
(
NR_SRB_INFO
*
Srb_info
,
uint8_t
Lchan_type
,
uint8_t
Role
)
{
Srb_info
->
Rx_buffer
.
payload_size
=
0
;
Srb_info
->
Tx_buffer
.
payload_size
=
0
;
}
//-----------------------------------------------------------------------------
openair2/RRC/NR/nr_rrc_common.h
View file @
c70f0a1d
...
@@ -61,31 +61,16 @@ typedef struct RB_INFO_NR_s {
...
@@ -61,31 +61,16 @@ typedef struct RB_INFO_NR_s {
}
NR_RB_INFO
;
}
NR_RB_INFO
;
typedef
struct
NR_SRB_INFO_s
{
typedef
struct
NR_SRB_INFO_s
{
uint16_t
Srb_id
;
//=Lchan_id
NR_RRC_BUFFER
Rx_buffer
;
NR_RRC_BUFFER
Rx_buffer
;
NR_RRC_BUFFER
Tx_buffer
;
NR_RRC_BUFFER
Tx_buffer
;
NR_LCHAN_DESC
Lchan_desc
[
2
];
unsigned
int
Trans_id
;
uint8_t
Active
;
}
NR_SRB_INFO
;
}
NR_SRB_INFO
;
typedef
struct
RB_INFO_TABLE_ENTRY_NR_s
{
NR_RB_INFO
Rb_info
;
uint8_t
Active
;
uint32_t
Next_check_frame
;
uint8_t
status
;
}
NR_RB_INFO_TABLE_ENTRY
;
typedef
struct
SRB_INFO_TABLE_ENTRY_NR_s
{
typedef
struct
SRB_INFO_TABLE_ENTRY_NR_s
{
NR_SRB_INFO
Srb_info
;
NR_SRB_INFO
Srb_info
;
uint8_t
Active
;
uint8_t
Active
;
uint8_t
status
;
uint8_t
status
;
uint32_t
Next_check_frame
;
}
NR_SRB_INFO_TABLE_ENTRY
;
}
NR_SRB_INFO_TABLE_ENTRY
;
void
rrc_init_nr_srb_param
(
NR_LCHAN_DESC
*
chan
);
void
rrc_init_nr_srb_param
(
NR_LCHAN_DESC
*
chan
);
void
rrc_config_nr_buffer
(
NR_SRB_INFO
*
Srb_info
,
uint8_t
Lchan_type
,
uint8_t
Role
);
#endif
#endif
openair2/RRC/NR/nr_rrc_defs.h
View file @
c70f0a1d
...
@@ -236,9 +236,7 @@ typedef enum {
...
@@ -236,9 +236,7 @@ typedef enum {
}
rrc_action_t
;
}
rrc_action_t
;
typedef
struct
gNB_RRC_UE_s
{
typedef
struct
gNB_RRC_UE_s
{
uint8_t
primaryCC_id
;
uint8_t
primaryCC_id
;
NR_SRB_ToAddModList_t
*
SRB_configList
;
NR_SRB_ToAddModList_t
*
SRB_configList2
[
NR_RRC_TRANSACTION_IDENTIFIER_NUMBER
];
NR_DRB_ToAddModList_t
*
DRB_configList
;
NR_DRB_ToAddModList_t
*
DRB_configList
;
NR_DRB_ToAddModList_t
*
DRB_configList2
[
NR_RRC_TRANSACTION_IDENTIFIER_NUMBER
];
NR_DRB_ToAddModList_t
*
DRB_configList2
[
NR_RRC_TRANSACTION_IDENTIFIER_NUMBER
];
NR_DRB_ToReleaseList_t
*
DRB_Release_configList2
[
NR_RRC_TRANSACTION_IDENTIFIER_NUMBER
];
NR_DRB_ToReleaseList_t
*
DRB_Release_configList2
[
NR_RRC_TRANSACTION_IDENTIFIER_NUMBER
];
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
c70f0a1d
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/rrc_gNB_NGAP.c
View file @
c70f0a1d
...
@@ -125,8 +125,6 @@ nr_rrc_pdcp_config_security(
...
@@ -125,8 +125,6 @@ nr_rrc_pdcp_config_security(
)
)
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
{
{
NR_SRB_ToAddModList_t
*
SRB_configList
=
ue_context_pP
->
ue_context
.
SRB_configList
;
(
void
)
SRB_configList
;
uint8_t
kRRCenc
[
16
]
=
{
0
};
uint8_t
kRRCenc
[
16
]
=
{
0
};
uint8_t
kRRCint
[
16
]
=
{
0
};
uint8_t
kRRCint
[
16
]
=
{
0
};
uint8_t
kUPenc
[
16
]
=
{
0
};
uint8_t
kUPenc
[
16
]
=
{
0
};
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
c70f0a1d
...
@@ -1651,8 +1651,7 @@ nr_rrc_ue_establish_srb1(
...
@@ -1651,8 +1651,7 @@ nr_rrc_ue_establish_srb1(
{
{
// add descriptor from RRC PDU
// add descriptor from RRC PDU
NR_UE_rrc_inst
[
ue_mod_idP
].
Srb1
[
gNB_index
].
Active
=
1
;
NR_UE_rrc_inst
[
ue_mod_idP
].
Srb1
[
gNB_index
].
Active
=
1
;
NR_UE_rrc_inst
[
ue_mod_idP
].
Srb1
[
gNB_index
].
status
=
RADIO_CONFIG_OK
;
//RADIO CFG
NR_UE_rrc_inst
[
ue_mod_idP
].
Srb1
[
gNB_index
].
status
=
RADIO_CONFIG_OK
;
// RADIO CFG
NR_UE_rrc_inst
[
ue_mod_idP
].
Srb1
[
gNB_index
].
Srb_info
.
Srb_id
=
1
;
LOG_I
(
NR_RRC
,
"[UE %d], CONFIG_SRB1 %d corresponding to gNB_index %d
\n
"
,
ue_mod_idP
,
DCCH
,
gNB_index
);
LOG_I
(
NR_RRC
,
"[UE %d], CONFIG_SRB1 %d corresponding to gNB_index %d
\n
"
,
ue_mod_idP
,
DCCH
,
gNB_index
);
return
(
0
);
return
(
0
);
}
}
...
@@ -1669,8 +1668,7 @@ nr_rrc_ue_establish_srb2(
...
@@ -1669,8 +1668,7 @@ nr_rrc_ue_establish_srb2(
{
{
// add descriptor from RRC PDU
// add descriptor from RRC PDU
NR_UE_rrc_inst
[
ue_mod_idP
].
Srb2
[
gNB_index
].
Active
=
1
;
NR_UE_rrc_inst
[
ue_mod_idP
].
Srb2
[
gNB_index
].
Active
=
1
;
NR_UE_rrc_inst
[
ue_mod_idP
].
Srb2
[
gNB_index
].
status
=
RADIO_CONFIG_OK
;
//RADIO CFG
NR_UE_rrc_inst
[
ue_mod_idP
].
Srb2
[
gNB_index
].
status
=
RADIO_CONFIG_OK
;
// RADIO CFG
NR_UE_rrc_inst
[
ue_mod_idP
].
Srb2
[
gNB_index
].
Srb_info
.
Srb_id
=
2
;
LOG_I
(
NR_RRC
,
"[UE %d], CONFIG_SRB2 %d corresponding to gNB_index %d
\n
"
,
ue_mod_idP
,
DCCH1
,
gNB_index
);
LOG_I
(
NR_RRC
,
"[UE %d], CONFIG_SRB2 %d corresponding to gNB_index %d
\n
"
,
ue_mod_idP
,
DCCH1
,
gNB_index
);
return
(
0
);
return
(
0
);
}
}
...
...
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