From 40bead5f380528226afdc1c6b5deb4d5f8accfe6 Mon Sep 17 00:00:00 2001 From: Junxiao Shi Date: Fri, 11 Oct 2024 18:54:14 +0000 Subject: [PATCH] upf: README --- app/upf/README.md | 19 +++++++++++++++++++ cmd/ndndpdk-upf/README.md | 34 ++++++++++++++++++++++++++++++++++ cmd/ndndpdk-upf/main.go | 5 ++--- go.mod | 4 ++-- go.sum | 8 ++++---- 5 files changed, 61 insertions(+), 9 deletions(-) create mode 100644 app/upf/README.md create mode 100644 cmd/ndndpdk-upf/README.md diff --git a/app/upf/README.md b/app/upf/README.md new file mode 100644 index 00000000..c88944fc --- /dev/null +++ b/app/upf/README.md @@ -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. diff --git a/cmd/ndndpdk-upf/README.md b/cmd/ndndpdk-upf/README.md new file mode 100644 index 00000000..c91d0905 --- /dev/null +++ b/cmd/ndndpdk-upf/README.md @@ -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. diff --git a/cmd/ndndpdk-upf/main.go b/cmd/ndndpdk-upf/main.go index a0d49320..eeceee2c 100644 --- a/cmd/ndndpdk-upf/main.go +++ b/cmd/ndndpdk-upf/main.go @@ -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", diff --git a/go.mod b/go.mod index 43d7283f..b115159d 100644 --- a/go.mod +++ b/go.mod @@ -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 ) @@ -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 ) diff --git a/go.sum b/go.sum index 43e04a3b..49a06ac7 100644 --- a/go.sum +++ b/go.sum @@ -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= @@ -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=