Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 1 | {{/* |
| 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 | */}} |
Hyunsun Moon | a24d3f9 | 2019-06-19 03:04:58 -0500 | [diff] [blame] | 17 | --- |
| 18 | apiVersion: v1 |
| 19 | kind: ConfigMap |
| 20 | metadata: |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 21 | name: spgwu |
| 22 | labels: |
Hyunsun Moon | 7a007bb | 2019-08-19 16:41:36 -0600 | [diff] [blame] | 23 | {{ tuple "spgwu" . | include "omec-data-plane.metadata_labels" | indent 4 }} |
Hyunsun Moon | a24d3f9 | 2019-06-19 03:04:58 -0500 | [diff] [blame] | 24 | data: |
| 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 Moon | 7a007bb | 2019-08-19 16:41:36 -0600 | [diff] [blame] | 50 | cp_comm_port = CP_PORT |
| 51 | {{- if not .Values.config.sriov.enabled }} |
Hyunsun Moon | a24d3f9 | 2019-06-19 03:04:58 -0500 | [diff] [blame] | 52 | setup-af-iface.sh: | |
Hyunsun Moon | 7a007bb | 2019-08-19 16:41:36 -0600 | [diff] [blame] | 53 | {{ tuple "bin/_spgwu-setup-af-iface.sh.tpl" . | include "omec-data-plane.template" | indent 4 }} |
Hyunsun Moon | a24d3f9 | 2019-06-19 03:04:58 -0500 | [diff] [blame] | 54 | {{- end }} |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 55 | run.sh: | |
Hyunsun Moon | 7a007bb | 2019-08-19 16:41:36 -0600 | [diff] [blame] | 56 | {{ tuple "bin/_spgwu-run.sh.tpl" . | include "omec-data-plane.template" | indent 4 }} |