blob: 895bf6c59e8d17ef14a08b8089f681817f265aaf [file] [log] [blame]
Hyunsun Moona24d3f92019-06-19 03:04:58 -05001---
2# Copyright 2019-present Open Networking Foundation
3# Copyright 2019 Intel Corporation
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16---
17apiVersion: v1
18kind: ConfigMap
19metadata:
20 name: {{ .Values.spgwu.name }}
21data:
22 dp_config.cfg: |
23 if [ ! -d "/dev/hugepages" ]; then
24 MEMORY="--no-huge -m $((MEM_LIMIT-1024))"
25 fi
26
27 CORES="-c $(taskset -p $$ | awk '{print $NF}')"
28 EAL_ARGS="${CORES} ${MEMORY} ${DEVICES}"
29
30 SPGW_CFG="--spgw_cfg 03"
31 S1U_IP=$(ip -4 addr show dev ${S1U_DEVNAME} | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
32 SGI_IP=$(ip -4 addr show dev ${SGI_DEVNAME} | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
33 S1U_MAC=$(ip addr show dev ${S1U_DEVNAME} | awk '$1=="link/ether"{print $2}')
34 SGI_MAC=$(ip addr show dev ${SGI_DEVNAME} | awk '$1=="link/ether"{print $2}')
35 S1U="--s1u_ip ${S1U_IP} --s1u_mac ${S1U_MAC} --ul_iface ${S1U_DEVNAME}"
36 SGI="--sgi_ip ${SGI_IP} --sgi_mac ${SGI_MAC} --dl_iface ${SGI_DEVNAME} --sgi_gw_ip ${RTR_SGI_IP} --sgi_mask ${SGI_MASK}"
37 MISC="--log 1"
38 APP_ARGS="${S1U} ${SGI} ${MISC} ${SPGW_CFG}"
39 cdr.cfg: |
40 CDR_PATH=./cdr
41 MASTER_CDR=./cdr/master.csv
42 interface.cfg: |
43 [0]
44 dp_comm_ip = DP_ADDR
45 dp_comm_port = 20
46 cp_comm_ip = CP_ADDR
47 cp_comm_port = 21
48{{- if not .Values.network.sriov.enabled }}
49 setup-af-iface.sh: |
50{{ tuple "bin/_spgwu-setup-af-iface.sh.tpl" . | include "mcord-services.template" | indent 4 }}
51{{- end }}
52 launch.sh: |
53{{ tuple "bin/_spgwu-launch.sh.tpl" . | include "mcord-services.template" | indent 4 }}