Giter Club home page Giter Club logo

Comments (2)

jafingerhut avatar jafingerhut commented on July 30, 2024

Besides the partial documentation in the README and the one example in the examples directory in this repository, I also recall that the advanced track tutorial on the P4 developer day on 2019-May-01 used PTF tests. The creators of the tutorial created some almost-complete PTF tests in this repository: https://github.com/opennetworkinglab/onos-p4-tutorial

As far as inserting table entries, the example in this repository looks like it uses the Thrift API. The one in the onos-p4-tutorial uses the P4Runtime API, I believe, so basically PTF does not seem to mandate or require one particular control plane API -- it is whatever you can implement in Python.

I am not familiar enough with PTF to know that I am suggesting the best course of learning, but this example test contains calls to send_packet and verify_packet methods that are probably implemented somewhere within PTF for sending packets to a device, and checking captured output packets to see if they contain the expected contents:
https://github.com/opennetworkinglab/onos-p4-tutorial/blob/master/ptf/tests/routing.py

from ptf.

hesingh avatar hesingh commented on July 30, 2024

Thanks for getting back. I have seen several Python programs for PTF testing and each program uses its own packet generator to prepare sending packet and expected packet - not good. In comparison STF is so much better, just allowing sent/expected packets to be in hex. I don't see the tutorial examples show how to add a table entry. In other PTF programs I have seen, I see a different API used by different creators for adding a table entry - sigh! STF is so much better for basic packet testing with simple_switch.

from ptf.

Related Issues (20)

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.