Re: [vpp-dev] vppcom and binary api #binapi #vapi #vppcom

2020-12-08 Thread Florin Coras
Hi Venu, 

Probably going through [2] lower would be advisable at this point as you’ll 
find more info there. 

LDP can only be used when the application is ld_preload-able and it works by 
intercepting app syscalls and redirecting them to vcl. Note that even if the 
app is ld_preloade-able, the ldp shim is not guaranteed to always work 
correctly (it has to do with they way the app uses sockets and socket options). 
VCL is just a library that simplifies interaction with the host stack in vpp, 
therefore both ldp and vcl depend on vpp. 

Regards, 
Florin

> On Dec 8, 2020, at 7:45 AM, Venumadhav Josyula  wrote:
> 
> Also does either are independent or require vpp host stack ?
> 
> Thanks and regards
> Venu
> 
> On Tue, 8 Dec, 2020, 9:13 pm Venumadhav Josyula,  > wrote:
> Hi Florin,
> 
> What's difference between ldp and direct vcl ? I mean in terms of use cases 
> 
> Thanks and Regards
> Venu
> 
> On Tue, 8 Dec, 2020, 8:47 pm Florin Coras,  > wrote:
> Hi Venu, 
> 
> Those are used for ldp tests. That is, they use normal sockets which go 
> through our ldp (LD_PRELOAD) shim and eventually through vcl. vcl_test_client 
> and vcl_test_server are the tests that use vcl directly. 
> 
> Regards,
> Florin
> 
>> On Dec 8, 2020, at 2:11 AM, Venumadhav Josyula > > wrote:
>> 
>> Hi Florin,
>> 
>> The below are vcl based, my understanding it is based normal sockets 
>> build-root/rpmbuild/vpp-21.01/src/plugins/hs_apps/vcl/sock_test.h
>> build-root/rpmbuild/vpp-21.01/src/plugins/hs_apps/vcl/sock_test_client.c
>> build-root/rpmbuild/vpp-21.01/src/plugins/hs_apps/vcl/sock_test_server.c
>> These files use normal socket(s) right now VCL 
>> 
>> Thanks,
>> Regards,
>> Venu
>> 
>> On Tue, 8 Dec 2020 at 01:07, Florin Coras > > wrote:
>> Hi Venu, 
>> 
>> You’ll find documentation regarding the host stack in general and vcl in 
>> particular here [1] (see for instance [2]). As for code examples, check here 
>> [3] the vcl test client/server apps. 
>> 
>> Regards,
>> Florin
>> 
>> [1] https://wiki.fd.io/view/VPP/HostStack 
>> 
>> [2] https://wiki.fd.io/images/9/9c/Vpp-hoststack-kc-eu19.pdf 
>> 
>> [3] https://git.fd.io/vpp/tree/src/plugins/hs_apps/vcl 
>> 
>> 
>> 
>>> On Dec 7, 2020, at 11:24 AM, Venumadhav Josyula >> > wrote:
>>> 
>>> Hi Florin,
>>> 
>>> This is nothing to do with the subject being discussed. 
>>> 
>>> Can you please direct me to the following
>>> i) example(s) of VCL ?
>>> ii) Any tutorial explaining the working of VCL ?
>>> 
>>> Thanks & Regards,
>>> Venu
>>> 
>>> On Fri, 4 Dec 2020 at 01:28, Florin Coras >> > wrote:
>>> Hi Ravi, 
>>> 
>>> VCL is not part of the vpp app/process, it’s a library that applications 
>>> can link against to be able to interact with the session layer in a more 
>>> posix-like manner. So if your app needs a binary api connection to vpp, it 
>>> needs to set it up independent of vcl. 
>>> 
>>> With regard to the “vpe-api” region, it’s worth nothing that the binary api 
>>> can work over two “transports”. Namely:
>>>
>>> 1) posix shared memory, and this is the one that relies on the vpe-api 
>>> region for bootstrapping and 
>>> 2) an af_unix socket which is configurable in startup.conf, i.e., by doing 
>>> something like socksvr { socket-name  }.
>>> 
>>> This is somewhat further complicated by the fact that a binary api 
>>> connection bootstrapped over a socket (option 2) can be switched to a 
>>> shared memory transport. Although similar to option1, in this case, the 
>>> memory is allocated and negotiated per binary api client using memfds and 
>>> the socket. This is what VCL uses underneath if configured to use the 
>>> binary api with the socket transport. 
>>> 
>>> Previously, VCL could also be configured to use option 1, but support for 
>>> this has been recently dropped.
>>> 
>>> Regards,
>>> Florin
>>> 
 On Dec 3, 2020, at 7:22 AM, RaviKiran Veldanda >>> > wrote:
 
 Hi Florin,
 Thanks for your response, however I have a question, If I want to use 
 another Binary API initialization do we need to do at our Application or 
 in VPP code.
 When I check VPP source code, the initialization always with "vpe-api"
 vpe_api_init calls always vl_set_memory_region_name ("/vpe-api"); so 
 wondering do we have any other region present?
 
 FYI: We are using 20.05 stable version.
 Regards,
 Ravi.
 
 
 
