[P4-dev] Don't care for exact match key

Andy Fingerhut andy.fingerhut at gmail.com
Sun Feb 17 02:34:21 EST 2019


Every table entry must specify a full exact match value for every field
that has match kind 'exact'.

It is somewhat common in the case of a table that can either have IPv4
entries, or IPv6 entries, to create two separate P4 tables, one with only
IPv4 entries, and another with only IPv6 entries, and to apply only the
table that is relevant for the packet being processed.

There can be very special cases, e.g. where you have IPv4-in-IPv6 or
IPv6-in-IPv4 tunneled packets, and you want to match on both outer and
inner fields simultaneously, where that approach is not useful, but that is
fairly uncommon in my experience.

Andy

On Sat, Feb 16, 2019 at 11:10 PM Kentaro Ebisawa <ebiken.g at gmail.com> wrote:

> Hi,
>
> Are there a way to set "don't care" for exact match key?
> Or do I have to use lpm or ternary to ignore some of the match keys in
> the table.
>
> For example, I want to have a table which has 2 exact match keys and set
> below kind of entries.
> * Exact match IPv4 dst address and don't care IPv6 dst address
> * Exact match IPv6 dst address and don't care IPv4 dst address
>
> table test_table {
>      key = {
>          hdr.ipv4.dstAddr: exact;
>          hdr.ipv6.dstAddr: exact;
>      }
> ...
>
> --
> Kentaro Ebisawa <ebiken.g at gmail.com>
>
>
> _______________________________________________
> P4-dev mailing list
> 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/20190216/5bc8942f/attachment.html>


More information about the P4-dev mailing list