Giter Site home page Giter Site logo

flay's Issues

Shall we allow adding disjunctive condition to reachabilityMap in addReachabilityMapping?

In current implementation of addReachabilityMapping, we always try to initialize for a pair of node and cond. However, in cases like this:

action copy_to_cpu(...) {
    // An if statement
    if (some_cond) {
        x = a;
    } else {
        x = b;
    }
    // codes to copy to cpu
}

action redirect_to_cpu(...) {
    // codes to drop
    copy_to_cpu(...) // this calls the previous action
}

the if statement in copy_to_cpu will be visited twice. And our ReachabilityMap is compared by SourceIdCmp. Thus, the second time to call addReachabilityMapping for this if statement will failed here.

I encountered this issue when trying on Tofino's switch program. And my fix in mind is instead of asserting existence of node, we should add new condition as disjunction to the reachabilityMap.

Does current `table_executor` consider default action reachability?

The current implementation of table_executor adds reachability for each action here. But the expression actionHitCondition is constructed with new IR::LAnd(hitCondition, actionChoice), where hitCondition is for key matching and actionChoice is for action name.

But for default actions, shall we add something like "if none of the actions matched, the default action will be reached"?

The reason I am thinking of this is that I noticed the removing for tna_operations.p4 looks incorrect. For example, if a packet misses on table forward, it should be dropped by executing default action miss. But since forward.apply() is removed, it won't be dropped.

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.