>>> 
>>> 
>>> 
>> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18288): https://lists.fd.io/g/vpp-dev/message/18288
Mute This Topic: https://lists.fd.io/mt/78677945/21656
Mute #binapi:https://lists.fd.io/g/vpp-dev/mutehashtag

Re: [vpp-dev] vppcom and binary api #binapi #vapi #vppcom

2020-12-08 Thread Venumadhav Josyula
Also does either are independent or require vpp host stack ?

Thanks and regards
Venu

On Tue, 8 Dec, 2020, 9:13 pm Venumadhav Josyula,  wrote:

> Hi Florin,
>
> What's difference between ldp and direct vcl ? I mean in terms of use
> cases
>
> Thanks and Regards
> Venu
>
> On Tue, 8 Dec, 2020, 8:47 pm Florin Coras,  wrote:
>
>> Hi Venu,
>>
>> Those are used for ldp tests. That is, they use normal sockets which go
>> through our ldp (LD_PRELOAD) shim and eventually through vcl.
>> vcl_test_client and vcl_test_server are the tests that use vcl directly.
>>
>> Regards,
>> Florin
>>
>> On Dec 8, 2020, at 2:11 AM, Venumadhav Josyula 
>> wrote:
>>
>> Hi Florin,
>>
>> The below are vcl based, my understanding it is based normal sockets
>> build-root/rpmbuild/vpp-21.01/src/plugins/hs_apps/vcl/sock_test.h
>> build-root/rpmbuild/vpp-21.01/src/plugins/hs_apps/vcl/sock_test_client.c
>> build-root/rpmbuild/vpp-21.01/src/plugins/hs_apps/vcl/sock_test_server.c
>> These files use normal socket(s) right now VCL
>>
>> Thanks,
>> Regards,
>> Venu
>>
>> On Tue, 8 Dec 2020 at 01:07, Florin Coras  wrote:
>>
>>> Hi Venu,
>>>
>>> You’ll find documentation regarding the host stack in general and vcl in
>>> particular here [1] (see for instance [2]). As for code examples, check
>>> here [3] the vcl test client/server apps.
>>>
>>> Regards,
>>> Florin
>>>
>>> [1] https://wiki.fd.io/view/VPP/HostStack
>>> [2] https://wiki.fd.io/images/9/9c/Vpp-hoststack-kc-eu19.pdf
>>> [3] https://git.fd.io/vpp/tree/src/plugins/hs_apps/vcl
>>>
>>>
>>> On Dec 7, 2020, at 11:24 AM, Venumadhav Josyula 
>>> wrote:
>>>
>>> Hi Florin,
>>>
>>> This is nothing to do with the subject being discussed.
>>>
>>> Can you please direct me to the following
>>> i) example(s) of VCL ?
>>> ii) Any tutorial explaining the working of VCL ?
>>>
>>> Thanks & Regards,
>>> Venu
>>>
>>> On Fri, 4 Dec 2020 at 01:28, Florin Coras 
>>> wrote:
>>>
 Hi Ravi,

 VCL is not part of the vpp app/process, it’s a library that
 applications can link against to be able to interact with the session layer
 in a more posix-like manner. So if your app needs a binary api connection
 to vpp, it needs to set it up independent of vcl.

 With regard to the “vpe-api” region, it’s worth nothing that the binary
 api can work over two “transports”. Namely:

 1) posix shared memory, and this is the one that relies on the vpe-api
 region for bootstrapping and
 2) an af_unix socket which is configurable in startup.conf, i.e., by
 doing something like socksvr { socket-name  }.

 This is somewhat further complicated by the fact that a binary api
 connection bootstrapped over a socket (option 2) can be switched to a
 shared memory transport. Although similar to option1, in this case, the
 memory is allocated and negotiated per binary api client using memfds and
 the socket. This is what VCL uses underneath if configured to use the
 binary api with the socket transport.

 Previously, VCL could also be configured to use option 1, but support
 for this has been recently dropped.

 Regards,
 Florin

 On Dec 3, 2020, at 7:22 AM, RaviKiran Veldanda 
 wrote:

 Hi Florin,
 Thanks for your response, however I have a question, If I want to use
 another Binary API initialization do we need to do at our Application or in
 VPP code.
 When I check VPP source code, the initialization always with "vpe-api"
 vpe_api_init calls always vl_set_memory_region_name ("/vpe-api"); so
 wondering do we have any other region present?

 FYI: We are using 20.05 stable version.
 Regards,
 Ravi.





 
