apiVersion: v1
kind: ConfigMap
metadata:
  name: upf-config
  namespace: upf
data:
  smu_config: |
        [debug]
        # debug_level can be set as "ALL" or "MUST|ERR|RUNNING|DEBUG"
        # debug_type can be set as "ALL" or specify module type
        # example:
        # debug_level = MUST|ERR|RUNNING|DEBUG|PERIOD
        # debug_type = CM|CLI|RDB|ROS|ROS_TIMER|ROS_EVENT|ROS_TASK|ROS_LOCK|SERVER|SESSION|FASTPASS|COMM|COMM_NIC
        debug_level=MUST|ERR
        debug_type = ALL
        log_path = /var/log/upf_smu.log
        
        [service]
        ; Maximum number of nodes that can be associated
        node_num=32
        ; Maximum number of sessions that can be created
        session_num=1000
        ; Maximum number of PFDs that can be created
        pfd_number = 10000
        ; Maximum number of fast forwarding rules that FPU can create
        fast_number=100000
        
        ; The interface between RAN(gNB) and UPF
        n3_ip_v4=10.8.124.197
        n3_ip_v6=2000:2::1113:abcc
        
        ;Interface between DN and UPF
        n6_ip_v4=10.8.125.197
        n6_ip_v6=2000:3::1114:abcc
        
        ;I-upf and UPF of PDU session anchor
        n9_ip_v4=10.8.127.197
        n9_ip_v6=2000:4::1119:abcc
        
        ; The N4 interface is not bound with dpdk, so you need to know the network port name to create a raw socket connection
        n4_ethname=net1
        ; Interface between SMF and UPF
        n4_ip_v4=10.8.126.48
        n4_ip_v6=2000:1::1112:abcc
        
        ;;;;;;;;;;;;;;;; Custom configuration  ;;;;;;;;;;;;;
        ;Number of tables for fast processing unknown flows(You don't have to change it)
        orphan_number = 10000
        ;Number of teids that can be allocated(Do not lower than the number of sessions)
        teid_number = 200000
        ;Number of DNS local caches
        dns_num=8000
        ;Number of highly available synchronized data blocks (ignored if highly available is not supported)
        ha_block_num = 10000
        ;The number of buckets in the fastpass table(Don't modify it)
        fast_bucket_number = 65536
        ;Number of blocks(Don't modify it)
        block_number = 65536
        ;Number of cache size(Don't modify it)
        block_size = 2048
        ;Number of cache blocks(Don't modify it)
        cblock_number = 65536
        
        ; rest API listen port
        restful_listen=38080
        
        ; Load-balancer info
        lb_ips = 192.168.199.140
        lb_port = 34434
        
        ; If there is no highly available module, the configuration here will be ignored
        ; high availability channel remote ip and remote port
        ha_ip = 0.0.0.0
        ; When default_master is set to 1, ha_port is the local listening port, otherwise it is the remote port
        ha_port = 34567
        ; If it is set to 1, it will become the primary when there is competition or brain fissure.
        ; Otherwise, it needs to be set to 0. The two SMUs must be set to different values
        default_master = 1
        
        ; Back end management port
        fpu_mgmt_port = 50000
        ; audit_period = 4, 0 <= audit_period <= 23, hour of Day, 4 indicates 4 am
        audit_period = 4
        ; audit_switch = 0 | 1, if = 1 audit enabled, else not enabled
        audit_switch = 1
        
        [UP_features]
        ; up features flag, 1 | 0 == enabled | disable
        ; Downlink Data Buffering in CP function is supported by the UP function.
        BUCP=1
        ; The buffering parameter 'Downlink Data Notification Delay' is supported by the UP function.
        DDND=1
        ; The buffering parameter 'DL Buffering Duration' is supported by the UP function.
        DLBD=1
        ; Traffic Steering is supported by the UP function.
        TRST=1
        ; F-TEID allocation / release in the UP function is supported by the UP function.
        FTUP=0
        ; The PFD Management procedure is supported by the UP function.
        PFDM=0
        ; Header Enrichment of Uplink traffic is supported by the UP function.
        HEEU=1
        ; Traffic Redirection Enforcement in the UP function is supported by the UP function.
        TREU=1
        ; Sending of End Marker packets supported by the UP function.
        EMPU=1
        ; Support of PDI optimised signalling in UP function.
        PDIU=1
        ; Support of UL/DL Buffering Control
        UDBC=1
        ; The UP function supports being provisioned with the Quota Action to apply when reaching quotas.
        QUOAC=1
        ; The UP function supports Trace.
        TRACE=0
        ; The UP function supports Framed Routing.
        FRRT=1
        ; The UP function supports a PFD Contents including a property with multiple values.
        PFDE=0
        ; The UP function supports the Enhanced PFCP Association Release feature.
        EPFAR=1
        ; The UP function supports Deferred PDR Activation or Deactivation.
        DPDRA=1
        ; The UP function supports the Activation and Deactivation of Pre-defined PDRs.
        ADPDP=1
        ; The UPF supports allocating UE IP addresses or prefixes.
        UEIP=0
        ; UPF support of PFCP sessions successively controlled by different SMFs of a same SMF Set.
        SSET=1
        ; UPF supports measurement of number of packets which is instructed with the flag 'Measurement of Number of Packets' in a URR.(Not Supported)
        MNOP=0
        ; UPF supports multiple instances of Traffic Endpoint IDs in a PDI.(Not Supported)
        MTE=1
        ; PFCP messages bunding is supported by the UP function.(Not Supported)
        BUNDL=0
        ; UPF support of 5G VN Group Communication.(Not Supported)
        GCOM=0
        ; UPF support for multiple PFCP associations to the SMFs in an SMF set.(Not Supported)
        MPAS=0
        ; The UP function supports redundant transmission at transport layer.(Not Supported)
        RTTL=0
        ; UPF support of quota validity time feature.(Not Supported)
        VTIME=0
        ; UP function support of Number of Reports.(Not Supported)
        NORP=0
        ; UPF support of IPTV service(Not Supported)
        IPTV=0
        ; UPF supports UE IPv6 address(es) allocation with IPv6 prefix length other than default /64 (including allocating /128 individual IPv6 addresses).(Not Supported)
        IP6PL=0
        ; Time Sensitive Communication is supported by the UPF.(Not Supported)
        TSCU=0
        ; UPF support of MPTCP Proxy functionality.(Not Supported)
        MPTCP=0
        ; UPF support of ATSSS-LLL steering functionality.(Not Supported)
        ATSSS-LL=0
        ; UPF support of per QoS flow per UE QoS monitoring.(Not Supported)
        QFQM=0
        ; UPF support of per GTP-U Path QoS monitoring.(Not Supported)
        GPQM=0
        ; SGW-U support of reporting the size of DL Data Packets.(Not Supported)
        MT-EDT=0
        ; UPF support of CIoT feature, e.g. small data packet rate enforcement.
        CIOT=1
        ; UPF support of Ethernet PDU Session Anchor Relocation.(Not Supported)
        ETHAR=0
        
        [ueip]
        ;Resource pool provided when ueip is allocated by UPF
        ueip_pool_num = 2
        ; ueip_pool_<X> X is an increasing integer
        ueip_pool_1 = 192.168.77.0/24
        ueip_pool_2 = 2001:2002:2003::0/96
  fpu_config: |
        [debug]
        # debug_level can be set as "ALL" or "MUST|ERR|RUNNING|DEBUG"
        # debug_type can be set as "ALL" or specify module type
        # example:
        # debug_level = MUST|ERR|RUNNING|DEBUG|PERIOD
        # debug_type = CM|CLI|RDB|ROS|ROS_TIMER|ROS_EVENT|ROS_TASK|ROS_LOCK|SERVER|SESSION|FASTPASS|COMM|COMM_NIC
        debug_level = MUST|ERR
        debug_type = ALL
        log_path = /var/log/upf_fpu.log
        
        [service]
        # The dpdkdev parameter here is left over and the configuration will be ignored
        dpdk_dev=04:00.0
        # MTU
        dpdk_mtu=1500
        ; Management-end channel info
        mb_ips = 192.168.199.140|192.168.199.230
        mb_port = 50000
  lbu_config: |
        [debug]
        # debug_level can be set as "ALL" or "MUST|ERR|RUNNING|DEBUG"
        # debug_type can be set as "ALL" or specify module type
        # example:
        # debug_level = MUST|ERR|RUNNING|DEBUG|PERIOD
        # debug_type = CM|CLI|RDB|ROS|ROS_TIMER|ROS_EVENT|ROS_TASK|ROS_LOCK|SERVER|SESSION|FASTPASS|COMM|COMM_NIC
        debug_level = MUST|ERR
        debug_type = ALL
        log_path = /var/log/upf_lbu.log
        
        [service]
        # Active and standby communication IP and port
        # When default_master is set to 1, ha_port is the local listening port, otherwise it is the remote port
        ha_ip = 0.0.0.0
        ha_port = 23323
        
        
        # The local listening port is used to communicate with SMU
        be_mgmt_port = 34434
        
        ; If it is set to 1, it will become the primary when there is competition or brain fissure.
        ; Otherwise, it needs to be set to 0. The two LBUs must be set to different values
        default_master = 1
        
        # UPF N3 IP address
        N3_IPv4 = 10.8.124.197/24
        N3_IPv4_gateway = 10.8.124.200
        N3_IPv6 =2000:2::1113:abcc/64
        
        # UPF N6 IP address
        N6_IPv4 = 10.8.125.1/24
        N6_IPv4_gateway = 10.8.124.200
        N6_IPv6 =2001:2::2223:abcc/64
        
        # UPF N9 IP address
        N9_IPv4 = 10.8.129.100/24
        N9_IPv4_gateway = 10.8.124.200
        N9_IPv6 =2001:9::2223:abcc/64
        
        # UPF N4 IP address
        N4_IPv4 = 10.8.126.48/24
        N4_IPv4_gateway = 10.8.124.200
        N4_IPv6 =2001:4::2223:abcc/64

