p4-dev@lists.p4.org

list for questions/discussion of p4 programs and tools

View all threads

Need some cheatsheat for TCAM table entries (ternary matching)

SG
Sahil Gupta
Thu, Dec 3, 2020 2:26 AM

Hi all,
Is there some program or cheat sheet for TCAM table entries from the
control plane?
I am particularly instructed in one specific case.
If I have two ternary matching fields, can I provide rules from the control
plane saying match anything in second entry and some specific value in
first matching field?
If Yes, how table entries look like to be sent from the control plane?

Regards
Sahil Gupta

Hi all, Is there some program or cheat sheet for TCAM table entries from the control plane? I am particularly instructed in one specific case. If I have two ternary matching fields, can I provide rules from the control plane saying match anything in second entry and some specific value in first matching field? If Yes, how table entries look like to be sent from the control plane? Regards Sahil Gupta
H
hemant@mnkcg.com
Thu, Dec 3, 2020 4:42 AM

If you use simple_switch, the CLI docs are here:

https://github.com/p4lang/behavioral-model/blob/master/docs/runtime_CLI.md

Search on the page for ternary and “&&&”.

Also see an example:

https://github.com/p4lang/p4c/blob/master/testdata/p4_16_samples/table-entries-ternary-bmv2.p4#L64

Hemant

From: P4-dev p4-dev-bounces@lists.p4.org On Behalf Of Sahil Gupta
Sent: Wednesday, December 02, 2020 9:27 PM
To: p4-dev p4-dev@lists.p4.org
Subject: [P4-dev] Need some cheatsheat for TCAM table entries (ternary matching)

Hi all,

Is there some program or cheat sheet for TCAM table entries from the control plane?

I am particularly instructed in one specific case.

If I have two ternary matching fields, can I provide rules from the control plane saying match anything in second entry and some specific value in first matching field?

If Yes, how table entries look like to be sent from the control plane?

Regards

Sahil Gupta

If you use simple_switch, the CLI docs are here: https://github.com/p4lang/behavioral-model/blob/master/docs/runtime_CLI.md Search on the page for ternary and “&&&”. Also see an example: https://github.com/p4lang/p4c/blob/master/testdata/p4_16_samples/table-entries-ternary-bmv2.p4#L64 Hemant From: P4-dev <p4-dev-bounces@lists.p4.org> On Behalf Of Sahil Gupta Sent: Wednesday, December 02, 2020 9:27 PM To: p4-dev <p4-dev@lists.p4.org> Subject: [P4-dev] Need some cheatsheat for TCAM table entries (ternary matching) Hi all, Is there some program or cheat sheet for TCAM table entries from the control plane? I am particularly instructed in one specific case. If I have two ternary matching fields, can I provide rules from the control plane saying match anything in second entry and some specific value in first matching field? If Yes, how table entries look like to be sent from the control plane? Regards Sahil Gupta
SG
Sahil Gupta
Thu, Dec 3, 2020 4:50 AM

Thanks Venkat and Hemant for the pointers to look at.
Those resources are really helpful.

Thanks Venkat and Hemant for the pointers to look at. Those resources are really helpful.