[P4-dev] Contribution to P4 development

Sandor Laki lakis at elte.hu
Mon Jun 1 12:39:27 EDT 2015


Dear All,

In collaboration with one of our industrial partners, we started 
analysing the capabilities of P4 about a month ago.  We had first made 
an attempt to implement a L2-demo with mac learning, and after that we 
realized that you also moved into this direction (l2_switch appeared in 
github [p4factory]).

However, the current implementation of pd-cli in p4factory is not 
complete. E.g. to make l2_switch partially work in Mininet, we had to 
extend pd-cli with e.g. the method set_default_action, and other methods 
needed for Mininet testing seems not being available there. Currently, 
we are working on extending pd-cli with the necessary functions that may 
be useful to directly add to the master branch of p4factory instead of 
fixing our local copy. We would be happy to contribute to the effort 
directly. How can we move forward into this direction?

Furthermore, in the example implementation available on github we have 
experienced that if there is no rule that matches in a given table, the 
switch simply drops the packet instead of doing nothing. E.g. in case of 
l2_switch we apply smac and dmac on ingress traffic sequentially, 
however if smac is empty and default action is not set, the packet is 
simply dropped and dmac is not applied at all. Is it a normal behaviour 
or a bug?

Finally, mac learning requires two tables smac and dmac, however their 
key sets are basically always the same. So in a practical implementation 
they could use the "same" lookup table, storing the mac addresses only 
once. Are you planning to handle it in the language (e.g. by adding a 
marking that dmac table extends smac or they share the same key values) 
or it should be done outside P4 e.g. via specific compiler options?

Thank you for your reply in advance!

Best,
Sandor

-- 
Sándor Laki
Department of Information Systems
Eötvös Loránd University
Pázmány Péter stny. 1/C
H-1117, Budapest, Hungary
Room 2.506
Web: http://lakis.web.elte.hu
Phone: +36 1 372 2869 / 8477
Cell: +36 70 374 2646





More information about the P4-dev mailing list