[P4-dev] Query Regarding Range Table

hemant at mnkcg.com hemant at mnkcg.com
Sat May 23 00:47:33 EDT 2020


Debobroto,

 

Any reason you want to use a range vs. a value?

 

Multipath algorithms such as ECMP, CONGA and HULA congestion control, etc. use one value to decide a packet flow path.  

 

Further a P4 table in p4-14 supports match_kind as range but p4-16 does not.  

 

As Ganesh has said, use of tcam is possible and tcam entries have to be setup in a specific order.  

 

Routing has to match more-specific subnets.  A subnet is a range. Routing uses a trie representation for matching.   I haven’t seen a trie implementation in P4.

 

Hemant

 

From: P4-dev <p4-dev-bounces at lists.p4.org> On Behalf Of Debobroto Das
Sent: Friday, May 22, 2020 6:43 PM
To: p4-dev at lists.p4.org
Subject: Re: [P4-dev] Query Regarding Range Table

 

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 <mailto: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. 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20200523/92344dd8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1594 bytes
Desc: not available
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20200523/92344dd8/attachment.p7s>


More information about the P4-dev mailing list