GithubHelp home page GithubHelp logo

Comments (6)

jfingerh avatar jfingerh commented on June 2, 2024

TODO Andy: Discussing this with Cristian Dumitrescu on precisely how these would be implemented on DPDK.

Note that they are already implemented on BMv2 for the v1model architecture. The PSA implementation for BMv2 is only partial as of 2022-Oct, with no one that I know of currently actively working to finish it. Similarly, I do not know of anyone working on BMv2 implementation of PNA architecture at this time.

from pna.

jfingerh avatar jfingerh commented on June 2, 2024

Consider adding log_msg to both PSA and PNA, not only PNA.

from pna.

apinski-cavium avatar apinski-cavium commented on June 2, 2024

+1 for me.
I might have HW which supports having these log messages out somewhere so it might be useful to mention that like assert it can be turned into a no-op by some mechanism (like you said on real HW it would be a no-op).

from pna.

apinski-cavium avatar apinski-cavium commented on June 2, 2024

This is more question of how {} are handled, and about the formatting part. Does {0} says the first element of the tuple or is it just {}. How does printing of a header/struct work? For a header, does it print each field and the valid/invalid field. Or is the tuple just supposed to be a tuple of bit/int/bool types (or is bool not supported there).
Or is this just left up to the implementation on what is supported or not supported?
I think defining a standard set of what is the min supported here would be a good idea.

from pna.

jfingerh avatar jfingerh commented on June 2, 2024

I think the BMv2 implementation of this is fairly bare-bones, where each {} in the format string corresponds to the next value to be printed, and there is no variation supported in the format, e.g. no choice of decimal/hex/binary/etc. If you have an Ubuntu system where you are willing to install p4c/behavioral-model/etc. open source dev tools, and write little v1model programs to try out different types of values to log_msg to see what it does today, it shouldn't take long, but I can hack up something over the weekend to show some examples too.

https://github.com/jafingerhut/p4-guide/blob/master/bin/README-install-troubleshooting.md

from pna.

jfingerh avatar jfingerh commented on June 2, 2024

I have updated the comments in the p4c test program issue2201-bmv2.p4 with this PR, so that the comments are up to date with the latest behavioral-model/BMv2 simple_switch behavior of its implementation of the log_msg extern function: p4lang/p4c#3637

Note: There is no spec defining its behavior. It was an implementation created by someone for BMv2, and I'd say does something fairly expedient but useful. I do not know how many people rely on its current precise behavior. I would guess not many, but for all I know someone has created automated test scripts that parse the output of simple_switch to recognize these messages and check their contents :-)

from pna.

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.