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

To Add PNA support into BMv2. #1245

Open
rupesh-chiluka-marvell opened this issue Apr 17, 2024 · 7 comments
Open

To Add PNA support into BMv2. #1245

rupesh-chiluka-marvell opened this issue Apr 17, 2024 · 7 comments

Comments

@rupesh-chiluka-marvell
Copy link
Contributor

Hello everyone,

Currently BMv2 doesn't support PNA. I want to add initial PNA support into BMv2. I have outlined few changes to make PNA integration possible:
• Updates to context.h, packet.h, and addition of a new file for PNA (just like switch.h) in the include/bm_sim directory.
• Modification of bm_runtime.h in the include/bm_runtime directory.
• Creation of few separate server.cpp files to facilitate PNA support in the src/bm_runtime directory.
• Creation of a new cpp file for PNA (just like switch.cpp) in the src/bm_sim directory.
• A separate directory containing the core logic and externs of PNA in the targets directory.
• Adjustments to related makefiles to ensure the new changes are compiled and built correctly.

I have submitted a PR in BMv2: #1240 for the initial PNA integration into BMv2.

Your feedback is much appreciated.
Need feedback on how to best split the PR.

@qobilidop
Copy link
Member

@qobilidop
Copy link
Member

First, thank you @rupesh-chiluka-marvell for your effort on open sourcing this work!

I'm not the most qualified person to give suggestions here, but just want to share some high-level thoughts and hopefully stimulate more discussions that could lead to better and more detailed solutions.

Regarding PR splitting, I think a test-driven approach might work for this process. The idea is to split into a series of PRs with each making a single P4 test program work. For example, the first PR could introduce minimal changes to BMv2 and p4c to enable a minimal P4 PNA program (e.g. single state parser + empty control block) to compile with p4c and run with BMv2. Each subsequent PRs will make the test P4 program a little bit more complicated.

@qobilidop
Copy link
Member

Also to give a better context to everyone, I'd like to attach @antoninbas's suggestion from the email thread:

We will have a better idea of the actual size of the bmv2 PR once the nanomsg files are removed. But yes, there should be potential for splitting up the PR after that, e.g., externs could be added in a subsequent PR.

@fruffy
Copy link
Contributor

fruffy commented Apr 18, 2024

In general, I would clean up the original PRs before we can even start to make suggestions on how to break them down. This means removing nanomsg and thrift.

@rupesh-chiluka-marvell
Copy link
Contributor Author

Created a new PR with just skeleton of pna_nic: #1255

@KrisNey-MSFT
Copy link

I am also very interested in the addition of PNA into bmv2 - along w/Mario Baldi. Do we have quite some way to go still?

@qobilidop
Copy link
Member

@KrisNey-MSFT There is definitely more work to do, and some collaboration is much appreciated!

As to the P4 GSoC project, @rupesh-chiluka-marvell will write a final report and publish it in https://github.com/p4lang/gsoc soon. That could probably be a good starting point for further discussions.

We are also planning to host a P4 GSoC wrap-up meeting some time in early September, where Rupesh will give a presentation about his work. If you are interested, maybe joining that meeting for some live discussion could also be useful. We'll notify the P4 community about the details once the meeting date is finalized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants