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

DPDK Backend: Register extern support for bfrt.json #3711

Closed
wants to merge 6 commits into from

Conversation

usha1830
Copy link
Contributor

This PR adds support for register extern in bfrt.json.
A new table is emitted for the register instance. This is as expected by the p4-dpdk-target.

    {
      "name" : "ip.MyIC.reg",
      "id" : 369588800,
      "table_type" : "Register",
      "size" : 1024,
      "annotations" : [],
      "depends_on" : [],
      "key" : [
        {
          "id" : 65557,
          "name" : "$REGISTER_INDEX",
          "repeated" : false,
          "annotations" : [],
          "mandatory" : true,
          "match_type" : "Exact",
          "type" : {
            "type" : "uint32"
          }
        }
      ],
      "data" : [
        {
          "mandatory" : false,
          "read_only" : false,
          "singleton" : {
            "id" : 65557,
            "name" : "$REGISTER_INDEX",
            "repeated" : false,
            "annotations" : [],
            "type" : {
              "type" : "bytes",
              "width" : 16
            }
          }
        }
      ],
      "supported_operations" : ["Sync"],
      "attributes" : []
    }

Copy link
Contributor

@mihaibudiu mihaibudiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not really qualified to review the bfruntime changes, so I cannot approve this.
There are lots of whitespace changes, ideally these should be a separate PR, but there's no point making one one. Is this from clang-format?

@usha1830
Copy link
Contributor Author

I am not really qualified to review the bfruntime changes, so I cannot approve this. There are lots of whitespace changes, ideally these should be a separate PR, but there's no point making one one. Is this from clang-format?

Yes the whitespace changes are coming from clang-format

@usha1830
Copy link
Contributor Author

Adding @swaroopsarma working on the https://github.com/p4lang/p4-dpdk-target which is consuming the output bfrt.json

@swaroopsarma
Copy link

Adding @swaroopsarma working on the https://github.com/p4lang/p4-dpdk-target which is consuming the output bfrt.json

I dont have privilege to approve this request but the run time changes are as per the requested format which is adhering to the requirements

@fruffy
Copy link
Collaborator

fruffy commented Nov 22, 2022

There are some changes to testgen, which is why some users are required as reviewers. Can you revert those changes? They seem benign.

@usha1830
Copy link
Contributor Author

There are some changes to testgen, which is why some users are required as reviewers. Can you revert those changes? They seem benign.

I reverted the changes in testgen directory

@usha1830
Copy link
Contributor Author

Closing this PR as there are unrelated formatting changes after multiple runs of different versions of clang-format. Created a new PR for the same with just the relevant changes.

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