[P4-discuss] table Match/action LPM

Antonin Bas antonin at barefootnetworks.com
Mon Oct 10 18:03:25 EDT 2016


Hi,

Please use the p4-dev mailing list for questions related to the p4lang
software.
The priority of a LPM entry is determined by the prefix length. In your
case the switch will first check if entry 2 matches (because it has the
longest prefix), then entry 1, then entry 0.
If this is not the behavior you are observing, you can submit a bug to the
p4-dev mailing list. You will need to provide 1) a sample P4 program to
reproduce the issue 2) the appropriate CLI commands to populate tables 3)
an example input packet that exhibits the bug.

Thanks,

Antonin

On Mon, Oct 10, 2016 at 1:58 PM, Thambi Sreedharan <thambisree at gmail.com>
wrote:

> Hi
>
> The LPM based matche table  the location of entry is important. How to in
> runtime_CLI How to  specify the location instead of using  table_add  or my
> understanding on the LPM is wrong.
>
> we programmed as follow:
>
>
>
>
>              Entry_hdl        match              Action                Data
>         +-----------------+-------------------+---------------------
> +----------+
>         |                 |                   |                     |
>      |
>         |        0        |    0.0.0.0/0      |    set_vrf          |
> vrf=10   |
>         +-----------------+-------------------+---------------------
> +----------+
>         |                 |                   |                     |
>      |
>         |        1        |   192.168.6.0/24  |     set_vrf         |
> vrf=2    |
>         |                 |                   |                     |
>      |
>         +-----------------+-------------------+---------------------
> +----------+
>         |                 |                   |                     |
>      |
>         |        2        |   192.168.6.1/32  |    set_vrf          |
> vrf=3    |
>         |                 |                   |                     |
>      |
>         +-----------------+-------------------+---------------------
> +----------+
>
> it always hitting Entry 0, instead of Entry 2.
>
> Please let me how to specify the entry while adding
>
> Thanks
> Thambi
>
> _______________________________________________
> P4-discuss mailing list
> P4-discuss at lists.p4.org
> http://lists.p4.org/mailman/listinfo/p4-discuss_lists.p4.org
>



-- 
Antonin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-discuss_lists.p4.org/attachments/20161010/cc9bee8b/attachment-0002.html>


More information about the P4-discuss mailing list