[P4-dev] Support for external instances
antonin at barefootnetworks.com
Wed Jun 29 18:45:03 EDT 2016
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
> Thanks in advance,
> Jeferson Santiago da Silva, M.Sc.
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev