[P4-dev] Ternary match-key field

Roshan Sedar roshan.sedar at student.uclouvain.be
Wed Aug 30 08:07:24 EDT 2017


ok. Thanks Nate!


Cheer,

Roshan.

________________________________
From: Nate Foster <jnfoster at cs.cornell.edu>
Sent: Tuesday, August 29, 2017 5:31:14 PM
To: Roshan Sedar
Cc: p4-dev
Subject: Re: [P4-dev] Ternary match-key field

In P4_16, you simply list the expressions that you want to be matched in the key property.

> table MyTable {
>   key = {
>    e1 : ternary,
>    e2 : ternary,
>    ...
> }

You can include multiple expressions, you can mix and match exact matches with ternary matches, and there's no distinction between headers and metadata -- it's all just data that gets slotted into the table. There's also no need to provide any masks in the P4 program itself. Any masking would be done by the control plane when it populates the patterns that are inserted into the table.

-N

On Tue, Aug 29, 2017 at 8:14 AM, Roshan Se <roshan.sedar at student.uclouvain.be<mailto:roshan.sedar at student.uclouvain.be>> wrote:
Hi,

I am trying to keep more than one metadata fields as ternary match-key fields in the table. Is it possible to keep more than one ternary match-key? Could give me an idea how it works and specially, both sides of &&&? Which part should be initialized in metadata to be able to match values in the table?

any help would be great.

Thanks,

Regards.

Roshan.


_______________________________________________
P4-dev mailing list
P4-dev at lists.p4.org<mailto:P4-dev at lists.p4.org>
http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20170830/cd9d5a8a/attachment-0002.html>


More information about the P4-dev mailing list