Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for CNDP(Cloud Native Data Plane) port in BESS #2

Merged

Conversation

manojgop
Copy link
Contributor

@manojgop manojgop commented Nov 3, 2022

  • CNDP BESS port to send/receive n/w packets using AF_XDP socket.
  • Modify Bess core Makefile to build CNDP port driver.
  • Dockerfile to build BESS with CNDP.
  • Add "CndpPortArg" in port_msg.proto file to initialize Bess CNDP port.
  • Use external BESS PacketPool (rte_mempool/rte_mbuf) with CNDP xskdev.
  • Example scripts to test Bess CNDP port.
  • ReadMe file to build docker image and run BESS CNDP example scripts.

Signed-off-by: Manoj Gopalakrishnan manoj.gopalakrishnan@intel.com

env/Dockerfile-cndp Outdated Show resolved Hide resolved
CNDP_README.md Show resolved Hide resolved
bessctl/conf/samples/cndp/fwd.jsonc Outdated Show resolved Hide resolved
bessctl/conf/samples/cndp/fwd.jsonc Outdated Show resolved Hide resolved
@gab-arrobo
Copy link
Contributor

@thakurajayL, question, do all files need to have license header? If so, license header needs to be added to all files in bessctl/conf/samples/cndp directory

bessctl/conf/samples/cndp/fwd.jsonc Outdated Show resolved Hide resolved
bessctl/conf/samples/cndp/fwd.jsonc Outdated Show resolved Hide resolved
@thakurajayL
Copy link
Contributor

Yes all new files should have copyright. If existing files have seen changes then there also copyright should be updated with appropriate company name.

@thakurajayL
Copy link
Contributor

But bess is new project and it may not have all copyright set. But at least let's make sure that newly added code has copyright set.

@gab-arrobo
Copy link
Contributor

But bess is new project and it may not have all copyright set. But at least let's make sure that newly added code has copyright set.

@manojgop, as per @thakurajayL input, please add license header to all your files in the bessctl/conf/samples/cndp directory.

@manojgop
Copy link
Contributor Author

manojgop commented Nov 9, 2022

But bess is new project and it may not have all copyright set. But at least let's make sure that newly added code has copyright set.

@manojgop, as per @thakurajayL input, please add license header to all your files in the bessctl/conf/samples/cndp directory.

Added and updated PR

CNDP_README.md Outdated Show resolved Hide resolved
CNDP_README.md Outdated Show resolved Hide resolved
CNDP_README.md Outdated Show resolved Hide resolved
CNDP_README.md Outdated Show resolved Hide resolved
CNDP_README.md Outdated Show resolved Hide resolved
core/drivers/cndp/cndp.h Outdated Show resolved Hide resolved
env/Dockerfile-cndp Outdated Show resolved Hide resolved
env/Dockerfile-cndp Outdated Show resolved Hide resolved
env/Dockerfile-cndp Outdated Show resolved Hide resolved
protobuf/ports/port_msg.proto Outdated Show resolved Hide resolved
@manojgop manojgop force-pushed the feat_cndp_bess_port branch 2 times, most recently from 0d612a7 to ef5cef8 Compare November 24, 2022 12:26
@gab-arrobo
Copy link
Contributor

@manojgop, a few updates/changes were pushed to the BESS and UPF repos. So, please make sure your changes are up to date.

@manojgop
Copy link
Contributor Author

@manojgop, a few updates/changes were pushed to the BESS and UPF repos. So, please make sure your changes are up to date.

I have rebased this PR with latest changes. There are no conflicts.

@gab-arrobo
Copy link
Contributor

@manojgop, I think you need to rebase your fork and/or branch because there are several commits that have been added to BESS repo in the past few weeks.

@gab-arrobo
Copy link
Contributor

@manojgop can you please rebase your feat_cndp_bess_port branch to include the latest changes from the omec-project:dpdk-2011-focal branch? So, all of the newer GitHub Actions are executed. Thanks!

@manojgop manojgop force-pushed the feat_cndp_bess_port branch 2 times, most recently from 7e29c0e to 0cbe145 Compare February 20, 2023 04:35
@manojgop
Copy link
Contributor Author

@manojgop can you please rebase your feat_cndp_bess_port branch to include the latest changes from the omec-project:dpdk-2011-focal branch? So, all of the newer GitHub Actions are executed. Thanks!

Just did. workflows awaiting approval

@gab-arrobo
Copy link
Contributor

@manojgop can you please rebase your feat_cndp_bess_port branch to include the latest changes from the omec-project:dpdk-2011-focal branch? So, all of the newer GitHub Actions are executed. Thanks!

