[P4-dev] Query Regarding Range Table

Andy Fingerhut andy.fingerhut at gmail.com
Fri May 22 22:11:00 EDT 2020


So are you saying that something in your P4 program, by some methods not
specified here, will somehow calculate a minimum delay A=15, and a maximum
value B=30, and you want to then do some kind of lookup to get port number
3 in that case.

If that is all correct, then what should the result of the lookup be if you
calculate a minimum delay A=0, and a maximum delay B=30?  Should the lookup
return all of the ports 1, 3, and 4?  Only one of them?  If only one, which
one?

In other words, can you state in English, or pseudocode, o with more
examples, what your desired behavior is for more pairs of values [A, B]
than the one example you give?

Andy

On Fri, May 22, 2020 at 3:44 PM Debobroto Das <debobrotodasrobin at gmail.com>
wrote:

> Hello Everyone,
>
> I want to implement a multipath routing in data plane.
> For example, assume in a device I have 4 ports. Each ports have a metrics
> which should be in range format. For example: this metrics is a delay value
> through this port. So, if  these 4 ports have following delay values
>
> port   | delay
> ==========
> 1       |    5
> ==========
> 2       |   50
> ==========
> 3        |  25
> ===========
> 4        |  10
> =============
>
> So if I want to select the port to forward a packet depending on the
> "delay" value, what type of match_kind  I should use here.
> An example query is, select a port that have delay value within rage
> 15-30. so clearly here the port 3 should be selected.
> how to achieve this kind of behavior in P4?
>
> On Fri, May 22, 2020 at 6:39 PM Debobroto Das <debobrotodasrobin at gmail.com>
> wrote:
>
>> Hello Everyone,
>>
>> I want to implement a multipath routing in data plane.
>> For example, assume in a device I have 4 ports. Each ports have a metrics
>> which should be in range format. For example: this metrics is a delay value
>> through this port. So, if  these 4 ports have following delay values
>>
>> port   | delay
>> ==========
>> 1       |    5
>> ==========
>> 2       |   50
>> ==========
>> 3        |  25
>> ===========
>> 4        |  10
>> =============
>>
>> So if I want to select the port to forward a packet depending on the
>> "delay" value, what type of match_kind  I should use here.
>>
>>
>> _______________________________________________
> 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/20200522/38d02a12/attachment.html>


More information about the P4-dev mailing list