About reserved URRs behavior and the interaction with gtp5g

,

Testing environment:
free5GC : v4.1.0
UERANSIM: v3.2.7
gtp5g: v0.9.14

SMF config:

info:
  version: 1.0.7
  description: SMF initial local configuration

configuration:
  smfName: SMF # the name of this SMF

  # Service-based interface information
  sbi:
    scheme: http # the protocol for sbi (http or https)
    registerIPv4: [CENSORED_IP] # IP used to register to NRF
    bindingIPv4: [CENSORED_IP] # IP used to bind the service
    port: 8000 # Port used to bind the service
    tls: # the local path of TLS key
      key: config/TLS/smf.key # SMF TLS Certificate
      pem: config/TLS/smf.pem # SMF TLS Private key

  # the SBI services provided by this SMF, refer to TS 29.502
  serviceNameList:
    - nsmf-pdusession # Nsmf_PDUSession service
    - nsmf-event-exposure # Nsmf_EventExposure service
    - nsmf-oam # OAM service

  # the S-NSSAI (Single Network Slice Selection Assistance Information) list supported by this AMF
  snssaiInfos:
    - sNssai: # S-NSSAI (Single Network Slice Selection Assistance Information)
        sst: 1 # Slice/Service Type (uinteger, range: 0~255)
        sd: 010203 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF)
      dnnInfos: # DNN information list
        - dnn: internet # Data Network Name
          dns: # the IP address of DNS
            ipv4: 8.8.8.8
            ipv6: 2001:4860:4860::8888
    - sNssai: # S-NSSAI (Single Network Slice Selection Assistance Information)
        sst: 1 # Slice/Service Type (uinteger, range: 0~255)
        sd: 112233 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF)
      dnnInfos: # DNN information list
        - dnn: internet # Data Network Name
          dns: # the IP address of DNS
            ipv4: 8.8.8.8
            ipv6: 2001:4860:4860::8888

  # Optional: PLMN IDs configuration.
  plmnList:
    - mcc: 208 # Mobile Country Code (3 digits string, digit: 0~9)
      mnc: 93 # Mobile Network Code (2 or 3 digits string, digit: 0~9)
  locality: area1 # Name of the location where a set of AMF, SMF, PCF and UPFs are located

  # PFCP (Packet Forwarding Control Protocol) configuration for N4 interface.
  pfcp:
    # addr config is deprecated in smf config v1.0.3, please use the following config
    nodeID: [CENSORED_IP] # the Node ID of this SMF
    listenAddr: [CENSORED_IP] # the IP/FQDN of N4 interface on this SMF (PFCP)
    externalAddr: [CENSORED_IP] # the IP/FQDN of N4 interface on this SMF (PFCP)
    assocFailAlertInterval: 10s
    assocFailRetryInterval: 30s
    heartbeatInterval: 10s

  # Userplane nodes information, specifying details for AN and UPF.
  userplaneInformation:
    upNodes: # information of userplane node (AN or UPF)
      gNB1: # the name of the node
        type: AN # the type of the node (AN or UPF)
        an_ip: [CENSORED_IP]
      gNB2: # the name of the node
        type: AN # the type of the node (AN or UPF)
        an_ip: [CENSORED_IP]
      I-UPF:  # the name of the node
        type: UPF # the type of the node (AN or UPF)
        nodeID: [CENSORED_IP] # the Node ID of this UPF
        addr: [CENSORED_IP] # the IP/FQDN of N4 interface on this UPF (PFCP)
        sNssaiUpfInfos: # S-NSSAI information list for this UPF
          - sNssai: # S-NSSAI (Single Network Slice Selection Assistance Information)
              sst: 1 # Slice/Service Type (uinteger, range: 0~255)
              sd: 010203 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF)
            dnnUpfInfoList: # DNN information list for this S-NSSAI
              - dnn: uplink
        # The IP address for the N3 interface must match the IP bound in the UPF N3 interface.
        # If UPF binds to a specific IP, set that same IP here.
        # If UPF binds to all IPs (0.0.0.0), you can set any of the available UPF IPs here.
        # Do NOT set 0.0.0.0 as this is not a valid routable address.      
        interfaces: # Interface list for this UPF
          - interfaceType: N3 # the type of the interface (N3 or N9)
            endpoints: # the IP address of this N3/N9 interface on this UPF
              - [CENSORED_IP]
            networkInstances: # Data Network Name (DNN)
              - internet
          - interfaceType: N9
            endpoints:
              - [CENSORED_IP]   # - [CENSORED_IP]
            networkInstances: # Data Network Name (DNN)
              - internet
      I-UPF2:  # the name of the node
        type: UPF # the type of the node (AN or UPF)
        nodeID: [CENSORED_IP] # the Node ID of this UPF
        addr: [CENSORED_IP] # the IP/FQDN of N4 interface on this UPF (PFCP)
        sNssaiUpfInfos: # S-NSSAI information list for this UPF
          - sNssai: # S-NSSAI (Single Network Slice Selection Assistance Information)
              sst: 1 # Slice/Service Type (uinteger, range: 0~255)
              sd: 112233 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF)
            dnnUpfInfoList: # DNN information list for this S-NSSAI
              - dnn: uplink
        # The IP address for the N3 interface must match the IP bound in the UPF N3 interface.
        # If UPF binds to a specific IP, set that same IP here.
        # If UPF binds to all IPs (0.0.0.0), you can set any of the available UPF IPs here.
        # Do NOT set 0.0.0.0 as this is not a valid routable address.   
        interfaces: # Interface list for this UPF
          - interfaceType: N3 # the type of the interface (N3 or N9)
            endpoints: # the IP address of this N3/N9 interface on this UPF
              - [CENSORED_IP]
            networkInstances: # Data Network Name (DNN)
              - internet
          - interfaceType: N9
            endpoints:
              - [CENSORED_IP]   # - [CENSORED_IP]
            networkInstances: # Data Network Name (DNN)
              - internet                
      PSA-UPF:  # the name of the node
        type: UPF # the type of the node (AN or UPF)
        nodeID: [CENSORED_IP] # the Node ID of this UPF
        addr: [CENSORED_IP] # the IP/FQDN of N4 interface on this UPF (PFCP)
        sNssaiUpfInfos: # S-NSSAI information list for this UPF
          - sNssai: # S-NSSAI (Single Network Slice Selection Assistance Information)
              sst: 1 # Slice/Service Type (uinteger, range: 0~255)
              sd: 010203 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF)
            dnnUpfInfoList: # DNN information list for this S-NSSAI
              - dnn: internet
                pools:
                  - cidr: [CENSORED_CIDR]
        interfaces: # Interface list for this UPF
          - interfaceType: N9
            endpoints:
              - [CENSORED_IP]  # - [CENSORED_IP]
            networkInstances: # Data Network Name (DNN)
              - internet          
      PSA-UPF2:  # the name of the node
        type: UPF # the type of the node (AN or UPF)
        nodeID: [CENSORED_IP] # the Node ID of this UPF
        addr: [CENSORED_IP] # the IP/FQDN of N4 interface on this UPF (PFCP)        
        sNssaiUpfInfos: # S-NSSAI information list for this UPF
          - sNssai: # S-NSSAI (Single Network Slice Selection Assistance Information)
              sst: 1 # Slice/Service Type (uinteger, range: 0~255)
              sd: 112233 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF)
            dnnUpfInfoList: # DNN information list for this S-NSSAI
              - dnn: internet
                pools:
                  - cidr: [CENSORED_CIDR]
        interfaces: # Interface list for this UPF
          - interfaceType: N9
            endpoints:
              - [CENSORED_IP]   # - [CENSORED_IP]
            networkInstances: # Data Network Name (DNN)
              - internet            
    links: # the topology graph of userplane, A and B represent the two nodes of each link
      - A: gNB1
        B: I-UPF
      - A: I-UPF
        B: PSA-UPF
      - A: gNB2
        B: I-UPF2
      - A: I-UPF2
        B: PSA-UPF2
  nrfUri: http://[CENSORED_IP]:8000
  nrfCertPem: config/TLS/nrf.pem # NRF Certificate
  ulcl: true

  # retransmission timer for pdu session modification command
  t3591:
    enable: true     # true or false
    expireTime: 16s   # default is 6 seconds
    maxRetryTimes: 3 # the max number of retransmission
  # retransmission timer for pdu session release command
  t3592:
    enable: true     # true or false
    expireTime: 16s   # default is 6 seconds
    maxRetryTimes: 3 # the max number of retransmission
  urrPeriod: 10 # default usage report period in seconds
  urrThreshold: 1000 # default usage report threshold in bytes
  requestedUnit: 1000
