Interface UpfDevice

  • All Known Subinterfaces:
    UpfProgrammable

    @Beta
    public interface UpfDevice
    Provides means to update forwarding state to implement a 3GPP User Plane Function.
    • Method Detail

      • cleanUp

        void cleanUp()
        Remove any state previously created by this API.
      • clearInterfaces

        void clearInterfaces()
        Remove all interfaces currently installed on the UPF-programmable device.
      • clearFlows

        void clearFlows()
        Remove all UE flows (PDRs, FARs) currently installed on the UPF-programmable device.
      • readCounter

        PdrStats readCounter​(int counterIdx)
                      throws UpfProgrammableException
        Read the the given cell (Counter index) of the PDR counters from the given device.
        Parameters:
        counterIdx - The counter cell index from which to read
        Returns:
        A structure containing ingress and egress packet and byte counts for the given cellId.
        Throws:
        UpfProgrammableException - if the cell ID is out of bounds
      • pdrCounterSize

        long pdrCounterSize()
        Return the number of PDR counter cells available. The number of cells in the ingress and egress PDR counters are equivalent.
        Returns:
        PDR counter size
      • farTableSize

        long farTableSize()
        Return the number of maximum number of table entries the FAR table supports.
        Returns:
        the number of FARs that can be installed
      • pdrTableSize

        long pdrTableSize()
        Return the total number of table entries the downlink and uplink PDR tables support. Both tables support an equal number of entries, so the total is twice the size of either.
        Returns:
        the total number of PDRs that can be installed
      • readAllCounters

        Collection<PdrStats> readAllCounters​(long maxCounterId)
                                      throws UpfProgrammableException
        Read the counter contents for all cell indices that are valid on the hardware switch. maxCounterId parameter is used to limit the number of counters retrieved from the UPF device. If the limit given is larger than the physical limit, the physical limit will be used. A limit of -1 removes limitations.
        Parameters:
        maxCounterId - Maximum counter ID to retrieve from the UPF device.
        Returns:
        A collection of counter values for all valid hardware counter cells
        Throws:
        UpfProgrammableException - if the counters are unable to be read
      • enablePscEncap

        void enablePscEncap​(int defaultQfi)
                     throws UpfProgrammableException
        Instructs the UPF-programmable device to use GTP-U extension PDU Session Container (PSC) when doing encap of downlink packets, with the given QoS Flow Identifier (QFI).
        Parameters:
        defaultQfi - QFI to be used by default for all encapped packets.
        Throws:
        UpfProgrammableException - if operation is not available
      • sendPacketOut

        void sendPacketOut​(ByteBuffer data)
                    throws UpfProgrammableException
        Sends the given data as a data plane packet-out through this device. Data is expected to contain an Ethernet frame.

        The device should process the packet through the pipeline tables to select an output port and to apply eventual modifications (e.g., MAC rewrite for routing, pushing a VLAN tag, etc.).

        Parameters:
        data - Ethernet frame bytes
        Throws:
        UpfProgrammableException - if operation is not available