magma / grants

0 stars 3 forks source link

N4 Proxy plugin for supporting PFCP protocol #19

Closed panyogesh closed 2 years ago

panyogesh commented 2 years ago

Proposal: Adding support for PFCP protocol via N4Proxy Plugin

Elevator Pitch :

Targeting for different scenarios there is a rapid development in fast path technologies and new functionalities being added. Supporting these functionalities, there are various 3GPP compliant UPF solutions which makes optimal use of various fastpath techniques like DPDK, VPP or providing integration with asic or np based chipset. This is also based on the ask from the OCN community is to make third party NFs compatible with Magma.

Total ask

Support of NRF feature on to Magma Architecture will be delivered across 5 milestones.

Contact Information

Yogesh Pandey (yogesh@wavelabs.ai)

Project Details

As part of current magma architecture almost modules GRPC for communication. The messaging structure itself is simplified version of 3GPP. There are 3 main reasons for the philosophy :

While one end the reliability is achieved, the challenge is when interworking with any other 3rd party 3GPP compliant UPF Network Function which can bring rich features of fastpath.

As part of this proposal, idea is to create Proxy Plugin which can facilitate the interaction between the existing Magma module sessiond with other User Plane Network Function. All the messages defined as part of PFCP protocol needs to be covered by the proxy plugin.

Existing messages between Sessiond and Pipelined is SetInterface and it needs to be converted to CURD format.

Proposed Approach

To support interworking with 3GPP compliant 3rd party UPF following changes are proposed : • Create a proxy plugin module connected to sessiond which will be chosen based on the selected UPF. • The plugin will convert the fields to the PFCP protocol format to be accepted by UPF. • This plugin will process the packets as expected by third party UPF. For example

N4ProxyModule-v0 1

N4 Proxy Plugin Module

N4 Proxy plugin module will be part of magma agw services and will be invoked if 3rd Party UPF is involved. Upon detecting the new UPF it will create an association and will start the heart beat procedure. This module will also define PFCP context which will be responsible for defining PDR, FAR,QER, URR to be send towards UPF.

It will act as a terminating point for the magmad's sessiond GRPC messages. The GRPC messages will be processed and converted to the PFCP protocol towards the actual UPF.

Message Conversion

For message conversion 2 main changes are required :

The existing GRPC message between Sessiond and Pipelined Encapsulates fully qualified rule in one flow without need for extra indexing. This makes the rule simple to parse and stand alone. Where as the same with PFCP format it has a layer of rule indexes in order to provide a generic framework where multiple rules can use same instance.

GrpcFlow: PDR + FAR <=> PFCPFlow: CreatePDR -> PDR ID + Precedence + PDI <+ OHR> + FARID CreateFAR -> FARID + Apply Action

To support the conversion a data structure needs to be created which will be on a session basis. This data structure will store the incoming grpc message will create an index based entries 3 main entries : PDR, FAR and QER.

Following is the snapshot of the message

Existing GRPC Message Snapshot

 INFO:root:Got RPC payload:
 SessionSet {
 subscriber_id: "IMSI222456000000001"
 local_f_teid: 2147483650
 session_version: 2
 node_id {node_id: "192.168.200.1"}
 state {state: CREATED}

 // Uplink Flow Rules
 set_gr_pdr {pdr_id: 1, pdr_version: 1, precedence: 32
             pdi {local_f_teid: 2147483650, net_instance: "uplink", ue_ipv4: "192.168.128.17"}
             set_gr_far {far_action_to_apply: FORW}
             activate_flow_req {sid {id: "IMSI222456000000001"}
                ip_addr: "192.168.128.17", request_origin {type: N4}
                apn_ambr {max_bandwidth_ul: 1000, max_bandwidth_dl: 2000}
                uplink_tunnel: 2147483650
                policies {rule {id: "allowlist_sid-IMSI222456000000001-internet"
                  priority: 2 flow_list {match {}}
             qos {}
             tracking_type: NO_TRACKING}
             version: 1}}}
 // Downlink Flow Rules            
 set_gr_pdr {
   ...
   ...
 }
}

PFCP Packet Snapshot

PFCP-Protocol-Dump

Start up and Initialization

As soon as the AGW is starting with 3rd party UPF, N4 proxy will be launched. On Northobound it gets connected to Sessiond and on southbound it connects to UPF. The mamgad services script should launch and monitor the same. The dependency matrix will be on similar lines as current pipelined

Underlying UPF will start Node level information to the this module which will be then converted and shared with sessiond Also this module will start a regular heartbeat. Once the resource information and capabilties of underlying UPF is received, this proxy
module will convert to GRPC message and share it sessiond. On getting response from Sessiond, this module will share Control Plan features
with UPF and will establish an association.

Session Level Procedure

Once the initial association is established, the proxy module will be responsible for converting the GRPC message from sessiond to PFCP messages and send it towards UPF. For doing this it might need to store the session related information and its mapping information. All the response from UPF will be shared with sessiond.

Session Related Reports

The regular reports generated from UPF will be stored in the Proxy module and will be preiodically synced with the sessiond for report generation.

Delivery Approach

Feature will be delivered in 5 milestones. Each milestone will have the following 5 process gates

  1. Design
  2. Development & Unit Testing
  3. code review
  4. Integration testing
  5. resolve integration issues and regression issues

Before finishing the 2nd milestone, the feature shall pass the following process gates

  1. System test
  2. User Acceptance test

Milestone1 - Launching & Initalizing of N4Proxy plugin

Tasks to launch N4 Proxy Plugin

Milestone2 - Node Management infrastructure

Milestone4 - Session Management infrastructure

Milestone5 - Charging, Usage reporting and IPv6 support

Test Plan

Primarily targeted for a stub testing. The testing will be targeted with UPF Module simulators from third party. Following is the set of tests or scenarios to 3rd Party UPF integration.

Integration Testing using simulators will be done

Feature Roadmap

Feature will be delivered in 5 Milestones.


Milestone Deliverable Summary
MS1 Launching & Initalizing of N4Proxy plugin MS2 Encoding and Decoding library for PFCP messages
MS3 Node Management infrastrucutre
MS4 Session Management infrastrcture
MS5 Charging, Usage reporting and IPv6 support & SIT

References

1) https://www.etsi.org/deliver/etsi_ts/129200_129299/129244/16.04.00_60/ts_129244v160400p.pdf 2) https://docs.magmacore.org/docs/ 3) https://www.globalspec.com/FeaturedProducts/Detail/GLCommunications/5G_N4_Interface_Simulation_and_Analysis/314687/0