>>>
>>>
>>>
>>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18287): https://lists.fd.io/g/vpp-dev/message/18287
Mute This Topic: https://lists.fd.io/mt/78677945/21656
Mute #binapi:https://lists.fd.io/g/vpp-dev/mutehashtag/binapi
Mute #vapi:https://lists.fd.io/g/vpp-dev/mutehashtag/vapi
Mute #vppcom:https://lists.fd.io/g/vpp-dev/mutehashtag/vppcom
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] vppcom and binary api #binapi #vapi #vppcom

2020-12-08 Thread Venumadhav Josyula
Hi Florin,

What's difference between ldp and direct vcl ? I mean in terms of use cases

Thanks and Regards
Venu

On Tue, 8 Dec, 2020, 8:47 pm Florin Coras,  wrote:

> Hi Venu,
>
> Those are used for ldp tests. That is, they use normal sockets which go
> through our ldp (LD_PRELOAD) shim and eventually through vcl.
> vcl_test_client and vcl_test_server are the tests that use vcl directly.
>
> Regards,
> Florin
>
> On Dec 8, 2020, at 2:11 AM, Venumadhav Josyula  wrote:
>
> Hi Florin,
>
> The below are vcl based, my understanding it is based normal sockets
> build-root/rpmbuild/vpp-21.01/src/plugins/hs_apps/vcl/sock_test.h
> build-root/rpmbuild/vpp-21.01/src/plugins/hs_apps/vcl/sock_test_client.c
> build-root/rpmbuild/vpp-21.01/src/plugins/hs_apps/vcl/sock_test_server.c
> These files use normal socket(s) right now VCL
>
> Thanks,
> Regards,
> Venu
>
> On Tue, 8 Dec 2020 at 01:07, Florin Coras  wrote:
>
>> Hi Venu,
>>
>> You’ll find documentation regarding the host stack in general and vcl in
>> particular here [1] (see for instance [2]). As for code examples, check
>> here [3] the vcl test client/server apps.
>>
>> Regards,
>> Florin
>>
>> [1] https://wiki.fd.io/view/VPP/HostStack
>> [2] https://wiki.fd.io/images/9/9c/Vpp-hoststack-kc-eu19.pdf
>> [3] https://git.fd.io/vpp/tree/src/plugins/hs_apps/vcl
>>
>>
>> On Dec 7, 2020, at 11:24 AM, Venumadhav Josyula 
>> wrote:
>>
>> Hi Florin,
>>
>> This is nothing to do with the subject being discussed.
>>
>> Can you please direct me to the following
>> i) example(s) of VCL ?
>> ii) Any tutorial explaining the working of VCL ?
>>
>> Thanks & Regards,
>> Venu
>>
>> On Fri, 4 Dec 2020 at 01:28, Florin Coras  wrote:
>>
>>> Hi Ravi,
>>>
>>> VCL is not part of the vpp app/process, it’s a library that applications
>>> can link against to be able to interact with the session layer in a more
>>> posix-like manner. So if your app needs a binary api connection to vpp, it
>>> needs to set it up independent of vcl.
>>>
>>> With regard to the “vpe-api” region, it’s worth nothing that the binary
>>> api can work over two “transports”. Namely:
>>>
>>> 1) posix shared memory, and this is the one that relies on the vpe-api
>>> region for bootstrapping and
>>> 2) an af_unix socket which is configurable in startup.conf, i.e., by
>>> doing something like socksvr { socket-name  }.
>>>
>>> This is somewhat further complicated by the fact that a binary api
>>> connection bootstrapped over a socket (option 2) can be switched to a
>>> shared memory transport. Although similar to option1, in this case, the
>>> memory is allocated and negotiated per binary api client using memfds and
>>> the socket. This is what VCL uses underneath if configured to use the
>>> binary api with the socket transport.
>>>
>>> Previously, VCL could also be configured to use option 1, but support
>>> for this has been recently dropped.
>>>
>>> Regards,
>>> Florin
>>>
>>> On Dec 3, 2020, at 7:22 AM, RaviKiran Veldanda 
>>> wrote:
>>>
>>> Hi Florin,
>>> Thanks for your response, however I have a question, If I want to use
>>> another Binary API initialization do we need to do at our Application or in
>>> VPP code.
>>> When I check VPP source code, the initialization always with "vpe-api"
>>> vpe_api_init calls always vl_set_memory_region_name ("/vpe-api"); so
>>> wondering do we have any other region present?
>>>
>>> FYI: We are using 20.05 stable version.
>>> Regards,
>>> Ravi.
>>>
>>>
>>>
>>>
>>>
>>> 
>>
>>
>>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18286): https://lists.fd.io/g/vpp-dev/message/18286
Mute This Topic: https://lists.fd.io/mt/78677945/21656
Mute #binapi:https://lists.fd.io/g/vpp-dev/mutehashtag/binapi
Mute #vapi:https://lists.fd.io/g/vpp-dev/mutehashtag/vapi
Mute #vppcom:https://lists.fd.io/g/vpp-dev/mutehashtag/vppcom
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] vppcom and binary api #binapi #vapi #vppcom

2020-12-08 Thread Florin Coras
Hi Venu, 

Those are used for ldp tests. That is, they use normal sockets which go through 
our ldp (LD_PRELOAD) shim and eventually through vcl. vcl_test_client and 
vcl_test_server are the tests that use vcl directly. 

Regards,
Florin

> On Dec 8, 2020, at 2:11 AM, Venumadhav Josyula  wrote:
> 
> Hi Florin,
> 
> The below are vcl based, my understanding it is based normal sockets 
> build-root/rpmbuild/vpp-21.01/src/plugins/hs_apps/vcl/sock_test.h
> build-root/rpmbuild/vpp-21.01/src/plugins/hs_apps/vcl/sock_test_client.c
> build-root/rpmbuild/vpp-21.01/src/plugins/hs_apps/vcl/sock_test_server.c
> These files use normal socket(s) right now VCL 
> 
> Thanks,
> Regards,
> Venu
> 
> On Tue, 8 Dec 2020 at 01:07, Florin Coras  > wrote:
> Hi Venu, 
> 
> You’ll find documentation regarding the host stack in general and vcl in 
> particular here [1] (see for instance [2]). As for code examples, check here 
> [3] the vcl test client/server apps. 
> 
> Regards,
> Florin
> 
> [1] https://wiki.fd.io/view/VPP/HostStack 
> 
> [2] https://wiki.fd.io/images/9/9c/Vpp-hoststack-kc-eu19.pdf 
> 
> [3] https://git.fd.io/vpp/tree/src/plugins/hs_apps/vcl 
> 
> 
> 
>> On Dec 7, 2020, at 11:24 AM, Venumadhav Josyula > > wrote:
>> 
>> Hi Florin,
>> 
>> This is nothing to do with the subject being discussed. 
>> 
>> Can you please direct me to the following
>> i) example(s) of VCL ?
>> ii) Any tutorial explaining the working of VCL ?
>> 
>> Thanks & Regards,
>> Venu
>> 
>> On Fri, 4 Dec 2020 at 01:28, Florin Coras > > wrote:
>> Hi Ravi, 
>> 
>> VCL is not part of the vpp app/process, it’s a library that applications can 
>> link against to be able to interact with the session layer in a more 
>> posix-like manner. So if your app needs a binary api connection to vpp, it 
>> needs to set it up independent of vcl. 
>> 
>> With regard to the “vpe-api” region, it’s worth nothing that the binary api 
>> can work over two “transports”. Namely:
>>
>> 1) posix shared memory, and this is the one that relies on the vpe-api 
>> region for bootstrapping and 
>> 2) an af_unix socket which is configurable in startup.conf, i.e., by doing 
>> something like socksvr { socket-name  }.
>> 
>> This is somewhat further complicated by the fact that a binary api 
>> connection bootstrapped over a socket (option 2) can be switched to a shared 
>> memory transport. Although similar to option1, in this case, the memory is 
>> allocated and negotiated per binary api client using memfds and the socket. 
>> This is what VCL uses underneath if configured to use the binary api with 
>> the socket transport. 
>> 
>> Previously, VCL could also be configured to use option 1, but support for 
>> this has been recently dropped.
>> 
>> Regards,
>> Florin
>> 
>>> On Dec 3, 2020, at 7:22 AM, RaviKiran Veldanda >> > wrote:
>>> 
>>> Hi Florin,
>>> Thanks for your response, however I have a question, If I want to use 
>>> another Binary API initialization do we need to do at our Application or in 
>>> VPP code.
>>> When I check VPP source code, the initialization always with "vpe-api"
>>> vpe_api_init calls always vl_set_memory_region_name ("/vpe-api"); so 
>>> wondering do we have any other region present?
>>> 
>>> FYI: We are using 20.05 stable version.
>>> Regards,
>>> Ravi.
>>> 
>>> 
>>> 
>> 
>> 
>> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18285): https://lists.fd.io/g/vpp-dev/message/18285
Mute This Topic: https://lists.fd.io/mt/78677945/21656
Mute #binapi:https://lists.fd.io/g/vpp-dev/mutehashtag/binapi
Mute #vapi:https://lists.fd.io/g/vpp-dev/mutehashtag/vapi
Mute #vppcom:https://lists.fd.io/g/vpp-dev/mutehashtag/vppcom
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] vppcom and binary api #binapi #vapi #vppcom

2020-12-08 Thread Venumadhav Josyula
Hi Florin,

The below are vcl based, my understanding it is based normal sockets
build-root/rpmbuild/vpp-21.01/src/plugins/hs_apps/vcl/sock_test.h
build-root/rpmbuild/vpp-21.01/src/plugins/hs_apps/vcl/sock_test_client.c
build-root/rpmbuild/vpp-21.01/src/plugins/hs_apps/vcl/sock_test_server.c
These files use normal socket(s) right now VCL

Thanks,
Regards,
Venu

On Tue, 8 Dec 2020 at 01:07, Florin Coras  wrote:

> Hi Venu,
>
> You’ll find documentation regarding the host stack in general and vcl in
> particular here [1] (see for instance [2]). As for code examples, check
> here [3] the vcl test client/server apps.
>
> Regards,
> Florin
>
> [1] https://wiki.fd.io/view/VPP/HostStack
> [2] https://wiki.fd.io/images/9/9c/Vpp-hoststack-kc-eu19.pdf
> [3] https://git.fd.io/vpp/tree/src/plugins/hs_apps/vcl
>
>
> On Dec 7, 2020, at 11:24 AM, Venumadhav Josyula 
> wrote:
>
> Hi Florin,
>
> This is nothing to do with the subject being discussed.
>
> Can you please direct me to the following
> i) example(s) of VCL ?
> ii) Any tutorial explaining the working of VCL ?
>
> Thanks & Regards,
> Venu
>
> On Fri, 4 Dec 2020 at 01:28, Florin Coras  wrote:
>
>> Hi Ravi,
>>
>> VCL is not part of the vpp app/process, it’s a library that applications
>> can link against to be able to interact with the session layer in a more
>> posix-like manner. So if your app needs a binary api connection to vpp, it
>> needs to set it up independent of vcl.
>>
>> With regard to the “vpe-api” region, it’s worth nothing that the binary
>> api can work over two “transports”. Namely:
>>
>> 1) posix shared memory, and this is the one that relies on the vpe-api
>> region for bootstrapping and
>> 2) an af_unix socket which is configurable in startup.conf, i.e., by
>> doing something like socksvr { socket-name  }.
>>
>> This is somewhat further complicated by the fact that a binary api
>> connection bootstrapped over a socket (option 2) can be switched to a
>> shared memory transport. Although similar to option1, in this case, the
>> memory is allocated and negotiated per binary api client using memfds and
>> the socket. This is what VCL uses underneath if configured to use the
>> binary api with the socket transport.
>>
>> Previously, VCL could also be configured to use option 1, but support for
>> this has been recently dropped.
>>
>> Regards,
>> Florin
>>
>> On Dec 3, 2020, at 7:22 AM, RaviKiran Veldanda 
>> wrote:
>>
>> Hi Florin,
>> Thanks for your response, however I have a question, If I want to use
>> another Binary API initialization do we need to do at our Application or in
>> VPP code.
>> When I check VPP source code, the initialization always with "vpe-api"
>> vpe_api_init calls always vl_set_memory_region_name ("/vpe-api"); so
>> wondering do we have any other region present?
>>
>> FYI: We are using 20.05 stable version.
>> Regards,
>> Ravi.
>>
>>
>>
>>
>>
>> 
>
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18283): https://lists.fd.io/g/vpp-dev/message/18283
Mute This Topic: https://lists.fd.io/mt/78677945/21656
Mute #binapi:https://lists.fd.io/g/vpp-dev/mutehashtag/binapi
Mute #vapi:https://lists.fd.io/g/vpp-dev/mutehashtag/vapi
Mute #vppcom:https://lists.fd.io/g/vpp-dev/mutehashtag/vppcom
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] vppcom and binary api #binapi #vapi #vppcom

2020-12-07 Thread Florin Coras
Hi Venu, 

You’ll find documentation regarding the host stack in general and vcl in 
particular here [1] (see for instance [2]). As for code examples, check here 
[3] the vcl test client/server apps. 

Regards,
Florin

[1] https://wiki.fd.io/view/VPP/HostStack 

[2] https://wiki.fd.io/images/9/9c/Vpp-hoststack-kc-eu19.pdf 

[3] https://git.fd.io/vpp/tree/src/plugins/hs_apps/vcl 



> On Dec 7, 2020, at 11:24 AM, Venumadhav Josyula  wrote:
> 
> Hi Florin,
> 
> This is nothing to do with the subject being discussed. 
> 
> Can you please direct me to the following
> i) example(s) of VCL ?
> ii) Any tutorial explaining the working of VCL ?
> 
> Thanks & Regards,
> Venu
> 
> On Fri, 4 Dec 2020 at 01:28, Florin Coras  > wrote:
> Hi Ravi, 
> 
> VCL is not part of the vpp app/process, it’s a library that applications can 
> link against to be able to interact with the session layer in a more 
> posix-like manner. So if your app needs a binary api connection to vpp, it 
> needs to set it up independent of vcl. 
> 
> With regard to the “vpe-api” region, it’s worth nothing that the binary api 
> can work over two “transports”. Namely:
>
> 1) posix shared memory, and this is the one that relies on the vpe-api region 
> for bootstrapping and 
> 2) an af_unix socket which is configurable in startup.conf, i.e., by doing 
> something like socksvr { socket-name  }.
> 
> This is somewhat further complicated by the fact that a binary api connection 
> bootstrapped over a socket (option 2) can be switched to a shared memory 
> transport. Although similar to option1, in this case, the memory is allocated 
> and negotiated per binary api client using memfds and the socket. This is 
> what VCL uses underneath if configured to use the binary api with the socket 
> transport. 
> 
> Previously, VCL could also be configured to use option 1, but support for 
> this has been recently dropped.
> 
> Regards,
> Florin
> 
>> On Dec 3, 2020, at 7:22 AM, RaviKiran Veldanda > > wrote:
>> 
>> Hi Florin,
>> Thanks for your response, however I have a question, If I want to use 
>> another Binary API initialization do we need to do at our Application or in 
>> VPP code.
>> When I check VPP source code, the initialization always with "vpe-api" 
>> vpe_api_init calls always vl_set_memory_region_name ("/vpe-api"); so 
>> wondering do we have any other region present?
>> 
>> FYI: We are using 20.05 stable version.
>> Regards,
>> Ravi.
>> 
>> 
>> 
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18272): https://lists.fd.io/g/vpp-dev/message/18272
Mute This Topic: https://lists.fd.io/mt/78677945/21656
Mute #binapi:https://lists.fd.io/g/vpp-dev/mutehashtag/binapi
Mute #vapi:https://lists.fd.io/g/vpp-dev/mutehashtag/vapi
Mute #vppcom:https://lists.fd.io/g/vpp-dev/mutehashtag/vppcom
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] vppcom and binary api #binapi #vapi #vppcom

2020-12-07 Thread Venumadhav Josyula
Hi Florin,

This is nothing to do with the subject being discussed.

Can you please direct me to the following
i) example(s) of VCL ?
ii) Any tutorial explaining the working of VCL ?

Thanks & Regards,
Venu

On Fri, 4 Dec 2020 at 01:28, Florin Coras  wrote:

> Hi Ravi,
>
> VCL is not part of the vpp app/process, it’s a library that applications
> can link against to be able to interact with the session layer in a more
> posix-like manner. So if your app needs a binary api connection to vpp, it
> needs to set it up independent of vcl.
>
> With regard to the “vpe-api” region, it’s worth nothing that the binary
> api can work over two “transports”. Namely:
>
> 1) posix shared memory, and this is the one that relies on the vpe-api
> region for bootstrapping and
> 2) an af_unix socket which is configurable in startup.conf, i.e., by doing
> something like socksvr { socket-name  }.
>
> This is somewhat further complicated by the fact that a binary api
> connection bootstrapped over a socket (option 2) can be switched to a
> shared memory transport. Although similar to option1, in this case, the
> memory is allocated and negotiated per binary api client using memfds and
> the socket. This is what VCL uses underneath if configured to use the
> binary api with the socket transport.
>
> Previously, VCL could also be configured to use option 1, but support for
> this has been recently dropped.
>
> Regards,
> Florin
>
> On Dec 3, 2020, at 7:22 AM, RaviKiran Veldanda 
> wrote:
>
> Hi Florin,
> Thanks for your response, however I have a question, If I want to use
> another Binary API initialization do we need to do at our Application or in
> VPP code.
> When I check VPP source code, the initialization always with "vpe-api"
> vpe_api_init calls always vl_set_memory_region_name ("/vpe-api"); so
> wondering do we have any other region present?
>
> FYI: We are using 20.05 stable version.
> Regards,
> Ravi.
>
>
>
>
>
> 
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18271): https://lists.fd.io/g/vpp-dev/message/18271
Mute This Topic: https://lists.fd.io/mt/78677945/21656
Mute #binapi:https://lists.fd.io/g/vpp-dev/mutehashtag/binapi
Mute #vapi:https://lists.fd.io/g/vpp-dev/mutehashtag/vapi
Mute #vppcom:https://lists.fd.io/g/vpp-dev/mutehashtag/vppcom
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] vppcom and binary api #binapi #vapi #vppcom

2020-12-07 Thread RaviKiran Veldanda
Hi Florin/Team of experts,
I have one more question, The basic requirement we have is
We have to send some data from our application to our own plugin.
While going through previous messages and documentation, we found we can use 
memif or quick sockets.
Our question is, do we have any other VPP provided methods of communication 
between a Plugin and Application? if yes can you please provide a pointer.
That may resolve our issue.
//Ravi.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18269): https://lists.fd.io/g/vpp-dev/message/18269
Mute This Topic: https://lists.fd.io/mt/78677945/21656
Mute #binapi:https://lists.fd.io/g/vpp-dev/mutehashtag/binapi
Mute #vapi:https://lists.fd.io/g/vpp-dev/mutehashtag/vapi
Mute #vppcom:https://lists.fd.io/g/vpp-dev/mutehashtag/vppcom
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] vppcom and binary api #binapi #vapi #vppcom

2020-12-03 Thread Florin Coras
Hi Ravi, 

VCL is not part of the vpp app/process, it’s a library that applications can 
link against to be able to interact with the session layer in a more posix-like 
manner. So if your app needs a binary api connection to vpp, it needs to set it 
up independent of vcl. 

With regard to the “vpe-api” region, it’s worth nothing that the binary api can 
work over two “transports”. Namely:
 
1) posix shared memory, and this is the one that relies on the vpe-api region 
for bootstrapping and 
2) an af_unix socket which is configurable in startup.conf, i.e., by doing 
something like socksvr { socket-name  }.

This is somewhat further complicated by the fact that a binary api connection 
bootstrapped over a socket (option 2) can be switched to a shared memory 
transport. Although similar to option1, in this case, the memory is allocated 
and negotiated per binary api client using memfds and the socket. This is what 
VCL uses underneath if configured to use the binary api with the socket 
transport. 

Previously, VCL could also be configured to use option 1, but support for this 
has been recently dropped.

Regards,
Florin

> On Dec 3, 2020, at 7:22 AM, RaviKiran Veldanda  wrote:
> 
> Hi Florin,
> Thanks for your response, however I have a question, If I want to use another 
> Binary API initialization do we need to do at our Application or in VPP code.
> When I check VPP source code, the initialization always with "vpe-api"
> vpe_api_init calls always vl_set_memory_region_name ("/vpe-api"); so 
> wondering do we have any other region present?
> 
> FYI: We are using 20.05 stable version.
> Regards,
> Ravi.
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18249): https://lists.fd.io/g/vpp-dev/message/18249
Mute This Topic: https://lists.fd.io/mt/78677945/21656
Mute #binapi:https://lists.fd.io/g/vpp-dev/mutehashtag/binapi
Mute #vapi:https://lists.fd.io/g/vpp-dev/mutehashtag/vapi
Mute #vppcom:https://lists.fd.io/g/vpp-dev/mutehashtag/vppcom
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] vppcom and binary api #binapi #vapi #vppcom

2020-12-03 Thread RaviKiran Veldanda
Hi Florin,
Thanks for your response, however I have a question, If I want to use another 
Binary API initialization do we need to do at our Application or in VPP code.
When I check VPP source code, the initialization always with "vpe-api"
vpe_api_init calls always vl_set_memory_region_name ("/vpe-api"); so wondering 
do we have any other region present?

FYI: We are using 20.05 stable version.
Regards,
Ravi.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18248): https://lists.fd.io/g/vpp-dev/message/18248
Mute This Topic: https://lists.fd.io/mt/78677945/21656
Mute #binapi:https://lists.fd.io/g/vpp-dev/mutehashtag/binapi
Mute #vapi:https://lists.fd.io/g/vpp-dev/mutehashtag/vapi
Mute #vppcom:https://lists.fd.io/g/vpp-dev/mutehashtag/vppcom
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] vppcom and binary api #binapi #vapi #vppcom

2020-12-02 Thread Florin Coras
Hi Ravi, 

By default, vcl relies on the binary api to attach to the session layer in vpp. 
It is possible to initialize another binary api connection from your app, apart 
from the one transparently created by vcl, but it requires some careful 
non-default initialization of a series of data structures.

So the simplest thing would be to use the new api exposed by the session layer. 
For that, in vpp’s startup.conf add “session { use-app-socket-api }” and in 
vcl.conf add  "app-socket-api /var/run/vpp/app_ns_sockets/default”. 

Note that this is a recent addition so it’s only available on vpp master. 

Regards,
Florin

> On Dec 2, 2020, at 7:49 PM, RaviKiran Veldanda  wrote:
> 
> Hi Team,
> We have our application which uses VPPCOM sessions to read and write some 
> packets.
> We have one more requirement that Application uses Vpp-binary api and provide 
> some information to our own plugin.
> When we try calling this binary apis without VPPCOM session started or 
> running, the VPP Binary APIs are working fine.
> When we try to call after VPPCOM session create then we are seeing our 
> application crash in VPP library.
> So we want to understand, if we are using VPPCOM session, is vpp binary api 
> not allowed to use?
> If that is true, do we have any other mechanism to call my plugin binary API? 
> I don't want to use CLI because these APIs will get call in fast path.
> Please advice us. 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18242): https://lists.fd.io/g/vpp-dev/message/18242
Mute This Topic: https://lists.fd.io/mt/78677945/21656
Mute #binapi:https://lists.fd.io/g/vpp-dev/mutehashtag/binapi
Mute #vapi:https://lists.fd.io/g/vpp-dev/mutehashtag/vapi
Mute #vppcom:https://lists.fd.io/g/vpp-dev/mutehashtag/vppcom
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-