Skip to content

docs: clarify MeterConfig units - #635

Merged
chrispsommers merged 1 commit into
p4lang:mainfrom
blackdragoon26:docs/meter-config-units
Oct 9, 2026
Merged

chrispsommers merged 1 commit into
p4lang:mainfrom
blackdragoon26:docs/meter-config-units

Conversation

@blackdragoon26

Copy link
Copy Markdown
Contributor

Summary

This PR is aiming to clarify that MeterSpec.Unit determines the units used by the rate and burst-size fields in MeterConfig.

For BYTES, rates are expressed in bytes per second and burst sizes in bytes.
For PACKETS, rates are expressed in packets per second and burst sizes in packets.

Also add a cross-reference to the Meter and DirectMeter section where MeterSpec.Unit is defined.

Fixes #301.

Testing

  • ./tools/asciidoclint.py docs/v1/P4Runtime-Spec.adoc
  • python3 tools/test_asciidoclint.py -v
  • Built the complete HTML and PDF specifications using the repository's official Docker build process
  • Verified that the rendered cross-reference resolves correctly

Document how MeterSpec.Unit determines the rate and burst-size units used by MeterConfig, and link back to the P4Info definition for easier discovery.

Fixes p4lang#301.

Signed-off-by: blackdragoon26 <sankalp.jha9643@gmail.com>
@blackdragoon26

Copy link
Copy Markdown
Contributor Author

Hihi @jafingerhut,
I have tried creating a simple straight PR for the fix, kindly review it.
Thanks

@jafingerhut jafingerhut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chrispsommers
chrispsommers merged commit 6b8f0dd into p4lang:main Oct 9, 2026
11 checks passed
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.

Make it a little easier to find units of meter configuration parameters

3 participants