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

Counters wildcard read doesn't show data #84

Open
jokuniew opened this issue Dec 14, 2022 · 0 comments
Open

Counters wildcard read doesn't show data #84

jokuniew opened this issue Dec 14, 2022 · 0 comments

Comments

@jokuniew
Copy link

Problem Statement

While using P4Runtime on p4-DPDK-target ovs I want to gather all counter values in single query. This functionality is available in behavioral model and described in P4Runtime spec/proto, which should be target agnostic.

  1. I create CounterEntry ce = counter_entry["someCounter"]
  2. I edit manually some counter entries, intentionally. Example: ce.index=10 ce.packet_count=101 ce.modify
  3. If I want to see only single counter entry, data is visible ce?
  4. But, If i want to see all entries in single query, data is not visible. Commands used: ce.index=None list(ce.read())

Steps to reproduce & Current output

P4 program with some counter (let's say 1024 in size, PACKETS type)
ce = counter_entry["someCounter"]
ce.index=10 ce.packet_count=101 ce.modify
ce.index=11 ce.packet_count=2000 ce.modify
ce.index=None list(ce.read())

output:

...
 counter_id: 317030940 ("someCounter")
index {
  index: 10
}
data {
  
}
,
 counter_id: 317030940 ("someCounter")
index {
  index: 11
}
data {
  
}
...

Expected output

...
 counter_id: 317030940 ("someCounter")
index {
  index: 10
}
data {
   packet_count: 101
}
,
 counter_id: 317030940 ("someCounter")
index {
  index: 11
}
data {
   packet_count: 2000
}
...
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

1 participant