Skip to main content

Slicing

This xApp is the first BubbleRAN's xApp where an E2 Control message is exchanged.

import sys
import xapp_usr_sdk as xapp

xapp.init(sys.argv)
nodes = xapp.e2_nodes(xapp.SLICE_USE_CASE_e)
assert(len(nodes) > 0 and "Needed at least one E2 node to slice")

node_idx = -1
for i in range(0, len(nodes)):
if (nodes[i].node.type == xapp.e2ap_ngran_gNB_DU_SDK or nodes[i].node.type == xapp.e2ap_ngran_gNB_SDK):
node_idx = i

assert(node_idx > -1 and "require node type is gNB or DU")

n = nodes[node_idx].node
sst = "1"
sd = "0"
dedicated_prb = 30
xapp.slice(n, sst, sd, dedicated_prb)

In this example, the xApp is using the RAN Control service model defined by O-RAN to slice the RAN. In the first part of the program i.e.,

import sys
import xapp_usr_sdk as xapp

xapp.init(sys.argv)
nodes = xapp.e2_nodes(xapp.SLICE_USE_CASE_e)
assert(len(nodes) > 0 and "Needed at least one E2 node to slice")

node_idx = -1
for i in range(0, len(nodes)):
if (nodes[i].node.type == xapp.e2ap_ngran_gNB_DU_SDK or nodes[i].node.type == xapp.e2ap_ngran_gNB_SDK):
node_idx = i

assert(node_idx > -1 and "require node type is gNB or DU")

the xApp SDK is initiated and the index of a valid E2 Node is selected. An E2 Node that is not a gNB or DU (e.g., CU) cannot use this slicing algorithm as the MAC sublayer is needed. In the second part of the program i.e.,

n = nodes[node_idx].node
sst = "1"
sd = "0"
dedicated_prb = 30
xapp.slice(n, sst, sd, dedicated_prb)

the E2 Node is selected, the slicing S-NSSAI SST (Slice/Service Type) and SD (Service Differentiator) are set, alt text

and the amount of Resource Blocks (RBs) is set.

The messages involved between E2 Node, MX RIC and the xApp can be observed in the following flowchart: alt text

i) The E2 Node (remember that the E2 Node is embeded in your RAN e.g., gNB) tries to connect to the MX RIC sending the E2 Setup Request message until it receives an E2 Setup Response from the MX RIC. From that momment onwards, the E2 Node and the MX RIC are connected.

ii) Afterward, the xApp sends an E42 Setup Request to the MX RIC that responds with an E42 Setup Request Response. At that moment, the xApp and the MX RIC are connected. This step happens when the xapp.init(sys.argv) is executed.

iii) In the next step, the xApp sends an E42 Control message that is forwarded as an E2 Control to the E2 Node. The E2 Node responds with an E2 Control Response that is converted into an E42 Control Response before arriving into the xApp before ending.