logger: # log output setting
  enable: true # true or false
  level: trace # how detailed to output, value: trace, debug, info, warn, error, fatal, panic
  reportCaller: false # enable the caller report or not, value: true or false

Issue :
When setting the preserved URRs to report in both periodical and volume threshold ways, the periodical report will always be 0.
I suspect that’s because the logic set in gtp5g/src/gtpu/encap.c is set to either periodical or VOLTH.

// Calculate Volume measurement for each trigger
                if (urr->trigger & URR_RPT_TRIGGER_VOLTH) {
                    update_counter(&urr->vol_th, volume, uplink, mnop);
                    if (check_counter(&urr->vol_th, &urr->volumethreshold)) {
                        triggers[report_num] = USAR_TRIGGER_VOLTH;
                        urrs[report_num++] = urr;
                    }
                } else {
                    if (urr->period == 0) {
                        continue;
                    }
                    update_period_vol_counter(urr, volume, uplink, mnop);
                }
                if (urr->trigger & URR_RPT_TRIGGER_VOLQU) {
                    update_counter(&urr->vol_qu, volume, uplink, mnop);
                    if (check_counter(&urr->vol_qu, &urr->volumequota)) {
                        triggers[report_num] = USAR_TRIGGER_VOLQU;
                        urrs[report_num++] = urr;
                        urr_quota_exhaust_action(urr, gtp);
                        GTP5G_INF(NULL, "URR (%u) Quota Exhaust, stop measure", urr->id);
                    }
                }

But to my acknowledgement of TS 29.244, it should be able to support both ways at the same time. I would like to know the reason why you decided to set it this way.

Thank you,
hokusai0603