Commit 69155bbb authored by Robert Schmidt's avatar Robert Schmidt

FlexRAN: report employed splits to controller

parent edb74831
......@@ -77,10 +77,19 @@ enum flex_bs_capability {
RRC = 7;
}
enum flex_bs_split {
F1 = 0;
nFAPI = 1;
IF4 = 2;
IF4p5 = 3;
IF5 = 4;
}
message flex_hello {
optional flex_header header = 1;
optional uint64 bs_id = 2; // Unique id to distinguish the eNB
repeated flex_bs_capability capabilities = 3;
repeated flex_bs_split splits = 4;
}
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->has_bs_id = 1;
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));
if(*msg == NULL)
......
......@@ -2646,3 +2646,31 @@ uint16_t flexran_get_capabilities_mask(mid_t mod_id)
}
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__IF5;
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 "PHY/phy_extern.h"
#include "common/utils/LOG/log.h"
#include "nfapi/oai_integration/vendor_ext.h"
/****************************
* 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
* mask. */
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);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment