FlexRAN: report employed splits to controller
This commit is contained in:
@@ -77,10 +77,19 @@ enum flex_bs_capability {
|
|||||||
RRC = 7;
|
RRC = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum flex_bs_split {
|
||||||
|
F1 = 0;
|
||||||
|
nFAPI = 1;
|
||||||
|
IF4 = 2;
|
||||||
|
IF4p5 = 3;
|
||||||
|
IF5 = 4;
|
||||||
|
}
|
||||||
|
|
||||||
message flex_hello {
|
message flex_hello {
|
||||||
optional flex_header header = 1;
|
optional flex_header header = 1;
|
||||||
optional uint64 bs_id = 2; // Unique id to distinguish the eNB
|
optional uint64 bs_id = 2; // Unique id to distinguish the eNB
|
||||||
repeated flex_bs_capability capabilities = 3;
|
repeated flex_bs_capability capabilities = 3;
|
||||||
|
repeated flex_bs_split splits = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message flex_echo_request {
|
message flex_echo_request {
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ int flexran_agent_hello(mid_t mod_id, const void *params, Protocol__FlexranMessa
|
|||||||
hello_msg->bs_id = flexran_get_bs_id(mod_id);
|
hello_msg->bs_id = flexran_get_bs_id(mod_id);
|
||||||
hello_msg->has_bs_id = 1;
|
hello_msg->has_bs_id = 1;
|
||||||
hello_msg->n_capabilities = flexran_get_capabilities(mod_id, &hello_msg->capabilities);
|
hello_msg->n_capabilities = flexran_get_capabilities(mod_id, &hello_msg->capabilities);
|
||||||
|
hello_msg->n_splits = flexran_get_splits(mod_id, &hello_msg->splits);
|
||||||
*msg = malloc(sizeof(Protocol__FlexranMessage));
|
*msg = malloc(sizeof(Protocol__FlexranMessage));
|
||||||
|
|
||||||
if(*msg == NULL)
|
if(*msg == NULL)
|
||||||
@@ -161,6 +162,7 @@ int flexran_agent_destroy_hello(Protocol__FlexranMessage *msg) {
|
|||||||
|
|
||||||
free(msg->hello_msg->header);
|
free(msg->hello_msg->header);
|
||||||
free(msg->hello_msg->capabilities);
|
free(msg->hello_msg->capabilities);
|
||||||
|
free(msg->hello_msg->splits);
|
||||||
free(msg->hello_msg);
|
free(msg->hello_msg);
|
||||||
free(msg);
|
free(msg);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -3570,3 +3570,31 @@ uint16_t flexran_get_capabilities_mask(mid_t mod_id) {
|
|||||||
|
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t flexran_get_splits(mid_t mod_id, Protocol__FlexBsSplit **splits) {
|
||||||
|
size_t n_splits = 0;
|
||||||
|
*splits = NULL;
|
||||||
|
if (rrc_is_present(mod_id) && !NODE_IS_MONOLITHIC(RC.rrc[mod_id]->node_type))
|
||||||
|
n_splits++;
|
||||||
|
if (NFAPI_MODE != NFAPI_MONOLITHIC)
|
||||||
|
n_splits++;
|
||||||
|
if (RC.ru && RC.ru[mod_id] && RC.ru[mod_id]->if_south != LOCAL_RF)
|
||||||
|
n_splits++;
|
||||||
|
if (n_splits == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
AssertFatal(n_splits < 3, "illegal number of splits (%lu)\n", n_splits);
|
||||||
|
*splits = calloc(n_splits, sizeof(Protocol__FlexBsSplit));
|
||||||
|
AssertFatal(*splits, "could not allocate Protocol__FlexBsSplit array\n");
|
||||||
|
int n = 0;
|
||||||
|
if (rrc_is_present(mod_id) && !NODE_IS_MONOLITHIC(RC.rrc[mod_id]->node_type))
|
||||||
|
(*splits)[n++] = PROTOCOL__FLEX_BS_SPLIT__F1;
|
||||||
|
if (NFAPI_MODE != NFAPI_MONOLITHIC)
|
||||||
|
(*splits)[n++] = PROTOCOL__FLEX_BS_SPLIT__nFAPI;
|
||||||
|
if (RC.ru && RC.ru[mod_id] && RC.ru[mod_id]->if_south == REMOTE_IF4p5)
|
||||||
|
(*splits)[n++] = PROTOCOL__FLEX_BS_SPLIT__IF4p5;
|
||||||
|
if (RC.ru && RC.ru[mod_id] && RC.ru[mod_id]->if_south == REMOTE_IF5)
|
||||||
|
(*splits)[n++] = PROTOCOL__FLEX_BS_SPLIT__IF5;
|
||||||
|
DevAssert(n == n_splits);
|
||||||
|
return n_splits;
|
||||||
|
}
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
#include "RRC/LTE/rrc_eNB_UE_context.h"
|
#include "RRC/LTE/rrc_eNB_UE_context.h"
|
||||||
#include "PHY/phy_extern.h"
|
#include "PHY/phy_extern.h"
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
|
#include "nfapi/oai_integration/vendor_ext.h"
|
||||||
|
|
||||||
/****************************
|
/****************************
|
||||||
* get generic info from RAN
|
* get generic info from RAN
|
||||||
@@ -815,3 +816,8 @@ size_t flexran_get_capabilities(mid_t mod_id, Protocol__FlexBsCapability **caps)
|
|||||||
/* get the capabilities supported by the underlying network function as a bit
|
/* get the capabilities supported by the underlying network function as a bit
|
||||||
* mask. */
|
* mask. */
|
||||||
uint16_t flexran_get_capabilities_mask(mid_t mod_id);
|
uint16_t flexran_get_capabilities_mask(mid_t mod_id);
|
||||||
|
|
||||||
|
/* get the splits used by the underlying network function,
|
||||||
|
* return the number and stores list of this length in splits. If there are
|
||||||
|
* zero capabilities, splits will be NULL */
|
||||||
|
size_t flexran_get_splits(mid_t mod_id, Protocol__FlexBsSplit **splits);
|
||||||
|
|||||||
Reference in New Issue
Block a user