Add BWP switch test in CI
Trigger various BWP switches through telnet, and test traffic after each switch.
This commit is contained in:
@@ -146,7 +146,11 @@ gNBs =
|
|||||||
);
|
);
|
||||||
|
|
||||||
first_active_bwp = 1;
|
first_active_bwp = 1;
|
||||||
bwp_list = ({ scs = 1; bwpStart = 0; bwpSize = 106;});
|
bwp_list = (
|
||||||
|
{ scs = 1; bwpStart = 0; bwpSize = 106;},
|
||||||
|
{ scs = 1; bwpStart = 0; bwpSize = 36;},
|
||||||
|
{ scs = 1; bwpStart = 36; bwpSize = 70;}
|
||||||
|
);
|
||||||
|
|
||||||
# ------- SCTP definitions
|
# ------- SCTP definitions
|
||||||
SCTP :
|
SCTP :
|
||||||
|
|||||||
@@ -30,20 +30,28 @@
|
|||||||
310000
|
310000
|
||||||
800813
|
800813
|
||||||
330101
|
330101
|
||||||
330102
|
|
||||||
330103
|
|
||||||
310001
|
310001
|
||||||
400001
|
400001
|
||||||
350000
|
350000
|
||||||
370001
|
|
||||||
370000
|
|
||||||
370002
|
|
||||||
370003
|
370003
|
||||||
370004
|
370004
|
||||||
|
370002
|
||||||
360001
|
360001
|
||||||
100002
|
100002
|
||||||
360002
|
360002
|
||||||
350000
|
350000
|
||||||
|
410002
|
||||||
|
370012
|
||||||
|
400002
|
||||||
|
410003
|
||||||
|
370013
|
||||||
|
400003
|
||||||
|
410000
|
||||||
|
350000
|
||||||
|
400000
|
||||||
|
410001
|
||||||
|
350000
|
||||||
|
400001
|
||||||
310011
|
310011
|
||||||
310002
|
310002
|
||||||
330201
|
330201
|
||||||
@@ -88,24 +96,10 @@
|
|||||||
</testCase>
|
</testCase>
|
||||||
<testCase id="330101">
|
<testCase id="330101">
|
||||||
<class>Deploy_Object</class>
|
<class>Deploy_Object</class>
|
||||||
<desc>Deploy gNB-CU-CP in a container</desc>
|
<desc>Deploy gNB-CU-CP/gNB-CU-UP/gNB-DU (TDD/n76/40MHz/B200)</desc>
|
||||||
<node>ofqot</node>
|
<node>ofqot</node>
|
||||||
<yaml_path>ci-scripts/yaml_files/sa_e1_b200_gnb</yaml_path>
|
<yaml_path>ci-scripts/yaml_files/sa_e1_b200_gnb</yaml_path>
|
||||||
<services>gnb_cucp</services>
|
<services>gnb_cucp gnb_cuup gnb_du_tdd</services>
|
||||||
</testCase>
|
|
||||||
<testCase id="330102">
|
|
||||||
<class>Deploy_Object</class>
|
|
||||||
<desc>Deploy gNB-CU-UP in a container</desc>
|
|
||||||
<node>ofqot</node>
|
|
||||||
<yaml_path>ci-scripts/yaml_files/sa_e1_b200_gnb</yaml_path>
|
|
||||||
<services>gnb_cuup</services>
|
|
||||||
</testCase>
|
|
||||||
<testCase id="330103">
|
|
||||||
<class>Deploy_Object</class>
|
|
||||||
<desc>Deploy gNB-DU (TDD/Band78/40MHz/B200) in a container</desc>
|
|
||||||
<node>ofqot</node>
|
|
||||||
<yaml_path>ci-scripts/yaml_files/sa_e1_b200_gnb</yaml_path>
|
|
||||||
<services>gnb_du_tdd</services>
|
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="300000">
|
<testCase id="300000">
|
||||||
@@ -132,16 +126,6 @@
|
|||||||
<ping_rttavg_threshold>25</ping_rttavg_threshold>
|
<ping_rttavg_threshold>25</ping_rttavg_threshold>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="370000">
|
|
||||||
<class>Iperf</class>
|
|
||||||
<desc>iperf (DL/80Mbps/UDP)(30 sec)</desc>
|
|
||||||
<iperf_args>-u -b 80M -t 30 -R</iperf_args>
|
|
||||||
<id>idefix</id>
|
|
||||||
<svr_id>sabox-nepes</svr_id>
|
|
||||||
<iperf_packetloss_threshold>10</iperf_packetloss_threshold>
|
|
||||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
|
||||||
</testCase>
|
|
||||||
|
|
||||||
<testCase id="400001">
|
<testCase id="400001">
|
||||||
<class>Custom_Command</class>
|
<class>Custom_Command</class>
|
||||||
<desc>Check UE is on dedicated BWP ID 1</desc>
|
<desc>Check UE is on dedicated BWP ID 1</desc>
|
||||||
@@ -149,19 +133,76 @@
|
|||||||
<command>echo ci get_current_bwp | nc -N 127.0.0.1 9091 | grep 'DL BWP ID 1 (dedicated) UL BWP ID 1 (dedicated)'</command>
|
<command>echo ci get_current_bwp | nc -N 127.0.0.1 9091 | grep 'DL BWP ID 1 (dedicated) UL BWP ID 1 (dedicated)'</command>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="370001">
|
<testCase id="410001">
|
||||||
|
<class>Custom_Command</class>
|
||||||
|
<desc>Switch to dedicated BWP ID 1</desc>
|
||||||
|
<node>ofqot</node>
|
||||||
|
<command>echo ci trigger_bwp_switch 1 | nc -N 127.0.0.1 9091 | grep 'triggered BWP switch to BWP ID 1 for UE'</command>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="400000">
|
||||||
|
<class>Custom_Command</class>
|
||||||
|
<desc>Check UE is on initial BWP ID 0</desc>
|
||||||
|
<node>ofqot</node>
|
||||||
|
<command>echo ci get_current_bwp | nc -N 127.0.0.1 9091 | grep 'DL BWP ID 0 (initial) UL BWP ID 0 (initial)'</command>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="410002">
|
||||||
|
<class>Custom_Command</class>
|
||||||
|
<desc>Switch to dedicated BWP ID 2</desc>
|
||||||
|
<node>ofqot</node>
|
||||||
|
<command>echo ci trigger_bwp_switch 2 | nc -N 127.0.0.1 9091 | grep 'triggered BWP switch to BWP ID 2 for UE'</command>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="370012">
|
||||||
<class>Iperf</class>
|
<class>Iperf</class>
|
||||||
<desc>iperf (UL/8Mbps/UDP)(30 sec)</desc>
|
<desc>iperf (DL/TCP)(10 sec)(single-ue profile)</desc>
|
||||||
<iperf_args>-u -b 8M -t 30</iperf_args>
|
<iperf_args>-t 10 -R</iperf_args>
|
||||||
<id>idefix</id>
|
<id>idefix</id>
|
||||||
<svr_id>sabox-nepes</svr_id>
|
<svr_id>sabox-nepes</svr_id>
|
||||||
<iperf_packetloss_threshold>1</iperf_packetloss_threshold>
|
<iperf_tcp_rate_target>35</iperf_tcp_rate_target>
|
||||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="400002">
|
||||||
|
<class>Custom_Command</class>
|
||||||
|
<desc>Check UE is on dedicated BWP ID 2</desc>
|
||||||
|
<node>ofqot</node>
|
||||||
|
<command>echo ci get_current_bwp | nc -N 127.0.0.1 9091 | grep 'DL BWP ID 2 (dedicated) UL BWP ID 2 (dedicated)'</command>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="410003">
|
||||||
|
<class>Custom_Command</class>
|
||||||
|
<desc>Switch to dedicated BWP ID 3</desc>
|
||||||
|
<node>ofqot</node>
|
||||||
|
<command>echo ci trigger_bwp_switch 3 | nc -N 127.0.0.1 9091 | grep 'triggered BWP switch to BWP ID 3 for UE'</command>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="370013">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (DL/TCP)(10 sec)(single-ue profile)</desc>
|
||||||
|
<iperf_args>-t 10 -R</iperf_args>
|
||||||
|
<id>idefix</id>
|
||||||
|
<svr_id>sabox-nepes</svr_id>
|
||||||
|
<iperf_tcp_rate_target>85</iperf_tcp_rate_target>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="400003">
|
||||||
|
<class>Custom_Command</class>
|
||||||
|
<desc>Check UE is on dedicated BWP ID 3</desc>
|
||||||
|
<node>ofqot</node>
|
||||||
|
<command>echo ci get_current_bwp | nc -N 127.0.0.1 9091 | grep 'DL BWP ID 3 (dedicated) UL BWP ID 3 (dedicated)'</command>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="410000">
|
||||||
|
<class>Custom_Command</class>
|
||||||
|
<desc>Switch to initial BWP ID 0</desc>
|
||||||
|
<node>ofqot</node>
|
||||||
|
<command>echo ci trigger_bwp_switch 0 | nc -N 127.0.0.1 9091 | grep 'triggered BWP switch to BWP ID 0 for UE'</command>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="370002">
|
<testCase id="370002">
|
||||||
<class>Iperf</class>
|
<class>Iperf</class>
|
||||||
<desc>iperf (BIDIR TCP)(10 sec)(single-ue profile)</desc>
|
<desc>iperf (BIDIR TCP)(20 sec)(single-ue profile)</desc>
|
||||||
<iperf_args>-t 20 --bidir</iperf_args>
|
<iperf_args>-t 20 --bidir</iperf_args>
|
||||||
<id>idefix</id>
|
<id>idefix</id>
|
||||||
<svr_id>sabox-nepes</svr_id>
|
<svr_id>sabox-nepes</svr_id>
|
||||||
@@ -169,17 +210,17 @@
|
|||||||
|
|
||||||
<testCase id="370003">
|
<testCase id="370003">
|
||||||
<class>Iperf</class>
|
<class>Iperf</class>
|
||||||
<desc>iperf (DL/TCP)(30 sec)(single-ue profile)</desc>
|
<desc>iperf (DL/TCP)(20 sec)(single-ue profile)</desc>
|
||||||
<iperf_args>-t 30 -R</iperf_args>
|
<iperf_args>-t 20 -R</iperf_args>
|
||||||
<id>idefix</id>
|
<id>idefix</id>
|
||||||
<svr_id>sabox-nepes</svr_id>
|
<svr_id>sabox-nepes</svr_id>
|
||||||
<iperf_tcp_rate_target>30</iperf_tcp_rate_target>
|
<iperf_tcp_rate_target>140</iperf_tcp_rate_target>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="370004">
|
<testCase id="370004">
|
||||||
<class>Iperf</class>
|
<class>Iperf</class>
|
||||||
<desc>iperf (UL/TCP)(30 sec)(single-ue profile)</desc>
|
<desc>iperf (UL/TCP)(20 sec)(single-ue profile)</desc>
|
||||||
<iperf_args>-t 30</iperf_args>
|
<iperf_args>-t 20</iperf_args>
|
||||||
<id>idefix</id>
|
<id>idefix</id>
|
||||||
<svr_id>sabox-nepes</svr_id>
|
<svr_id>sabox-nepes</svr_id>
|
||||||
<iperf_tcp_rate_target>15</iperf_tcp_rate_target>
|
<iperf_tcp_rate_target>15</iperf_tcp_rate_target>
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
#include "openair2/LAYER2/nr_rlc/nr_rlc_ue_manager.h"
|
#include "openair2/LAYER2/nr_rlc/nr_rlc_ue_manager.h"
|
||||||
#include "openair2/LAYER2/nr_rlc/nr_rlc_entity_am.h"
|
#include "openair2/LAYER2/nr_rlc/nr_rlc_entity_am.h"
|
||||||
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
|
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||||
|
#include "openair2/LAYER2/NR_MAC_gNB/mac_config.h"
|
||||||
#include "openair2/RRC/NR/rrc_gNB_mobility.h"
|
#include "openair2/RRC/NR/rrc_gNB_mobility.h"
|
||||||
#include "openair3/NGAP/ngap_gNB_ue_context.h"
|
#include "openair3/NGAP/ngap_gNB_ue_context.h"
|
||||||
|
|
||||||
@@ -276,6 +277,8 @@ static int get_current_bwp(char *buf, int debug, telnet_printfunc_t prnt)
|
|||||||
if (rnti < 0)
|
if (rnti < 0)
|
||||||
ERROR_MSG_RET("could not identify UE (no UE, no such RNTI, or multiple UEs)\n");
|
ERROR_MSG_RET("could not identify UE (no UE, no such RNTI, or multiple UEs)\n");
|
||||||
NR_UE_info_t *UE = find_nr_UE(&RC.nrmac[0]->UE_info, rnti);
|
NR_UE_info_t *UE = find_nr_UE(&RC.nrmac[0]->UE_info, rnti);
|
||||||
|
if (!UE)
|
||||||
|
ERROR_MSG_RET("could not find UE with RNTI %04x\n", rnti);
|
||||||
int dl_bwp = UE->current_DL_BWP.bwp_id;
|
int dl_bwp = UE->current_DL_BWP.bwp_id;
|
||||||
const char *dl_bwp_text = dl_bwp > 0 ? "dedicated" : "initial";
|
const char *dl_bwp_text = dl_bwp > 0 ? "dedicated" : "initial";
|
||||||
int ul_bwp = UE->current_UL_BWP.bwp_id;
|
int ul_bwp = UE->current_UL_BWP.bwp_id;
|
||||||
@@ -365,6 +368,24 @@ static int trigger_ngap_pdu_session_release(char *buf, int debug, telnet_printfu
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int trigger_bwp_switch(char *buf, int debug, telnet_printfunc_t prnt)
|
||||||
|
{
|
||||||
|
char *sbwpId = strtok(buf, " ");
|
||||||
|
int bwpId = atoi(sbwpId);
|
||||||
|
char *srnti = strtok(NULL, " ");
|
||||||
|
prnt("bwpId %d rnti %s\n", bwpId, srnti);
|
||||||
|
int rnti = fetch_rnti(srnti, prnt);
|
||||||
|
if (rnti < 0)
|
||||||
|
ERROR_MSG_RET("could not identify UE (no UE, no such RNTI, or multiple UEs)\n");
|
||||||
|
if (!nr_trigger_bwp_switch(rnti, bwpId)) {
|
||||||
|
prnt("failed trigger BWP switch for UE %04x BWP ID %d\n", rnti, bwpId);
|
||||||
|
return -1;
|
||||||
|
} else {
|
||||||
|
prnt("triggered BWP switch to BWP ID %d for UE %04x\n", bwpId, rnti);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static telnetshell_cmddef_t cicmds[] = {
|
static telnetshell_cmddef_t cicmds[] = {
|
||||||
{"get_single_rnti", "", get_single_rnti},
|
{"get_single_rnti", "", get_single_rnti},
|
||||||
{"force_reestab", "[rnti(hex,opt)]", trigger_reestab},
|
{"force_reestab", "[rnti(hex,opt)]", trigger_reestab},
|
||||||
@@ -374,6 +395,7 @@ static telnetshell_cmddef_t cicmds[] = {
|
|||||||
{"trigger_f1_ho", "[rrc_ue_id(int,opt)]", rrc_gNB_trigger_f1_ho},
|
{"trigger_f1_ho", "[rrc_ue_id(int,opt)]", rrc_gNB_trigger_f1_ho},
|
||||||
{"fetch_du_by_ue_id", "[rrc_ue_id(int,opt)]", fetch_du_by_ue_id},
|
{"fetch_du_by_ue_id", "[rrc_ue_id(int,opt)]", fetch_du_by_ue_id},
|
||||||
{"get_current_bwp", "[rnti(hex,opt)]", get_current_bwp},
|
{"get_current_bwp", "[rnti(hex,opt)]", get_current_bwp},
|
||||||
|
{"trigger_bwp_switch", "newBWPId [rnti(hex,opt)]", trigger_bwp_switch},
|
||||||
{"trigger_n2_ho", "[neighbour_pci(uint32_t),ueId(uint32_t)]", rrc_gNB_trigger_n2_ho},
|
{"trigger_n2_ho", "[neighbour_pci(uint32_t),ueId(uint32_t)]", rrc_gNB_trigger_n2_ho},
|
||||||
{"pdu_session_release", "[gNB_ue_ngap_id(int,opt)]", trigger_ngap_pdu_session_release},
|
{"pdu_session_release", "[gNB_ue_ngap_id(int,opt)]", trigger_ngap_pdu_session_release},
|
||||||
{"", "", NULL},
|
{"", "", NULL},
|
||||||
|
|||||||
Reference in New Issue
Block a user