Skip to content

Commit

Permalink
Merge branch 'master' into feat_cndp_upf_initial
Browse files Browse the repository at this point in the history
  • Loading branch information
gab-arrobo committed Jan 14, 2023
2 parents 2854309 + 3546fce commit 6c3e98c
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3.2.0
uses: golangci/golangci-lint-action@v3.3.1
with:
version: latest
working-directory: pfcpiface
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ RUN ./build_bess.sh && \
cp -r core/pb /pb

# Stage bess: creates the runtime image of BESS
FROM python:3.9.14-slim AS bess
FROM python:3.11.0-slim AS bess
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ QoS Enforcement Rules (QERs).
* IPv4 support
* N3, N4, N6, N9 interfacing
* Single & Multi-port support
* Monitoring/Debugging capabilties using
* Monitoring/Debugging capabilities using
- tcpdump on individual BESS modules
- visualization web interface
- command line shell interface for displaying statistics
Expand All @@ -75,7 +75,7 @@ QoS Enforcement Rules (QERs).
* Support for IPv4 datagrams reassembly
* Support for IPv4 packets fragmentation
* Support for UE IP NAT
* Service Data Flow (SDF) configuration via N4/PFCP.
* Service Data Flow (SDF) configuration via N4/PFCP
* I-UPF/A-UPF ULCL/Branching i.e., simultaneous N6/N9 support within PFCP session
* Downlink Data Notification (DDN) - notification only (no buffering)
* Basic QoS support, with per-slice and per-session rate limiting
Expand Down
60 changes: 59 additions & 1 deletion docs/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,69 @@ Copyright 2022 Open Networking Foundation
-->
# Developer guide

## New Features or Improvements to the BESS pipeline

When implementing new features or making improvements to the `BESS` pipeline,
the easiest way to do so is by:

- Clone the `bess` repo inside the UPF repo
```bash
$ cd <path/to/upf>
$ git clone https://github.com/<your-user>/bess.git
```

- **Temporarily** modify Dockerfile to use the `bess` cloned in the previous
step
```diff
diff --git a/Dockerfile b/Dockerfile
index 052456d..03b7d33 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -11,9 +11,7 @@ RUN apt-get update && \

# BESS pre-reqs
WORKDIR /bess
-ARG BESS_COMMIT=dpdk-2011-focal
-RUN git clone https://github.com/omec-project/bess.git .
-RUN git checkout ${BESS_COMMIT}
+COPY bess/ .
RUN cp -a protobuf /protobuf

# Stage bess-build: builds bess with its dependencies
```

- Implement a feature or make modifications

- Test the modifications

- Revert change in Dockerfile
```diff
diff --git a/Dockerfile b/Dockerfile
index 03b7d33..052456d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -11,7 +11,9 @@ RUN apt-get update && \

# BESS pre-reqs
WORKDIR /bess
-COPY bess/ .
+ARG BESS_COMMIT=dpdk-2011-focal
+RUN git clone https://github.com/omec-project/bess.git .
+RUN git checkout ${BESS_COMMIT}
RUN cp -a protobuf /protobuf

# Stage bess-build: builds bess with its dependencies
```

- Commit your changes to `bess` repo and, if needed, `upf` repo
- Open pull request in `bess` repo and, if needed, `upf` repo


## Testing local Go dependencies

The `upf` repository relies on some external Go dependencies, which are not mature yet (e.g. pfcpsim or p4runtime-go-client).
It's often needed to extend those dependencies first, before adding a new feature to the PFCP Agent. However, when using Go modules and Dockerized environment,
it's hard to test WIP changes to local dependencies. Therefore, this repository come up with a way to use Go vendoring, instead of Go modules, for development purposes.
it's hard to test WIP changes to local dependencies. Therefore, this repository comes up with a way to use Go vendoring, instead of Go modules, for development purposes.

To use a local Go dependency add the `replace` directive to `go.mod`. An example:

Expand Down

0 comments on commit 6c3e98c

Please sign in to comment.