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