Skip to content

Commit

Permalink
Merge pull request #129 from andy89923/doc/update-info
Browse files Browse the repository at this point in the history
feat: add PCF charging design docs
  • Loading branch information
ianchen0119 committed May 7, 2024
2 parents c3c1783 + 04cf25a commit 35c4c04
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/guide/3-install-free5gc.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ You will not be able to run most of the tests in [Test](./4-test-free5gc.md) pag

2\. Golang Version

* As noted above, free5gc is built and tested with Go 1.18.10
* As noted above, free5gc is built and tested with Go 1.21.8
* To check the version of Go on your system, from a command prompt:
```
go version
```

* If another version of Go is installed, remove the existing version and install Go 1.18.10:
* If another version of Go is installed, remove the existing version and install Go 1.21.8:

```bash
# this assumes your current version of Go is in the default location:
Expand Down
3 changes: 2 additions & 1 deletion docs/guide/Chf/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,5 @@ Charging on PDU Session is achieved by **FBC charging, with specific rating grou
- For ULCL deployment, only the data usage of the PSA-UPF will be charged (it avoids charging the same data packet twice).
- In our implementations, UPF is composed of the `go-upf` (Controller) and `gtp5g` (Executor).
- `gtp5g` sends the usage report to `go-upf` via unix socket.
- `gtp5g` is able to send multiple reports at once, which reduces the communication effort in UPF.
- `gtp5g` is able to send multiple reports at once, which reduces the communication effort in UPF.
- [PCF Charing Design](./../PCF/charging.md)
60 changes: 60 additions & 0 deletions docs/guide/PCF/charging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# PCF Charging Software Design Architecture

>[!NOTE]
> Author: [Andy Chen (CTFang)](https://www.linkedin.com/in/tsung-fang-chen-437a71191/)
> Date: 2024/05/07


**PCF: Policy Control Function**

Relative specs:

- *TS 29.507 Access and Mobility Policy Control Service*
- *TS 23.503 Policy and Charging Control Framework for the 5G System (5GS)*
- *Ts 29.513 Policy and Charging Control Signalling flows and QoS parameter mapping*
- *Ts 23.255 Telecommunication management; Charging management; 5G data connectivity domain charging*



The 3GPP defines the FBC(Flow-Based Charging) and QBC (QoS-Based Charging).

However, *free5GC v3.4.1* supports **FBC** only.



## RatingGroup Allocate

![PDU session establishment](./../Chf/image-1.png)

> PDU session establishment, described in *3GPP TS 32.255 clause 5.2.2.2.2*
Charging on PDU Session is achieved by **FBC charging, with specific rating group/service identifier**:

- The **rating group** would be allocated by PCF during SM Policy Authorization (Step 6).
- Get chargingData from MongoDB collection `policyData.ues.chargingData`.
- Allocate **rating group** to each charging rule.
- Create new chargingData with rating group in MongoDB.
- Create PCC Rule for charging with rating group, SDF template, and charging method.
- Make Decision from PCC Rule to SMF.

- When PCF `HandleDeleteSmPolicyContextRequest`, the new chargingData with rating group would be deleted.



## CHF

CHF would use rating group from MongoDB (`policyData.ues.chargingData`) to calculate the usage and grant quota.

- ABMF (Account Balance Management Function)
- Rating Function



![pcf_charging](./images/pcf_charging.png)



## Others

- [CHF design document](./../Chf/design.md)
Binary file added docs/guide/PCF/images/pcf_charging.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/guide/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ We maintain the design documents to help people started contributing to the free
- [UPF (GTP5G)](./Gtp5g/design.md)
- [UPF (PFCP)](./Upf_PFCP/design.md)
- [CHF](./Chf/design.md)
- [PCF (Charging)](./PCF/charging.md)
- [OAuth2 on SBI](./OAuth2/OAuth2Design.md)
- [Problem Details](https://github.com/free5gc/free5gc.github.io/tree/main/docs/guide/ProblemDetails)

Expand Down

0 comments on commit 35c4c04

Please sign in to comment.