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

Added guide to add table entries in P4 dpdk using native control plan… #116

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Vineet1101
Copy link

PR Title: Add Guide for Adding Table Entries to P4 DPDK Using Native Control Plane API

Description:

This PR adds a comprehensive guide on how to add table entries to a P4 DPDK pipeline using its native control plane API. The guide walks through the necessary steps to interact with the P4 DPDK control plane, providing an in-depth explanation of:

  • Setting up the environment for P4 DPDK.
  • Writing and compiling a P4 program for DPDK.
  • Using the native control plane API to insert table entries dynamically.
  • Verifying table entries using appropriate commands or logging outputs.

Related Issues:

Fixes #27

@Vineet1101
Copy link
Author

@jafingerhut please review this

Copy link
Collaborator

@swaroopsarma swaroopsarma left a comment

Choose a reason for hiding this comment

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

initial placement comments

@@ -0,0 +1,190 @@
/* -*- P4_16 -*- */
Copy link
Collaborator

Choose a reason for hiding this comment

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

move the P4 to examples directory


CC = gcc
CFLAGS = -Wall -Werror
LDFLAGS = -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lp4rt
Copy link
Collaborator

Choose a reason for hiding this comment

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

add instructions on how to download p4rt

@@ -0,0 +1,226 @@
#include <stdio.h>
Copy link
Collaborator

Choose a reason for hiding this comment

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

create and move this to e2e-test/p4rt. Provide make file also as part of test being added rather than providing in guide

@@ -0,0 +1,100 @@
#!/usr/bin/env python3
Copy link
Collaborator

Choose a reason for hiding this comment

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

move to e2e-test/p4rt

Signed-off-by: Vineet1101 <Vineetgoel692@gmail.com>
@Vineet1101
Copy link
Author

@swaroopsarma I have made the changes can you review them

@Vineet1101 Vineet1101 requested a review from swaroopsarma March 3, 2025 10:44
@swaroopsarma
Copy link
Collaborator

Makefile in e2e-test p4rt missing

@Vineet1101
Copy link
Author

The gitignore file has mentioned Makefile so should i remove it from there or I add that part in the guide??

@swaroopsarma
Copy link
Collaborator

The gitignore file has mentioned Makefile so should i remove it from there or I add that part in the guide??

you can still add it with git add -f though its in gitignore

@Vineet1101
Copy link
Author

@swaroopsarma I have added the makefile

@jafingerhut
Copy link
Contributor

@swaroopsarma I have added the makefile

The makefile I see added in the PR is an empty file. That was not the intent of the comment, I don't think.

@Vineet1101
Copy link
Author

@jafingerhut I have updated the code of makefile

@jafingerhut
Copy link
Contributor

@jafingerhut please review this

I would be happy to do so when I have some time to try out the steps and see if they work.

I would like to ask: have you tried out the steps in your instructions and successfully installed the necessary software on a aystem of your own, and successfully run the test P4 program and control plane code interacting with it?

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