GithubHelp home page GithubHelp logo

kevinbird61 / p4-researching Goto Github PK

View Code? Open in Web Editor NEW
95.0 3.0 25.0 19.96 MB

Testbed/Tutorials/Researching work on P4.

License: GNU General Public License v3.0

P4 48.18% Makefile 1.05% Shell 4.23% Python 36.80% Go 0.20% Dockerfile 0.39% Java 8.96% Starlark 0.18% C 0.01%
p4 controller learning p4runtime docker installation-help networking networking-programmability bmv2 mininet

p4-researching's Introduction

p4-researching

My Researching work on P4.

Notice: Current testing environment are not based on the latest version of P4. You can using the scripts under docker/ to build a docker image for these tests. And all the examinations are running on software switch, a.k.a "bmv2", and I use simple_switch_grpc as demonstration.

Environment Setting

Before getting started with P4 programming, we need a P4-capabled environment for running those scenario. And this repository summarize several methods and provide several way to accomplish.


About this repository

P4 (with Mininet)

  • More details under src/
  • Contain lots of P4 practices and scenarios, which based on the open source software switch - BMv2 and mininet, with P4Runtime support to finish those work.

Notice:

v0 users: You can found some tutorials in branch:tutorials

v1 users: Use the master branch directly.

P4 with ONOS

Learning how to build an ONOS application which support P4. See more detail under onos/

Tracing P4Runtime

  • Look here, have some diagram about P4Runtime's dependencies.

Build network namespace

  • If you don't want to use mininet, you can use ip netns instead.
  • Under net/, have a demo script for building several network namespace.

Learning Materials

  • Provide some learning resources about Networking, which located in course/.
  • Welcome to contribute!

Author

National Cheng Kung University, 瞿旭民 (Kevin Cyu), [email protected]

Activities


Reference

p4-researching's People

Contributors

kevinbird61 avatar ting2313 avatar yungshenglu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

p4-researching's Issues

packet out not performed

I am using the learning switch and I noticed in the s1.log log and also in the controller processing (messages left by the controller after starting it) that the processing (while true) does not end in all received packets (packet in), or that is, the final message is not displayed at all packet-in. As if processing is stuck. The problem occurs when s1.PacketOut (packetout) is executed. Any idea why?

Monitor support

  • using python + matplotlib to plot the result monitor.
  • using python + web application to support real-time monitor.

Any scenario or example that using P4 is welcome!

If you have any SDN-related scenario that using P4/OpenFlow with software switch and controller, feel free to send Pull Request to master, which your scenario is under src/<your_scenario_name>.

advanced-topo pingall not working

Hi @kevinbird61, thanks for sharing this repo. I've been exploring some of the folders in src/fundamental/. I tested out basic-tutorial-switch and learning-switch, and they are working well. However, when testing advanced-topo, the pingall is not working correctly.

image

I did not change any code. I only used the provided scripts ./build.sh and make controller.

Also, another thing is that for basic-tutorial-switch, when I try to change the topology.json to my own topology, and also update the controller to install the correct rules, then it does not work as well. I am unable to ping any hosts. Any idea why this might happen?

Thanks!

Tutorials or Courses

Any tutorials or courses are welcome, too!
You can create a folder under courses/<your_tutorals_or_courses_name> for your precious materials!

learning switch loop after multiple switches

Greetings,

I am using your p4 learning switch program, but I have a problem regarding the multicast action. When I try to add another switch in the topology, I confront with loops. What is the meaning of the multicast in your controller and do you know if I can avoid the loops?

Regards

Adonis Chatzivasiliou

Makefile Error.

After fixing the typo, running make command and then the error log shown below:

int-transit.p4(171): [--Wwarn=uninitialized_out_param] warning: out parameter normal_meta may be uninitialized when IngressDeparserImpl terminates
    out metadata normal_meta,
                 ^^^^^^^^^^^
int-transit.p4(167)
control IngressDeparserImpl(
        ^^^^^^^^^^^^^^^^^^^
int-transit.p4(767): error: package PSA_Switch: main package does not match the expected model
)main;
 ^^^^
error: Are you using an up-to-date v1model.p4?
int-transit.p4(767): error: package PSA_Switch: main package does not match the expected model
)main;
 ^^^^
error: Are you using an up-to-date v1model.p4?
Makefile:4: recipe for target 'int' failed
make: *** [int] Error 1

And checking out the p4c/psa.p4 (L681), still can't find why the error said can not match "main" package.


Another try: using p4c-bm2-psa to compile, still can't fix the problem, another error message:

p4c-bm2-psa --std p4-16 -o int.json \
        --p4runtime-file int.p4info \
        --p4runtime-format text int-transit.p4
int-transit.p4(171): [--Wwarn=uninitialized_out_param] warning: out parameter normal_meta may be uninitialized when IngressDeparserImpl terminates
    out metadata normal_meta,
                 ^^^^^^^^^^^
int-transit.p4(167)
control IngressDeparserImpl(
        ^^^^^^^^^^^^^^^^^^^
make: *** [int] Segmentation fault: 11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.