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

Accept action IDs on DirectCounterEntry in Stratum-bfrt #942

Merged
merged 1 commit into from
Mar 24, 2022

Conversation

pudelkoM
Copy link
Member

Those are still valid and the action field has to be ignored, according to the P4RT spec.

Those are still valid and the action field has to be ignored, according to the P4RT spec.
@pudelkoM pudelkoM requested a review from Yi-Tseng March 23, 2022 19:29
@pudelkoM
Copy link
Member Author

Thanks @daniele-moro for reporting.

@pudelkoM
Copy link
Member Author

pudelkoM commented Mar 23, 2022

cc @pierventre
We might have code in ONOS that was affected by this, too.

@codecov
Copy link

codecov bot commented Mar 23, 2022

Codecov Report

Merging #942 (0e11c66) into main (e031360) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #942      +/-   ##
==========================================
+ Coverage   79.19%   79.20%   +0.01%     
==========================================
  Files         339      339              
  Lines       30924    30918       -6     
==========================================
- Hits        24489    24488       -1     
+ Misses       6435     6430       -5     
Impacted Files Coverage Δ
stratum/hal/lib/barefoot/bfrt_table_manager.cc 25.83% <ø> (+0.08%) ⬆️

@daniele-moro
Copy link

I think ONOS code is not affected but wait for confirmation from @pierventre. Direct counters in ONOS are either read as part of a read of table entries, or doing reads by specifying only the table entry handle (i.e., match + priority). See: https://github.com/opennetworkinglab/onos/blob/dc08c95eed882936edf47527ca64d416009e8514/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/P4RuntimeFlowRuleProgrammable.java#L536-L551

@pierventre
Copy link
Contributor

pierventre commented Mar 23, 2022

I think ONOS code is not affected but wait for confirmation from @pierventre. Direct counters in ONOS are either read as part of a read of table entries, or doing reads by specifying only the table entry handle (i.e., match + priority). See: https://github.com/opennetworkinglab/onos/blob/dc08c95eed882936edf47527ca64d416009e8514/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/P4RuntimeFlowRuleProgrammable.java#L536-L551

Yup - we talked about this in private me and @pudelkoM and I confirm what you are saying. On our end we can remove some code around encodeKey for TableEntryCodec but IMHO is not really worth.

@pudelkoM
Copy link
Member Author

Sounds good to me. "affected" was poorly worded here. "potential chance for simplification" is more appropriate as old behavior will continue to work.

@pudelkoM pudelkoM merged commit 07fe368 into main Mar 24, 2022
@pudelkoM pudelkoM deleted the bfrt-direct-counter-action branch March 24, 2022 16:34
ffoulkes added a commit to ipdk-io/stratum-dev that referenced this pull request Jan 17, 2024
Signed-off-by: Derek G Foster <derek.foster@intel.com>
ffoulkes added a commit to ipdk-io/stratum-dev that referenced this pull request Jan 17, 2024
Signed-off-by: Derek G Foster <derek.foster@intel.com>
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.

None yet

4 participants