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 P4 Behavioral Model #492

Merged
merged 33 commits into from
Jul 3, 2018
Merged

Added P4 Behavioral Model #492

merged 33 commits into from
Jul 3, 2018

Conversation

snifbh
Copy link
Collaborator

@snifbh snifbh commented Apr 5, 2017

This pull request contains:

  • A general switch P4 behavioral model.
  • Implementation of the SAI API over the P4 BM.
  • unit test example for the sai api usage.
  • Thirft sai server implementation and ptf tests.

currently only L2 (1D,1Q) flows are supported.

@kcudnik
Copy link
Collaborator

kcudnik commented Apr 5, 2017

Almost 600 files in one commit ? can you split that into couple PR ? Are all files go to BM directory ?

@snifbh
Copy link
Collaborator Author

snifbh commented Apr 6, 2017

  1. All files are in the BM directory.
  2. this PR needs the P4 environment (~60% of the files), found under BM/p4-softswtich/. it is required to compile the BM.
  3. this pull request can be splitted: the PTF, unittest, and sai_thrift_server (BM/sai_adapter/tests/ ~100 files) are done in another PR, but I think that the tests show usage examples and simplify the model understanding.

@kcudnik
Copy link
Collaborator

kcudnik commented Apr 6, 2017

Does this needs to be in SAI repo ? is that developed for SAI ? or maybe this can be in other repo and jus be git submodule here? I believe nobody will be able to do review of this code in this form

@lguohan
Copy link
Collaborator

lguohan commented Apr 6, 2017

yes, this provides the official SAI compliant software switch.

@lguohan
Copy link
Collaborator

lguohan commented Apr 7, 2017

@snifbh, can you rename the root directory to bm? we are using non capital letters.

@YonatanPitz
Copy link
Contributor

@lguohan done.

@lguohan
Copy link
Collaborator

lguohan commented Apr 7, 2017

did we modify any p4 switch behavior model? Is it possible to use submodule to link to a p4 switch behavior model here? The concern is that from time to time we probably want to upgrade to a new p4 switch behavior model.

I prefer to only have following in the SAI repo.

  • our p4 program, P4-SAI.
  • Implementation of the SAI API over the P4 BM.
  • unit test example for the sai api usage.
  • Thirft sai server implementation and ptf tests.

Then, we can have a submodule link to bmv2 software, so that we can compile our P4-SAI model.

This may be cleaner and more easy to understand our own contribution.

@snifbh
Copy link
Collaborator Author

snifbh commented Apr 19, 2017

@lguohan
I agree that using the behavioral model as submodule here is much cleaner.
But we have implementation issue:
Currently the behavioral model doesn't support external target (our P4-SAI MUST be in the behavioral-model/targets/ folder)
We might be able work around this, but it will be much less clean.
I'll try to open the external target feature with the P4 community, but for now, I suggest we keep it like this.

@lguohan
Copy link
Collaborator

lguohan commented Apr 20, 2017

we can do this using our own build script, for example, first copy our target to the behaviroal-model/targets/folder and then compile.

@snifbh
Copy link
Collaborator Author

snifbh commented May 3, 2017

@lguohan done.

@lguohan lguohan merged commit 09d8c74 into opencomputeproject:master Jul 3, 2018
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.

4 participants