Skip to content

Commit

Permalink
Release logs | add release logs, change logs and update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
riyazahm22 authored and swaroopsarma committed Jul 28, 2022
1 parent 1219655 commit 3344147
Show file tree
Hide file tree
Showing 9 changed files with 527 additions and 44 deletions.
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## [v22.07] - 2022-07-27

### Added

* Linux Networking support (L2 Forwarding, VXLAN, Routing, Connection Tracking)
* TDI Integration and TDI CLI Python support.
* PAL API support to retrieve fixed table functionality such as port, device etc.
* Direct Match Table support [Match kind supported - Exact, Ternary, LPM].
* Indirect Match Table support - Action Selector, Action Profile.
* Indirect Counter support.
* Port and Vport support.
* Auto learn support.
* PNA meta data direction support.
* Table default action with arguments support.
* Multiple Pipeline support.
* Hotplug support for vhost-user ports.
* Enable DPDK backend cli to get port/mac stats.
* GTEST based Unit test framework.

### Fixed

* Table name is different in ContextJSON and SPEC artifacts/file.
* Display of custom MTU value for TAP port set by gnmi-cli.
* Action profile/selector: table entry addition is failing for action profile or selector tests.
* Action selector: deleting non-existing group (the first one) did not generate error.
* Indirect Counter: Flow / Indirect counters does not account packet counters.
* Indirect Counter: Reset-counter not working for flow counters.

### Limitation

* Counter: No support for Counter cell display when index is not set.
* Counter: Cumulative count of all counters not supported (index is 0).
* Configure invalid port in rule and sending traffic causes application to crash.
* Add/Remove Hot plug interface on VM1/VM2 does not resume ping traffic on any VM in the same host in LNT Feature.
* Need to set PYTHONPATH and PYTHONHOME for tdi_python to work and LD_LIBRARY_PATH to the custom library path.
* Logging: Following error logs of type "BF_BFRT ERROR" and "BF_BFRT FATAL" generated when lanunching the OVS but
no functional impact.
70 changes: 42 additions & 28 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ p4-dpdk-target works in conjunction with following repos:

DPDK SWX Pipeline:
(https://github.com/DPDK/dpdk/blob/main/lib/pipeline)
Version: 22.07-rc2

P4 DPDK SWX pipeline implements the P4 pipeline in a DPDK software switch.
The software switch is driven by artifacts generated by the P4 compiler
for P4 DPDK SWX pipeline.
p4-dpdk-target submodules dpdk repo to build P4 DPDK pipeline.
Note about DPDK Patches (p4-dpdk-target/src/lld/dpdk/patch):
DPDK patches 0001-pipeline-updated-instruction-label-check.patch and
0001-add-ctl-wrapper-api.patch are a temporary solution and will be
removed. The fixes are being worked upon and will be committed soon.
DPDK patches 007-Fix-pipeline-structs-initialization.patch
is a temporary solution and will be removed.
The fixes are being worked upon and will be committed soon.

P4 Compiler DPDK Backend:
(https://github.com/p4lang/p4c/tree/main/backends/dpdk)
Expand All @@ -36,19 +38,11 @@ p4-dpdk-target works in conjunction with following repos:
The P4 DPDK spec file from P4C DPDK, which is used by DPDK SWX pipeline
to setup the software pipeline, is also loaded through p4-dpdk-target.

Target backend utilities:
(https://github.com/p4lang/target-utils)
(https://github.com/p4lang/target-syslibs)
p4-dpdk-target utilizes the libraries built through target-utils and
target-syslibs libraries. p4-dpdk-target uses these libraries
in the install directory.

P4-OVS:
(https://github.com/ipdk-io/ovs)
The remote control plane interfaces like P4 Runtime and OpenConfig are
supported through P4-OVS. P4-OVS maps these remote protocol messages
and maps them to TDI interface. (Currently, it maps them to the interim
bf_rt interface).
and maps them to tdi_rt interface.

Code Organization
=================
Expand All @@ -60,8 +54,9 @@ p4-dpdk-target is organized as follows
include/
Header files associated with various driver modules
bf_rt:
bf_rt defines the interim frontend interface till TDI interface is
supported.
bf_rt defines the interim frontend interface with bfrt.
tdi_rt:
tdi_rt defines the frontend interface with TDI.

src/
Driver source files. Largely they are categorized into these submodules.
Expand All @@ -74,6 +69,8 @@ p4-dpdk-target is organized as follows
Low Level Driver (e.g. DPDK library)
dvm:
Device Mgmt (e.g. device/port instantiation, HA sequences)
tdi_rt:
P4 program independent and object driven implementation with TDI.
bf_rt:
P4 program independent and object driven implementation.
bf_pal:
Expand All @@ -86,11 +83,7 @@ p4-dpdk-target is organized as follows

third-party
tdi:
Target independent frontend interface. (To be supported in future.)
target-syslibs:
Target syslib package
target-utils:
Target utilities package
Target independent frontend interface.

tools/
Scripts to help dependencies installation, ports setup and executing.
Expand Down Expand Up @@ -130,7 +123,7 @@ Note:- Make sure that your yum repository proxy and environment proxies are set
cd $SDE/p4-dpdk-target
git submodule update --init --recursive --force
./autogen.sh
./configure --prefix=$SDE_INSTALL
./configure --prefix=$SDE_INSTALL (For both bfrt and TDI build)
./configure --prefix=$SDE_INSTALL --with-generic-flags=yes (For TDI build)
make -j
make install
Expand All @@ -153,6 +146,11 @@ Running Reference App
bf_switchd is a reference application that can be configured through a debug CLI.

# Running of bf_switchd
Need to set PYTHONPATH and PYTHONHOME for bfrt_python/tdi_python to work.
export SDE_INSTALL=<path to install directory>
export LD_LIBRARY_PATH=$SDE_INSTALL/lib:$SDE_INSTALL/lib64:$SDE_INSTALL/lib/x86_64-linux-gnu
export PYTHONPATH=$SDE_INSTALL/lib/python3.8/:$SDE_INSTALL/lib/python3.8/lib-dynload:$SDE_INSTALL/lib/python3.8/site-packages
export PYTHONHOME=$SDE_INSTALL/lib/python3.8
cd $SDE_INSTALL/bin
./bf_switchd --install-dir $SDE_INSTALL --conf-file $SDE_INSTALL/share/dpdk/<P4 program name>/<P4 program name>.conf --init-mode=cold --status-port 7777

Expand All @@ -167,30 +165,46 @@ Running Reference App
{
"id": "asic-0",
"chip_family": "dpdk",
"instance": 0,
"instance": 0
}
],
"instance": 0,
"p4_devices": [
{
"device-id": 0,
"eal-args": "dummy -n 4 -c 3",
"mempools": [
{
"name": "MEMPOOL0",
"buffer_size": 2304,
"pool_size": 1024,
"cache_size": 256,
"numa_node": 0
}
],
"p4_programs": [
{
"program-name": "<P4 program name>",
"cpu_numa_node": "0",
"bfrt-config": "share/dpdk/<P4 program name>/bf-rt.json",
"bfrt-config": "share/dpdk/<P4 program name>/tdi.json",
"port-config": "share/dpdk/<P4 program name>/ports_topology.json",
"eal-args": "dummy -n 4 -c 3",
"p4_pipelines": [
{
"p4_pipeline_name": "pipe",
"core_id": 1,
"numa_node": 0,
"context": "share/dpdk/<P4 program name>/pipe/context.json",
"config": "share/dpdk/<P4 program name>/pipe/<P4 program name>.spec",
"pipe_scope": [
0,
1,
2,
3
],
"path": "share/dpdk/<P4 program name>"
}
]
}
],
]
}
]
}
Expand All @@ -199,10 +213,10 @@ Running Reference App
# CLI interface
Once bf_switchd starts running, bfshell is available.

bfshell> bfrt_python
bfshell> tdi_python

bfrt.<P4 program>.enable
pipe = bfrt.<P4 program>.pipe.ingress
tdi.<P4 program>.enable
pipe = tdi.<P4 program>.pipe.ingress
from netaddr import IPAddress
pipe.<P4 table>.<P4 action>(<action parameters>)
eg) pipe.ipv4_lpm.add_with_send(dst_addr=IPAddress('192.168.2.0'),dst_addr_p_length=24, port=1)
Loading

0 comments on commit 3344147

Please sign in to comment.