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

Part 1 for PSA support #601

Merged
merged 67 commits into from
May 11, 2017
Merged

Part 1 for PSA support #601

merged 67 commits into from
May 11, 2017

Commits on May 10, 2017

  1. Adds PSA specification.

      - Comments on how to handle the semantics of multiple PRE invocations
      - and design option of splitting the PRE into PRE and BQE (Buffering
      and Queueing Engine)
      - added PRE as argument to Ingress and Egress
      - added missing 'in' qualifiers and random distribution
      - add size types instead of indefinite int
      - update with @mbudiu-vmw comments to pass through compiler
      - ActionProfile and ActionSelector externs
    Calin Cascaval authored and Han Wang committed May 10, 2017
    Configuration menu
    Copy the full SHA
    d5e1441 View commit details
    Browse the repository at this point in the history

Commits on May 11, 2017

  1. Bmv2 multi-architecture support

    This commit refactors bmv2 backend to support multiple pipelien
    architectures. JsonConverter is refactored into a pass manager
    which is more conformed to the rest of the compiler design.
    
    Added files:
    backend.cpp       - the new backend pass manager
    convert*.cpp      - compiler passes for control, parser, deparser,
                        externs and headers
    inferArchitecture - a new frontend pass to parse the architecture p4
                        into a data object which is then used by json
                        generator
    model.cpp         - a v2model that oriented for p4-16 IR
    
    TODO:
    tov1model         - a pass to convert v2model to v1model to execute
                        on simple-switch
    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    dfb7957 View commit details
    Browse the repository at this point in the history
  2. adds metadata remapping (#4)

    Calin Cascaval authored and Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    13e2b15 View commit details
    Browse the repository at this point in the history
  3. fix gtest

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    16c32aa View commit details
    Browse the repository at this point in the history
  4. simplified filenames

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    7e345e9 View commit details
    Browse the repository at this point in the history
  5. factor out extern json generation from jsonconverter to v1model (#5)

    Calin Cascaval authored and Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    2de4e05 View commit details
    Browse the repository at this point in the history
  6. V1Model::convertExternObjects

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    a484540 View commit details
    Browse the repository at this point in the history
  7. adds extern function serialization (#6)

    Calin Cascaval authored and Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    bbd4e5d View commit details
    Browse the repository at this point in the history
  8. checkpoint

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    584c61b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    260b313 View commit details
    Browse the repository at this point in the history
  10. fix error code generation

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    e129eab View commit details
    Browse the repository at this point in the history
  11. use v1model header generation routine

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    6a01520 View commit details
    Browse the repository at this point in the history
  12. add headerstack generation

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    f5bf970 View commit details
    Browse the repository at this point in the history
  13. support for directCounterMap (#7)

    Calin Cascaval authored and Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    87934f2 View commit details
    Browse the repository at this point in the history
  14. refactor deparser

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    b71aab7 View commit details
    Browse the repository at this point in the history
  15. fixed issues with pipeline generation

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    d441c26 View commit details
    Browse the repository at this point in the history
  16. start to add metadata handling (#8)

    Also fixes issues with decl handling and match types.
    Calin Cascaval authored and Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    ff285d6 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    95ec081 View commit details
    Browse the repository at this point in the history
  18. fix standard metadata generation

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    889a7a8 View commit details
    Browse the repository at this point in the history
  19. fix deparser generation

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    63012bb View commit details
    Browse the repository at this point in the history
  20. clean up

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    c651b1f View commit details
    Browse the repository at this point in the history
  21. move meta and program section to top of json

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    c989e79 View commit details
    Browse the repository at this point in the history
  22. adds field_aliases to support remapping of metadata names (#9)

    BMV2 supports field_aliases to facilitate using different names
    in the P4 programs from the names supported by the target.
    For PSA and P4D2 we define a different set of metadata and a map
    file to map to bmv2 simple_switch (aka v1model). The name map name
    is currently hardcoded, and it should be set by the compiler driver
    as it knows which architecture and which target.
    
    Also removes the force_arith field in json, since it is no longer used.
    
    This started initially as a pass to rename metadata in the program.
    It seems to not be necessary, so the code is #ifdef-ed out. We should
    remove it in the final version if we find that it is really not
    needed.
    Calin Cascaval authored and Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    0fff6cf View commit details
    Browse the repository at this point in the history
  23. checkpoint: need to fix counter_array generation

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    571e5b2 View commit details
    Browse the repository at this point in the history
  24. removed psa gtest

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    e73664d View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    2988b83 View commit details
    Browse the repository at this point in the history
  26. unique headers and disable field aliases (#10)

    * generate only one header instance
    
    * disable field aliases until we figure out how to handle multiple aliases to the same standard metadata field
    Calin Cascaval authored and Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    02e6bb4 View commit details
    Browse the repository at this point in the history
  27. fix v1model extern instance generation

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    6635ac0 View commit details
    Browse the repository at this point in the history
  28. continue if extern is generated to avoid BUG()

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    5c12025 View commit details
    Browse the repository at this point in the history
  29. refactor parser input

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    a69222c View commit details
    Browse the repository at this point in the history
  30. clean up

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    9766bf4 View commit details
    Browse the repository at this point in the history
  31. cpplint

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    3a8906b View commit details
    Browse the repository at this point in the history
  32. fix scalar name generation

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    d45e2d4 View commit details
    Browse the repository at this point in the history
  33. fix standard metadata field generation

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    6baa7c9 View commit details
    Browse the repository at this point in the history
  34. fix match kind parsing

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    2a2cfab View commit details
    Browse the repository at this point in the history
  35. pass midend refmap and typemap to facilitate v1() conversion (#11)

    Calin Cascaval authored and Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    ba6cbd6 View commit details
    Browse the repository at this point in the history
  36. do not generate extern_instances for v1model

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    1dc89fe View commit details
    Browse the repository at this point in the history
  37. fix meter generation issue

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    d0183df View commit details
    Browse the repository at this point in the history
  38. fix standard metadata name generation

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    eaa4f09 View commit details
    Browse the repository at this point in the history
  39. fix header stack generation

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    bef0b07 View commit details
    Browse the repository at this point in the history
  40. set refMap to v1 and initialize the control names for ingress and egr…

    …ess (#12)
    Calin Cascaval authored and Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    b996987 View commit details
    Browse the repository at this point in the history
  41. uses midEnd refMap and typeMap, because the backend generated ones ar…

    …e not the same
    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    451c0fa View commit details
    Browse the repository at this point in the history
  42. clean up

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    df545fa View commit details
    Browse the repository at this point in the history
  43. upstreaming

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    be7e076 View commit details
    Browse the repository at this point in the history
  44. add jsonObjects class to manage json in backend

    - refactor meta_info, program and enum generation
    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    9f06b1c View commit details
    Browse the repository at this point in the history
  45. clean up header and parser generation

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    6b3cb58 View commit details
    Browse the repository at this point in the history
  46. simplified header generation code

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    03a94d3 View commit details
    Browse the repository at this point in the history
  47. tweaks p4d2model and adds testcase (#13)

    Calin Cascaval authored and Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    3c44059 View commit details
    Browse the repository at this point in the history
  48. moved actions outside control to macros (#14)

    Calin Cascaval authored and Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    9fd2f6a View commit details
    Browse the repository at this point in the history
  49. bugfix in enum generation

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    6a6fd9b View commit details
    Browse the repository at this point in the history
  50. add ipv4_forward example for p4d2 (#15)

    Calin Cascaval authored and Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    d57aaaa View commit details
    Browse the repository at this point in the history
  51. refactor done on header.cpp

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    beb43f6 View commit details
    Browse the repository at this point in the history
  52. clean up

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    9af4581 View commit details
    Browse the repository at this point in the history
  53. clear warnings

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    c8e00df View commit details
    Browse the repository at this point in the history
  54. use conv instead of getExpressionConverter

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    59fde68 View commit details
    Browse the repository at this point in the history
  55. clean up extern generation

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    95fd63e View commit details
    Browse the repository at this point in the history
  56. minor

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    6cb3b07 View commit details
    Browse the repository at this point in the history
  57. expands the v1model standard metadata to cover all metadata exposed b…

    …y simple switch
    
    Allows access to bmv2 simple switch intrinsic and queueing metadata
    for programs that use the v1model. While these metadata would be
    available by defining separate metadata with the correct names, it is
    desirable that the functionality is exposed in the architecture
    definition. This patch will work with any metadata that has fields
    renamed.
    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    80cf530 View commit details
    Browse the repository at this point in the history
  58. fix duplicated standard_metadata bug

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    7c59a80 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    7bf1a65 View commit details
    Browse the repository at this point in the history
  60. revert changes to lib/error.h and parser4.p4

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    7916c99 View commit details
    Browse the repository at this point in the history
  61. address review comments

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    178b0f9 View commit details
    Browse the repository at this point in the history
  62. remove unused test case

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    4bab1e4 View commit details
    Browse the repository at this point in the history
  63. put back actionSelectorCheck in control.cpp

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    0e4283d View commit details
    Browse the repository at this point in the history
  64. fixing rebase errors

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    90965fa View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    c08bec7 View commit details
    Browse the repository at this point in the history
  66. cpplint

    Han Wang committed May 11, 2017
    Configuration menu
    Copy the full SHA
    fd729d4 View commit details
    Browse the repository at this point in the history