diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 3a282de0d..64c68cc28 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index a5b060786..22d34ee9f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \ diff --git a/README.md b/README.md index 533b18f26..324537f1b 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/docs/developer-guide.md b/docs/developer-guide.md index d4ca06d47..48b426b2b 100644 --- a/docs/developer-guide.md +++ b/docs/developer-guide.md @@ -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 +$ git clone https://github.com//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: