Skip to content

Allow for larger max_port_counts than 512 in PRE #1341

@verios-google

Description

@verios-google

Previously there was an issue for configurable max_port that appeared to be resolved by @antoninbas generous pull request

It appears that include/bm/bm_sim/simple_pre.h has a bitmap for ports that is statically set to 512. This means that any customer that want's to use a port larger than 511 cannot

Also (I don't know if this is significant) pdfixed/include/bm/pdfixed/pd_pre.h defines PRE_PORTS_MAX as 512

As @antoninbas mentioned in his pull request
"Note that for v1model.p4 (base architecture for simple_switch) the
default bitwidth for port fields is 9-bit, so only ports in the [0, 511]
range are supported. The burden is on the v1model user to change the
bitwidth if so desired. In psa.p4, the default bitwidth is 32."

There is a another issue opened in p4c to update that bitwidth to 32

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions