Skip to content

Commit

Permalink
upf: README
Browse files Browse the repository at this point in the history
  • Loading branch information
yoursunny committed Oct 11, 2024
1 parent 83f5dfa commit 40bead5
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 9 deletions.
19 changes: 19 additions & 0 deletions app/upf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# ndn-dpdk/app/upf

This package provides a 5G User Plane Function (UPF) that converts PFCP sessions to GTP-U faces.
It works as follows:

1. Listen for PFCP messages from a 5G Session Management Function (SMF).
2. Gather PFCP session related messages, convert them into NDN-DPDK face creation/deletion commands with appropriate locators of GTP-U faces.
3. These commands can then be sent to a running NDN-DPDK forwarder, to achieve NDN forwarding within a 5G network.

Currently, this package supports these PFCP message types:

* heartbeat request/response
* association setup request/response
* session establishment request/response
* session modification request/response
* session deletion request/response

For each message, it only recognizes the most basic fields required for constructing GTP-U headers, but does not support all cases.
It is tested to be compatible with several open-source SMF implementations, including free5GC and OAI-CN5G.
34 changes: 34 additions & 0 deletions cmd/ndndpdk-upf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# ndndpdk-upf

This command runs a PFCP server that turns NDN-DPDK forwarder into 5G UPF.
The PFCP-related implementation is in [package upf](../../app/upf).
The GTP-U face implementation in in [package ethface](../../iface/ethface).

This program shall be deployed alongside an NDN-DPDK forwarder on the same host.
To use this program:

1. Activate the NDN-DPDK service as a forwarder.
2. Create an Ethernet port on the Ethernet device intended for N3 interface.
3. If desired, create a fallback face on the Ethernet port, so that ARP and IP works on the N3 interface.
4. Start ndndpdk-upf to provide a PFCP server on the N4 interface, which would be ready for incoming messages from the SMF.

Command line flags of this program include:

* `--gqlserver`: GraphQL endpoint of NDN-DPDK service activated as forwarder.
* `--smf-n4`: SMF N4 IPv4 address.
The UPF only accepts PFCP messages from this IP address.
* `--upf-n4`: UPF N4 IPv4 address.
The UPF binds to this IP address while listening for PFCP messages.
This IP address must be configured on a kernel network interface.
* `--upf-n3`: UPF N3 IPv4 address.
NDN-DPDK forwarder uses this IP address as the local IP in outer IPv4 header of GTP-U packets.
* `--upf-mac`: UPF N3 MAC address, corresponding to `--upf-n3`.
NDN-DPDK forwarder uses this MAC address as the local MAC in outer Ethernet header of GTP-U packets.
* `--upf-vlan`: UPF N3 VLAN ID.
If set, NDN-DPDK forwarder inserts a VLAN header before the outer IPv4 header in GTP-U packets.
* `--n3`: N3 ip-mac tuples, repeatable.
NDN-DPDK forwarder does not perform ARP lookups.
Every remote IP address (usually belongs to gNBs) that could appear in PFCP session must be listed in these tuples.
NDN-DPDK forwarder uses this MAC address as the remote MAC in outer Ethernet header of GTP-U packets.
* `--dn`: Data Network NDN forwarder IPv4 address.
NDN-DPDK forwarder uses this IP address as the local IP in inner IPv4 header of GTP-U packets.
5 changes: 2 additions & 3 deletions cmd/ndndpdk-upf/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ var (
)

var app = &cli.App{
Version: version.V.String(),
Usage: "Use NDN-DPDK as a UPF.",
EnableBashCompletion: true,
Version: version.V.String(),
Usage: "Use NDN-DPDK as a UPF.",
Flags: upfParams.DefineFlags([]cli.Flag{
&cli.StringFlag{
Name: "gqlserver",
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ require (
go.fd.io/govpp/extras v0.1.0
go.uber.org/zap v1.27.0
go4.org v0.0.0-20230225012048-214862532bf5
golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c
golang.org/x/sys v0.26.0
)

Expand Down Expand Up @@ -72,7 +72,7 @@ require (
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/term v0.25.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 h1:1wqE9dj9NpSm04INVsJhhEUzhuDVjbcyKH91sVyPATw=
golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8=
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c h1:7dEasQXItcW1xKJ2+gg5VOiBnqWrJc+rq0DPKyvvdbY=
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
Expand Down Expand Up @@ -612,8 +612,8 @@ golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4=
golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down

0 comments on commit 40bead5

Please sign in to comment.