Just did. workflows awaiting approval

Thanks... workflows are running now.

@gab-arrobo
Copy link
Contributor

@manojgop can you please rebase your feat_cndp_bess_port branch to include the latest changes from the omec-project:dpdk-2011-focal branch? So, all of the newer GitHub Actions are executed. Thanks!

Just did. workflows awaiting approval

Thanks... workflows are running now.

The workflow for checking Protobuf format failed. Please check that using clang-format-12 and make sure your changes comply with it.

@manojgop
Copy link
Contributor Author

@gab-arrobo I'm seeing a clang-format error in protobuf/ports/port_msg.proto. I ran clang-format on this file and updated the PR (though this change is unrelated to the PR). But this issue is still seen. Any idea why checks are failing ?

@gab-arrobo
Copy link
Contributor

@gab-arrobo I'm seeing a clang-format error in protobuf/ports/port_msg.proto. I ran clang-format on this file and updated the PR (though this change is unrelated to the PR). But this issue is still seen. Any idea why checks are failing ?

Let me check tomorrow and get back to you.

@gab-arrobo
Copy link
Contributor

@gab-arrobo I'm seeing a clang-format error in protobuf/ports/port_msg.proto. I ran clang-format on this file and updated the PR (though this change is unrelated to the PR). But this issue is still seen. Any idea why checks are failing ?

Did you run clang-format-12? This seems to be the problem:

