[P4-dev] runtime_CLI.py in C/C++

Andreas Pantelopoulos padelopoulos at gmail.com
Mon May 22 14:14:55 EDT 2017


Ok then! Thanks for the answers.

Andreas

On Mon, May 22, 2017 at 7:36 PM, Antonin Bas <antonin at barefootnetworks.com>
wrote:

> What I meant is that this Thrift API is only available on bmv2. It is not
> standardized and is not implemented on any other P4-programmable target
> (e.g. P4 ASIC, P4 NIC,...). So any application code that you write would
> not be usable on other P4 targets. However, for the purpose of a simulation
> including exclusively bmv2 nodes, it is just fine.
>
> On Mon, May 22, 2017 at 10:33 AM, Andreas Pantelopoulos <
> padelopoulos at gmail.com> wrote:
>
>> Hello,
>>
>> Thanks for the prompt answer. What exactly do you mean by " bmv2 Thrift
>> API is not meant to be portable" ? What I want to achieve is port the
>> simple_switch in the ns3 simulator so as to run simulations that involve p4
>> switches *almost* automatically. To do that, all the binaries should be
>> compiled in a specific manner. Since, runtime_CLI.py is in python, it is
>> not compiled. I tried converting in C and then compiling but that has other
>> issues.
>>
>> Thanks for the code link!
>>
>> Andreas
>>
>>
>>
>> On Mon, May 22, 2017 at 7:26 PM, Antonin Bas <
>> antonin at barefootnetworks.com> wrote:
>>
>>> Hi,
>>>
>>> I am not aware of a C++ equivalent of the runtime_CLI. The bmv2 Thrift
>>> API is not meant to be portable and is not available on other P4 targets,
>>> so you should probably keep that in mind.
>>> There is an example of a small C++ client implementing a control-plane
>>> for L2 switching here: https://github.com/p4lan
>>> g/behavioral-model/blob/master/targets/l2_switch/learn_clien
>>> t/learn_client.cpp. It is only meant to be used with l2_switch.p4 but
>>> can be adapted for other P4 programs.
>>>
>>> Best,
>>>
>>> Antonin
>>>
>>> On Mon, May 22, 2017 at 10:12 AM, Andreas Pantelopoulos <
>>> padelopoulos at gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> I am wondering if you have developed any other thrift client for the
>>>> behavioral model in C or C++. It might as well be not fully functional or
>>>> just a draft.
>>>>
>>>> Thanks a lot,
>>>> Andreas
>>>>
>>>> _______________________________________________
>>>> P4-dev mailing list
>>>> P4-dev at lists.p4.org
>>>> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>>>>
>>>
>>>
>>>
>>> --
>>> Antonin
>>>
>>
>>
>
>
> --
> Antonin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20170522/8dcc4d53/attachment-0002.html>


More information about the P4-dev mailing list