2. Temporary solution: Change the core assignment in both source code and test case configuration files to explicitly bind any thread to the core specified from configuration file.
3. Provide a automation script to assign VF devices/core IDs/test case ID/others to sample-app configuration file and run test cases.
Change-Id: I58c33e5aa5cc31979f396fd69ee680b496516e53
Signed-off-by: Peng Cao <peng.cao@intel.com>
# See the License for the specific language governing permissions and #
# limitations under the License. #
################################################################################
-FROM nexus3.o-ran-sc.org:10004/bldr-ubuntu16-c-go:2-u16.04-nng as ubuntu
+FROM centos:centos7.7.1908 AS builder
+
+ENV https_proxy $https_proxy
+ENV http_proxy $http_proxy
+ENV no_proxy $no_proxy
+
+ARG icc_license_file
WORKDIR /opt/o-du/phy
-COPY . .
+ENV BUILD_DIR /opt/o-du/phy
+ENV XRAN_DIR $BUILD_DIR/fhi_lib
-ENV XRAN_DIR /opt/o-du/phy/fhi_lib
-ENV BUILD_GCC 1
+###Install required libs
+RUN yum update -y && \
+ yum install -y libhugetlbfs-utils libhugetlbfs-devel libhugetlbfs numactl-devel ethtool gcc make module-init-tools kmod patch xz iproute pciutils python vim cmake unzip nano mc iputils-ping libaio libaio-devel net-tools wget zip
-RUN apt-get update &&\
- apt-get install -y wget libnuma-dev linux-headers-generic libgtest-dev
-# because we run in VM which may be linuxkit kernel. Faking for "regular" kernel
-RUN cp -r /lib/modules/$(ls -1 /lib/modules | head -1) /lib/modules/$(uname -r)
+###Install some libs to compile DPDK
+RUN yum groupinstall -y "Development Tools"
+RUN yum install -y ncurses-devel hmaccalc zlib-devel binutils-devel elfutils-libelf-devel bc libstdc++-4.8.5-28.el7_5.1.x86_64 gcc-c++ libstdc++-devel-4.8.5-28.el7_5.1.x86_64 autoconf-2.69-11.el7.noarch
+###googletest is required for XRAN unittests build and run
RUN wget https://github.com/google/googletest/archive/v1.8.x.zip && \
- unzip v1.8.x.zip
-ENV GTEST_ROOT /opt/o-du/phy/googletest-1.8.x
+ cd /opt && unzip $BUILD_DIR/v1.8.x.zip
+ENV GTEST_ROOT /opt/googletest-1.8.x/googletest
+ENV GTEST_DIR /opt/googletest-1.8.x/googletest
+RUN cd $GTEST_DIR && \
+ g++ -isystem ${GTEST_DIR}/include -I${GTEST_DIR} -pthread -c ${GTEST_DIR}/src/gtest-all.cc && \
+ ar -rv libgtest.a gtest-all.o
+
+
+###Before install ISS, please go to Intel site to get a free license: https://software.intel.com/en-us/system-studio/choose-download
+COPY $icc_license_file $BUILD_DIR/license.lic
+
+####Download Intel System Studio from Intel website and install ICC
+RUN wget https://registrationcenter-download.intel.com/akdlm/irc_nas/16242/system_studio_2020_ultimate_edition_offline.tar.gz && \
+ cd /opt && mkdir intel && cp $BUILD_DIR/license.lic intel/license.lic && \
+ tar -zxvf $BUILD_DIR/system_studio_2020_ultimate_edition_offline.tar.gz && \
+ cd system_studio_2020_ultimate_edition_offline/ && \
+ sed -i "s/ACCEPT_EULA.*/ACCEPT_EULA=accept/" silent.cfg && \
+ sed -i "s/PSET_INSTALL_DIR.*/PSET_INSTALL_DIR=\/opt\/intel/" silent.cfg && \
+ sed -i "s/.*ACTIVATION_LICENSE_FILE.*/ACTIVATION_LICENSE_FILE=\/opt\/intel\/license.lic/" silent.cfg && \
+ sed -i "s/ACTIVATION_TYPE.*/ACTIVATION_TYPE=license_file/" silent.cfg && \
+ ./install.sh -s silent.cfg
+
+###Set env for ICC
+RUN source /opt/intel/system_studio_2020/bin/iccvars.sh intel64
+ENV PATH /opt/intel/system_studio_2020/bin/:$PATH
-ENV RTE_TARGET x86_64-native-linuxapp-gcc
+####Download and build DPDK
+ENV RTE_TARGET x86_64-native-linuxapp-icc
ENV RTE_SDK /opt/o-du/dpdk-18.08
-RUN wget http://fast.dpdk.org/rel/dpdk-18.08.1.tar.xz && \
- tar -xf dpdk-18.08.1.tar.xz && \
- mv dpdk-stable-18.08.1 $RTE_SDK && \
+RUN wget http://fast.dpdk.org/rel/dpdk-18.08.tar.xz && \
+ tar -xf dpdk-18.08.tar.xz && \
+ mv dpdk-18.08 $RTE_SDK && \
cd $RTE_SDK && \
- make install T="$RTE_TARGET"
+ make config T=$RTE_TARGET O=$RTE_TARGET && \
+ cd $RTE_SDK/$RTE_TARGET && \
+ sed -i "s/CONFIG_RTE_EAL_IGB_UIO=y/CONFIG_RTE_EAL_IGB_UIO=n/" .config && \
+ sed -i "s/CONFIG_RTE_KNI_KMOD=y/CONFIG_RTE_KNI_KMOD=n/" .config && \
+ make
+
+####Install octave. Issue when downloading octave. And the octave will take 500MB space.
+RUN yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -y && \
+ yum install octave -y
+
+###Copy XRAN source code into docker image
+COPY fhi_lib $BUILD_DIR/fhi_lib
+COPY misc $BUILD_DIR/misc
+
+####Build XRAN lib, unittests, sample app
+RUN cd $BUILD_DIR/fhi_lib/ && ./build.sh xclean && ./build.sh && cd app && octave gen_test.m
+
+####Unset network proxy
+RUN unset http_proxy https_prox ftp_proxy no_proxy
+
+FROM centos:centos7.7.1908
+ENV TARGET_DIR /opt/o-du/phy
+COPY --from=builder /opt/o-du/phy/fhi_lib $TARGET_DIR/fhi_lib
+COPY --from=builder /opt/o-du/phy/misc $TARGET_DIR/misc
+COPY --from=builder /usr/lib64/libnuma* /usr/lib64/
+ENV XRAN_DIR $TARGET_DIR/fhi_lib
+WORKDIR $TARGET_DIR/fhi_lib
+
+LABEL description="ORAN Fronthaul Sample Application"
-RUN cd fhi_lib/lib && \
- bash ./build_ci.sh
#include "debug.h"\r
\r
#include <rte_ethdev.h>\r
+#include <inttypes.h>\r
\r
#define MAX_LINE_SIZE 512\r
/* Configuration file maximum supported line length */\r
\r
#define KEY_MTU_SIZE "MTUSize"\r
#define KEY_IO_CORE "ioCore"\r
+#define KEY_SYSTEM_CORE "systemCore"\r
+#define KEY_PKT_PROC_CORE "pktProcCore"\r
+#define KEY_PKT_AUX_CORE "pktAuxCore"\r
+#define KEY_TIMING_CORE "timingCore"\r
+\r
#define KEY_INSTANCE_ID "instanceId"\r
\r
#define KEY_LLS_CU_MAC "llsCUMac"\r
} else if (strcmp(key, KEY_IO_CORE) == 0) {\r
config->io_core = atoi(value);\r
printf("io_core %d\n", config->io_core);\r
+ } else if (strcmp(key, KEY_SYSTEM_CORE) == 0) {\r
+ config->system_core = atoi(value);\r
+ printf("system_core -c %" PRIx64 "\n", config->system_core);\r
+ } else if (strcmp(key, KEY_PKT_PROC_CORE) == 0) {\r
+ config->pkt_proc_core = atoi(value);\r
+ printf("pkt_proc_core -c %" PRIx64 "\n", config->pkt_proc_core);\r
+ } else if (strcmp(key, KEY_PKT_AUX_CORE) == 0) {\r
+ config->pkt_aux_core = atoi(value);\r
+ printf("pkt_aux_core -c %" PRIx64 "\n", config->pkt_aux_core);\r
+ } else if (strcmp(key, KEY_TIMING_CORE) == 0) {\r
+ config->timing_core = atoi(value);\r
+ printf("timing_core -c %" PRIx64 "\n", config->timing_core);\r
}else if (strcmp(key, KEY_INSTANCE_ID) == 0) {\r
config->instance_id = atoi(value);\r
printf("instance_id %d\n", config->instance_id);\r
\r
uint32_t instance_id; /**< Instance ID of application */\r
uint32_t io_core; /**< Core used for IO */\r
-\r
+ uint64_t system_core; /* <system core ID> */\r
+ uint64_t pkt_proc_core;\r
+ uint64_t pkt_aux_core;\r
+ uint64_t timing_core;\r
+ \r
uint32_t mtu; /**< maximum transmission unit (MTU) is the size of the largest protocol data unit (PDU) that can be communicated in a single\r
xRAN network layer transaction. supported 1500 bytes and 9600 bytes (Jumbo Frame) */\r
int numSlots; /**< number of slots in IQ vector */\r
#include <sys/stat.h>\r
#include <unistd.h>\r
\r
-\r
#include "common.h"\r
#include "config.h"\r
#include "xran_mlog_lnx.h"\r
printf("set O-DU\n");\r
xranInit.io_cfg.id = 0;/* O-DU */\r
xranInit.io_cfg.core = startupConfiguration.io_core;\r
- xranInit.io_cfg.system_core = 0;\r
- xranInit.io_cfg.pkt_proc_core = startupConfiguration.io_core+1;\r
- xranInit.io_cfg.pkt_aux_core = 0; /* do not start*/\r
- xranInit.io_cfg.timing_core = startupConfiguration.io_core+2;\r
+ xranInit.io_cfg.system_core = startupConfiguration.system_core;\r
+ xranInit.io_cfg.pkt_proc_core = startupConfiguration.pkt_proc_core;\r
+ xranInit.io_cfg.pkt_aux_core = startupConfiguration.pkt_aux_core; /* do not start*/\r
+ xranInit.io_cfg.timing_core = startupConfiguration.timing_core;\r
} else {\r
printf("set O-RU\n");\r
xranInit.io_cfg.id = 1; /* O-RU*/\r
xranInit.io_cfg.core = startupConfiguration.io_core;\r
- xranInit.io_cfg.system_core = 0;\r
- xranInit.io_cfg.pkt_proc_core = startupConfiguration.io_core+1;\r
- xranInit.io_cfg.pkt_aux_core = 0; /* do not start */\r
- xranInit.io_cfg.timing_core = startupConfiguration.io_core+2;\r
+ xranInit.io_cfg.system_core = startupConfiguration.system_core;\r
+ xranInit.io_cfg.pkt_proc_core = startupConfiguration.pkt_proc_core;\r
+ xranInit.io_cfg.pkt_aux_core = startupConfiguration.pkt_aux_core; /* do not start*/\r
+ xranInit.io_cfg.timing_core = startupConfiguration.timing_core;\r
}\r
\r
+ cpu_set_t cpuset;\r
+ pthread_t thread;\r
+\r
+ thread = pthread_self();\r
+ CPU_ZERO(&cpuset);\r
+ CPU_SET(xranInit.io_cfg.system_core,&cpuset);\r
+ pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\r
+/* if (s != 0)\r
+ handle_error_en(s, "pthread_setaffinity_np");\r
+*/\r
+\r
xranInit.io_cfg.bbdev_mode = XRAN_BBDEV_NOT_USED;\r
\r
if(startupConfiguration.xranCat == XRAN_CATEGORY_A){\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=25\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of O-DU VF\r
ruMac=00:11:22:33:44:55 # O-RU VF for O-RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of lls-CU VF\r
ruMac=00:11:22:33:44:55 #RU VF for RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=10\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of lls-CU VF\r
ruMac=00:11:22:33:44:55 #RU VF for RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
\r
llsCUMac=00:11:22:33:44:66 # asigned MAC of lls-CU VF\r
ruMac=00:11:22:33:44:55 #RU VF for RU app\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=1\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
\r
llsCUMac=00:11:22:33:44:66 # asigned MAC of lls-CU VF\r
#llsCUMac=3c:fd:fe:a8:e0:70 #lls-CU PF for tcpdump\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of lls-CU VF\r
ruMac=00:11:22:33:44:55 #RU VF for RU app\r
numSlots=40 #number of slots per IQ files\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=10\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of lls-CU VF\r
#llsCUMac=3c:fd:fe:a8:e0:70\r
ruMac=00:11:22:33:44:55 #RU VF for RU app\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of lls-CU VF\r
ruMac=00:11:22:33:44:55 #RU VF for RU app\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=10\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of lls-CU VF\r
ruMac=00:11:22:33:44:55 #RU VF for RU app\r
numSlots=40 #number of slots per IQ files\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of lls-CU VF\r
ruMac=00:11:22:33:44:55 # RU VF for RU app\r
#ruMac=3c:fd:fe:9e:93:68 #RU PF for tcpdump\r
nebyteorderswap=1 #do swap of byte order for each I and Q from CPU byte order to network byte order\r
\r
##Debug\r
-debugStop=0 #stop app on 1pps boundary (gps_second % 30)\r
+debugStop=1 #stop app on 1pps boundary (gps_second % 30)\r
debugStopCount=0 #if this value is >0 then stop app after x transmission packets, otherwise app will stop at 1pps boundary\r
bbdevMode=-1 #bbdev mode, -1 = not use bbdev, 0: use software mode, 1: use hardware mode\r
\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=10\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of lls-CU VF\r
#llsCUMac=3c:fd:fe:a8:e0:70\r
ruMac=00:11:22:33:44:55 # RU VF for RU app\r
nebyteorderswap=1 #do swap of byte order for each I and Q from CPU byte order to network byte order\r
\r
##Debug\r
-debugStop=0 #stop app on 1pps boundary (gps_second % 30)\r
+debugStop=1 #stop app on 1pps boundary (gps_second % 30)\r
debugStopCount=0 #if this value is >0 then stop app after x transmission packets, otherwise app will stop at 1pps boundary\r
bbdevMode=-1 #bbdev mode, -1 = not use bbdev, 0: use software mode, 1: use hardware mode\r
\r
-CPenable=1 #(1) C-Plane is enabled| (0) C-Plane is disabled\r
+CPenable=0 #(1) C-Plane is enabled| (0) C-Plane is disabled\r
\r
##O-RU Settings\r
Tadv_cp_dl=25 # in us\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=5\r
+ioCore=5
+systemCore=5
+pktProcCore=5
+pktAuxCore=5
+timingCore=6
llsCUMac=00:11:22:33:44:66 # asigned MAC of lls-CU VF\r
ruMac=00:11:22:33:44:55 # RU VF for RU app\r
#ruMac=3c:fd:fe:9e:93:68 #RU PF for tcpdump\r
Gps_Alpha=0 #alpha and beta value as in section 9.7.2 of ORAN spec\r
Gps_Beta=0\r
\r
-ioCore=10\r
+ioCore=10
+systemCore=10
+pktProcCore=10
+pktAuxCore=10
+timingCore=11
llsCUMac=00:11:22:33:44:66 # asigned MAC of lls-CU VF\r
#llsCUMac=3c:fd:fe:a8:e0:70\r
ruMac=00:11:22:33:44:55 # RU VF for RU app\r
struct xran_io_loop_cfg *p_io_cfg = (struct xran_io_loop_cfg *)&p_xran_fh_init->io_cfg;\r
struct xran_device_ctx * p_xran_dev_ctx = xran_dev_get_ctx();\r
\r
- int32_t lcore_id = 0;\r
+ cpu_set_t system_cpuset;\r
+ pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &system_cpuset);\r
+ for (j = 0; j < CPU_SETSIZE; j++)\r
+ if (CPU_ISSET(j, &system_cpuset))\r
+ break;\r
+\r
+ int32_t lcore_id = j;\r
+\r
char filename[64];\r
int64_t offset_sec, offset_nsec;\r
\r
--- /dev/null
+#!/bin/bash
+
+###############################################################################
+#
+# Copyright (c) 2019 Intel.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+################################################################################
+
+sudo docker build \
+ --build-arg http_proxy=$http_proxy \
+ --build-arg https_proxy=$https_proxy \
+ --build-arg no_proxy=$no_proxy \
+ --build-arg icc_license_file=$icc_license_file \
+ -t o-du-app:1.0 .
+
--- /dev/null
+#!/bin/bash
+
+
+###Check environment K8S_SRIOV_DP (0 or 1, default 0), K8S_CPU_MANAGER (0 or 1, default 0), XRAN_DIR before running this script
+
+###Parameters:
+
+###$1 - used to specify sriov net devices to run XRAN sample app.
+###The input will be different depending on k8s sriov device plugin enabled or not.
+###If k8s sriov net device plugin is enabled, container will request integral sriov VF devices ($1) from k8s,
+###which is specified in the pod configuration file like - intel.com/intel_sriov_dpdk: "2".
+###Then the input of this parameter would be number like 2, or 4.
+###Else this parameter $1 will be sriov net devices PCIe address list like "18:02.0 18:02.1"
+
+###$2 - Test case index. Like "mu3_100mhz"
+
+###$3 - "du" or "ru"
+
+###$4 - Instance/wls ID. Like "1", "2", or "3".
+
+###$5 - Used to assign core affinity to different threads of XRAN sample app.
+###If this parameter input is "0", k8s CPU Manager is enabled, and this script will get core mapping from the container taskset affinity,
+###which is assigned by the CPU Manager.
+###Else this parameter input should be taskset core mask assigned by user (in Hex format, but removing 0x in the head), like "0000f0"
+
+cd $XRAN_DIR
+
+#########Assigned PCIe VF for container
+vf_num=$1
+#########Test Case index
+case_index=$2
+########du or ru?
+mode_du_ru=$3
+########instance/wls ID
+wls_id=$4
+########taskset core mask
+taskset_str=$5
+
+###########Get SRIOV VF PCI addresses if K8S_SRIOV_DP enabled or not
+array_pci_list=""
+if [ $K8S_SRIOV_DP ]; then
+ env_pci_list=$(env | grep -i PCIDEVICE | grep -i DPDK | awk -F= '{print $2}')
+
+ let i=1
+ while [ $i -le $vf_num ]
+ do
+ addr=$(echo $env_pci_list | awk -F, '{print $'$i'}')
+ array_pci_list="$array_pci_list $addr"
+ let i++
+ done
+else
+ array_pci_list=$vf_number
+fi
+
+#####Specify which test case to run and the VF number
+sed -i "s/\.\/build\/sample-app .*/\.\/build\/sample-app \.\/usecase\/$case_index\/config_file_o_${mode_du_ru}.dat $array_pci_list/" $XRAN_DIR/app/run_o_${mode_du_ru}.sh
+
+####Update some parameters for test case
+sed -i "s/debugStop=.*/debugStop=0/" app/usecase/${case_index}/config_file_o_${mode_du_ru}.dat
+sed -i "s/CPenable=.*/CPenable=1/" app/usecase/${case_index}/config_file_o_${mode_du_ru}.dat
+sed -i "s/instanceId=.*/instanceId=${wls_id}/" app/usecase/${case_index}/config_file_o_${mode_du_ru}.dat
+
+####Get core ID from core mask
+if [ $K8S_CPU_MANAGER ]; then
+ taskset_str=$(echo $(taskset -p 1) | sed 's/.*affinity mask: \(.*\)/\1/')
+fi
+let core_map="0x$taskset_str"
+let core_mask=1
+let first_core_mask=$((core_map & core_mask))
+let first_core_num=0
+
+
+#####Get first core ID for system thread
+let max_cpu=64
+while [ $first_core_mask -eq 0 ]
+do
+ if [ $max_cpu -eq 0 ]; then
+ echo "ERROR: provided core mask is wrong in your system. Please check."
+ fi
+ core_mask=$(($core_mask+$core_mask))
+ first_core_num=$(($first_core_num+1))
+ echo core_mask $core_mask
+ echo first_core_num $first_core_num
+ first_core_mask=$((core_map & core_mask))
+ echo first_core_mask=$first_core_mask
+ max_cpu=$(($max_cpu-1))
+done
+
+system_core_num=$first_core_num
+
+core_map=$(($core_map-$core_mask))
+if [ $core_map -eq 0 ]
+then
+ echo "ERROR: require at least two cores for O-DU/RU sample app"
+ exit
+fi
+
+#####Get the second core ID for timing thread
+first_core_mask=0
+while [ $first_core_mask -eq 0 ]
+do
+ if [ $max_cpu -eq 0 ]; then
+ echo "ERROR: provided core mask is wrong in your system. Please check."
+ fi
+
+ core_mask=$(($core_mask+$core_mask))
+ first_core_num=$(($first_core_num+1))
+ echo core_mask $core_mask
+ echo first_core_num $first_core_num
+ first_core_mask=$((core_map & core_mask))
+ echo first_core_mask=$first_core_mask
+ max_cpu=$(($max_cpu-1))
+done
+
+timing_core_num=$first_core_num
+####Currently only use 2 cores to run O-DU/RU sample app
+sed -i "s/ioCore.*/ioCore=${system_core_num}/" app/usecase/${case_index}/config_file_o_${mode_du_ru}.dat
+sed -i "s/pktAuxCore.*/pktAuxCore=${system_core_num}/" app/usecase/${case_index}/config_file_o_${mode_du_ru}.dat
+sed -i "s/pktProcCore.*/pktProcCore=${system_core_num}/" app/usecase/${case_index}/config_file_o_${mode_du_ru}.dat
+sed -i "s/systemCore.*/systemCore=${system_core_num}/" app/usecase/${case_index}/config_file_o_${mode_du_ru}.dat
+sed -i "s/timingCore.*/timingCore=${timing_core_num}/" app/usecase/${case_index}/config_file_o_${mode_du_ru}.dat
+
+cd app
+sh run_o_${mode_du_ru}.sh
+