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
zzha zzha
OpenXG-RAN
Commits
e9421938
Commit
e9421938
authored
Sep 03, 2021
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Plain Diff
add partial coding ue context resp
parents
14775c9d
7fab0147
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
221 additions
and
128 deletions
+221
-128
openair2/COMMON/f1ap_messages_types.h
openair2/COMMON/f1ap_messages_types.h
+14
-4
openair2/F1AP/f1ap_cu_ue_context_management.c
openair2/F1AP/f1ap_cu_ue_context_management.c
+89
-3
openair2/F1AP/f1ap_du_ue_context_management.c
openair2/F1AP/f1ap_du_ue_context_management.c
+106
-115
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+4
-2
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+8
-4
No files found.
openair2/COMMON/f1ap_messages_types.h
View file @
e9421938
...
...
@@ -317,22 +317,28 @@ typedef struct f1ap_ul_rrc_message_s {
typedef
struct
f1ap_up_tnl_s
{
in_addr_t
tl_address
;
// currently only IPv4 supported
teid_t
outgoingTeid
;
teid_t
incomingTeid
;
teid_t
teid
;
}
f1ap_up_tnl_t
;
typedef
struct
f1ap_drb_to_be_setup_s
{
long
drb_id
;
f1ap_up_tnl_t
tnl
[
2
];
uint8_t
tnl_length
;
f1ap_up_tnl_t
up_ul_tnl
[
2
];
uint8_t
up_ul_tnl_length
;
f1ap_up_tnl_t
up_dl_tnl
[
2
];
uint8_t
up_dl_tnl_length
;
rlc_mode_t
rlc_mode
;
}
f1ap_drb_to_be_setup_t
;
typedef
struct
f1ap_srb_to_be_setup_s
{
long
srb_id
;
rlc_mode_t
rlc_mode
;
uint8_t
lcid
;
}
f1ap_srb_to_be_setup_t
;
typedef
struct
f1ap_rb_failed_to_be_setup_s
{
long
rb_id
;
}
f1ap_rb_failed_to_be_setup_t
;
typedef
struct
f1ap_ue_context_setup_req_s
{
uint32_t
gNB_CU_ue_id
;
// BK: need to replace by use from rnti
uint32_t
gNB_DU_ue_id
;
...
...
@@ -367,6 +373,10 @@ typedef struct f1ap_ue_context_setup_resp_s {
uint8_t
drbs_setup_length
;
// BK: need to replace by s1ap_initial_context_setup_req
f1ap_srb_to_be_setup_t
*
srbs_setup
;
uint8_t
srbs_setup_length
;
uint8_t
srbs_failed_to_be_setup_length
;
f1ap_rb_failed_to_be_setup_t
*
srbs_failed_to_be_setup
;
uint8_t
drbs_failed_to_be_setup_length
;
f1ap_rb_failed_to_be_setup_t
*
drbs_failed_to_be_setup
;
}
f1ap_ue_context_setup_resp_t
;
typedef
enum
F1ap_Cause_e
{
...
...
openair2/F1AP/f1ap_cu_ue_context_management.c
View file @
e9421938
...
...
@@ -509,7 +509,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
}
// if some_decide_qos
/* 12.1.3 uLUPTNLInformation_ToBeSetup_List */
for
(
int
j
=
0
;
j
<
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
tnl_length
;
j
++
)
{
for
(
int
j
=
0
;
j
<
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_ul_
tnl_length
;
j
++
)
{
/* 12.3.1 ULTunnels_ToBeSetup_Item */
asn1cSequenceAdd
(
drbs_toBeSetup_item
->
uLUPTNLInformation_ToBeSetup_List
.
list
,
F1AP_ULUPTNLInformation_ToBeSetup_Item_t
,
uLUPTNLInformation_ToBeSetup_Item
);
...
...
@@ -517,10 +517,10 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
asn1cCalloc
(
uLUPTNLInformation_ToBeSetup_Item
->
uLUPTNLInformation
.
choice
.
gTPTunnel
,
F1AP_GTPTunnel_t
,
gTPTunnel
);
/* 12.3.1.1.1 transportLayerAddress */
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING
(
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
tnl
[
j
].
tl_address
,
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING
(
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_ul_
tnl
[
j
].
tl_address
,
&
gTPTunnel
->
transportLayerAddress
);
/* 12.3.1.1.2 gTP_TEID */
INT32_TO_OCTET_STRING
(
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
tnl
[
j
].
outgoingT
eid
,
INT32_TO_OCTET_STRING
(
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_ul_tnl
[
j
].
t
eid
,
&
gTPTunnel
->
gTP_TEID
);
}
...
...
@@ -626,31 +626,117 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance,
uint32_t
assoc_id
,
uint32_t
stream
,
F1AP_F1AP_PDU_t
*
pdu
)
{
MessageDef
*
msg_p
;
F1AP_UEContextSetupResponse_t
*
container
;
F1AP_UEContextSetupResponseIEs_t
*
ie
;
DevAssert
(
pdu
);
msg_p
=
itti_alloc_new_message
(
TASK_DU_F1
,
0
,
F1AP_UE_CONTEXT_SETUP_RESP
);
f1ap_ue_context_setup_resp_t
*
f1ap_ue_context_setup_resp
=
&
F1AP_UE_CONTEXT_SETUP_RESP
(
msg_p
);
container
=
&
pdu
->
choice
.
successfulOutcome
->
value
.
choice
.
UEContextSetupResponse
;
int
i
;
/* GNB_CU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextSetupResponseIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID
,
true
);
f1ap_ue_context_setup_resp
->
gNB_CU_ue_id
=
ie
->
value
.
choice
.
GNB_CU_UE_F1AP_ID
;
/* GNB_DU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextSetupResponseIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID
,
true
);
f1ap_ue_context_setup_resp
->
gNB_DU_ue_id
=
ie
->
value
.
choice
.
GNB_DU_UE_F1AP_ID
;
/* DUtoCURRCInformation */
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextSetupResponseIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_DUtoCURRCInformation
,
true
);
if
(
ie
==
NULL
){
LOG_E
(
F1AP
,
"%s %d: ie is a NULL pointer
\n
"
,
__FILE__
,
__LINE__
);
return
-
1
;
}
memcpy
(
f1ap_ue_context_setup_resp
->
du_to_cu_rrc_information
,
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
buf
,
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
size
);
f1ap_ue_context_setup_resp
->
du_to_cu_rrc_information_length
=
ie
->
value
.
choice
.
DUtoCURRCInformation
.
cellGroupConfig
.
size
;
/* DRBs_Setup_List */
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextSetupResponseIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_DRBs_Setup_List
,
true
);
if
(
ie
!=
NULL
){
f1ap_ue_context_setup_resp
->
drbs_setup_length
=
ie
->
value
.
choice
.
DRBs_Setup_List
.
list
.
count
;
f1ap_ue_context_setup_resp
->
drbs_setup
=
calloc
(
f1ap_ue_context_setup_resp
->
drbs_setup_length
,
sizeof
(
f1ap_drb_to_be_setup_t
));
AssertFatal
(
f1ap_ue_context_setup_resp
->
drbs_setup
,
"could not allocate memory for f1ap_ue_context_setup_resp->drbs_setup
\n
"
);
for
(
i
=
0
;
i
<
f1ap_ue_context_setup_resp
->
drbs_setup_length
;
++
i
)
{
f1ap_drb_to_be_setup_t
*
drb_p
=
&
f1ap_ue_context_setup_resp
->
drbs_setup
[
i
];
F1AP_DRBs_Setup_Item_t
*
drbs_setup_item_p
;
drbs_setup_item_p
=
&
((
F1AP_DRBs_Setup_ItemIEs_t
*
)
ie
->
value
.
choice
.
DRBs_Setup_List
.
list
.
array
[
i
])
->
value
.
choice
.
DRBs_Setup_Item
;
drb_p
->
drb_id
=
drbs_setup_item_p
->
dRBID
;
/* TODO in the following, assume only one UP UL TNL is present.
* this matches/assumes OAI CU/DU implementation, can be up to 2! */
drb_p
->
up_dl_tnl_length
=
1
;
AssertFatal
(
drbs_setup_item_p
->
dLUPTNLInformation_ToBeSetup_List
.
list
.
count
>
0
,
"no DL UP TNL Information in DRBs to be Setup list
\n
"
);
F1AP_DLUPTNLInformation_ToBeSetup_Item_t
*
dl_up_tnl_info_p
=
(
F1AP_DLUPTNLInformation_ToBeSetup_Item_t
*
)
drbs_setup_item_p
->
dLUPTNLInformation_ToBeSetup_List
.
list
.
array
[
0
];
F1AP_GTPTunnel_t
*
dl_up_tnl0
=
dl_up_tnl_info_p
->
dLUPTNLInformation
.
choice
.
gTPTunnel
;
BIT_STRING_TO_TRANSPORT_LAYER_ADDRESS_IPv4
(
&
dl_up_tnl0
->
transportLayerAddress
,
drb_p
->
up_dl_tnl
[
0
].
tl_address
);
OCTET_STRING_TO_INT32
(
&
dl_up_tnl0
->
gTP_TEID
,
drb_p
->
up_dl_tnl
[
0
].
teid
);
}
}
/* SRBs_FailedToBeSetup_List */
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextSetupResponseIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_SRBs_FailedToBeSetup_List
,
true
);
if
(
ie
!=
NULL
){
f1ap_ue_context_setup_resp
->
srbs_failed_to_be_setup_length
=
ie
->
value
.
choice
.
SRBs_FailedToBeSetup_List
.
list
.
count
;
f1ap_ue_context_setup_resp
->
srbs_failed_to_be_setup
=
calloc
(
f1ap_ue_context_setup_resp
->
srbs_failed_to_be_setup_length
,
sizeof
(
f1ap_rb_failed_to_be_setup_t
));
AssertFatal
(
f1ap_ue_context_setup_resp
->
srbs_failed_to_be_setup
,
"could not allocate memory for f1ap_ue_context_setup_resp->srbs_failed_to_be_setup
\n
"
);
for
(
i
=
0
;
i
<
f1ap_ue_context_setup_resp
->
srbs_failed_to_be_setup_length
;
++
i
)
{
f1ap_rb_failed_to_be_setup_t
*
srb_p
=
&
f1ap_ue_context_setup_resp
->
srbs_failed_to_be_setup
[
i
];
srb_p
->
rb_id
=
((
F1AP_SRBs_FailedToBeSetup_Item_t
*
)
ie
->
value
.
choice
.
SRBs_FailedToBeSetup_List
.
list
.
array
[
i
])
->
sRBID
;
}
}
/* DRBs_FailedToBeSetup_List */
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextSetupResponseIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_DRBs_FailedToBeSetup_List
,
true
);
if
(
ie
!=
NULL
){
f1ap_ue_context_setup_resp
->
drbs_failed_to_be_setup_length
=
ie
->
value
.
choice
.
DRBs_FailedToBeSetup_List
.
list
.
count
;
f1ap_ue_context_setup_resp
->
drbs_failed_to_be_setup
=
calloc
(
f1ap_ue_context_setup_resp
->
drbs_failed_to_be_setup_length
,
sizeof
(
f1ap_rb_failed_to_be_setup_t
));
AssertFatal
(
f1ap_ue_context_setup_resp
->
drbs_failed_to_be_setup
,
"could not allocate memory for f1ap_ue_context_setup_resp->drbs_failed_to_be_setup
\n
"
);
for
(
i
=
0
;
i
<
f1ap_ue_context_setup_resp
->
drbs_failed_to_be_setup_length
;
++
i
)
{
f1ap_rb_failed_to_be_setup_t
*
drb_p
=
&
f1ap_ue_context_setup_resp
->
drbs_failed_to_be_setup
[
i
];
drb_p
->
rb_id
=
((
F1AP_DRBs_FailedToBeSetup_Item_t
*
)
ie
->
value
.
choice
.
DRBs_FailedToBeSetup_List
.
list
.
array
[
i
])
->
dRBID
;
}
}
/* SCell_FailedtoSetup_List */
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextSetupResponseIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_SCell_FailedtoSetup_List
,
true
);
if
(
ie
!=
NULL
){
LOG_E
(
F1AP
,
"Not supporting handling of SCell_FailedtoSetup_List
\n
"
);
}
/* SRBs_Setup_List */
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextSetupResponseIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_SRBs_Setup_List
,
true
);
if
(
ie
!=
NULL
){
f1ap_ue_context_setup_resp
->
srbs_setup_length
=
ie
->
value
.
choice
.
SRBs_Setup_List
.
list
.
count
;
f1ap_ue_context_setup_resp
->
srbs_setup
=
calloc
(
f1ap_ue_context_setup_resp
->
srbs_setup_length
,
sizeof
(
f1ap_srb_to_be_setup_t
));
AssertFatal
(
f1ap_ue_context_setup_resp
->
drbs_setup
,
"could not allocate memory for f1ap_ue_context_setup_resp->drbs_setup
\n
"
);
for
(
i
=
0
;
i
<
f1ap_ue_context_setup_resp
->
srbs_setup_length
;
++
i
)
{
f1ap_srb_to_be_setup_t
*
srb_p
=
&
f1ap_ue_context_setup_resp
->
srbs_setup
[
i
];
F1AP_SRBs_Setup_Item_t
*
srbs_setup_item_p
;
srbs_setup_item_p
=
&
((
F1AP_SRBs_Setup_ItemIEs_t
*
)
ie
->
value
.
choice
.
SRBs_Setup_List
.
list
.
array
[
i
])
->
value
.
choice
.
SRBs_Setup_Item
;
srb_p
->
srb_id
=
srbs_setup_item_p
->
sRBID
;
srb_p
->
lcid
=
srbs_setup_item_p
->
lCID
;
}
}
itti_send_msg_to_task
(
TASK_RRC_GNB
,
instance
,
msg_p
);
return
0
;
}
...
...
openair2/F1AP/f1ap_du_ue_context_management.c
View file @
e9421938
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
e9421938
...
...
@@ -284,8 +284,10 @@ uint8_t compute_ri_bitlen(struct NR_CSI_ReportConfig *csi_reportconfig,
}
return
max_ri
;
}
else
else
{
AssertFatal
(
1
==
0
,
"Other configurations not yet implemented
\n
"
);
return
0
;
}
}
void
compute_li_bitlen
(
struct
NR_CSI_ReportConfig
*
csi_reportconfig
,
...
...
@@ -1352,7 +1354,7 @@ int nr_acknack_scheduling(int mod_id,
* for initialCyclicShift 0 (we assume it always has that one), so other
* initialCyclicShifts can overlap with ICS 0!*/
if
(
pucch_Config
==
NULL
)
return
;
return
-
1
;
const
NR_PUCCH_Resource_t
*
resource
=
pucch_Config
->
resourceToAddModList
->
list
.
array
[
pucch
->
resource_indicator
];
DevAssert
(
resource
->
format
.
present
==
NR_PUCCH_Resource__format_PR_format0
);
if
(
resource
->
format
.
choice
.
format0
->
initialCyclicShift
==
0
)
{
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
e9421938
...
...
@@ -1365,7 +1365,7 @@ rrc_gNB_process_RRCReconfigurationComplete(
/* Here the callback function used as input is not the right one. Need to create a new one probably for F1-U, not sure
* if the kind of input parameters to the callback function are convenient though for gtp-u over F1-U.*/
ue_context_pP
->
ue_context
.
incoming_teid
[
i
]
=
newGtpuCreateTunnel
(
0
,
create_tunnel_req
.
rnti
,
ue_context_pP
->
ue_context
.
incoming_teid
[
i
]
=
newGtpuCreateTunnel
(
INSTANCE_DEFAULT
,
create_tunnel_req
.
rnti
,
create_tunnel_req
.
incoming_rb_id
[
i
],
create_tunnel_req
.
incoming_rb_id
[
i
],
create_tunnel_req
.
outgoing_teid
[
i
],
...
...
@@ -1374,9 +1374,9 @@ rrc_gNB_process_RRCReconfigurationComplete(
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
drbs_to_be_setup
[
i
].
drb_id
=
DRB_configList
->
list
.
array
[
i
]
->
drb_Identity
;
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
drbs_to_be_setup
[
i
].
rlc_mode
=
RLC_MODE_AM
;
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
drbs_to_be_setup
[
i
].
tnl
[
0
].
incomingT
eid
=
ue_context_pP
->
ue_context
.
incoming_teid
[
i
];
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
drbs_to_be_setup
[
i
].
tnl
[
0
].
tl_address
=
inet_addr
(
rrc
->
eth_params_s
.
my_addr
);
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
drbs_to_be_setup
[
i
].
tnl_length
=
1
;
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
drbs_to_be_setup
[
i
].
up_ul_tnl
[
0
].
t
eid
=
ue_context_pP
->
ue_context
.
incoming_teid
[
i
];
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
drbs_to_be_setup
[
i
].
up_ul_
tnl
[
0
].
tl_address
=
inet_addr
(
rrc
->
eth_params_s
.
my_addr
);
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
drbs_to_be_setup
[
i
].
up_ul_
tnl_length
=
1
;
}
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
gNB_CU_ue_id
=
0
;
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
gNB_DU_ue_id
=
0
;
...
...
@@ -3671,6 +3671,10 @@ void *rrc_gnb_task(void *args_p) {
rrc_DU_process_ue_context_setup_request
(
msg_p
,
msg_name_p
,
instance
);
break
;
case
F1AP_UE_CONTEXT_SETUP_RESP
:
LOG_W
(
NR_RRC
,
"Handling of F1 UE context setup response context at the RRC layer of the CU is pending
\n
"
);
break
;
/* Messages from X2AP */
case
X2AP_ENDC_SGNB_ADDITION_REQ
:
LOG_I
(
NR_RRC
,
"Received ENDC sgNB addition request from X2AP
\n
"
);
...
...
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