diff --git a/protobuf/ports/port_msg.proto b/protobuf/ports/port_msg.proto
index 4fb9160c..d2b9b175 100644
--- a/protobuf/ports/port_msg.proto
+++ b/protobuf/ports/port_msg.proto
@@ -52,9 +52,7 @@ message PMDPortArg {
   bool vlan_offload_rx_strip = 5;
   bool vlan_offload_rx_filter = 6;
   bool vlan_offload_rx_qinq = 7;
-  oneof socket {
-    int32 socket_id = 8;
-  }
+  oneof socket { int32 socket_id = 8; }
   bool promiscuous_mode = 9;
   bool hwcksum = 10;

@manojgop
Copy link
Contributor Author

clang-format version in my system is 14. Ubuntu clang-format version 14.0.0-1ubuntu1. So should I use clang-format-12 instead ?

@manojgop manojgop force-pushed the feat_cndp_bess_port branch 12 times, most recently from 46843c4 to 4d532b3 Compare March 8, 2023 12:58
.github/workflows/pull_request.yaml Outdated Show resolved Hide resolved
.github/workflows/pull_request.yaml Outdated Show resolved Hide resolved
.github/workflows/pull_request.yaml Outdated Show resolved Hide resolved
env/Dockerfile-cndp Outdated Show resolved Hide resolved
gab-arrobo
gab-arrobo previously approved these changes Mar 9, 2023
Copy link
Contributor

@gab-arrobo gab-arrobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@gab-arrobo
Copy link
Contributor

@thakurajayL @badhrinathpa, please try to take a look at this PR. Everything looks good to me

gab-arrobo
gab-arrobo previously approved these changes Mar 9, 2023
Copy link
Contributor

@gab-arrobo gab-arrobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

- CNDP BESS port to send/receive n/w packets using AF_XDP socket.
- Modify Bess core Makefile to build CNDP port driver.
- Dockerfile to build BESS with CNDP.
- Add "CndpPortArg" in port_msg.proto file to initialize Bess CNDP port.
- Use external BESS PacketPool (rte_mempool/rte_mbuf) with CNDP xskdev.
- Example scripts to test Bess CNDP port.
- ReadMe file to build docker image and run BESS CNDP example scripts.
- GitHub Action for running CNDP tests.

Signed-off-by: Manoj Gopalakrishnan <manoj.gopalakrishnan@intel.com>
Copy link
Contributor

@gab-arrobo gab-arrobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@gab-arrobo gab-arrobo merged commit 50d34ec into omec-project:dpdk-2011-focal Mar 20, 2023
gab-arrobo added a commit that referenced this pull request Jun 20, 2023
…the `master` branch (#21)

* Upgrade DPDK to 20.11

- address memseg and mbuf changes
- move to meson/ninja build system

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>

* Update DPDK version to 20.11.3

ice ddp loading seems reliable when using a PF with this version

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>

* Allow override of base image with IMAGE

IMAGE="ghcr.io/omec-project/upf-epc/bess_build" \
./container_build.py shell

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>

* Use focal base image

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>

* 0001-Add-2-workers-support-to-Nat-module

* 0002-Use-same-rss-key-across-interfaces

* 0003-Add-FIB-routing-support-in-IPLookup-module

* 0004-IOVA-mode-correction

* 0005-Expose-PMDPort-socket-memory-allocation

* 0006-Add-switch-for-promiscuous-mode

* 0008-Enable-hardware-checksum-offload

* 0009-Adding-value-attributes-to-ExactMatch-WildcardMatch

* 0010-Add-hardware-rx-checksum-offload-option-for-checksum

* 0011-Protobuf-update-to-new-module-messages

* 0012-Dpdk-concurrent-hash-support-pipeline-improvement

* 0013-Use-rte_flow_create-to-do-GTPU-RSS

* 0014-Add-ice-iavf-to-list-of-drivers-need-SW-port-stats

* 0015-Protobuf-changes-for-Qos

* 0016-Newer-versions-require-go_package-stated-in-proto

* 0017-Make-table-sizes-configurable

* 0017-QoS-Measure

* 0018-Increase-max-tuple-num

* 0019-GUI-dot-module-name-quote

* Removed deprecated DPDK options/functions

* Remove unnecesary `endl`

* Fix a couple typos

* Remove unused variables

* No need to use `move`

* Improve code

* Fix Doxygen for AddMetadataAttr method

* Bring DPDK patch from UPF

* Move BESS-related files to BESS repo

* Bring BESS scripts from UPF repo

* Update links to reference ONF's BESS

* Remove unnecesary `endl` in loggings

* Fix stringstream

* Fix format in files

* Add override keyword and remove unused attribute

* Ubuntu Focal includes this package

* Update CXXFLAGS to work with g++ and clang

* Explicitily include server_builder.h

* Temporarily disabling some tests due to changes made in UPF.
Need to address the issues one by one

* Add missing header file <linux/ethtool.h>

* Use `bytes` for the scapy packets due to problems when using `str`

* Moving to python3 due to Python2 EOL
These changes are needed to be able to build and test bess with GitHub Actions

* Use ghcr.io/omec-project/upf-epc/bess_build for the BESS dependencies
This bess_build includes the changes needed to build DPDK 20.11

* Add GitHub Action that will trigger the Build and Test process
Additionally, remove Travis.yml file that is not needed anymore

* Create pull_request.yaml

* Update README.md

test the workflow

* Remove unnecessary file

* Update sugar.py

* Action for dependabot and check license/copyright (#14)

* Action for dependabot and check license/copyright

* Remove empty line

* Add empty line at end of file

* Add GitHub Action for checking code format (C/C++ and Protobuf) (#15)

* Add GitHub Action for checking code format (C/C++ and Protobuf)

* Update GitHub Action to only remove the OS from the matrix

* Address issues with format compliance for protobuf files

* Add missing file that was not formatted

* Update parameters for GitHub Action

* Add missing license/copyright header and add an exception

* Refactor define for the GTPu header (#16)

* Update GitHub Action to build docker image locally (#18)

- Update GitHub Actions to build docker image locally during pull request
- Use protobuf version 3.20 to fix errors in generated _pb2.py file

Signed-off-by: Manoj Gopalakrishnan <manoj.gopalakrishnan@intel.com>

* Add support for CNDP(Cloud Native Data Plane) port in BESS. (#2)

- CNDP BESS port to send/receive n/w packets using AF_XDP socket.
- Modify Bess core Makefile to build CNDP port driver.
- Dockerfile to build BESS with CNDP.
- Add "CndpPortArg" in port_msg.proto file to initialize Bess CNDP port.
- Use external BESS PacketPool (rte_mempool/rte_mbuf) with CNDP xskdev.
- Example scripts to test Bess CNDP port.
- ReadMe file to build docker image and run BESS CNDP example scripts.
- GitHub Action for running CNDP tests.

Signed-off-by: Manoj Gopalakrishnan <manoj.gopalakrishnan@intel.com>

* Build new image taking into account new dependencies (e.g., CNDP) (#22)

* Fix typo (#17)

* Enable GTPu path monitoring (#19)

* Enable GTPu path monitoring

* Update pktbatch.h (#24)

---------

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
Signed-off-by: Manoj Gopalakrishnan <manoj.gopalakrishnan@intel.com>
Co-authored-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
Co-authored-by: Ajay Lotan Thakur <ajay@opennetworking.org>
Co-authored-by: Ajay Lotan Thakur <thakur.ajay@gmail.com>
Co-authored-by: Amol Jaikar <111894366+amolonf@users.noreply.github.com>
Co-authored-by: Badhrinath <badhrinath.pa@gmail.com>
Co-authored-by: manojgop <manoj.gopalakrishnan@intel.com>
JayaramRCDAC added a commit to JayaramRCDAC/bess that referenced this pull request Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants