Skip to content

Commit

Permalink
[#39] Updates README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
navarrothiago committed Oct 24, 2021
1 parent 047fe0b commit 74c9994
Show file tree
Hide file tree
Showing 12 changed files with 231 additions and 79 deletions.
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@
"strstream": "cpp",
"typeindex": "cpp",
"csignal": "cpp",
"gtpu.h": "c"
"gtpu.h": "c",
"charconv": "cpp",
"csetjmp": "cpp",
"cuchar": "cpp",
"scoped_allocator": "cpp"
},

"git.ignoreLimitWarning": true,
Expand Down
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,35 @@ The instructions here is still missing. If you need to know how to test, contact

## :rocket: Benchmark

Check the [Jupyter notebook](notebook.ipynb).
Test environment:

<img src="img/setup-performance-evaluation.svg" alt="drawing" width="500"/>

Step:
1. Run Trex Traffic Generator
1. Run HTTP API + upf-bpf
1. Configure interfaces (/configure)
1. Create PFCP Session context (/createSession)
1. Generate the traffic (pkt size = 64B)
1. Collects metrics (CPU load, ipackets, opacket, throughput)

> :memo: Postman files are available: [Uplink](tests/api/requests_body/gtp-postman-colletion.json) and [Downlink](tests/api/requests_body/udp-postman-colletion.json). You will find the json message used by the tests.
The flows are generate using [Trex Field Engine](https://trex-tgn.cisco.com/trex/doc/cp_stl_docs/api/field_engine.html). Check the implementation [here](tests/trex/test_cases/run.py).


<img src="img/screenshot-tmux.png" alt="drawing" width="600"/>

Downlink | Uplink
---|---
<img src="tests/reports/img/Downlink Max Throughput.svg" alt="drawing" width="500"/>| <img src="tests/reports/img/Uplink Max Throughput.svg" alt="drawing" width="500"/>
<img src="tests/reports/img/Downlink Max ThroughputLoad per Core - 6 Rx Queue.svg" alt="drawing" width="500"/>| <img src="tests/reports/img/Uplink Max ThroughputLoad per Core - 6 Rx Queue.svg" alt="drawing" width="500"/>

Check the [Jupyter notebook](notebook.ipynb) to how the graphics are generated.

> :memo: For more graphics, check [this](tests/reports/img) folder.


## Tree

Expand Down
3 changes: 3 additions & 0 deletions img/screenshot-tmux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/SessionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void SessionManager::addPDR(uint64_t seid, std::shared_ptr<PacketDetectionRules>
throw std::runtime_error("Source interface not supported");
}

// TODO navarrothiago - Check if it make sense, because we have a UL and DL PDR.
// TODO navarrothiago - REMOVED IT.
pSessionProgram->getPDRMap()->update(pdr.pdr_id.rule_id, pdr, BPF_ANY);
}

Expand Down
12 changes: 0 additions & 12 deletions tests/README.md

This file was deleted.

4 changes: 0 additions & 4 deletions tests/api/requests_body/configure.json

This file was deleted.

96 changes: 96 additions & 0 deletions tests/api/requests_body/gtp-postman-colletion.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"info": {
"_postman_id": "88c048a5-db33-4523-a1ce-4be71282b681",
"name": "eBPF Remote GTP",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Configuration",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"udpInterface\": \"enp3s0f1\",\n \"gtpInterface\": \"enp3s0f0\"\n}"
},
"url": {
"raw": "http://localhost:1234/configure",
"protocol": "http",
"host": [
"localhost"
],
"port": "1234",
"path": [
"configure"
]
}
},
"response": []
},
{
"name": "Session",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"seid\": 1,\n \"pdrs\": [\n {\n \"pdrId\": 20,\n \"farId\": 200,\n \"outerHeaderRemoval\": \"OUTER_HEADER_REMOVAL_UDP_IPV4\",\n \"pdi\": {\n \"teid\": 100,\n \"sourceInterface\": \"INTERFACE_VALUE_CORE\",\n \"ueIPAddress\": \"10.1.3.27\"\n }\n },\n {\n \"pdrId\": 10,\n \"farId\": 100,\n \"outerHeaderRemoval\": \"OUTER_HEADER_REMOVAL_GTPU_UDP_IPV4\",\n \"pdi\": {\n \"teid\": 100,\n \"sourceInterface\": \"INTERFACE_VALUE_ACCESS\",\n \"ueIPAddress\": \"10.1.3.27\"\n }\n }\n ],\n \"fars\": [\n {\n \"farId\": 200,\n \"forwardingParameters\": {\n \"outerHeaderCreation\": {\n \"outerHeaderCreationDescription\": \"OUTER_HEADER_CREATION_GTPU_UDP_IPV4\",\n \"ipv4Address\": \"10.1.3.27\",\n \"portNumber\": 1234\n },\n \"destinationInterface\": \"INTERFACE_VALUE_ACCESS\"\n }\n },\n {\n \"farId\": 100,\n \"forwardingParameters\": {\n \"outerHeaderCreation\": {\n \"outerHeaderCreationDescription\": \"OUTER_HEADER_CREATION_UDP_IPV4\",\n \"ipv4Address\": \"10.1.3.27\",\n \"portNumber\": 1234\n },\n \"destinationInterface\": \"INTERFACE_VALUE_CORE\"\n }\n }\n ],\n \"arpTable\": [\n {\n \"ip\": \"10.1.2.27\",\n \"mac\": \"90:e2:ba:27:fd:3c\"\n },\n {\n \"ip\": \"10.1.3.27\",\n \"mac\": \"90:e2:ba:27:fd:3d\"\n }\n ]\n}"
},
"url": {
"raw": "http://localhost:1234/createSession",
"protocol": "http",
"host": [
"localhost"
],
"port": "1234",
"path": [
"createSession"
]
}
},
"response": []
},
{
"name": "Test Connection",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:1234/hi",
"protocol": "http",
"host": [
"localhost"
],
"port": "1234",
"path": [
"hi"
]
}
},
"response": []
}
]
}
59 changes: 0 additions & 59 deletions tests/api/requests_body/pfcp_session.json

This file was deleted.

96 changes: 96 additions & 0 deletions tests/api/requests_body/udp-postman-colletion.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"info": {
"_postman_id": "7f7bdcd4-2df1-490e-a11c-82cfee8d6d17",
"name": "eBPF Remote UDP",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Test Connection",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:1234/hi",
"protocol": "http",
"host": [
"localhost"
],
"port": "1234",
"path": [
"hi"
]
}
},
"response": []
},
{
"name": "Configuration",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"udpInterface\": \"enp3s0f0\",\n \"gtpInterface\": \"enp3s0f1\"\n}"
},
"url": {
"raw": "http://localhost:1234/configure",
"protocol": "http",
"host": [
"localhost"
],
"port": "1234",
"path": [
"configure"
]
}
},
"response": []
},
{
"name": "Session",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"seid\": 1,\n \"pdrs\": [\n {\n \"pdrId\": 20,\n \"farId\": 200,\n \"outerHeaderRemoval\": \"OUTER_HEADER_REMOVAL_UDP_IPV4\",\n \"pdi\": {\n \"teid\": 100,\n \"sourceInterface\": \"INTERFACE_VALUE_CORE\",\n \"ueIPAddress\": \"10.1.3.27\"\n }\n },\n {\n \"pdrId\": 10,\n \"farId\": 100,\n \"outerHeaderRemoval\": \"OUTER_HEADER_REMOVAL_GTPU_UDP_IPV4\",\n \"pdi\": {\n \"teid\": 100,\n \"sourceInterface\": \"INTERFACE_VALUE_ACCESS\",\n \"ueIPAddress\": \"10.1.3.27\"\n }\n }\n ],\n \"fars\": [\n {\n \"farId\": 200,\n \"forwardingParameters\": {\n \"outerHeaderCreation\": {\n \"outerHeaderCreationDescription\": \"OUTER_HEADER_CREATION_GTPU_UDP_IPV4\",\n \"ipv4Address\": \"10.1.3.27\",\n \"portNumber\": 1234\n },\n \"destinationInterface\": \"INTERFACE_VALUE_ACCESS\"\n }\n },\n {\n \"farId\": 100,\n \"forwardingParameters\": {\n \"outerHeaderCreation\": {\n \"outerHeaderCreationDescription\": \"OUTER_HEADER_CREATION_UDP_IPV4\",\n \"ipv4Address\": \"10.1.3.27\",\n \"portNumber\": 1234\n },\n \"destinationInterface\": \"INTERFACE_VALUE_CORE\"\n }\n }\n ],\n \"arpTable\": [\n {\n \"ip\": \"10.1.2.27\",\n \"mac\": \"90:e2:ba:27:fd:3c\"\n },\n {\n \"ip\": \"10.1.3.27\",\n \"mac\": \"90:e2:ba:27:fd:3d\"\n }\n ]\n}"
},
"url": {
"raw": "http://localhost:1234/createSession",
"protocol": "http",
"host": [
"localhost"
],
"port": "1234",
"path": [
"createSession"
]
}
},
"response": []
}
]
}
2 changes: 1 addition & 1 deletion tests/reports/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Report generated by running:

```
export PYTHONPATH='/workspaces/tests/trex/trex_client/interactive/'
./tests/trex/test_cases/udp_downlink.py -m <tx_data_rate> -p <dut-host-password> -f <gtp or udp>
./tests/trex/test_cases/run.py -m <tx_data_rate> -p <dut-host-password> -f <gtp or udp>
```
File renamed without changes.
File renamed without changes.

0 comments on commit 74c9994

Please sign in to comment.