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

Applying the same table twice #1237

Open
smolkaj opened this issue Apr 3, 2024 · 3 comments
Open

Applying the same table twice #1237

smolkaj opened this issue Apr 3, 2024 · 3 comments

Comments

@smolkaj
Copy link
Member

smolkaj commented Apr 3, 2024

Today, BMv2 does not allow us to apply the same table twice, see e.g. #231 and #1158.

@jafingerhut noted in #1158:

bmv2 does have some artificially imposed limitations in the P4 programs you can write, e.g. you cannot apply() the same table twice in the same control

I would like to understand why this restriction was "artificially imposed", if there are any concerns about lifting it, and how challenging that might be.

I suspect the restriction may just exist to mimic hardware switches like the Tofino? cc @kheradmandG

@jafingerhut
Copy link
Contributor

jafingerhut commented Apr 3, 2024

For some discussion on this, see this issue, especially the recently added comments: p4lang/p4c#457

Note that my "artificially imposed" phrase might have been poorly chosen -- there were some reasons for that choice, but I did not develop bmv2 and do not know all the reasons for its design decisions. Certainly from the point of view of "what can a general purpose CPU do?" it seems like an artificial restriction.

@smolkaj
Copy link
Member Author

smolkaj commented Apr 4, 2024

Thanks for the pointer, I missed/forget about the discussion on the p4c repo. cc @fruffy.

That issue also contains an explanation by @antoninbas why the restriction exist: p4lang/p4c#457 (comment). The take away is that it could be lifted but requires some architectural changes.

Copy link

github-actions bot commented Oct 2, 2024

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment, or this will be closed in 180 days

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

No branches or pull requests

3 participants