Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2Cell changes at OAI-DU #127

Open
wants to merge 2 commits into
base: develop-onf
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions openair2/F1AP/MESSAGES/ASN1/R15.2.1/F1AP-Constants.asn
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ maxnoofPagingCells INTEGER ::= 512
maxnoofTNLAssociations INTEGER ::= 32
maxnoofQoSFlows INTEGER ::= 64
maxnoofSliceItems INTEGER ::= 1024
maxCellineNB INTEGER ::= 256

maxCellineNB INTEGER ::= 256
maxnoofTLAs INTEGER ::= 16
maxnoofGTPTLAs INTEGER ::= 16
maxnoofExtSliceItems INTEGER ::= 65535

-- **************************************************************
--
Expand Down Expand Up @@ -252,5 +254,12 @@ id-PWS-Failed-NR-CGI-List ProtocolIE-ID ::= 154
id-PWS-Failed-NR-CGI-Item ProtocolIE-ID ::= 155
id-ConfirmedUEID ProtocolIE-ID ::= 156
id-Cancel-all-Warning-Messages-Indicator ProtocolIE-ID ::= 157

id-GNB-DU-RRC-Version ProtocolIE-ID ::= 171
id-latest-RRC-Version-Enhanced ProtocolIE-ID ::= 199
id-Transport-Layer-Address-Info ProtocolIE-ID ::= 254
id-BAPAddress ProtocolIE-ID ::= 281
id-NPNSupportInfo ProtocolIE-ID ::= 384
id-NID ProtocolIE-ID ::= 385
id-ExtendedTAISliceSupportList ProtocolIE-ID ::= 390
id-Extended-GNB-DU-Name ProtocolIE-ID ::= 426
END
94 changes: 92 additions & 2 deletions openair2/F1AP/MESSAGES/ASN1/R15.2.1/F1AP-IEs.asn
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ IMPORTS
id-HandoverPreparationInformation,
id-TAISliceSupportList,
id-RANAC,
id-NPNSupportInfo,
id-ExtendedTAISliceSupportList,
maxNRARFCN,
maxnoofErrors,
maxnoofBPLMNs,
Expand All @@ -26,7 +28,11 @@ IMPORTS
maxnoofQoSFlows,
maxnoofSliceItems,
maxnoofSIBTypes,
maxCellineNB
maxCellineNB,
id-latest-RRC-Version-Enhanced,
maxnoofTLAs,
maxnoofExtSliceItems,
maxnoofGTPTLAs

FROM F1AP-Constants

Expand Down Expand Up @@ -83,10 +89,13 @@ BroadcastPLMNs-Item ::= SEQUENCE {
}

BroadcastPLMNs-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
{ ID id-TAISliceSupportList CRITICALITY ignore EXTENSION SliceSupportList PRESENCE optional },
{ ID id-TAISliceSupportList CRITICALITY ignore EXTENSION SliceSupportList PRESENCE optional }|
{ ID id-NPNSupportInfo CRITICALITY reject EXTENSION NPNSupportInfo PRESENCE optional }|
{ ID id-ExtendedTAISliceSupportList CRITICALITY reject EXTENSION ExtendedSliceSupportList PRESENCE optional },
...
}

BAPAddress ::= BIT STRING (SIZE(10))

-- C

Expand Down Expand Up @@ -566,6 +575,8 @@ Dynamic5QIDescriptor-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {

-- E

ExtendedSliceSupportList ::= SEQUENCE (SIZE(1.. maxnoofExtSliceItems)) OF SliceSupportItem

Endpoint-IP-address-and-port ::=SEQUENCE {
endpointIPAddress TransportLayerAddress,
iE-Extensions ProtocolExtensionContainer { { Endpoint-IP-address-and-port-ExtIEs} } OPTIONAL
Expand Down Expand Up @@ -620,6 +631,20 @@ EUTRA-TDD-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
...
}

Extended-GNB-DU-Name ::= SEQUENCE {
gNB-DU-NameVisibleString GNB-DU-NameVisibleString OPTIONAL,
gNB-DU-NameUTF8String GNB-DU-NameUTF8String OPTIONAL,
iE-Extensions ProtocolExtensionContainer { { Extended-GNB-DU-Name-ExtIEs } } OPTIONAL,
...
}

Extended-GNB-DU-Name-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
...
}

GNB-DU-NameVisibleString ::= VisibleString(SIZE(1..150,...))
GNB-DU-NameUTF8String ::= UTF8String(SIZE(1..150,...))

-- F

FDD-Info ::= SEQUENCE {
Expand Down Expand Up @@ -798,6 +823,26 @@ GTPTunnel-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
...
}

