Skip to content
Snippets Groups Projects
Commit c07b4631 authored by Husaam Mehdi's avatar Husaam Mehdi
Browse files

qosmngr: move Device.QoS. from bbfdm to qosmngr and fix pipeline

* no changes done to bbf code, only moved qos.c and qos.h from
  bbfdm to qosmngr, and added as a bbfdm micro service
* fix pipeline
parent 4179d88a
No related branches found
No related tags found
1 merge request!20qosmngr: move Device.QoS. from bbfdm to qosmngr
Pipeline #144167 passed
include:
- project: 'iopsys/gitlab-ci-pipeline'
file: '/static-code-analysis.yml'
ref: '0.28'
ref: '0.31'
stages:
- static_code_analysis
......@@ -11,6 +11,7 @@ stages:
- api_test
variables:
COMMON_IMAGE: "dev.iopsys.eu:5050/iopsys/gitlab-ci-pipeline/code-analysis:0.31"
DEBUG: 'TRUE'
SOURCE_FOLDER: "src"
RUN_CPPCHECK: "cppcheck --enable=all --error-exitcode=1 --suppress=missingInclude --suppress=unusedFunction --suppress=unreadVariable --suppress=variableScope --suppress=redundantInitialization --suppress=unusedLabel --suppress=unusedStructMember --suppress=knownConditionTrueFalse --suppress=unmatchedSuppression --force"
......
......@@ -4,6 +4,7 @@ include common.mk
-include Makefile.diag.inc
QOSMNGR_LIB=libqosmngr.so
PLUGIN = bbf_plugin
GCOV=gcov
SRC_DIR = src
......@@ -22,7 +23,10 @@ PROG_CFLAGS += -Wno-format-nonliteral
.PHONY: all clean
all: version $(PROG)
all: version $(PLUGIN) $(PROG)
$(PLUGIN): $(OBJS)
$(MAKE) -C ./bbf_plugin
$(PROG): $(INCLUDE_DIR)/version.h $(OBJS)
$(CC) $(PROG_LDFLAGS) -o $@ $^ $(PROG_LIBS)
......
LIB_QOS_BBF := libqos_bbf.so
OBJS := qos_bbf.o
LIB_CFLAGS = $(CFLAGS) -Wall -Werror
LIB_LDFLAGS = $(LDFLAGS)
FPIC := -fPIC
.PHONY: all
%.o: %.c
$(CC) $(LIB_CFLAGS) $(FPIC) -c -o $@ $<
all: $(LIB_QOS_BBF)
$(LIB_QOS_BBF): $(OBJS)
$(CC) $(LIB_CFLAGS) $(LIB_LDFLAGS) -shared -o $@ $^
clean:
rm -f *.o $(LIB_QOS_BBF)
This diff is collapsed.
/*
* Copyright (C) 2019 iopsys Software Solutions AB
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 2.1
* as published by the Free Software Foundation
*
* Author: Omar Kallel <omar.kallel@pivasoftware.com>
*/
#ifndef __QOS_H
#define __QOS_H
#include "libbbfdm-api/dmcommon.h"
extern DMOBJ tQoSObj[];
extern DMLEAF tQoSParams[];
extern DMLEAF tQoSClassificationParams[];
extern DMLEAF tQoSAppParams[];
extern DMLEAF tQoSFlowParams[];
extern DMLEAF tQoSPolicerParams[];
extern DMLEAF tQoSQueueParams[];
extern DMLEAF tQoSQueueStatsParams[];
extern DMLEAF tQoSShaperParams[];
#endif //__QOS_H
......@@ -16,6 +16,21 @@ function exec_cmd()
fi
}
function install_bbfdm()
{
[ -d "/opt/dev/bbfdm" ] && rm -rf /opt/dev/bbfdm
if [ -n "${BBFDM_BRANCH}" ]; then
exec_cmd git clone -b ${BBFDM_BRANCH} https://dev.iopsys.eu/bbf/bbfdm.git /opt/dev/bbfdm
else
exec_cmd git clone https://dev.iopsys.eu/bbf/bbfdm.git /opt/dev/bbfdm
fi
cd /opt/dev/bbfdm
./gitlab-ci/install-dependencies.sh install
./gitlab-ci/setup.sh install
}
# libeasy
cd /opt/dev
rm -fr libeasy
......@@ -24,7 +39,7 @@ exec_cmd git clone -b devel https://dev.iopsys.eu/hal/libeasy.git
cd libeasy
exec_cmd make CFLAGS+="-I/usr/include/libnl3"
exec_cmd cp -a libeasy*.so* /usr/lib
exec_cmd cp -a easy.h event.h utils.h if_utils.h debug.h hlist.h /usr/include/easy/
exec_cmd cp -a easy.h event.h utils.h if_utils.h debug.h hlist.h bufutil.h cryptutil.h ecc_cryptutil.h timestamp.h /usr/include/easy/
# libqos
cd /opt/dev
......@@ -35,3 +50,6 @@ make PLATFORM=TEST
cp include/qos.h /usr/include
cp -a libqos.so* /usr/lib
sudo ldconfig
# bbfdm
install_bbfdm
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment