[P4-dev] Support for external instances

Antonin Bas antonin at barefootnetworks.com
Wed Jun 29 18:45:03 EDT 2016

Hi Jeferson,

The short answer is no, extern objects are not supported. However, a big
chunk of the work has been done in the bmv2 core code. Internally, most
extern objects are supported, with the caveat that when instantiating them
only integer values can be provided to initialize the state of the extern.
The simple_switch target does not support any extern object type, but you
can see an extern example in one of the unit tests:
The p4c-bm compiler, which produces the JSON, does not support extern
objects though, so unless you write that part of the JSON by hand, there is
no way to leverage extern in bmv2.
My goal was to have the extern implementation ready for the release of
P4-16. I wanted to wait for the definitive P4-16 spec and compiler to avoid
getting too may things wrong in the implementation.



On Wed, Jun 29, 2016 at 12:15 PM, Jeferson Santiago da Silva <
eng.jefersonsantiago at gmail.com> wrote:

> Dear all,
> I've checked the json generator and it seems that external instances are
> not yet supported in the bmv2. I was wondering if there is a scheduled plan
> for supporting external methods in the bmv2.
> Also, there is any example of an external object instantiated in some
> target?
> Thanks in advance,
> Jeferson
> --
> Jeferson Santiago da Silva, M.Sc.
> <http://br.linkedin.com/in/engjefersonsantiago>
> Ph.D. Candidate in Computer Engineering
> Hardware and Programmable Logic Design Engineer
> Phone: +1 (514) 581-1004
> Skype: eng.jefersonsantiago
> Montreal/QC - Canada
> Lattes CV: http://lattes.cnpq.br/9568850258686622
> _______________________________________________
> 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/20160629/595ad81d/attachment-0002.html>

More information about the P4-dev mailing list