GTPTLAs ::= SEQUENCE (SIZE(1.. maxnoofGTPTLAs)) OF GTPTLA-Item

GTPTLA-Item ::= SEQUENCE {
gTPTransportLayerAddress TransportLayerAddress,
iE-Extensions ProtocolExtensionContainer { { GTPTLA-Item-ExtIEs } } OPTIONAL
}

GTPTLA-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
...
}

RRC-Version ::= SEQUENCE {
latest-RRC-Version BIT STRING (SIZE(3)),
iE-Extensions ProtocolExtensionContainer { { RRC-Version-ExtIEs } } OPTIONAL}

RRC-Version-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
{ID id-latest-RRC-Version-Enhanced CRITICALITY ignore EXTENSION OCTET STRING (SIZE(3)) PRESENCE optional },
...
}

-- H

HandoverPreparationInformation ::= OCTET STRING
Expand Down Expand Up @@ -917,6 +962,17 @@ NumberOfBroadcasts ::= INTEGER (0..65535)

NumberofBroadcastRequest ::= INTEGER (0..65535)

NID ::= BIT STRING (SIZE(44))

NPNSupportInfo ::= CHOICE {
sNPN-Information NID,
choice-extension ProtocolIE-SingleContainer { { NPNSupportInfo-ExtIEs } }
}

NPNSupportInfo-ExtIEs F1AP-PROTOCOL-IES ::= {
...
}

-- O

OffsetToPointA ::= INTEGER (0..2199,...)
Expand Down Expand Up @@ -1378,6 +1434,40 @@ TypeOfError ::= ENUMERATED {
...
}

Transport-UP-Layer-Address-Info-To-Add-List ::= SEQUENCE (SIZE(1.. maxnoofTLAs)) OF Transport-UP-Layer-Address-Info-To-Add-Item

Transport-UP-Layer-Address-Info-To-Add-Item ::= SEQUENCE {
iP-SecTransportLayerAddress TransportLayerAddress,
gTPTransportLayerAddressToAdd GTPTLAs OPTIONAL,
iE-Extensions ProtocolExtensionContainer { { Transport-UP-Layer-Address-Info-To-Add-ItemExtIEs } } OPTIONAL
}

Transport-UP-Layer-Address-Info-To-Add-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
...
}

Transport-UP-Layer-Address-Info-To-Remove-List ::= SEQUENCE (SIZE(1.. maxnoofTLAs)) OF Transport-UP-Layer-Address-Info-To-Remove-Item

Transport-UP-Layer-Address-Info-To-Remove-Item ::= SEQUENCE {
iP-SecTransportLayerAddress TransportLayerAddress,
gTPTransportLayerAddressToRemove GTPTLAs OPTIONAL,
iE-Extensions ProtocolExtensionContainer { { Transport-UP-Layer-Address-Info-To-Remove-ItemExtIEs } } OPTIONAL
}

Transport-UP-Layer-Address-Info-To-Remove-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= {
...
}

Transport-Layer-Address-Info ::= SEQUENCE {
transport-UP-Layer-Address-Info-To-Add-List Transport-UP-Layer-Address-Info-To-Add-List OPTIONAL,
transport-UP-Layer-Address-Info-To-Remove-List Transport-UP-Layer-Address-Info-To-Remove-List OPTIONAL,
iE-Extensions ProtocolExtensionContainer { { Transport-Layer-Address-Info-ExtIEs } } OPTIONAL
}

Transport-Layer-Address-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
...
}

-- U

UE-associatedLogicalF1-ConnectionItem ::= SEQUENCE {
Expand Down
20 changes: 17 additions & 3 deletions openair2/F1AP/MESSAGES/ASN1/R15.2.1/F1AP-PDU-Contents.asn
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,13 @@ IMPORTS
EUTRA-NR-CellResourceCoordinationReqAck-Container,
ListofEUTRACellsinGNBDUCoordination,
SpectrumSharingGroupID,
RequestType
RequestType,
RRC-Version,
Transport-Layer-Address-Info,
TransportLayerAddress,
BAPAddress,
Extended-GNB-DU-Name,
NID

FROM F1AP-IEs

Expand Down Expand Up @@ -292,7 +298,11 @@ FROM F1AP-Containers
maxnoofSRBs,
maxnoofPagingCells,
maxnoofTNLAssociations,
maxCellineNB
maxCellineNB,
id-GNB-DU-RRC-Version,
id-Transport-Layer-Address-Info,
id-BAPAddress,
id-Extended-GNB-DU-Name

FROM F1AP-Constants;

Expand Down Expand Up @@ -413,7 +423,11 @@ F1SetupRequestIEs F1AP-PROTOCOL-IES ::= {
{ ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }|
{ ID id-gNB-DU-ID CRITICALITY reject TYPE GNB-DU-ID PRESENCE mandatory }|
{ ID id-gNB-DU-Name CRITICALITY ignore TYPE GNB-DU-Name PRESENCE optional }|
{ ID id-gNB-DU-Served-Cells-List CRITICALITY reject TYPE GNB-DU-Served-Cells-List PRESENCE mandatory },
{ ID id-gNB-DU-Served-Cells-List CRITICALITY reject TYPE GNB-DU-Served-Cells-List PRESENCE mandatory }|
{ ID id-GNB-DU-RRC-Version CRITICALITY reject TYPE RRC-Version PRESENCE optional }|
{ ID id-Transport-Layer-Address-Info CRITICALITY ignore TYPE Transport-Layer-Address-Info PRESENCE optional }|
{ ID id-BAPAddress CRITICALITY ignore TYPE BAPAddress PRESENCE optional }|
{ ID id-Extended-GNB-DU-Name CRITICALITY ignore TYPE Extended-GNB-DU-Name PRESENCE optional },
...
}

Expand Down
29 changes: 28 additions & 1 deletion openair2/F1AP/f1ap_cu_interface_management.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ int CU_send_ERROR_INDICATION(instance_t instance, F1AP_ErrorIndication_t *ErrorI
/*
F1 Setup
*/

void *g_cuF1SetupReq;
uint32_t g_cuF1SetupReqSize;

int CU_handle_F1_SETUP_REQUEST(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
Expand All @@ -94,8 +98,18 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,

DevAssert(pdu != NULL);

/* Create */
g_cuF1SetupReq = malloc(sizeof(F1AP_F1SetupRequest_t));
memset(g_cuF1SetupReq, 0, sizeof(F1AP_F1SetupRequest_t));
g_cuF1SetupReqSize = sizeof(F1AP_F1SetupRequest_t);

container = &pdu->choice.initiatingMessage->value.choice.F1SetupRequest;

/*copying to global buffer for E2Cell Info to be sent during E2SetupReq */
memcpy(g_cuF1SetupReq, container, sizeof(F1AP_F1SetupRequest_t));
LOG_I(F1AP, "++ CU Received F1SetupReq for E2Cell Info copied ++\n");


/* F1 Setup Request == Non UE-related procedure -> stream 0 */
if (stream != 0) {
LOG_W(F1AP, "[SCTP %d] Received f1 setup request on stream != 0 (%d)\n",
Expand Down Expand Up @@ -254,8 +268,12 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
return 0;
}

void *g_cuF1SetupResp;
int32_t g_cuF1SetupRespSize;

int CU_send_F1_SETUP_RESPONSE(instance_t instance,
f1ap_setup_resp_t *f1ap_setup_resp) {
f1ap_setup_resp_t *f1ap_setup_resp)
{

module_id_t enb_mod_idP;
module_id_t cu_mod_idP;
Expand All @@ -273,6 +291,10 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
int i = 0;

/* Create */
g_cuF1SetupResp = malloc(sizeof(F1AP_F1SetupResponse_t));
memset(g_cuF1SetupResp, 0, sizeof(F1AP_F1SetupResponse_t));
g_cuF1SetupRespSize = sizeof(F1AP_F1SetupResponse_t);

/* 0. Message Type */
memset(&pdu, 0, sizeof(pdu));
pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome;
Expand Down Expand Up @@ -381,6 +403,11 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
}
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);

/*copying to global buffer for E2Cell Info to be sent during E2SetupReq */
memcpy(g_cuF1SetupResp, out, sizeof(F1AP_F1SetupResponse_t));
LOG_I(F1AP, "++ CU F1SetupResp for E2Cell Info copied ++\n");


/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
LOG_E(F1AP, "Failed to encode F1 setup request\n");
Expand Down
54 changes: 51 additions & 3 deletions openair2/F1AP/f1ap_du_interface_management.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,12 @@ int DU_handle_ERROR_INDICATION(instance_t instance,
F1 Setup
*/

void *g_f1SetupReq;
uint32_t g_f1SetupReqSize;

// SETUP REQUEST
int DU_send_F1_SETUP_REQUEST(instance_t instance) {
int DU_send_F1_SETUP_REQUEST(instance_t instance)
{
module_id_t enb_mod_idP=0;
module_id_t du_mod_idP=0;

Expand All @@ -98,6 +102,10 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
int j = 0;

/* Create */
//g_f1SetupReq = malloc(sizeof(F1AP_F1AP_PDU_t));
//memset(g_f1SetupReq, 0, sizeof(F1AP_F1AP_PDU_t));
//g_f1SetupReqSize = sizeof(F1AP_F1AP_PDU_t);

/* 0. pdu Type */
memset(&pdu, 0, sizeof(pdu));
pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage;
Expand Down Expand Up @@ -171,11 +179,11 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
F1AP_NRCGI_t nRCGI;
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &nRCGI.pLMN_Identity);
LOG_D(F1AP, "plmn: (%d,%d)\n",f1ap_du_data->mcc[i],f1ap_du_data->mnc[i]);
LOG_I(F1AP, "plmn: (%d,%d)\n",f1ap_du_data->mcc[i],f1ap_du_data->mnc[i]);
//MCC_MNC_TO_PLMNID(208, 95, 2, &nRCGI.pLMN_Identity);

NR_CELL_ID_TO_BIT_STRING(f1ap_du_data->nr_cellid[i], &nRCGI.nRCellIdentity);
LOG_D(F1AP, "nRCellIdentity (%llx): %x.%x.%x.%x.%x\n",
LOG_I(F1AP, "nRCellIdentity (%llx): %x.%x.%x.%x.%x\n",
(long long unsigned int)f1ap_du_data->nr_cellid[i],
nRCGI.nRCellIdentity.buf[0],
nRCGI.nRCellIdentity.buf[1],
Expand Down Expand Up @@ -399,12 +407,43 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
}
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);

#if 1
/* RRC Version */
/* gNB-DU RRC version (BIT STRING) */
ie = (F1AP_F1SetupRequestIEs_t *)calloc(1, sizeof(F1AP_F1SetupRequestIEs_t));
ie->id = F1AP_ProtocolIE_ID_id_GNB_DU_RRC_Version;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_F1SetupRequestIEs__value_PR_RRC_Version;
//asn_int642INTEGER(&ie->value.choice.GNB_DU_ID, f1ap_du_data->gNB_DU_id);
ie->value.choice.RRC_Version.latest_RRC_Version.buf = calloc(1, sizeof(uint8_t));
ie->value.choice.RRC_Version.latest_RRC_Version.buf[0] = 0;
//ie->value.choice.RRC_Version.latest_RRC_Version.buf[1] = 0;
//ie->value.choice.RRC_Version.latest_RRC_Version.buf[2] = 0;
ie->value.choice.RRC_Version.latest_RRC_Version.size = 1;
ie->value.choice.RRC_Version.latest_RRC_Version.bits_unused = 5;

ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
#endif

/*copying to global buffer for E2Cell Info to be sent during E2SetupReq */
//memcpy(g_f1SetupReq, &pdu, sizeof(F1AP_F1AP_PDU_t));
//LOG_I(F1AP, "++ F1SetupReq for E2Cell Info copied PCI:%u ++\n",f1ap_du_data->nr_pci[0]);

/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
LOG_E(F1AP, "Failed to encode F1 setup request\n");
return -1;
}

/* Create */
g_f1SetupReq = malloc(len);
memset(g_f1SetupReq, 0, len);
g_f1SetupReqSize = len;

/*copying to global buffer for E2Cell Info to be sent during E2SetupReq */
memcpy(g_f1SetupReq, buffer, len);
LOG_I(F1AP, "++ F1SetupReq for E2Cell Info copied PCI:%u ++\n",f1ap_du_data->nr_pci[0]);

MSC_LOG_TX_MESSAGE(
MSC_F1AP_DU,
MSC_F1AP_CU,
Expand All @@ -419,6 +458,8 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
return 0;
}

void *g_f1SetupResp;
uint32_t g_f1SetupRespSize;
int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
Expand All @@ -438,6 +479,13 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,

F1AP_F1SetupResponse_t *in = &pdu->choice.successfulOutcome->value.choice.F1SetupResponse;

g_f1SetupResp = malloc(sizeof(F1AP_F1SetupResponse_t));
memset(g_f1SetupResp, 0, sizeof(F1AP_F1SetupResponse_t));
g_f1SetupRespSize = sizeof(F1AP_F1SetupResponse_t);

/*copying to global buffer for E2Cell Info to be sent during E2SetupResp */
memcpy(g_f1SetupResp, in, sizeof(F1AP_F1SetupResponse_t));
LOG_I(F1AP, "++ F1SetupResp for E2Cell Info copied ++\n");

F1AP_F1SetupResponseIEs_t *ie;
int TransactionId = -1;
Expand Down
Loading