Re: [vpp-dev] vppcom and binary api #binapi #vapi #vppcom
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
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
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
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] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] support of raw socket like support in vpp
Hi All. There is any raw socket like support in vpp. Our stack opens raw sockets and as out stack is sitting in the stack. We would like to pass the ethernet data directly via session layer to the application. We are planning to use vcl to achieve the same. Any pointers of examples are good to know. Thanks, Regards, Venu -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18406): https://lists.fd.io/g/vpp-dev/message/18406 Mute This Topic: https://lists.fd.io/mt/79145357/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] support of raw socket like support in vpp
Hi florin, Are there any examples for the same Thanks, Regards Venu On Tue, 22 Dec, 2020, 8:52 pm Florin Coras, wrote: > Hi Venu, > > We don’t support raw sockets in the host stack and implicitly in vcl. You > might be able to achieve what you want with memif interfaces. > > Regards, > Florin > > On Dec 22, 2020, at 12:43 AM, Venumadhav Josyula > wrote: > > Hi All. > > There is any raw socket like support in vpp. Our stack opens raw sockets > and as out stack is sitting in the stack. We would like to pass the > ethernet data directly via session layer to the application. We are > planning to use vcl to achieve the same. > > Any pointers of examples are good to know. > > Thanks, > Regards, > Venu > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18409): https://lists.fd.io/g/vpp-dev/message/18409 Mute This Topic: https://lists.fd.io/mt/79145357/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] support of raw socket like support in vpp
Pointers will also help. On Tue, 22 Dec, 2020, 9:17 pm Florin Coras, wrote: > Hi Venu, > > The only resource I know of is [1]. Others might have more pointers. > > Regards, > Florin > > [1] https://git.fd.io/vpp/tree/extras/libmemif > > On Dec 22, 2020, at 7:36 AM, Venumadhav Josyula > wrote: > > Hi florin, > > Are there any examples for the same > > Thanks, > Regards > Venu > > On Tue, 22 Dec, 2020, 8:52 pm Florin Coras, > wrote: > >> Hi Venu, >> >> We don’t support raw sockets in the host stack and implicitly in vcl. You >> might be able to achieve what you want with memif interfaces. >> >> Regards, >> Florin >> >> On Dec 22, 2020, at 12:43 AM, Venumadhav Josyula >> wrote: >> >> Hi All. >> >> There is any raw socket like support in vpp. Our stack opens raw sockets >> and as out stack is sitting in the stack. We would like to pass the >> ethernet data directly via session layer to the application. We are >> planning to use vcl to achieve the same. >> >> Any pointers of examples are good to know. >> >> Thanks, >> Regards, >> Venu >> >> >> >> >> >> > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18411): https://lists.fd.io/g/vpp-dev/message/18411 Mute This Topic: https://lists.fd.io/mt/79145357/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] Problem running vcl-test-server inside a docker
Hi Setup details :- Two dockers created using following commands *vpp docker * *creation :-* docker run --privileged -it -d -v /var/run:/var/run -v /dev:/dev -v /dev/shm:/dev/shm --cap-add=CAP_SYS_ADMIN --cap-add=CAP_NET_ADMIN --name vpp-run-c1 vpp-run:1.0 /usr/sbin/init *VPP Libraries installed* [root@aa7c1125718d vpp-rpm]# rpm -qa | grep vpp vpp-lib-21.06-rc0~27_g7b0fa55.x86_64 vpp-plugins-21.06-rc0~27_g7b0fa55.x86_64 vpp-api-python3-21.06-rc0~27_g7b0fa55.x86_64 vpp-debuginfo-21.06-rc0~27_g7b0fa55.x86_64 vpp-selinux-policy-21.06-rc0~27_g7b0fa55.x86_64 vpp-21.06-rc0~27_g7b0fa55.x86_64 vpp-api-lua-21.06-rc0~27_g7b0fa55.x86_64 vpp-devel-21.06-rc0~27_g7b0fa55.x86_64 [root@aa7c1125718d vpp-rpm]# *startup.conf* unix { nodaemon interactive log /var/log/vpp/vpp.log full-coredump cli-listen localhost:5002 } dpdk { dev :00:08.0 uio-driver igb_uio } logging { default-syslog-log-level info default-log-level info } session { enable } api-trace { on } vcl.conf vcl { max-workers 1 use-app-socket-api } *vcl-server docker* *Creation* docker run -it -d -v /var/run:/var/run -v /dev/shm:/dev/shm --name vcl-server-1 stackpod-img:1.0 *VPP Libraries installed* [root@8a41dfa6780e vcl-server]# rpm -qa | grep vpp vpp-lib-21.06-rc0~27_g7b0fa55.x86_64 vpp-selinux-policy-21.06-rc0~27_g7b0fa55.x86_64 [root@8a41dfa6780e vcl-server]# vcl.conf is present but empty. It is present in /etc/vpp/vcl.conf We are getting following error when starting the vcl_test_server // please we are trying to bringup the basic [root@8a41dfa6780e vcl-server]# ./vcl_test_server -p tcp 1234 vcl_bapi_init:604: vcl<682:0>: ERROR couldn't connect to VPP! ERROR when calling vppcom_app_create(): Invalid argument ERROR: vppcom_app_create() failed (errno = 22)! Segmentation fault (core dumped) [root@8a41dfa6780e vcl-server]# It would nice, if somebody told us what might be missing or what is the additional information required. Thanks, Regards, Venu -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18422): https://lists.fd.io/g/vpp-dev/message/18422 Mute This Topic: https://lists.fd.io/mt/79200852/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] Problem running vcl-test-server inside a docker
Hi Florin, Thanks, that helped. Now I have question, please vpp# show session verbose proto tcp [0:1][T] 0.0.0.0:1234->0.0.0.0:0LISTEN 0 0 [0:2][T] 172.168.2.60:1234->172.168.1.40:44874 ESTABLISHED 3062960 Thread 0: 2 sessions matched filter vpp# show session verbose Connection State Rx-f Tx-f *[0:0][CT:T] 0.0.0.0:1234->0.0.0.0:0 <http://0.0.0.0:0> * LISTEN 0 0 *[0:1][T] 0.0.0.0:1234->0.0.0.0:0 <http://0.0.0.0:0> * LISTEN 0 0 [0:2][T] 172.168.2.60:1234->172.168.1.40:44874 ESTABLISHED 3062960 Thread 0: active sessions 3 vpp# Question, i) what is 0.0.0.0 session for ? ii) why 2) iii) why not number of session(s) only one ? Thanks, Regards, Venu On Thu, 24 Dec 2020 at 23:29, Florin Coras wrote: > Hi Venu, > > That last error "vcl_bapi_init:604: vcl<682:0>: ERROR couldn't connect to > VPP!” pretty much explains everything. VCL is trying to connect over the > binary api to vpp and it can’t find the socket. Make sure that vpp exposes > the binary api’s socket where you want (/var/run as far as I can tell from > lower) by adding "socksvr { socket-name /var/run/vpp-api.sock }" to vpp’s > startup.conf. And then add the same to vcl.conf "api-socket-name > /var/run/vpp-api.sock”. > > If you want to use the session layer’s socket api (not the binary api with > socket transport) add to vpp’s startup.conf "session { use-app-socket-api > }” and to vcl "app-socket-api /var/run/vpp/app_ns_sockets/default”. > > More conf info here [1] and here [2] > > Regards, > Florin > > [1] https://wiki.fd.io/view/VPP/HostStack/VCL > [2] > https://wiki.fd.io/view/VPP/HostStack/SessionLayerArchitecture#Session_Layer_Startup_Configuration > > On Dec 24, 2020, at 4:35 AM, Venumadhav Josyula > wrote: > > Hi > Setup details :- > Two dockers created using following commands > *vpp docker * > > *creation :-* > docker run --privileged -it -d -v /var/run:/var/run -v /dev:/dev -v > /dev/shm:/dev/shm --cap-add=CAP_SYS_ADMIN --cap-add=CAP_NET_ADMIN --name > vpp-run-c1 vpp-run:1.0 /usr/sbin/init > > *VPP Libraries installed* > [root@aa7c1125718d vpp-rpm]# rpm -qa | grep vpp > vpp-lib-21.06-rc0~27_g7b0fa55.x86_64 > vpp-plugins-21.06-rc0~27_g7b0fa55.x86_64 > vpp-api-python3-21.06-rc0~27_g7b0fa55.x86_64 > vpp-debuginfo-21.06-rc0~27_g7b0fa55.x86_64 > vpp-selinux-policy-21.06-rc0~27_g7b0fa55.x86_64 > vpp-21.06-rc0~27_g7b0fa55.x86_64 > vpp-api-lua-21.06-rc0~27_g7b0fa55.x86_64 > vpp-devel-21.06-rc0~27_g7b0fa55.x86_64 > [root@aa7c1125718d vpp-rpm]# > > *startup.conf* > > unix { > nodaemon > interactive > log /var/log/vpp/vpp.log > full-coredump > cli-listen localhost:5002 > } > dpdk { >dev :00:08.0 >uio-driver igb_uio > } > logging { > default-syslog-log-level info > default-log-level info > } > session { > enable > } > api-trace { > on > } > > vcl.conf > > vcl { > max-workers 1 > use-app-socket-api > } > > > *vcl-server docker* > *Creation* > docker run -it -d -v /var/run:/var/run -v /dev/shm:/dev/shm --name > vcl-server-1 stackpod-img:1.0 > > *VPP Libraries installed* > [root@8a41dfa6780e vcl-server]# rpm -qa | grep vpp > vpp-lib-21.06-rc0~27_g7b0fa55.x86_64 > vpp-selinux-policy-21.06-rc0~27_g7b0fa55.x86_64 > [root@8a41dfa6780e vcl-server]# > > vcl.conf is present but empty. It is present in /etc/vpp/vcl.conf > > We are getting following error when starting the vcl_test_server // please > we are trying to bringup the basic > [root@8a41dfa6780e vcl-server]# ./vcl_test_server -p tcp 1234 > vcl_bapi_init:604: vcl<682:0>: ERROR couldn't connect to VPP! > ERROR when calling vppcom_app_create(): Invalid argument > > ERROR: vppcom_app_create() failed (errno = 22)! > Segmentation fault (core dumped) > [root@8a41dfa6780e vcl-server]# > > > It would nice, if somebody told us what might be missing or what is the > additional information required. > > Thanks, > Regards, > Venu > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18431): https://lists.fd.io/g/vpp-dev/message/18431 Mute This Topic: https://lists.fd.io/mt/79200852/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] Problem running vcl-test-server inside a docker
Hi Florin, Thanks for quick reply. I still have more questions, *Setup details :-* Docker#1 - vpp running Docker#2 - vcl test server running // separate m/c over n/w - tcp client running // Now questions inline. *>That’s a cut-through session because the app has requested local scoped connections. See [1] around slide 16.* why cut-through, my understanding is that l2 | l3 | l4 stack comes into play w/o bypassing them ? My understanding is that cut-through session(s) do not go through vpp stack it is more session layer to session layer communication. Thanks, Regards, Venu On Mon, 28 Dec 2020 at 03:54, Florin Coras wrote: > Hi Venu, > > Inline. > > On Dec 27, 2020, at 8:17 AM, Venumadhav Josyula > wrote: > > Hi Florin, > > Thanks, that helped. Now I have question, please > vpp# show session verbose proto tcp > [0:1][T] 0.0.0.0:1234->0.0.0.0:0LISTEN > 0 0 > [0:2][T] 172.168.2.60:1234->172.168.1.40:44874 ESTABLISHED > 3062960 > Thread 0: 2 sessions matched filter > vpp# show session verbose > Connection State > Rx-f Tx-f > *[0:0][CT:T] 0.0.0.0:1234->0.0.0.0:0 <http://0.0.0.0:0/> * > LISTEN 0 0 > *[0:1][T] 0.0.0.0:1234->0.0.0.0:0 <http://0.0.0.0:0/> * > LISTEN 0 0 > [0:2][T] 172.168.2.60:1234->172.168.1.40:44874 ESTABLISHED > 3062960 > Thread 0: active sessions 3 > vpp# > > Question, > i) what is 0.0.0.0 session for ? > > > This is a listener session. The app bound to port 1234 and 0/0 (or > INADDR_ANY). > > ii) why 2) > > > That’s a cut-through session because the app has requested local scoped > connections. See [1] around slide 16. > > iii) why not number of session(s) only one ? > > > You have one established session and 2 listeners (local and global scope). > > Regards, > Florin > > [1] https://wiki.fd.io/images/9/9c/Vpp-hoststack-kc-eu19.pdf > > > Thanks, > Regards, > Venu > > > On Thu, 24 Dec 2020 at 23:29, Florin Coras wrote: > >> Hi Venu, >> >> That last error "vcl_bapi_init:604: vcl<682:0>: ERROR couldn't connect to >> VPP!” pretty much explains everything. VCL is trying to connect over the >> binary api to vpp and it can’t find the socket. Make sure that vpp exposes >> the binary api’s socket where you want (/var/run as far as I can tell from >> lower) by adding "socksvr { socket-name /var/run/vpp-api.sock }" to vpp’s >> startup.conf. And then add the same to vcl.conf "api-socket-name >> /var/run/vpp-api.sock”. >> >> If you want to use the session layer’s socket api (not the binary api >> with socket transport) add to vpp’s startup.conf "session >> { use-app-socket-api }” and to vcl "app-socket-api >> /var/run/vpp/app_ns_sockets/default”. >> >> More conf info here [1] and here [2] >> >> Regards, >> Florin >> >> [1] https://wiki.fd.io/view/VPP/HostStack/VCL >> [2] >> https://wiki.fd.io/view/VPP/HostStack/SessionLayerArchitecture#Session_Layer_Startup_Configuration >> >> On Dec 24, 2020, at 4:35 AM, Venumadhav Josyula >> wrote: >> >> Hi >> Setup details :- >> Two dockers created using following commands >> *vpp docker * >> >> *creation :-* >> docker run --privileged -it -d -v /var/run:/var/run -v /dev:/dev -v >> /dev/shm:/dev/shm --cap-add=CAP_SYS_ADMIN --cap-add=CAP_NET_ADMIN --name >> vpp-run-c1 vpp-run:1.0 /usr/sbin/init >> >> *VPP Libraries installed* >> [root@aa7c1125718d vpp-rpm]# rpm -qa | grep vpp >> vpp-lib-21.06-rc0~27_g7b0fa55.x86_64 >> vpp-plugins-21.06-rc0~27_g7b0fa55.x86_64 >> vpp-api-python3-21.06-rc0~27_g7b0fa55.x86_64 >> vpp-debuginfo-21.06-rc0~27_g7b0fa55.x86_64 >> vpp-selinux-policy-21.06-rc0~27_g7b0fa55.x86_64 >> vpp-21.06-rc0~27_g7b0fa55.x86_64 >> vpp-api-lua-21.06-rc0~27_g7b0fa55.x86_64 >> vpp-devel-21.06-rc0~27_g7b0fa55.x86_64 >> [root@aa7c1125718d vpp-rpm]# >> >> *startup.conf* >> >> unix { >> nodaemon >> interactive >> log /var/log/vpp/vpp.log >> full-coredump >> cli-listen localhost:5002 >> } >> dpdk { >>dev :00:08.0 >>uio-driver igb_uio >> } >> logging { >> default-syslog-log-level info >> default-log-level info >> } >> session { >> enable >> } >> api-trace { >> on >> } >> >> vcl.conf >> >> vcl { >> max-workers 1 >> use-app-socket-api >>
Re: [vpp-dev] support of raw socket like support in vpp
Hi Florin, We want sctp traffic processing to happen in some other pod, which has sctp stack. Now vpp is running in one pod, both network pod { where vpp is running } and stack pod { does sctp processing are there on the same host }. *We want to avoid using vpp sctp plugin*. Now is following possible ? - have some sort of acl (for dst ip + src ip + port + sctp). - Once the match is hit divert this to the session layer. - Via vcl send it to stack pod for sctp processing. Was browsing the vcl code , the SCTP proto type what was it intended for ? Thanks, Regards, Venu On Tue, 22 Dec 2020 at 20:52, Florin Coras wrote: > Hi Venu, > > We don’t support raw sockets in the host stack and implicitly in vcl. You > might be able to achieve what you want with memif interfaces. > > Regards, > Florin > > On Dec 22, 2020, at 12:43 AM, Venumadhav Josyula > wrote: > > Hi All. > > There is any raw socket like support in vpp. Our stack opens raw sockets > and as out stack is sitting in the stack. We would like to pass the > ethernet data directly via session layer to the application. We are > planning to use vcl to achieve the same. > > Any pointers of examples are good to know. > > Thanks, > Regards, > Venu > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18441): https://lists.fd.io/g/vpp-dev/message/18441 Mute This Topic: https://lists.fd.io/mt/79145357/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] Requirement of predictable interface name
Hi Chetan, That ability is already there right now also we are using vpp 20.09 and intend to go 21.x also, we do it this way ... dpdk { dev :19:00.1 { name vpp-intf19/0/1 <--- "you can give whatever you , we have chose bus, slot,fn appended with vpp-intf" } .. } We doing this way and it works for us. This generation fo startup.conf happens to us via some our task ( unix process ). I guess that should good enough ? Thanks, Regards, Venu On Wed, 24 Mar 2021 at 11:31, chetan bhasin wrote: > Hi Team, > > We have a requirement to have a predictable interface name , say > "device_" , instead of GigabitEthernet/TenGigabitEthernet etc > , so that external scripts can create vpp.conf automatically. > > One way is to modify plugins/dpdk/device/format.c code as per our > requirement . but we want to avoid changes in vpp code base that will make > vpp upgrade easy for the future. > Can you please suggest any additional CLI or configuration via which we > could alias interface names ? > > Thanks, > Chetan > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19006): https://lists.fd.io/g/vpp-dev/message/19006 Mute This Topic: https://lists.fd.io/mt/81570537/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] child sa rekey
Hi Vpp Ipsec Experts, I wanted to understand how child sa rekey ( lifetime) are handled in vpp. i) We are using strongswan + kernel-vpp plugin for our ikev2 exchange. ii) Now we are facing the issue child sa rekey, the problem child sa rekey is not getting triggered. I understand, the strongswan needs to trigger this. We triggered manually it works, but timeout of lifetime does not work. Please also note there is no issue with IKE SA rekey timeout expiry. iii) for ii) in the kernel world while adding as these parameters such lifetime are passed. And it is the kernel that triggers child sa rekey on hard timer expiry. iv) How do we pass these parameter lifetime cfg to the vpp, is it handled or not handled. Please note we are using the vpp 20.09 release version for the same. Thank and regards Venu -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19089): https://lists.fd.io/g/vpp-dev/message/19089 Mute This Topic: https://lists.fd.io/mt/81780992/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] child sa rekey
Hi Benoit, Strongswan keeps track for whatever is required but kernel feeds the relevant information via events. For *child sa*, in the kernel world, it is kernel which XFRM_EXPIRE message via netlink. The strongswan is listening of netlink events for the same. When it receives events from the kernel it processes expire and calls the relevant 'charon->kernel->migrate'. Please note i am only talking about child sa rekey where kernel send events, for IKE SA rekey the strongswan works on timer basis. Thanks, Regards, Venu On Fri, 2 Apr 2021 at 14:35, Benoit Ganne (bganne) wrote: > Hi Venu, > > I am not familiar with the kernel-vpp plugin you mention, however if I > understand correctly your question is how strongSwan can know it must > trigger a rekey because of time expiration or max bytes transferred? > VPP IPsec does not manage SA lifetimes by itself, it is the responsibility > of strongSwan (or any other IKE stack). strongSwan can keep track of time > by itself, and regarding the max bytes limit, VPP exposes per-SA bytes > counters, so strongSwan should poll those counters periodically and trigger > a rekey if needed. > Also, VPP comes with its own IKEv2 implementation (which does support > lifetime management), you can find examples here: > https://gerrit.fd.io/r/c/vpp/+/31414 > > Best > ben > > > -Original Message- > > From: vpp-dev@lists.fd.io On Behalf Of Venumadhav > > Josyula > > Sent: jeudi 1 avril 2021 18:05 > > To: vpp-dev > > Subject: [vpp-dev] child sa rekey > > > > Hi Vpp Ipsec Experts, > > > > I wanted to understand how child sa rekey ( lifetime) are handled in vpp. > > i) We are using strongswan + kernel-vpp plugin for our ikev2 exchange. > > ii) Now we are facing the issue child sa rekey, the problem child sa > > rekey is not getting triggered. I understand, the strongswan needs to > > trigger this. We triggered manually it works, but timeout of lifetime > does > > not work. Please also note there is no issue with IKE SA rekey timeout > > expiry. > > iii) for ii) in the kernel world while adding as these parameters such > > lifetime are passed. And it is the kernel that triggers child sa rekey on > > hard timer expiry. > > iv) How do we pass these parameter lifetime cfg to the vpp, is it handled > > or not handled. > > > > Please note we are using the vpp 20.09 release version for the same. > > > > Thank and regards > > Venu > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19097): https://lists.fd.io/g/vpp-dev/message/19097 Mute This Topic: https://lists.fd.io/mt/81780992/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] child sa rekey
small correction , strongswan call *expire* not migrate On Fri, 2 Apr 2021 at 15:07, Venumadhav Josyula via lists.fd.io wrote: > Hi Benoit, > > Strongswan keeps track for whatever is required but kernel feeds the > relevant information via events. > > For *child sa*, in the kernel world, it is kernel which XFRM_EXPIRE > message via netlink. The strongswan is listening of netlink events for the > same. When it receives events from the kernel it processes expire and calls > the relevant 'charon->kernel->migrate'. > > Please note i am only talking about child sa rekey where kernel send > events, for IKE SA rekey the strongswan works on timer basis. > > Thanks, > Regards, > Venu > > On Fri, 2 Apr 2021 at 14:35, Benoit Ganne (bganne) > wrote: > >> Hi Venu, >> >> I am not familiar with the kernel-vpp plugin you mention, however if I >> understand correctly your question is how strongSwan can know it must >> trigger a rekey because of time expiration or max bytes transferred? >> VPP IPsec does not manage SA lifetimes by itself, it is the >> responsibility of strongSwan (or any other IKE stack). strongSwan can keep >> track of time by itself, and regarding the max bytes limit, VPP exposes >> per-SA bytes counters, so strongSwan should poll those counters >> periodically and trigger a rekey if needed. >> Also, VPP comes with its own IKEv2 implementation (which does support >> lifetime management), you can find examples here: >> https://gerrit.fd.io/r/c/vpp/+/31414 >> >> Best >> ben >> >> > -Original Message- >> > From: vpp-dev@lists.fd.io On Behalf Of Venumadhav >> > Josyula >> > Sent: jeudi 1 avril 2021 18:05 >> > To: vpp-dev >> > Subject: [vpp-dev] child sa rekey >> > >> > Hi Vpp Ipsec Experts, >> > >> > I wanted to understand how child sa rekey ( lifetime) are handled in >> vpp. >> > i) We are using strongswan + kernel-vpp plugin for our ikev2 exchange. >> > ii) Now we are facing the issue child sa rekey, the problem child sa >> > rekey is not getting triggered. I understand, the strongswan needs to >> > trigger this. We triggered manually it works, but timeout of lifetime >> does >> > not work. Please also note there is no issue with IKE SA rekey timeout >> > expiry. >> > iii) for ii) in the kernel world while adding as these parameters such >> > lifetime are passed. And it is the kernel that triggers child sa rekey >> on >> > hard timer expiry. >> > iv) How do we pass these parameter lifetime cfg to the vpp, is it >> handled >> > or not handled. >> > >> > Please note we are using the vpp 20.09 release version for the same. >> > >> > Thank and regards >> > Venu >> > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19098): https://lists.fd.io/g/vpp-dev/message/19098 Mute This Topic: https://lists.fd.io/mt/81780992/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] IPSec - Clear packet's classification for SA lookup in VPP
Hi Benoit, Sorry to poke in the middle > - VLANs arrive on different sub-interfaces > - each sub-interface is in a different VRF > - each VRF has its own tunnel with a default route going through it We would need something of this sort, can you provide example for the same in vpp ? Thanks, Regards, Venu On Wed, 7 Apr 2021 at 23:12, Benoit Ganne (bganne) via lists.fd.io wrote: > Hi Manoj, > > We support 2 main modes: > - tunnel protection mode: > https://wiki.fd.io/view/VPP/IPSec#Protection_Model > - policy mode: https://wiki.fd.io/view/VPP/IPSec#Policy_Mode > > In tunnel protection mode, the packet classification is done via routing, > I suspect this is what you need, eg. > - VLANs arrive on different sub-interfaces > - each sub-interface is in a different VRF > - each VRF has its own tunnel with a default route going through it > > Of course you can build more complex topologies, eg. having multiple > tunnels per VRF with different routes, etc. > > Best > ben > > > -Original Message- > > From: vpp-dev@lists.fd.io On Behalf Of Manoj Kumar > > (manojku5) via lists.fd.io > > Sent: mercredi 7 avril 2021 19:19 > > To: vpp-dev@lists.fd.io > > Cc: Dharmarajan Subramanian (dharsubr) ; Srinivas > > Davuluri (srinud) ; Prashant Anand (prasanan) > > > > Subject: [vpp-dev] IPSec - Clear packet's classification for SA lookup in > > VPP > > > > Hi Team, > > > > > > > > We have some basic queries on the IPSEC support in VPP. Could someone > > please take a look? > > > > > > > > How does the clear packet classification and SA lookup happens in VPP for > > the packet? I mean, what all fields of the IP packet are considered for > > the SA lookup – can it support some L2/VLAN fields as well for this > > lookup? > > > > * Please share some code pointers towards this if possible. > > > > > > > > I came across esp4_encrypt_handoff() in ipsec_handoff.c file but could > not > > find the caller for the same. Which code leg calls this? > > > > * This further points to esp4_encrypt_node() and to > > esp_encrypt_inline(). > > * Inside esp_encrypt_inline(), I can see the code to access the SA > for > > the packet. But looks like that is pre-populated in the packet/frame. Is > > that understanding correct? If yes, can you please point us to the code > > pointers where this is set – is it in the previous graph node before > > “esp4_encrypt_handoff”? > > > > 636 if (is_tun) > > > > 637 { > > > > 638 /* we are on a ipsec tunnel's feature arc */ > > > > 639 vnet_buffer (b[0])->ipsec.sad_index = > > > > 640 sa_index0 = ipsec_tun_protect_get_sa_out > > > > 641 (vnet_buffer (b[0])->ip.adj_index[VLIB_TX]); > > > > 642 } > > > > 643 else > > > > 644 sa_index0 = vnet_buffer (b[0])->ipsec.sad_index; > > > > 645 > > > > > > > > At a high level, we want to be able to support IPSEC for multiple VRFs > and > > we would like to use an L2 encapsulation so that we can classify / find > > the SA for the clear text packet using the IP Header and the L2 fields. > Is > > that supported? > > > > If yes, what is the control plane programming requirements for that and > > where is this classification done in the VPP code? > > > > > > > > > > > > Thanks & Regards > > > > --Manoj > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19130): https://lists.fd.io/g/vpp-dev/message/19130 Mute This Topic: https://lists.fd.io/mt/81921820/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] VRF does not seem to working for us
Hi All, For VRF configuration does not seem to work for us, we using vpp-20.09. vpp# show version vpp v20.09.0-1~0-g94f29f6 built by root on devdocker2.parallelwireless.net at 2021-04-05T21:52:02 vpp# We are trying to following configuration ip table add 100 set interface ip table vpp-intf19/0/1 100 set interface ip address vpp-intf19/0/1 10.53.1.189/23 ip route add 10.43.0.170/32 table 100 via 10.53.0.1 here is dump vpp# show ip fib table 100 ipv4-VRF:100, fib_index:1, flow hash:[src dst sport dport proto ] epoch:0 flags:none locks:[CLI:2, ] 0.0.0.0/0 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:16 buckets:1 uRPF:17 to:[0:0]] [0] [@0]: dpo-drop ip4 0.0.0.0/32 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:17 buckets:1 uRPF:20 to:[0:0]] [0] [@0]: dpo-drop ip4 10.43.0.170/32 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:27 buckets:1 uRPF:29 to:[0:0]] [0] [@0]: dpo-drop ip4 10.53.0.0/32 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:19 buckets:1 uRPF:14 to:[0:0]] [0] [@0]: dpo-drop ip4 10.53.0.0/23 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:20 buckets:1 uRPF:12 to:[0:0]] [0] [@4]: ipv4-glean: vpp-intf19/0/1: mtu:9000 next:2 3cecef1f59df0806 10.53.1.189/32 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:25 buckets:1 uRPF:30 to:[0:0]] [0] [@2]: dpo-receive: 10.53.1.189 on vpp-intf19/0/1 10.53.1.255/32 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:18 buckets:1 uRPF:28 to:[3:234]] [0] [@0]: dpo-drop ip4 224.0.0.0/4 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:14 buckets:1 uRPF:18 to:[0:0]] [0] [@0]: dpo-drop ip4 240.0.0.0/4 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:15 buckets:1 uRPF:19 to:[0:0]] [0] [@0]: dpo-drop ip4 255.255.255.255/32 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:13 buckets:1 uRPF:16 to:[214:19084]] [0] [@0]: dpo-drop ip4 vpp# Can anyone pinpoint what could be the problem ? Thanks, Regards, Venu -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19137): https://lists.fd.io/g/vpp-dev/message/19137 Mute This Topic: https://lists.fd.io/mt/81936718/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] VRF does not seem to working for us
Sorry forgot to hight the problem > ip route add 10.43.0.170/32 table 100 via 10.53.0.1 In the show ip fib table 100, i am seeing the below, which does not seem correct *10.43.0.170/32 <http://10.43.0.170/32>unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:27 buckets:1 uRPF:29 to:[0:0]][0] [@0]: dpo-drop ip4 * Thanks, Regards, Venu On Thu, 8 Apr 2021 at 13:10, Venumadhav Josyula via lists.fd.io wrote: > Hi All, > For VRF configuration does not seem to work for us, we using vpp-20.09. > vpp# show version > vpp v20.09.0-1~0-g94f29f6 built by root on devdocker2.parallelwireless.net > at 2021-04-05T21:52:02 > vpp# > > We are trying to following configuration > > ip table add 100 > set interface ip table vpp-intf19/0/1 100 > set interface ip address vpp-intf19/0/1 10.53.1.189/23 > ip route add 10.43.0.170/32 table 100 via 10.53.0.1 > > here is dump > vpp# show ip fib table 100 > ipv4-VRF:100, fib_index:1, flow hash:[src dst sport dport proto ] epoch:0 > flags:none locks:[CLI:2, ] > 0.0.0.0/0 > unicast-ip4-chain > [@0]: dpo-load-balance: [proto:ip4 index:16 buckets:1 uRPF:17 to:[0:0]] > [0] [@0]: dpo-drop ip4 > 0.0.0.0/32 > unicast-ip4-chain > [@0]: dpo-load-balance: [proto:ip4 index:17 buckets:1 uRPF:20 to:[0:0]] > [0] [@0]: dpo-drop ip4 > 10.43.0.170/32 > unicast-ip4-chain > [@0]: dpo-load-balance: [proto:ip4 index:27 buckets:1 uRPF:29 to:[0:0]] > [0] [@0]: dpo-drop ip4 > 10.53.0.0/32 > unicast-ip4-chain > [@0]: dpo-load-balance: [proto:ip4 index:19 buckets:1 uRPF:14 to:[0:0]] > [0] [@0]: dpo-drop ip4 > 10.53.0.0/23 > unicast-ip4-chain > [@0]: dpo-load-balance: [proto:ip4 index:20 buckets:1 uRPF:12 to:[0:0]] > [0] [@4]: ipv4-glean: vpp-intf19/0/1: mtu:9000 next:2 > 3cecef1f59df0806 > 10.53.1.189/32 > unicast-ip4-chain > [@0]: dpo-load-balance: [proto:ip4 index:25 buckets:1 uRPF:30 to:[0:0]] > [0] [@2]: dpo-receive: 10.53.1.189 on vpp-intf19/0/1 > 10.53.1.255/32 > unicast-ip4-chain > [@0]: dpo-load-balance: [proto:ip4 index:18 buckets:1 uRPF:28 to:[3:234]] > [0] [@0]: dpo-drop ip4 > 224.0.0.0/4 > unicast-ip4-chain > [@0]: dpo-load-balance: [proto:ip4 index:14 buckets:1 uRPF:18 to:[0:0]] > [0] [@0]: dpo-drop ip4 > 240.0.0.0/4 > unicast-ip4-chain > [@0]: dpo-load-balance: [proto:ip4 index:15 buckets:1 uRPF:19 to:[0:0]] > [0] [@0]: dpo-drop ip4 > 255.255.255.255/32 > unicast-ip4-chain > [@0]: dpo-load-balance: [proto:ip4 index:13 buckets:1 uRPF:16 > to:[214:19084]] > [0] [@0]: dpo-drop ip4 > vpp# > > Can anyone pinpoint what could be the problem ? > > Thanks, > Regards, > Venu > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19138): https://lists.fd.io/g/vpp-dev/message/19138 Mute This Topic: https://lists.fd.io/mt/81936718/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] VRF does not seem to working for us
Hi Stanislav, > By default it'd be nexthop in default fib. i) by default meaning table id 0 ? i) So we want it to be default fib, what should be in the default fib ? meaning default route ? ii) But we want to only for dest ip ( 10.43.0.170/32) What needs to be done? Thanks, Regards, Venu On Thu, 8 Apr 2021 at 13:18, Stanislav Zaikin wrote: > Hi Venumadhav, > > You should specify an ip table for the nexthop with "next-hop-table XX". > By default it'd be nexthop in default fib. > > On Thu, 8 Apr 2021 at 10:40, Venumadhav Josyula > wrote: > >> Hi All, >> For VRF configuration does not seem to work for us, we using vpp-20.09. >> vpp# show version >> vpp v20.09.0-1~0-g94f29f6 built by root on >> devdocker2.parallelwireless.net at 2021-04-05T21:52:02 >> vpp# >> >> We are trying to following configuration >> >> ip table add 100 >> set interface ip table vpp-intf19/0/1 100 >> set interface ip address vpp-intf19/0/1 10.53.1.189/23 >> ip route add 10.43.0.170/32 table 100 via 10.53.0.1 >> >> here is dump >> vpp# show ip fib table 100 >> ipv4-VRF:100, fib_index:1, flow hash:[src dst sport dport proto ] epoch:0 >> flags:none locks:[CLI:2, ] >> 0.0.0.0/0 >> unicast-ip4-chain >> [@0]: dpo-load-balance: [proto:ip4 index:16 buckets:1 uRPF:17 to:[0:0]] >> [0] [@0]: dpo-drop ip4 >> 0.0.0.0/32 >> unicast-ip4-chain >> [@0]: dpo-load-balance: [proto:ip4 index:17 buckets:1 uRPF:20 to:[0:0]] >> [0] [@0]: dpo-drop ip4 >> 10.43.0.170/32 >> unicast-ip4-chain >> [@0]: dpo-load-balance: [proto:ip4 index:27 buckets:1 uRPF:29 to:[0:0]] >> [0] [@0]: dpo-drop ip4 >> 10.53.0.0/32 >> unicast-ip4-chain >> [@0]: dpo-load-balance: [proto:ip4 index:19 buckets:1 uRPF:14 to:[0:0]] >> [0] [@0]: dpo-drop ip4 >> 10.53.0.0/23 >> unicast-ip4-chain >> [@0]: dpo-load-balance: [proto:ip4 index:20 buckets:1 uRPF:12 to:[0:0]] >> [0] [@4]: ipv4-glean: vpp-intf19/0/1: mtu:9000 next:2 >> 3cecef1f59df0806 >> 10.53.1.189/32 >> unicast-ip4-chain >> [@0]: dpo-load-balance: [proto:ip4 index:25 buckets:1 uRPF:30 to:[0:0]] >> [0] [@2]: dpo-receive: 10.53.1.189 on vpp-intf19/0/1 >> 10.53.1.255/32 >> unicast-ip4-chain >> [@0]: dpo-load-balance: [proto:ip4 index:18 buckets:1 uRPF:28 >> to:[3:234]] >> [0] [@0]: dpo-drop ip4 >> 224.0.0.0/4 >> unicast-ip4-chain >> [@0]: dpo-load-balance: [proto:ip4 index:14 buckets:1 uRPF:18 to:[0:0]] >> [0] [@0]: dpo-drop ip4 >> 240.0.0.0/4 >> unicast-ip4-chain >> [@0]: dpo-load-balance: [proto:ip4 index:15 buckets:1 uRPF:19 to:[0:0]] >> [0] [@0]: dpo-drop ip4 >> 255.255.255.255/32 >> unicast-ip4-chain >> [@0]: dpo-load-balance: [proto:ip4 index:13 buckets:1 uRPF:16 >> to:[214:19084]] >> [0] [@0]: dpo-drop ip4 >> vpp# >> >> Can anyone pinpoint what could be the problem ? >> >> Thanks, >> Regards, >> Venu >> >> >> >> > > -- > Best regards > Stanislav Zaikin > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19140): https://lists.fd.io/g/vpp-dev/message/19140 Mute This Topic: https://lists.fd.io/mt/81936718/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] route based on the source ip
Hi, We have a requirement such that i) we want to have a vrf table for each vlan interface. Each vrf will have it own default route ii)for packets from the host interface , we want to have a route based on the source ip such we can redirect to use vrf table as next hop table. iii) We are using strongswan for ipsec, and we don't want to enable the install_route option of strongswan, so that we can packet remote host to be sent to default route in the vrf table. Please our problem is not specific to ipsec processing by routes The problem statement is how do we route the host interface packets to appropriate vrf table corresponding to the vlan interface. We donot know the remote ip for which we want install route. So is it possible to have a route based on source ip ? Thanks, Regards, Venu -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19245): https://lists.fd.io/g/vpp-dev/message/19245 Mute This Topic: https://lists.fd.io/mt/82206233/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] route based on the source ip
Hi Benoit, Can we mix, ABF and VRF ? Thanks, Regards Venu On Mon, 19 Apr 2021 at 17:31, Benoit Ganne (bganne) wrote: > Hi Venu, > > You can do that with ABF, see https://wiki.fd.io/view/VPP/ABF > > Best > ben > > > -Original Message- > > From: vpp-dev@lists.fd.io On Behalf Of Venumadhav > > Josyula > > Sent: lundi 19 avril 2021 13:17 > > To: vpp-dev > > Subject: [vpp-dev] route based on the source ip > > > > Hi, > > > > We have a requirement such that > > i) we want to have a vrf table for each vlan interface. Each vrf will > have > > it own default route > > ii)for packets from the host interface , we want to have a route based on > > the source ip such we can redirect to use vrf table as next hop table. > > iii) We are using strongswan for ipsec, and we don't want to enable the > > install_route option of strongswan, so that we can packet remote host to > > be sent to default route in the vrf table. Please our problem is not > > specific to ipsec processing by routes > > > > > > The problem statement is how do we route the host interface packets to > > appropriate vrf table corresponding to the vlan interface. We donot know > > the remote ip for which we want install route. > > > > So is it possible to have a route based on source ip ? > > > > > > Thanks, > > Regards, > > Venu > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19248): https://lists.fd.io/g/vpp-dev/message/19248 Mute This Topic: https://lists.fd.io/mt/82206233/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] vpp in a non-previleged mode
Hi All, Can you run vpp + dpdk in non-privileged mode ? This vpp running inside pod as a cnf Thanks, Regards, Venu -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19567): https://lists.fd.io/g/vpp-dev/message/19567 Mute This Topic: https://lists.fd.io/mt/83551481/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] vpp in a non-previleged mode
Hi Christian, Can you please share the exact steps please ? Thanks, Regards, Venu On Thu, 17 Jun 2021 at 21:25, Christian Hopps wrote: > > "Venumadhav Josyula" writes: > > > Hi All, > > > > Can you run vpp + dpdk in non-privileged mode ? This vpp running > > inside pod as a cnf > > I did this at one point, IIRC I had to disable something small bit of code > in the dpdk_early_init that required root, but as this code was only > required to do something directly with the HW later, it wasn't needed in > the container/virtual case. > > Thanks, > Chris. > > > > > Thanks, > > Regards, > > Venu > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19604): https://lists.fd.io/g/vpp-dev/message/19604 Mute This Topic: https://lists.fd.io/mt/83551481/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] vpp in a non-previleged mode
Hi Damjan, We need dpdk, the reason being that packets from the NICs ( pollmode ) need to come inside our packet processing sw ( GTPU). So we wanted to use dpdk for the same. Now we wanted to know the pod in which vpp is running in non-previleged mode. Now we have questions i) is it possible ? ii) if yes how ? Now we were looking at below link for examples, but no luck... they non-previleged running vpp + dpdk had some problems. https://github.com/cncf/cnf-testbed/issues/291 Hence i am trying to check in the community. Thanks, Regards, Venu On Fri, 18 Jun 2021 at 12:20, Damjan Marion wrote: > > > Why do you need dpdk? > > — > Damjan > > On 18.06.2021., at 06:47, Venumadhav Josyula wrote: > > > Hi Christian, > > Can you please share the exact steps please ? > > Thanks, > Regards, > Venu > > On Thu, 17 Jun 2021 at 21:25, Christian Hopps wrote: > >> >> "Venumadhav Josyula" writes: >> >> > Hi All, >> > >> > Can you run vpp + dpdk in non-privileged mode ? This vpp running >> > inside pod as a cnf >> >> I did this at one point, IIRC I had to disable something small bit of >> code in the dpdk_early_init that required root, but as this code was only >> required to do something directly with the HW later, it wasn't needed in >> the container/virtual case. >> >> Thanks, >> Chris. >> >> > >> > Thanks, >> > Regards, >> > Venu >> > >> > >> > >> > >> >> > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19606): https://lists.fd.io/g/vpp-dev/message/19606 Mute This Topic: https://lists.fd.io/mt/83551481/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] vpp in a non-previleged mode
Hi Damien, >I’m asking because in vpp we have also native > drivers for some NICs and paravirtualized >devices, and those drivers are working in the >non-priv mode. You mean to say native NICs para virtualized drivers ??? If yes can share details. So are you also implying that it might not be possible to run vpp with dpdk in non-previlege mode ?, Which would be mean that that pod need to have previlege mode Thanks Regards Venu On Fri, 18 Jun, 2021, 12:52 pm Damjan Marion, wrote: > > I’m asking because in vpp we have also native drivers for some NICs and > paravirtualized devices, and those drivers are working in the non-priv mode. > > — > Damjan > > On 18.06.2021., at 09:12, Venumadhav Josyula wrote: > > > > Hi Damjan, > > We need dpdk, the reason being that packets from the NICs ( pollmode ) > need to come inside our packet processing sw ( GTPU). So we wanted to use > dpdk for the same. Now we wanted to know the pod in which vpp is running in > non-previleged mode. > > Now we have questions > i) is it possible ? > ii) if yes how ? > Now we were looking at below link for examples, but no luck... they > non-previleged running vpp + dpdk had some problems. > https://github.com/cncf/cnf-testbed/issues/291 > > Hence i am trying to check in the community. > > Thanks, > Regards, > Venu > > > On Fri, 18 Jun 2021 at 12:20, Damjan Marion wrote: > >> >> >> Why do you need dpdk? >> >> — >> Damjan >> >> On 18.06.2021., at 06:47, Venumadhav Josyula wrote: >> >> >> Hi Christian, >> >> Can you please share the exact steps please ? >> >> Thanks, >> Regards, >> Venu >> >> On Thu, 17 Jun 2021 at 21:25, Christian Hopps wrote: >> >>> >>> "Venumadhav Josyula" writes: >>> >>> > Hi All, >>> > >>> > Can you run vpp + dpdk in non-privileged mode ? This vpp running >>> > inside pod as a cnf >>> >>> I did this at one point, IIRC I had to disable something small bit of >>> code in the dpdk_early_init that required root, but as this code was only >>> required to do something directly with the HW later, it wasn't needed in >>> the container/virtual case. >>> >>> Thanks, >>> Chris. >>> >>> > >>> > Thanks, >>> > Regards, >>> > Venu >>> > >>> > >>> > >>> > >>> >>> >> >> >> > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19608): https://lists.fd.io/g/vpp-dev/message/19608 Mute This Topic: https://lists.fd.io/mt/83551481/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] vpp in a non-previleged mode
Hi Christian, As mentioned in my previous email, we want to give Intel based ( 10G ) for the our packet processing so we need dpdk. With dpdk being there i was trying to explore if we can run in non-previlege mode ... Thanks, Regards, Venu On Fri, 18 Jun 2021 at 13:49, Christian Hopps wrote: > > Venumadhav Josyula writes: > > > Hi Damien, > > > >>I’m asking because in vpp we have also native > >> drivers for some NICs and paravirtualized >devices, and those > >> drivers are working in the >non-priv mode. > > > You mean to say native NICs para virtualized drivers ??? If yes can > > share details. > > What HW are you using is what he's asking. You may not need DPDK at all, > in which case you do not need to run vpp privileged. > > Thanks, > Chris. > > > So are you also implying that it might not be possible to run vpp > > with dpdk in non-previlege mode ?, Which would be mean that that pod > > need to have previlege mode > > > > Thanks > > Regards > > Venu > > > > On Fri, 18 Jun, 2021, 12:52 pm Damjan Marion, wrote: > > > > > > I’m asking because in vpp we have also native drivers for some > > NICs and paravirtualized devices, and those drivers are working > > in the non-priv mode. > > > > — > > Damjan > > > > On 18.06.2021., at 09:12, Venumadhav Josyula > > wrote: > > > > > > > > Hi Damjan, > > > > We need dpdk, the reason being that packets from the NICs ( > > pollmode ) need to come inside our packet processing sw ( > > GTPU). So we wanted to use dpdk for the same. Now we wanted > > to know the pod in which vpp is running in non-previleged > > mode. > > > > Now we have questions > > i) is it possible ? > > ii) if yes how ? > > Now we were looking at below link for examples, but no > > luck... they non-previleged running vpp + dpdk had some > > problems. > > https://github.com/cncf/cnf-testbed/issues/291 > > > > Hence i am trying to check in the community. > > > > Thanks, > > Regards, > > Venu > > > > > > On Fri, 18 Jun 2021 at 12:20, Damjan Marion > > wrote: > > > > > > > > Why do you need dpdk? > > > > — > > Damjan > > > > > > On 18.06.2021., at 06:47, Venumadhav Josyula < > > vjosy...@gmail.com> wrote: > > > > > > Hi Christian, > > > > Can you please share the exact steps please ? > > > > Thanks, > > Regards, > > Venu > > > > On Thu, 17 Jun 2021 at 21:25, Christian Hopps < > > cho...@chopps.org> wrote: > > > > > > "Venumadhav Josyula" writes: > > > > > Hi All, > > > > > > Can you run vpp + dpdk in non-privileged mode ? > > This vpp running > > > inside pod as a cnf > > > > I did this at one point, IIRC I had to disable > > something small bit of code in the > > dpdk_early_init that required root, but as this > > code was only required to do something directly > > with the HW later, it wasn't needed in the > > container/virtual case. > > > > Thanks, > > Chris. > > > > > > > > Thanks, > > > Regards, > > > Venu > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19611): https://lists.fd.io/g/vpp-dev/message/19611 Mute This Topic: https://lists.fd.io/mt/83551481/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] memif problems
Hi All, Vpp1 ( docker ) --- vpp# show interface Name IdxState MTU (L3/IP4/IP6/MPLS) Counter Count GigabitEthernet0/4/0 1 down 9000/0/0/0 gtpu_tunnel0 4 up 0/0/0/0 host-vpp2out 2 up 9000/0/0/0 local00 down 0/0/0/0 drops 2 memif0/0 3 up 9000/0/0/0 tx-error 2 vpp# show node counters CountNode Reason * 2 memif0/0-outputinterface is down* vpp# show interface address GigabitEthernet0/4/0 (dn): gtpu_tunnel0 (up): L3 50.50.50.2/24 host-vpp2out (up): L3 22.2.2.2/24 local0 (dn): memif0/0 (up): L3 10.10.2.2/24 vpp# vpp# show memif sockets id listenerfilename 0 no /run/vpp/memif.sock interface memif0/0 socket-id 0 id 0 mode ethernet flags admin-up slave zero-copy listener-fd 0 conn-fd 0 num-s2m-rings 0 num-m2s-rings 0 buffer-size 0 num-regions 0 vpp# Vpp2 ( docker ) vpp# show interface Name IdxState MTU (L3/IP4/IP6/MPLS) Counter Count GigabitEthernet0/6/0 1 down 9000/0/0/0 gtpu_tunnel0 4 up 0/0/0/0 tx packets 101 tx bytes 12120 host-vpp1out 2 up 9000/0/0/0 rx packets 110 rx bytes 10480 tx packets 9 tx bytes 582 drops 103 ip4 104 local00 down 0/0/0/0 drops 1 memif0/0 3 up 9000/0/0/0 drops 6 tx-error 1 vpp# show interface address GigabitEthernet0/6/0 (dn): gtpu_tunnel0 (up): L3 50.50.50.1/24 host-vpp1out (up): L3 11.1.1.2/24 local0 (dn): memif0/0 (up): L3 10.10.2.1/24 vpp# show node counters CountNode Reason 6null-node blackholed packets 101 gtpu4-encap good packets encapsulated 5arp-reply ARP replies sent 1ip4-glean ARP requests sent 102 ethernet-input no error * 1 memif0/0-outputinterface is down* vpp# show memif sockets id listenerfilename 0 yes (1) /run/vpp/memif.sock interface memif0/0 socket-id 0 id 0 mode ethernet flags admin-up listener-fd 23 conn-fd 0 num-s2m-rings 0 num-m2s-rings 0 buffer-size 0 num-regions 0 vpp# I am not sure why interface is showing down. Can somebody suggrest what could be the issue. Thanks, Regards, Venu -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19671): https://lists.fd.io/g/vpp-dev/message/19671 Mute This Topic: https://lists.fd.io/mt/83911784/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] having problem pinging gtpu_tunnel0 interface, says Failed: no source address for egress interface
Hi All, I facing problem to ping over gtpu tunnel interface *vpp1 on separate vm* set interface state GigabitEthernet0/4/0 up set interface ip address GigabitEthernet0/4/0 10.21.58.142/16 create gtpu tunnel src 10.21.58.142 dst 10.21.58.140 teid 13 tteid 14 encap-vrf-id 0 decap-next ip4 set in state gtpu_tunnel0 up set int ip address gtpu_tunnel0 50.50.50.1/16 *vpp2 on separate vm* set interface state GigabitEthernet0/4/0 up set interface ip address GigabitEthernet0/4/0 10.21.58.142/16 create gtpu tunnel src 10.21.58.140 dst 10.21.58.142 teid 13 tteid 14 encap-vrf-id 0 decap-next ip4 set in state gtpu_tunnel0 up set int ip address gtpu_tunnel0 50.50.50.2/16 When we try to ping from vpp2 tunnel --> vpp1 tunnel, we are getting following error vpp# ping 50.50.50.1 repeat 2 Failed: no source address for egress interface Failed: no source address for egress interface Statistics: 0 sent, 0 received, 0% packet loss vpp# vpp running is following vpp v21.06-release built by root on hng4.3-pdavane2 at 2021-07-06T05:02:47 *Branch details* [root@hng4 vpp]# git log commit fc83f8cc67e65c734df3c47518f724c1617e1a5c Author: Andrew Yourtchenko Date: Wed May 26 14:52:41 2021 + misc: 21.06 Release Notes Change-Id: Iedd1263a971e50aceb2d579982484dd8873814dc Type: docs Signed-off-by: Andrew Yourtchenko Signed-off-by: Dave Wallace commit 3001c0344e4fce34b824df988ced2c8ccbee82e3 Author: Florin Coras Date: Tue Jun 29 13:27:45 2021 -0700 session: free ctrl event data on connect rpc Type: fix Signed-off-by: Florin Coras Change-Id: I56c4682aef59ed0e69073f9001341c425e65bd48 (cherry picked from commit 595724a49072b30356e365ce78a3cc815980d342) commit f68dcb720cfbbfb0eee7084219af45b35bd0615f Author: wanghanlin Date: Tue Jun 29 16:01:55 2021 +0800 vcl: Don't use app_socket_api to notify VPP in parent when child exited Type: fix Signed-off-by: wanghanlin Change-Id: Icd2fc3cc2d0a0a6060abfb262044cf9e09ab4ba2 (cherry picked from commit b940fd4d5a16b62a5aa09b924140a135fd06c6bb) commit 803ac6389dbd3f3c124542c1a5ad40c575537ccc [root@hng4 vpp]# git branch master * stable/2106 [root@hng4 vpp]# We have built vpp out of stabe/2106 branch fdio repo Thanks, Regards Venu -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19711): https://lists.fd.io/g/vpp-dev/message/19711 Mute This Topic: https://lists.fd.io/mt/84038840/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] having problem pinging gtpu_tunnel0 interface, says Failed: no source address for egress interface
vpp experts any comments / suggestions on the below ? On Wed, 7 Jul 2021 at 11:30, Venumadhav Josyula via lists.fd.io wrote: > Hi All, > > I facing problem to ping over gtpu tunnel interface > > *vpp1 on separate vm* > set interface state GigabitEthernet0/4/0 up > set interface ip address GigabitEthernet0/4/0 10.21.58.142/16 > create gtpu tunnel src 10.21.58.142 dst 10.21.58.140 teid 13 tteid 14 > encap-vrf-id 0 decap-next ip4 > set in state gtpu_tunnel0 up > set int ip address gtpu_tunnel0 50.50.50.1/16 > > *vpp2 on separate vm* > set interface state GigabitEthernet0/4/0 up > set interface ip address GigabitEthernet0/4/0 10.21.58.142/16 > create gtpu tunnel src 10.21.58.140 dst 10.21.58.142 teid 13 tteid 14 > encap-vrf-id 0 decap-next ip4 > set in state gtpu_tunnel0 up > set int ip address gtpu_tunnel0 50.50.50.2/16 > > When we try to ping from vpp2 tunnel --> vpp1 tunnel, we are getting > following error > vpp# ping 50.50.50.1 repeat 2 > Failed: no source address for egress interface > Failed: no source address for egress interface > > Statistics: 0 sent, 0 received, 0% packet loss > vpp# > > vpp running is following > vpp v21.06-release built by root on hng4.3-pdavane2 at 2021-07-06T05:02:47 > > *Branch details* > [root@hng4 vpp]# git log > commit fc83f8cc67e65c734df3c47518f724c1617e1a5c > Author: Andrew Yourtchenko > Date: Wed May 26 14:52:41 2021 + > > misc: 21.06 Release Notes > > Change-Id: Iedd1263a971e50aceb2d579982484dd8873814dc > Type: docs > Signed-off-by: Andrew Yourtchenko > Signed-off-by: Dave Wallace > > commit 3001c0344e4fce34b824df988ced2c8ccbee82e3 > Author: Florin Coras > Date: Tue Jun 29 13:27:45 2021 -0700 > > session: free ctrl event data on connect rpc > > Type: fix > > Signed-off-by: Florin Coras > Change-Id: I56c4682aef59ed0e69073f9001341c425e65bd48 > (cherry picked from commit 595724a49072b30356e365ce78a3cc815980d342) > > commit f68dcb720cfbbfb0eee7084219af45b35bd0615f > Author: wanghanlin > Date: Tue Jun 29 16:01:55 2021 +0800 > > vcl: Don't use app_socket_api to notify VPP in parent when child exited > > Type: fix > > Signed-off-by: wanghanlin > Change-Id: Icd2fc3cc2d0a0a6060abfb262044cf9e09ab4ba2 > (cherry picked from commit b940fd4d5a16b62a5aa09b924140a135fd06c6bb) > > commit 803ac6389dbd3f3c124542c1a5ad40c575537ccc > [root@hng4 vpp]# git branch > master > * stable/2106 > [root@hng4 vpp]# > We have built vpp out of stabe/2106 branch fdio repo > > Thanks, > Regards > Venu > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19719): https://lists.fd.io/g/vpp-dev/message/19719 Mute This Topic: https://lists.fd.io/mt/84038840/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] having problem pinging gtpu_tunnel0 interface, says Failed: no source address for egress interface
Hi Benoit, We tried vpp# ping ? ping ping { | ipv4 | ipv6 } [ipv4 | ipv6 ] [source ] [size ] [interval ] [repeat ] [table-id ] [burst ] [verbose] vpp# ping 50.50.50.1 source gtpu_tunnel0 repeat 1 Failed: no source address for egress interface Statistics: 0 sent, 0 received, 0% packet loss vpp# It is not working Thanks, Regards, Venu On Thu, 8 Jul, 2021, 5:19 pm Benoit Ganne (bganne), wrote: > Hi, > > This looks like an issue with source address selection. Does "ping > 50.50.50.1 source gtpu_tunnel0" work? > > ben > > > -Original Message- > > From: vpp-dev@lists.fd.io On Behalf Of Venumadhav > > Josyula > > Sent: jeudi 8 juillet 2021 12:19 > > To: vpp-dev > > Subject: Re: [vpp-dev] having problem pinging gtpu_tunnel0 interface, > says > > Failed: no source address for egress interface > > > > vpp experts any comments / suggestions on the below ? > > > > > > On Wed, 7 Jul 2021 at 11:30, Venumadhav Josyula via lists.fd.io > > <http://lists.fd.io> > <mailto:gmail@lists.fd.io> > wrote: > > > > > > Hi All, > > > > I facing problem to ping over gtpu tunnel interface > > > > vpp1 on separate vm > > set interface state GigabitEthernet0/4/0 up > > set interface ip address GigabitEthernet0/4/0 10.21.58.142/16 > > <http://10.21.58.142/16> > > create gtpu tunnel src 10.21.58.142 dst 10.21.58.140 teid 13 tteid > > 14 encap-vrf-id 0 decap-next ip4 > > set in state gtpu_tunnel0 up > > set int ip address gtpu_tunnel0 50.50.50.1/16 < > http://50.50.50.1/16> > > > > vpp2 on separate vm > > set interface state GigabitEthernet0/4/0 up > > set interface ip address GigabitEthernet0/4/0 10.21.58.142/16 > > <http://10.21.58.142/16> > > create gtpu tunnel src 10.21.58.140 dst 10.21.58.142 teid 13 tteid > > 14 encap-vrf-id 0 decap-next ip4 > > set in state gtpu_tunnel0 up > > set int ip address gtpu_tunnel0 50.50.50.2/16 < > http://50.50.50.2/16> > > > > When we try to ping from vpp2 tunnel --> vpp1 tunnel, we are > getting > > following error > > vpp# ping 50.50.50.1 repeat 2 > > Failed: no source address for egress interface > > Failed: no source address for egress interface > > > > Statistics: 0 sent, 0 received, 0% packet loss > > vpp# > > > > vpp running is following > > vpp v21.06-release built by root on hng4.3-pdavane2 at 2021-07- > > 06T05:02:47 > > > > Branch details > > [root@hng4 vpp]# git log > > commit fc83f8cc67e65c734df3c47518f724c1617e1a5c > > Author: Andrew Yourtchenko > <mailto:ayour...@gmail.com> > > > Date: Wed May 26 14:52:41 2021 + > > > > misc: 21.06 Release Notes > > > > Change-Id: Iedd1263a971e50aceb2d579982484dd8873814dc > > Type: docs > > Signed-off-by: Andrew Yourtchenko > <mailto:ayour...@gmail.com> > > > Signed-off-by: Dave Wallace > <mailto:dwallac...@gmail.com> > > > > > commit 3001c0344e4fce34b824df988ced2c8ccbee82e3 > > Author: Florin Coras mailto:fco...@cisco.com> > > > Date: Tue Jun 29 13:27:45 2021 -0700 > > > > session: free ctrl event data on connect rpc > > > > Type: fix > > > > Signed-off-by: Florin Coras > <mailto:fco...@cisco.com> > > > Change-Id: I56c4682aef59ed0e69073f9001341c425e65bd48 > > (cherry picked from commit > > 595724a49072b30356e365ce78a3cc815980d342) > > > > commit f68dcb720cfbbfb0eee7084219af45b35bd0615f > > Author: wanghanlin > <mailto:wanghan...@corp.netease.com> > > > Date: Tue Jun 29 16:01:55 2021 +0800 > > > > vcl: Don't use app_socket_api to notify VPP in parent when > child > > exited > > > > Type: fix > > > > Signed-off-by: wanghanlin > <mailto:wanghan...@corp.netease.com> > > > Change-Id: Icd2fc3cc2d0a0a6060abfb262044cf9e09ab4ba2 > > (cherry picked from commit > > b940fd4d5a16b62a5aa09b924140a135fd06c6bb) > > > > commit 803ac6389dbd3f3c124542c1a5ad40c575537ccc > > [root@hng4 vpp]# git branch > > master > > * stable/2106 > > [root@hng4 vpp]# > > > > We have built vpp out of stabe/2106 branch fdio repo > > > > Thanks, > > Regards > > Venu > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19721): https://lists.fd.io/g/vpp-dev/message/19721 Mute This Topic: https://lists.fd.io/mt/84038840/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] having problem pinging gtpu_tunnel0 interface, says Failed: no source address for egress interface
Hi Benoit, Small correction vpp2 interface ip is should read as 10.21.58.140/16 <http://10.21.58.142/16> I had those correct ip Though the problem is not solved. Thanks, Regards, Venu On Thu, 8 Jul 2021 at 17:27, Venumadhav Josyula via lists.fd.io wrote: > Hi Benoit, > > We tried > vpp# ping ? > ping ping { | ipv4 | ipv6 } > [ipv4 | ipv6 ] [source ] [size > ] [interval ] [repeat ] [table-id ] [burst > ] [verbose] > vpp# ping 50.50.50.1 source gtpu_tunnel0 repeat 1 > Failed: no source address for egress interface > > Statistics: 0 sent, 0 received, 0% packet loss > vpp# > > It is not working > > Thanks, > Regards, > Venu > > > On Thu, 8 Jul, 2021, 5:19 pm Benoit Ganne (bganne), > wrote: > >> Hi, >> >> This looks like an issue with source address selection. Does "ping >> 50.50.50.1 source gtpu_tunnel0" work? >> >> ben >> >> > -Original Message- >> > From: vpp-dev@lists.fd.io On Behalf Of Venumadhav >> > Josyula >> > Sent: jeudi 8 juillet 2021 12:19 >> > To: vpp-dev >> > Subject: Re: [vpp-dev] having problem pinging gtpu_tunnel0 interface, >> says >> > Failed: no source address for egress interface >> > >> > vpp experts any comments / suggestions on the below ? >> > >> > >> > On Wed, 7 Jul 2021 at 11:30, Venumadhav Josyula via lists.fd.io >> > <http://lists.fd.io> > > <mailto:gmail@lists.fd.io> > wrote: >> > >> > >> > Hi All, >> > >> > I facing problem to ping over gtpu tunnel interface >> > >> > vpp1 on separate vm >> > set interface state GigabitEthernet0/4/0 up >> > set interface ip address GigabitEthernet0/4/0 10.21.58.142/16 >> > <http://10.21.58.142/16> >> > create gtpu tunnel src 10.21.58.142 dst 10.21.58.140 teid 13 tteid >> > 14 encap-vrf-id 0 decap-next ip4 >> > set in state gtpu_tunnel0 up >> > set int ip address gtpu_tunnel0 50.50.50.1/16 < >> http://50.50.50.1/16> >> > >> > vpp2 on separate vm >> > set interface state GigabitEthernet0/4/0 up >> > set interface ip address GigabitEthernet0/4/0 10.21.58.142/16 >> > <http://10.21.58.142/16> >> > create gtpu tunnel src 10.21.58.140 dst 10.21.58.142 teid 13 tteid >> > 14 encap-vrf-id 0 decap-next ip4 >> > set in state gtpu_tunnel0 up >> > set int ip address gtpu_tunnel0 50.50.50.2/16 < >> http://50.50.50.2/16> >> > >> > When we try to ping from vpp2 tunnel --> vpp1 tunnel, we are >> getting >> > following error >> > vpp# ping 50.50.50.1 repeat 2 >> > Failed: no source address for egress interface >> > Failed: no source address for egress interface >> > >> > Statistics: 0 sent, 0 received, 0% packet loss >> > vpp# >> > >> > vpp running is following >> > vpp v21.06-release built by root on hng4.3-pdavane2 at 2021-07- >> > 06T05:02:47 >> > >> > Branch details >> > [root@hng4 vpp]# git log >> > commit fc83f8cc67e65c734df3c47518f724c1617e1a5c >> > Author: Andrew Yourtchenko > > <mailto:ayour...@gmail.com> > >> > Date: Wed May 26 14:52:41 2021 + >> > >> > misc: 21.06 Release Notes >> > >> > Change-Id: Iedd1263a971e50aceb2d579982484dd8873814dc >> > Type: docs >> > Signed-off-by: Andrew Yourtchenko > > <mailto:ayour...@gmail.com> > >> > Signed-off-by: Dave Wallace > > <mailto:dwallac...@gmail.com> > >> > >> > commit 3001c0344e4fce34b824df988ced2c8ccbee82e3 >> > Author: Florin Coras mailto:fco...@cisco.com> >> > >> > Date: Tue Jun 29 13:27:45 2021 -0700 >> > >> > session: free ctrl event data on connect rpc >> > >> > Type: fix >> > >> > Signed-off-by: Florin Coras > > <mailto:fco...@cisco.com> > >> > Change-Id: I56c4682aef59ed0e69073f9001341c425e65bd48 >> > (cherry picked from commit >> > 595724a49072b30356e365ce78a3cc815980d342) >> > >> > commit f68dcb720cfbbfb0eee7084219af45b35bd0615f >> > Author: wanghanlin > > <mailto:wanghan...@corp.netease.com> >
Re: [vpp-dev] having problem pinging gtpu_tunnel0 interface, says Failed: no source address for egress interface
Hi Beniot, Can this be issue https://gerrit.fd.io/r/c/vpp/+/31315 I am using Branch details [root@hng4 vpp]# git log commit fc83f8cc67e65c734df3c47518f724c1617e1a5c Author: Andrew Yourtchenko mailto:ayour...@gmail.com> > Date: Wed May 26 14:52:41 2021 + misc: 21.06 Release Notes Change-Id: Iedd1263a971e50aceb2d579982484dd8873814dc Type: docs Signed-off-by: Andrew Yourtchenko mailto:ayour...@gmail.com> > Signed-off-by: Dave Wallace mailto:dwallac...@gmail.com> > commit 3001c0344e4fce34b824df988ced2c8ccbee82e3 Author: Florin Coras mailto:fco...@cisco.com> > Date: Tue Jun 29 13:27:45 2021 -0700 session: free ctrl event data on connect rpc Type: fix Signed-off-by: Florin Coras mailto:fco...@cisco.com> > Change-Id: I56c4682aef59ed0e69073f9001341c425e65bd48 (cherry picked from commit 595724a49072b30356e365ce78a3cc815980d342) commit f68dcb720cfbbfb0eee7084219af45b35bd0615f Author: wanghanlin mailto:wanghan...@corp.netease.com> > Date: Tue Jun 29 16:01:55 2021 +0800 vcl: Don't use app_socket_api to notify VPP in parent when child exited Type: fix Signed-off-by: wanghanlin mailto:wanghan...@corp.netease.com> > Change-Id: Icd2fc3cc2d0a0a6060abfb262044cf9e09ab4ba2 (cherry picked from commit b940fd4d5a16b62a5aa09b924140a135fd06c6bb) commit 803ac6389dbd3f3c124542c1a5ad40c575537ccc [root@hng4 vpp]# git branch master * stable/2106 [root@hng4 vpp]# We have built vpp out of stabe/2106 branch fdio repo [root@hng4 vpp]# git branch master * stable/2106 [root@hng4 vpp]# Thanks, Regards, Venu On Thu, 8 Jul 2021 at 17:33, Venumadhav Josyula via lists.fd.io wrote: > Hi Benoit, > > Small correction vpp2 interface ip is should read as 10.21.58.140/16 > <http://10.21.58.142/16> I had those correct ip > > Though the problem is not solved. > > Thanks, > Regards, > Venu > > On Thu, 8 Jul 2021 at 17:27, Venumadhav Josyula via lists.fd.io gmail@lists.fd.io> wrote: > >> Hi Benoit, >> >> We tried >> vpp# ping ? >> ping ping { | ipv4 | ipv6 } >> [ipv4 | ipv6 ] [source ] [size >> ] [interval ] [repeat ] [table-id ] [burst >> ] [verbose] >> vpp# ping 50.50.50.1 source gtpu_tunnel0 repeat 1 >> Failed: no source address for egress interface >> >> Statistics: 0 sent, 0 received, 0% packet loss >> vpp# >> >> It is not working >> >> Thanks, >> Regards, >> Venu >> >> >> On Thu, 8 Jul, 2021, 5:19 pm Benoit Ganne (bganne), >> wrote: >> >>> Hi, >>> >>> This looks like an issue with source address selection. Does "ping >>> 50.50.50.1 source gtpu_tunnel0" work? >>> >>> ben >>> >>> > -Original Message- >>> > From: vpp-dev@lists.fd.io On Behalf Of >>> Venumadhav >>> > Josyula >>> > Sent: jeudi 8 juillet 2021 12:19 >>> > To: vpp-dev >>> > Subject: Re: [vpp-dev] having problem pinging gtpu_tunnel0 interface, >>> says >>> > Failed: no source address for egress interface >>> > >>> > vpp experts any comments / suggestions on the below ? >>> > >>> > >>> > On Wed, 7 Jul 2021 at 11:30, Venumadhav Josyula via lists.fd.io >>> > <http://lists.fd.io> >> > <mailto:gmail@lists.fd.io> > wrote: >>> > >>> > >>> > Hi All, >>> > >>> > I facing problem to ping over gtpu tunnel interface >>> > >>> > vpp1 on separate vm >>> > set interface state GigabitEthernet0/4/0 up >>> > set interface ip address GigabitEthernet0/4/0 10.21.58.142/16 >>> > <http://10.21.58.142/16> >>> > create gtpu tunnel src 10.21.58.142 dst 10.21.58.140 teid 13 >>> tteid >>> > 14 encap-vrf-id 0 decap-next ip4 >>> > set in state gtpu_tunnel0 up >>> > set int ip address gtpu_tunnel0 50.50.50.1/16 < >>> http://50.50.50.1/16> >>> > >>> > vpp2 on separate vm >>> > set interface state GigabitEthernet0/4/0 up >>> > set interface ip address GigabitEthernet0/4/0 10.21.58.142/16 >>> > <http://10.21.58.142/16> >>> > create gtpu tunnel src 10.21.58.140 dst 10.21.58.142 teid 13 >>> tteid >>> > 1
Re: [vpp-dev] having problem pinging gtpu_tunnel0 interface, says Failed: no source address for egress interface
Hi Neale, Sorry for the late reply, the below patch worked for me. Can you let me know who is the gtpu mainrainer ? Thanks, Regards, Venu On Thu, 8 Jul 2021 at 19:15, Neale Ranns wrote: > > > Try this one: > > https://gerrit.fd.io/r/c/vpp/+/32801 > > > > /neale > > > > *From: *vpp-dev@lists.fd.io on behalf of Benoit > Ganne (bganne) via lists.fd.io > *Date: *Thursday, 8 July 2021 at 15:08 > *To: *Venumadhav Josyula > *Cc: *vpp-dev > *Subject: *Re: [vpp-dev] having problem pinging gtpu_tunnel0 interface, > says Failed: no source address for egress interface > > > Can this be issue > > https://gerrit.fd.io/r/c/vpp/+/31315 > > Unfortunately not, because it is already present in 21.06. > > ben > > > I am using > >Branch details > >[root@hng4 vpp]# git log > >commit fc83f8cc67e65c734df3c47518f724c1617e1a5c > >Author: Andrew Yourtchenko > <mailto:ayour...@gmail.com > > > <mailto:ayour...@gmail.com <mailto:ayour...@gmail.com > > > > > >Date: Wed May 26 14:52:41 2021 + > > > >misc: 21.06 Release Notes > > > >Change-Id: Iedd1263a971e50aceb2d579982484dd8873814dc > >Type: docs > >Signed-off-by: Andrew Yourtchenko > <mailto:ayour...@gmail.com > > > <mailto:ayour...@gmail.com <mailto:ayour...@gmail.com > > > > > >Signed-off-by: Dave Wallace > <mailto:dwallac...@gmail.com > > > <mailto:dwallac...@gmail.com <mailto:dwallac...@gmail.com > > > > > > > >commit 3001c0344e4fce34b824df988ced2c8ccbee82e3 > >Author: Florin Coras mailto:fco...@cisco.com > > > > <mailto:fco...@cisco.com <mailto:fco...@cisco.com > > > > > >Date: Tue Jun 29 13:27:45 2021 -0700 > > > >session: free ctrl event data on connect rpc > > > >Type: fix > > > >Signed-off-by: Florin Coras > <mailto:fco...@cisco.com > > > <mailto:fco...@cisco.com <mailto:fco...@cisco.com > > > > > >Change-Id: I56c4682aef59ed0e69073f9001341c425e65bd48 > >(cherry picked from commit > > 595724a49072b30356e365ce78a3cc815980d342) > > > >commit f68dcb720cfbbfb0eee7084219af45b35bd0615f > >Author: wanghanlin > <mailto:wanghan...@corp.netease.com > > > <mailto:wanghan...@corp.netease.com < > mailto:wanghan...@corp.netease.com > > > > > > >Date: Tue Jun 29 16:01:55 2021 +0800 > > > >vcl: Don't use app_socket_api to notify VPP in parent when > > child > > exited > > > >Type: fix > > > >Signed-off-by: wanghanlin > <mailto:wanghan...@corp.netease.com > > > <mailto:wanghan...@corp.netease.com < > mailto:wanghan...@corp.netease.com > > > > > > > Change-Id: Icd2fc3cc2d0a0a6060abfb262044cf9e09ab4ba2 > >(cherry picked from commit > > b940fd4d5a16b62a5aa09b924140a135fd06c6bb) > > > >commit 803ac6389dbd3f3c124542c1a5ad40c575537ccc > >[root@hng4 vpp]# git branch > > master > >* stable/2106 > >[root@hng4 vpp]# > > > >We have built vpp out of stabe/2106 branch fdio repo > > [root@hng4 vpp]# git branch > > master > > * stable/2106 > > [root@hng4 vpp]# > > > > Thanks, > > Regards, > > Venu > > > > On Thu, 8 Jul 2021 at 17:33, Venumadhav Josyula via lists.fd.io > > <http://lists.fd.io> > <mailto:gmail@lists.fd.io > > wrote: > > > > > >Hi Benoit, > > > >Small correction vpp2 interface ip is should read as > 10.21.58.140/16 > > <http://10.21.58.142/16> I had those correct ip > > > > > >Though the problem is not solved. > > > >Thanks, > >Regards, > >Venu > > > > > >On Thu, 8 Jul 2021 at 17:27, Venumadhav Josyula via lists.fd.io > > <http://lists.fd.io> > <mailto:gmail@lists.fd.io > > wrote: > > > > > >Hi Benoit, > > > >We tried > >vpp# ping ? > > ping ping { | ipv4 | > ipv6 > > } [ipv4 | ipv6 ] [source ] > [size > > ] [interval ] [repeat ] [table-id ] > [burst > > ] [verbose] > >vpp# pi
[vpp-dev] question on gtpu_input graph node
Hi vpp gtpu experts, We have requirement where - we create gtpu tunnel - Now, we will hit gtpu input, where we will receive gtpu packet and when we send it out on the interface replace the tied with tried and massage the ip address of src and destination and send the packet out vpp# show vlib graph gtpu4-input Name NextPrevious gtpu4-input error-drop [0]ip4-gtpu-bypass l2-input [1] ip4-udp-lookup ip4-input [2] ip6-input [3] vpp# vpp# show vlib graph gtpu4-encap Name NextPrevious gtpu4-encap error-drop [0] ip4-dvr-dpo ip4-lookup [1]ip4-arp ip6-lookup [2] ip4-midchain ip4-load-balance [3] ip4-mcast-midchain ip4-rewrite-mcast ip4-rewrite-bcast ip4-rewrite interface-output vpp# show vlib graph gtpu4-input Name NextPrevious gtpu4-input error-drop [0]ip4-gtpu-bypass l2-input [1] ip4-udp-lookup gtpu4-encap [2] gtpu6-encap [3] Now we want next gtpu-input to be gtpu4-encap and the next of that to ip4-load-balance or directly send it out. Is such thing possible. Thanks, Regards, Venu -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19796): https://lists.fd.io/g/vpp-dev/message/19796 Mute This Topic: https://lists.fd.io/mt/84244683/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] question on gtpu_input graph node
Hi Akash, While creating tunnels there if I set decap-next gtpu4-encap will it not work, it use the tried for the same right ? create gtpu tunnel src 10.21.58.142 dst 10.21.58.140 teid 13 tteid 14 encap-vrf-id 0 decap-next ip4 // instead of ip4, gtpu4-encap Thanks, Regards, Venu On Fri, 16 Jul 2021 at 14:22, Akash S R wrote: > Hi Venumadhav, > > Sharing my knowledge nuggets as below: > * gtpu_input is an API which processes the gtpu packet for decapsulation > and fire out the packet as an IP packet. You cannot reach gtpu_encap_inline > with the same. But if you wish to send the Decapsulated IP packet to encap, > you can using the next0 variable which enqueues your packet to the next > node you wish to reach. > > I don't guarantee that your packet will be encapsulated without any error > but you can reach the next node you wish to reach in this way. > > Thanks and Regards, > Akash S R > > On Fri, Jul 16, 2021, 2:03 PM Venumadhav Josyula > wrote: > >> Hi vpp gtpu experts, >> >> We have requirement where >> >>- we create gtpu tunnel >>- Now, we will hit gtpu input, where we will receive gtpu packet and >>when we send it out on the interface replace the tied with tried and >>massage the ip address of src and destination and send the packet out >> >> vpp# show vlib graph gtpu4-input >>Name NextPrevious >> gtpu4-input error-drop [0]ip4-gtpu-bypass >> l2-input [1] ip4-udp-lookup >> ip4-input [2] >> ip6-input [3] >> vpp# >> >> vpp# show vlib graph gtpu4-encap >>Name NextPrevious >> gtpu4-encap error-drop [0] ip4-dvr-dpo >> ip4-lookup [1]ip4-arp >> ip6-lookup [2] ip4-midchain >> ip4-load-balance [3] ip4-mcast-midchain >> ip4-rewrite-mcast >> ip4-rewrite-bcast >> ip4-rewrite >> interface-output >> >> vpp# show vlib graph gtpu4-input >>Name NextPrevious >> gtpu4-input error-drop [0]ip4-gtpu-bypass >> l2-input [1] ip4-udp-lookup >> gtpu4-encap [2] >> gtpu6-encap [3] >> >> Now we want next gtpu-input to be gtpu4-encap and the next of that to >> ip4-load-balance or directly send it out. Is such thing possible. >> >> Thanks, >> Regards, >> Venu >> >> >> >> -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19798): https://lists.fd.io/g/vpp-dev/message/19798 Mute This Topic: https://lists.fd.io/mt/84244683/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] question on gtpu_input graph node
Hi Akash, Our requirement is simple we will get gtpu packet and send gtpu packet by properly replacing with proper tied and ip Thanks Regards Venu On Fri, 16 Jul, 2021, 7:25 pm Akash S R, wrote: > Hi Venu, > > decap-next supports only 3 parameters I guess .So, If you need an support > like reaching gtpu4_encap-node, you might need to have a look on the > gtpu_input API where the next0 fields can be set internally with some > checks and enqueue the packet to gtpu4-encap. > > Also, Please add your requirement view so that I may help you out on it. > > Regards, > Akash > > On Fri, Jul 16, 2021, 2:42 PM Venumadhav Josyula > wrote: > >> Hi Akash, >> >> While creating tunnels there if I set decap-next gtpu4-encap will it not >> work, it use the tried for the same right ? >> create gtpu tunnel src 10.21.58.142 dst 10.21.58.140 teid 13 tteid 14 >> encap-vrf-id 0 decap-next ip4 // instead of ip4, gtpu4-encap >> >> Thanks, >> Regards, >> Venu >> >> >> On Fri, 16 Jul 2021 at 14:22, Akash S R >> wrote: >> >>> Hi Venumadhav, >>> >>> Sharing my knowledge nuggets as below: >>> * gtpu_input is an API which processes the gtpu packet for decapsulation >>> and fire out the packet as an IP packet. You cannot reach gtpu_encap_inline >>> with the same. But if you wish to send the Decapsulated IP packet to encap, >>> you can using the next0 variable which enqueues your packet to the next >>> node you wish to reach. >>> >>> I don't guarantee that your packet will be encapsulated without any >>> error but you can reach the next node you wish to reach in this way. >>> >>> Thanks and Regards, >>> Akash S R >>> >>> On Fri, Jul 16, 2021, 2:03 PM Venumadhav Josyula >>> wrote: >>> >>>> Hi vpp gtpu experts, >>>> >>>> We have requirement where >>>> >>>>- we create gtpu tunnel >>>>- Now, we will hit gtpu input, where we will receive gtpu packet >>>>and when we send it out on the interface replace the tied with tried and >>>>massage the ip address of src and destination and send the packet out >>>> >>>> vpp# show vlib graph gtpu4-input >>>>Name NextPrevious >>>> gtpu4-input error-drop [0] >>>> ip4-gtpu-bypass >>>> l2-input [1] ip4-udp-lookup >>>> ip4-input [2] >>>> ip6-input [3] >>>> vpp# >>>> >>>> vpp# show vlib graph gtpu4-encap >>>>Name NextPrevious >>>> gtpu4-encap error-drop [0] ip4-dvr-dpo >>>> ip4-lookup [1]ip4-arp >>>> ip6-lookup [2] ip4-midchain >>>> ip4-load-balance [3] >>>> ip4-mcast-midchain >>>> >>>> ip4-rewrite-mcast >>>> >>>> ip4-rewrite-bcast >>>> ip4-rewrite >>>> >>>> interface-output >>>> >>>> vpp# show vlib graph gtpu4-input >>>>Name NextPrevious >>>> gtpu4-input error-drop [0] >>>> ip4-gtpu-bypass >>>> l2-input [1] ip4-udp-lookup >>>> gtpu4-encap [2] >>>> gtpu6-encap [3] >>>> >>>> Now we want next gtpu-input to be gtpu4-encap and the next of that to >>>> ip4-load-balance or directly send it out. Is such thing possible. >>>> >>>> Thanks, >>>> Regards, >>>> Venu >>>> >>>> >>>> >>>> -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19803): https://lists.fd.io/g/vpp-dev/message/19803 Mute This Topic: https://lists.fd.io/mt/84244683/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] question on gtpu_input graph node
Hi Akash, >From your requirement , keeping vpp support in mind, you shall send the complete GTPU >packet from your device which you use to fire packets. The packet shall be marked with the >exact destination so that it reaches the GTPU Tunnel created via Phys and the >Decapsulated packet shall egress out via Phys on which it was received. But I have no idea >how encap comes into picture in this . Anyways, if you need to mark the packet with the >correct teid, tteid and make the packet as type GTPU then you shall fire an IP packet to the >Tunnel so that it is encapsulated and fired out of interface. Ok let me explain, we are recieve GTPU packets from DU and want to send gtp packet to the UPF. Now for that our node receives GTP-U packet and send the GTP-U using tried. The dst ip passed as part of CLI will be going the dest ip. So once the packet enter gtpu_input ( i am talking existing GTPU Plugin code ), it uses the configured tied to match tied in the received packet. Now does it not strip GTP-U header. ?? This is my understanding. please correct me if i am wrong/ If strips the GTP-U header we need to put back GTP-U which happens in the gtpu4-encap ? and send it out on interface. Or my understanding is totally misplaced ??? then what is the purpose gtpu4-encap ? Thanks, Regards, Venu On Fri, 16 Jul 2021 at 20:11, Akash S R wrote: > Hi Venu, > > From your requirement , keeping vpp support in mind, you shall send the > complete GTPU packet from your device which you use to fire packets. The > packet shall be marked with the exact destination so that it reaches the > GTPU Tunnel created via Phys and the Decapsulated packet shall egress out > via Phys on which it was received. But I have no idea how encap comes into > picture in this . Anyways, if you need to mark the packet with the correct > teid, tteid and make the packet as type GTPU then you shall fire an IP > packet to the Tunnel so that it is encapsulated and fired out of interface. > > Hope this helps. > > Regards, > Akash > > On Fri, Jul 16, 2021, 7:46 PM Venumadhav Josyula > wrote: > >> Hi Akash, >> >> Our requirement is simple we will get gtpu packet and send gtpu packet by >> properly replacing with proper tied and ip >> >> Thanks >> Regards >> Venu >> >> On Fri, 16 Jul, 2021, 7:25 pm Akash S R, >> wrote: >> >>> Hi Venu, >>> >>> decap-next supports only 3 parameters I guess .So, If you need an >>> support like reaching gtpu4_encap-node, you might need to have a look on >>> the gtpu_input API where the next0 fields can be set internally with some >>> checks and enqueue the packet to gtpu4-encap. >>> >>> Also, Please add your requirement view so that I may help you out on it. >>> >>> Regards, >>> Akash >>> >>> On Fri, Jul 16, 2021, 2:42 PM Venumadhav Josyula >>> wrote: >>> >>>> Hi Akash, >>>> >>>> While creating tunnels there if I set decap-next gtpu4-encap will it >>>> not work, it use the tried for the same right ? >>>> create gtpu tunnel src 10.21.58.142 dst 10.21.58.140 teid 13 tteid 14 >>>> encap-vrf-id 0 decap-next ip4 // instead of ip4, gtpu4-encap >>>> >>>> Thanks, >>>> Regards, >>>> Venu >>>> >>>> >>>> On Fri, 16 Jul 2021 at 14:22, Akash S R >>>> wrote: >>>> >>>>> Hi Venumadhav, >>>>> >>>>> Sharing my knowledge nuggets as below: >>>>> * gtpu_input is an API which processes the gtpu packet for >>>>> decapsulation and fire out the packet as an IP packet. You cannot reach >>>>> gtpu_encap_inline with the same. But if you wish to send the Decapsulated >>>>> IP packet to encap, you can using the next0 variable which enqueues your >>>>> packet to the next node you wish to reach. >>>>> >>>>> I don't guarantee that your packet will be encapsulated without any >>>>> error but you can reach the next node you wish to reach in this way. >>>>> >>>>> Thanks and Regards, >>>>> Akash S R >>>>> >>>>> On Fri, Jul 16, 2021, 2:03 PM Venumadhav Josyula >>>>> wrote: >>>>> >>>>>> Hi vpp gtpu experts, >>>>>> >>>>>> We have requirement where >>>>>> >>>>>>- we create gtpu tunnel >>>>>>- Now, we will hit gtpu input, where we will receive gtpu packet >>>>>>and when we send it out on the
Re: [vpp-dev] question on gtpu_input graph node
Hi Andreas, > If you are already using an UPF, why don't you use another UPF for this purpose? We do not have UPF, we are working CU where incoming packet are DU ( GTP-U) and outgoing packets towards UPF ( GTP-U ). Our requirement is to 1. receive GTP-U packet from DU 2. Replace the tied with tried and put the proper source and destination ip and send to UPF. The dest ip is ip of UPF and source ip the ip of our node interface. If you open-source code, if there is such example code, i will refer.. Please let me know. Thanks, Regards, Venu On Fri, 16 Jul 2021 at 21:37, Andreas Schultz < andreas.schu...@travelping.com> wrote: > > > Am Fr., 16. Juli 2021 um 17:04 Uhr schrieb Venumadhav Josyula < > vjosy...@gmail.com>: > >> Hi Akash, >> >> >From your requirement , keeping vpp support in mind, you shall send the >> complete GTPU >> >packet from your device which you use to fire packets. The packet shall >> be marked with the >exact destination so that it reaches the GTPU Tunnel >> created via Phys and the >Decapsulated packet shall egress out via Phys on >> which it was received. But I have no idea >how encap comes into picture in >> this . Anyways, if you need to mark the packet with the >correct teid, >> tteid and make the packet as type GTPU then you shall fire an IP packet to >> the >Tunnel so that it is encapsulated and fired out of interface. >> >> Ok let me explain, we are recieve GTPU packets from DU and want to send >> gtp packet to the UPF. Now for that our node receives GTP-U packet and send >> the GTP-U using tried. The dst ip passed as part of CLI will be going the >> dest ip. >> > > If you are already using an UPF, why don't you use another UPF for this > purpose? The PDR/FAR combination to change TEIDs and destination IPs is not > too hard. If you can write a tool to drive the VPP cli or API, doing the > same with a simple PFCP protocol layer is not too hard. > > Shameless plug: in case you want to use a VPP based, Open Source UPF, have > a look at https://github.com/travelping/upg-vpp > > Regards > Andreas > > > So once the packet enter gtpu_input ( i am talking existing GTPU Plugin >> code ), it uses the configured tied to match tied in the received packet. >> Now does it not strip GTP-U header. ?? This is my understanding. please >> correct me if i am wrong/ >> >> If strips the GTP-U header we need to put back GTP-U which happens in the >> gtpu4-encap ? and send it out on interface. >> >> Or my understanding is totally misplaced ??? then what is the purpose >> gtpu4-encap ? >> >> Thanks, >> Regards, >> Venu >> >> >> >> On Fri, 16 Jul 2021 at 20:11, Akash S R >> wrote: >> >>> Hi Venu, >>> >>> From your requirement , keeping vpp support in mind, you shall send the >>> complete GTPU packet from your device which you use to fire packets. The >>> packet shall be marked with the exact destination so that it reaches the >>> GTPU Tunnel created via Phys and the Decapsulated packet shall egress out >>> via Phys on which it was received. But I have no idea how encap comes into >>> picture in this . Anyways, if you need to mark the packet with the correct >>> teid, tteid and make the packet as type GTPU then you shall fire an IP >>> packet to the Tunnel so that it is encapsulated and fired out of interface. >>> >>> Hope this helps. >>> >>> Regards, >>> Akash >>> >>> On Fri, Jul 16, 2021, 7:46 PM Venumadhav Josyula >>> wrote: >>> >>>> Hi Akash, >>>> >>>> Our requirement is simple we will get gtpu packet and send gtpu packet >>>> by properly replacing with proper tied and ip >>>> >>>> Thanks >>>> Regards >>>> Venu >>>> >>>> On Fri, 16 Jul, 2021, 7:25 pm Akash S R, >>>> wrote: >>>> >>>>> Hi Venu, >>>>> >>>>> decap-next supports only 3 parameters I guess .So, If you need an >>>>> support like reaching gtpu4_encap-node, you might need to have a look on >>>>> the gtpu_input API where the next0 fields can be set internally with some >>>>> checks and enqueue the packet to gtpu4-encap. >>>>> >>>>> Also, Please add your requirement view so that I may help you out on >>>>> it. >>>>> >>>>> Regards, >>>>> Akash >>>>> >>>>> On Fri, Jul 16, 2021, 2:42 PM Venumadhav
Re: [vpp-dev] question on gtpu_input graph node
Hi Akash, You are more or less right, but there is an exception, we want to replace tried, the src ip, dst ip and then forward it. 1. receive GTP-U packet from DU 1. Replace the tied with tried and put the proper source and destination ip and send to UPF. The dest ip is ip of UPF and source ip the ip of our node interface. Thanks, Regards, Venu On Fri, 16 Jul 2021 at 20:52, Akash S R wrote: > Hi Venu, > > From your points, I understand that your GTPU packet must not be > decapsulated and fired out to Phys once the packet reaches VPP. If your > requirement is on Forwarding the packet via tunnel then include some code > in gtpu_input so that the packet is not decapsulated and the forwarding > also happens as you need. Search for the keyword "enqueue" inside the > gtpu_input which puts the packet to queue for egress of the same. Reach > that call without decapsulated .Mostly a goto variable would do the job > with some if checks. > > Hope this helps. > > Thanks and Regards, > Akash > > On Fri, Jul 16, 2021, 8:34 PM Venumadhav Josyula > wrote: > >> Hi Akash, >> >> >From your requirement , keeping vpp support in mind, you shall send the >> complete GTPU >> >packet from your device which you use to fire packets. The packet shall >> be marked with the >exact destination so that it reaches the GTPU Tunnel >> created via Phys and the >Decapsulated packet shall egress out via Phys on >> which it was received. But I have no idea >how encap comes into picture in >> this . Anyways, if you need to mark the packet with the >correct teid, >> tteid and make the packet as type GTPU then you shall fire an IP packet to >> the >Tunnel so that it is encapsulated and fired out of interface. >> >> Ok let me explain, we are recieve GTPU packets from DU and want to send >> gtp packet to the UPF. Now for that our node receives GTP-U packet and send >> the GTP-U using tried. The dst ip passed as part of CLI will be going the >> dest ip. >> >> So once the packet enter gtpu_input ( i am talking existing GTPU Plugin >> code ), it uses the configured tied to match tied in the received packet. >> Now does it not strip GTP-U header. ?? This is my understanding. please >> correct me if i am wrong/ >> >> If strips the GTP-U header we need to put back GTP-U which happens in the >> gtpu4-encap ? and send it out on interface. >> >> Or my understanding is totally misplaced ??? then what is the purpose >> gtpu4-encap ? >> >> Thanks, >> Regards, >> Venu >> >> >> >> On Fri, 16 Jul 2021 at 20:11, Akash S R >> wrote: >> >>> Hi Venu, >>> >>> From your requirement , keeping vpp support in mind, you shall send the >>> complete GTPU packet from your device which you use to fire packets. The >>> packet shall be marked with the exact destination so that it reaches the >>> GTPU Tunnel created via Phys and the Decapsulated packet shall egress out >>> via Phys on which it was received. But I have no idea how encap comes into >>> picture in this . Anyways, if you need to mark the packet with the correct >>> teid, tteid and make the packet as type GTPU then you shall fire an IP >>> packet to the Tunnel so that it is encapsulated and fired out of interface. >>> >>> Hope this helps. >>> >>> Regards, >>> Akash >>> >>> On Fri, Jul 16, 2021, 7:46 PM Venumadhav Josyula >>> wrote: >>> >>>> Hi Akash, >>>> >>>> Our requirement is simple we will get gtpu packet and send gtpu packet >>>> by properly replacing with proper tied and ip >>>> >>>> Thanks >>>> Regards >>>> Venu >>>> >>>> On Fri, 16 Jul, 2021, 7:25 pm Akash S R, >>>> wrote: >>>> >>>>> Hi Venu, >>>>> >>>>> decap-next supports only 3 parameters I guess .So, If you need an >>>>> support like reaching gtpu4_encap-node, you might need to have a look on >>>>> the gtpu_input API where the next0 fields can be set internally with some >>>>> checks and enqueue the packet to gtpu4-encap. >>>>> >>>>> Also, Please add your requirement view so that I may help you out on >>>>> it. >>>>> >>>>> Regards, >>>>> Akash >>>>> >>>>> On Fri, Jul 16, 2021, 2:42 PM Venumadhav Josyula >>>>> wrote: >>>>> >>>>>> Hi Akash, >>>>>>
[vpp-dev] using dpdk backend with vpp 20.09 using stable/2009
Hi All, Please note we have build vpp from stable/2009 branch, following is startup.conf unix { # nodaemon log /var/log/vpp/vpp.log full-coredump cli-listen /run/vpp/cli.sock gid vpp exec /etc/vpp/setup.conf } api-trace { on } api-segment { gid vpp } socksvr { default } cpu { main-core 18 corelist-workers 20,22 no-multi-seg } dpdk { dev default { num-rx-desc 4096 num-tx-desc 4096 } dev :87:10.0 { ## Port handled by vfio-pci driver in host name eth0 } dev :87:10.1 { ## Port handled by vfio-pci driver in host name eth1 } socket-mem 1024,1024 vdev crypto_aesni_mb0 vdev crypto_aesni_mb1 } Commands used to ipsec tunnel vpp --- ipsec sa add 10 spi 1001 esp crypto-alg aes-cbc-256 crypto-key 4a506a794f574265564551694d6537684a506a794f574265564551694d653768 integ-alg sha-256-128 integ-key 2b7e151628aed2a6abf7158809cf4f3d2b7e151628aed2a6abf7158809cf4f3d tunnel-src 172.17.4.246 tunnel-dst 172.17.4.251 ipsec sa add 11 spi 1002 esp crypto-alg aes-cbc-256 crypto-key 4a506a794f574265564551694d6537684a506a794f574265564551694d653768 integ-alg sha-256-128 integ-key 2b7e151628aed2a6abf7158809cf4f3d2b7e151628aed2a6abf7158809cf4f3d tunnel-src 172.17.4.251 tunnel-dst 172.17.4.246 ipsec spd add 1 set interface ipsec spd eth0 1 ipsec policy add spd 1 priority 10 outbound action protect sa 10 local-ip-range 172.17.4.246 - 172.17.4.246 remote-ip-range 172.17.4.251 - 172.17.4.251 ipsec policy add spd 1 priority 10 inbound action protect sa 11 local-ip-range 172.17.4.246 - 172.17.4.246 remote-ip-range 172.17.4.251 - 172.17.4.251 ipsec policy add spd 1 priority 100 inbound action bypass protocol 50 ipsec policy add spd 1 priority 100 outbound action bypass protocol 50 Following output vpp# show ipsec backends IPsec AH backends available: Name Index Active crypto engine backend 0 yes IPsec ESP backends available: Name Index Active crypto engine backend 0 yes dpdk backend 1 no vpp# vpp# show version vpp v20.09.0-65~gdbaff84 built by root on 9315b7360381 at 2021-08-05T08:20:42 vpp# show dp dpdk dpo vpp# show dpdk version DPDK Version: DPDK 20.08.0 DPDK EAL init args: -c 54 -n 4 --in-memory --vdev crypto_aesni_mb0 --vdev crypto_aesni_mb1 --file-prefix vpp -w :87:10.0 -w :87:10.1 --master-lcore 18 vpp# How do we make it use dpdk backend ? Thanks, Regards, Venu -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19972): https://lists.fd.io/g/vpp-dev/message/19972 Mute This Topic: https://lists.fd.io/mt/84941801/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] using dpdk backend with vpp 20.09 using stable/2009
Hi *Sergio,* *Any help would be really appreciated.* *Thanks,* *Regards,* *Venu* On Tue, 17 Aug 2021 at 11:21, Venumadhav Josyula via lists.fd.io wrote: > Hi All, > Please note we have build vpp from stable/2009 branch, following is > startup.conf > unix { > # nodaemon > log /var/log/vpp/vpp.log > full-coredump > cli-listen /run/vpp/cli.sock > gid vpp > exec /etc/vpp/setup.conf > } > api-trace { > on > } > api-segment { > gid vpp > } > socksvr { > default > } > cpu { > main-core 18 > corelist-workers 20,22 > no-multi-seg > } > dpdk { > dev default { > num-rx-desc 4096 > num-tx-desc 4096 > } > > dev :87:10.0 { ## Port handled by vfio-pci driver in host > name eth0 > } > dev :87:10.1 { ## Port handled by vfio-pci driver in host > name eth1 > } > socket-mem 1024,1024 > vdev crypto_aesni_mb0 > vdev crypto_aesni_mb1 > > } > > Commands used to ipsec tunnel > vpp > --- > ipsec sa add 10 spi 1001 esp crypto-alg aes-cbc-256 crypto-key > 4a506a794f574265564551694d6537684a506a794f574265564551694d653768 integ-alg > sha-256-128 integ-key > 2b7e151628aed2a6abf7158809cf4f3d2b7e151628aed2a6abf7158809cf4f3d tunnel-src > 172.17.4.246 tunnel-dst 172.17.4.251 > ipsec sa add 11 spi 1002 esp crypto-alg aes-cbc-256 crypto-key > 4a506a794f574265564551694d6537684a506a794f574265564551694d653768 integ-alg > sha-256-128 integ-key > 2b7e151628aed2a6abf7158809cf4f3d2b7e151628aed2a6abf7158809cf4f3d tunnel-src > 172.17.4.251 tunnel-dst 172.17.4.246 > ipsec spd add 1 > set interface ipsec spd eth0 1 > ipsec policy add spd 1 priority 10 outbound action protect sa 10 > local-ip-range 172.17.4.246 - 172.17.4.246 remote-ip-range 172.17.4.251 - > 172.17.4.251 > ipsec policy add spd 1 priority 10 inbound action protect sa 11 > local-ip-range 172.17.4.246 - 172.17.4.246 remote-ip-range 172.17.4.251 - > 172.17.4.251 > > ipsec policy add spd 1 priority 100 inbound action bypass protocol 50 > ipsec policy add spd 1 priority 100 outbound action bypass protocol 50 > > > Following output > > vpp# show ipsec backends > IPsec AH backends available: >Name Index Active > crypto engine backend 0 yes > IPsec ESP backends available: >Name Index Active > crypto engine backend 0 yes >dpdk backend 1 no > vpp# > vpp# show version > vpp v20.09.0-65~gdbaff84 built by root on 9315b7360381 at > 2021-08-05T08:20:42 > vpp# show dp > dpdk dpo > vpp# show dpdk version > DPDK Version: DPDK 20.08.0 > DPDK EAL init args: -c 54 -n 4 --in-memory --vdev > crypto_aesni_mb0 --vdev crypto_aesni_mb1 --file-prefix vpp -w :87:10.0 > -w :87:10.1 --master-lcore 18 > vpp# > > How do we make it use dpdk backend ? > > Thanks, > Regards, > Venu > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19973): https://lists.fd.io/g/vpp-dev/message/19973 Mute This Topic: https://lists.fd.io/mt/84941801/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] using dpdk backend with vpp 20.09 using stable/2009
Thanks , neale let me try this On Tue, 17 Aug 2021 at 13:21, Neale Ranns wrote: > > > Hi Venu, > > > > Before adding any IPSec state: > > > > DBGvpp# ipsec select ? > > ipsec select backend ipsec select backend > > > > > /neale > > > > *From: *vpp-dev@lists.fd.io on behalf of Venumadhav > Josyula via lists.fd.io > *Date: *Tuesday, 17 August 2021 at 08:30 > *To: *Sweetu Hubby > *Cc: *vpp-dev > *Subject: *Re: [vpp-dev] using dpdk backend with vpp 20.09 using > stable/2009 > > Hi *Sergio,* > > > > *Any help would be really appreciated.* > > > > *Thanks,* > > *Regards,* > > *Venu* > > > > On Tue, 17 Aug 2021 at 11:21, Venumadhav Josyula via lists.fd.io > wrote: > > Hi All, > > Please note we have build vpp from stable/2009 branch, following is > startup.conf > > unix { > # nodaemon > log /var/log/vpp/vpp.log > full-coredump > cli-listen /run/vpp/cli.sock > gid vpp > exec /etc/vpp/setup.conf > } > api-trace { > on > } > api-segment { > gid vpp > } > socksvr { > default > } > cpu { > main-core 18 > corelist-workers 20,22 > no-multi-seg > } > dpdk { > dev default { > num-rx-desc 4096 > num-tx-desc 4096 > } > > dev :87:10.0 { ## Port handled by vfio-pci driver in host > name eth0 > } > dev :87:10.1 { ## Port handled by vfio-pci driver in host > name eth1 > } > socket-mem 1024,1024 > vdev crypto_aesni_mb0 > vdev crypto_aesni_mb1 > > } > > > > Commands used to ipsec tunnel > > vpp > --- > ipsec sa add 10 spi 1001 esp crypto-alg aes-cbc-256 crypto-key > 4a506a794f574265564551694d6537684a506a794f574265564551694d653768 integ-alg > sha-256-128 integ-key > 2b7e151628aed2a6abf7158809cf4f3d2b7e151628aed2a6abf7158809cf4f3d tunnel-src > 172.17.4.246 tunnel-dst 172.17.4.251 > ipsec sa add 11 spi 1002 esp crypto-alg aes-cbc-256 crypto-key > 4a506a794f574265564551694d6537684a506a794f574265564551694d653768 integ-alg > sha-256-128 integ-key > 2b7e151628aed2a6abf7158809cf4f3d2b7e151628aed2a6abf7158809cf4f3d tunnel-src > 172.17.4.251 tunnel-dst 172.17.4.246 > ipsec spd add 1 > set interface ipsec spd eth0 1 > ipsec policy add spd 1 priority 10 outbound action protect sa 10 > local-ip-range 172.17.4.246 - 172.17.4.246 remote-ip-range 172.17.4.251 - > 172.17.4.251 > ipsec policy add spd 1 priority 10 inbound action protect sa 11 > local-ip-range 172.17.4.246 - 172.17.4.246 remote-ip-range 172.17.4.251 - > 172.17.4.251 > > ipsec policy add spd 1 priority 100 inbound action bypass protocol 50 > ipsec policy add spd 1 priority 100 outbound action bypass protocol 50 > > > > > > Following output > > > > vpp# show ipsec backends > IPsec AH backends available: >Name Index Active > crypto engine backend 0 yes > IPsec ESP backends available: >Name Index Active > crypto engine backend 0 yes >dpdk backend 1 no > vpp# > > vpp# show version > vpp v20.09.0-65~gdbaff84 built by root on 9315b7360381 at > 2021-08-05T08:20:42 > vpp# show dp > dpdk dpo > vpp# show dpdk version > DPDK Version: DPDK 20.08.0 > DPDK EAL init args: -c 54 -n 4 --in-memory --vdev > crypto_aesni_mb0 --vdev crypto_aesni_mb1 --file-prefix vpp -w :87:10.0 > -w :87:10.1 --master-lcore 18 > vpp# > > > > How do we make it use dpdk backend ? > > > > Thanks, > > Regards, > > Venu > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19976): https://lists.fd.io/g/vpp-dev/message/19976 Mute This Topic: https://lists.fd.io/mt/84941801/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] using dpdk backend with vpp 20.09 using stable/2009
Hi Neale, Thanks, it worked. But occasionally *I am starving for crypto buffers, how do we increase just the crypto buffers* ? I mean to ask if I know which numa is being used in my case i only want to give additional buffers to that only. So let me give me more details , please find them below. *Node counters* vpp# show node counters CountNode Reason 409391269 gtpu4-input good packets decapsulated 409391269dpdk-esp4-encrypt ESP pkts received *56491dpdk-esp4-encrypt Enqueue encrypt failed (queue full)* 409391269 dpdk-esp4-decrypt-post ESP post pkts 409516045dpdk-esp4-decrypt ESP pkts received *124776dpdk-esp4-decrypt Enqueue decrypt failed (queue full)* 818726047dpdk-crypto-input Crypto ops dequeued 2725300 dpdk-input no error 65arp-reply ARP replies sent 96321arp-reply IP4 source address not local to subnet 1886arp-input IP4 destination address is unset 409391269 ipsec4-output-feature IPSec policy protect 409334778 ipsec4-output-feature IPSec policy bypass 818961464 ipsec4-input-feature IPSec pkts received 409516045 ipsec4-input-feature IPSec policy match 409445419 ipsec4-input-feature IPSec policy bypass 2723575 dpdk-input no error 97927 arp-disabled ARP Disabled on this interface 1886arp-input IP4 destination address is unset vpp# *Startup.conf* unix { # nodaemon log /var/log/vpp/vpp.log full-coredump cli-listen /run/vpp/cli.sock gid vpp exec /etc/vpp/setup.conf } api-trace { on } api-segment { gid vpp } socksvr { default } cpu { main-core 18 corelist-workers 20,22 no-multi-seg } dpdk { dev default { num-rx-desc 4096 num-tx-desc 4096 } dev :87:10.0 { ## Port handled by vfio-pci driver in host name eth0 } dev :87:10.1 { ## Port handled by vfio-pci driver in host name eth1 } *socket-mem 1024,1024* vdev crypto_aesni_mb0 vdev crypto_aesni_mb1 } buffers { * buffers-per-numa 128000* } Thanks, Regards, Venu On Tue, 17 Aug 2021 at 14:25, Venumadhav Josyula via lists.fd.io wrote: > Thanks , neale let me try this > > On Tue, 17 Aug 2021 at 13:21, Neale Ranns wrote: > >> >> >> Hi Venu, >> >> >> >> Before adding any IPSec state: >> >> >> >> DBGvpp# ipsec select ? >> >> ipsec select backend ipsec select backend >> >> >> >> >> /neale >> >> >> >> *From: *vpp-dev@lists.fd.io on behalf of >> Venumadhav Josyula via lists.fd.io >> *Date: *Tuesday, 17 August 2021 at 08:30 >> *To: *Sweetu Hubby >> *Cc: *vpp-dev >> *Subject: *Re: [vpp-dev] using dpdk backend with vpp 20.09 using >> stable/2009 >> >> Hi *Sergio,* >> >> >> >> *Any help would be really appreciated.* >> >> >> >> *Thanks,* >> >> *Regards,* >> >> *Venu* >> >> >> >> On Tue, 17 Aug 2021 at 11:21, Venumadhav Josyula via lists.fd.io >> wrote: >> >> Hi All, >> >> Please note we have build vpp from stable/2009 branch, following is >> startup.conf >> >> unix { >> # nodaemon >> log /var/log/vpp/vpp.log >> full-coredump >> cli-listen /run/vpp/cli.sock >> gid vpp >> exec /etc/vpp/setup.conf >> } >> api-trace { >> on >> } >> api-segment { >> gid vpp >> } >> socksvr { >> default >> } >> cpu { >> main-core 18 >> corelist-workers 20,22 >> no-multi-seg >> } >> dpdk { >> dev default { >> num-rx-desc 4096 >> num-tx-desc 4096 >> } >> >> dev :87:10.0 { ## Port handled by vfio-pci driver in host >> name eth0 >> } >> dev :87:10.1 { ## Port handled by vfio-pci driver in host >> name eth1 >> } >> socket-mem 1024,1024 >> vdev crypto_aesni_mb0 >> vdev crypto_aesni_mb1 >> >> } >> >> >> >> Commands used to ipsec tunnel >> >> vpp >> --- >> ipsec sa add 10 spi 1001 esp crypto-alg aes-cbc-256 crypto-key >> 4a506a794f574265564551694d6537684a506a794f574265564551694d653768 integ-alg >> sha-256-128 integ-key >> 2b7e151628aed2a6abf7158809cf4f3d2b7e151628aed2a6abf715
Re: [vpp-dev] Packet processing time.
Hi Mohammed / Dave, How would you measure the latency of packet ? for e.g clocks & vector/call for each node, can we measure it ? Thanks, Regards, Venu On Tue, 21 Apr 2020 at 16:54, Mohammed Hawari wrote: > Hi Chris, > > Evaluating packet processing time in software is a very challenging issue, > as mentioned by Dave, it is likely to impact the performance we are trying > to evaluate. I worked on that issue and have an unpublished, under review, > academic paper proposing a solution using the NetFPGA-SUME platform. > Basically, I built a custom FPGA design, mimicking a NIC capable of > timestamping every packets at the ingress and the egress (immediately after > packets arrivals from the wire, and immediately before the packets > departures on the wire). I also wrote a DPDK driver for that NIC, and made > it work with VPP, so that the latency introduced by (VPP+PCI-based DMA) can > be evaluated. I played with this design and VPP in various configurations > (l2-patch l2 crossconnect and l3 forward) and I think it could be an > interesting tool to diagnose latency issues on a “per-packet” basis. > Downside is, of course, from the perspective of VPP, this is a custom NIC, > with a custom driver (not necessarily super-optimised), and the evaluated > packet forwarding latency takes the driver’s performance into account. > > If you are interested in discussing this work, I can give you more details > and resources in unicast, don’t hesitate to contact me :) > > Cheers, > > Mohammed Hawari > Software Engineer & PhD student > Cisco Systems > > > On 18 Apr 2020, at 22:14, Dave Barach via lists.fd.io < > dbarach=cisco@lists.fd.io> wrote: > > If you turn on the main loop dispatch event logs and look at the results > in the g2 viewer [or dump them in ascii] you can make pretty accurate lap > time estimates for any workload. Roughly speaking, packets take 1 lap time > to arrive and then leave. > > The “circuit-node ” game produces one elog event per frame, so > you can look at several million frame circuit times. > > Individually timestamping packets would be more precise, but calling > clib_cpu_time_now(...) (rdtsc instrs on x86_64) twice per packet would > almost certainly affect forwarding performance. > > See > https://fd.io/docs/vpp/master/gettingstarted/developers/eventviewer.html > > /*? > * Control event logging of api, cli, and thread barrier events > * With no arguments, displays the current trace status. > * Name the event groups you wish to trace or stop tracing. > * > * @cliexpar > * @clistart > * elog trace api cli barrier > * elog trace api cli barrier disable > * elog trace dispatch > * elog trace circuit-node ethernet-input > * elog trace > * @cliend > * @cliexcmd{elog trace [api][cli][barrier][disable]} > ?*/ > /* *INDENT-OFF* */ > > *From:* vpp-dev@lists.fd.io *On Behalf Of *Christian > Hopps > *Sent:* Saturday, April 18, 2020 3:14 PM > *To:* vpp-dev > *Cc:* Christian Hopps > *Subject:* [vpp-dev] Packet processing time. > > > The recent discussion on reference counting and barrier timing has got me > interested in packet processing time. I realize there's a way to use "show > runtime" along with knowledge of the arc a packet follows, but I'm curious > if something more straight-forward has been attempted where packets are > timestamped on ingress (or creation) and stats are collected on egress > (transmission)? > > I also have an unrelated interest in hooking into the graph > immediate-post-transmission -- I'd like to adjust an input queue size only > when the packet that enqueued on it is actually transmitted on the wire, > and not just handed off downstream on the arc -- this would be a likely the > same place packet stat collection might occur. :) > > Thanks, > Chris. > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20021): https://lists.fd.io/g/vpp-dev/message/20021 Mute This Topic: https://lists.fd.io/mt/73114130/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] Cloud native VNF agent
Hi All, Does the govpp have a Cloud native VNF agent also ? I was looking at the slides on govpp, those are back from 2017 Is the Cloud native VNF agent also open sourced ? Please note we do not want to use VPP-Ligato agent for cloud-native platforms for our CU work. We are responsible for the dataplane pod where vpp will run. Any inputs / suggestions / pointers in the right direction are welcome Thanks, Regards, Venu -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20136): https://lists.fd.io/g/vpp-dev/message/20136 Mute This Topic: https://lists.fd.io/mt/85621548/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] getting high throughput from VPP
Hi Mohsen, We recently tested , we are good throughput for gtp-u ( non-ipsec ) case. We had link limitation of 10 Gbps... We were doing Line rate for single cpu and single gtp-u tunnel. Can you configuration details ? Also show hardware-interfaces and startup.conf Thanks Regards Vemu On Thu, Sep 16, 2021, 1:43 PM Mohsen Meamarian wrote: > Hello to all dear friends, > > I have trouble getting high throughput from VPP. Where and how can I apply > configurations that make the throughput as much as possible? I have > attached a photo of the amount of throughput I should have (green) and the > amount of throughput I have now (blue). I use 2 CPUs that each have 20 > cores. I see "htop" command results and all CPU cores almost are in 100% > usage. I use VPP in Multi-thread mode. How can I apply effective settings > on DPDK via VPP? For example, increasing the size of huge pages. I > appreciate any help you can provide. > > best regards, > Mohsen Memariyan > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20142): https://lists.fd.io/g/vpp-dev/message/20142 Mute This Topic: https://lists.fd.io/mt/85647105/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] question using VPP APIs using vac layer
Hi All, i) want to use C APIs. ii) want to have vpp-client proxy which forward API messages to the VPP iii) towards VPP is the binary APIs , intent is use vac_connect, iv) VPP + this application will run in a pod. v) south another would send those APIs recieved by fastpath pod and send it to VPP. So any examples to refer in vpp or external projects ? Thanks, Regards Venu -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20230): https://lists.fd.io/g/vpp-dev/message/20230 Mute This Topic: https://lists.fd.io/mt/85950329/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] VPP Socket API how to use from the application #socket-api #vpp #sock-api
Hi Ole, Any examples for VAPI shared to use binary APIs ? Thanks, Regards, Venu On Thu, 23 Sept 2021 at 00:26, Ole Troan wrote: > Ravi, > > The VPP binary API supports two transports. Shared memory and unix domain > sockets. > VAPI is the C language binding for the binary API. I think it only > supports shared memory now. > > Other language bindings support both or only sockets. > > Cheers, > Ole > > > On 22 Sep 2021, at 20:31, RaviKiran Veldanda > wrote: > > > > Hi Experts, > > I was trying to find out how to use socket-api instead of "VAPI" based > API. > > Can you please provide how to use socket-api any pointer will be a great > help. > > //Ravi > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20231): https://lists.fd.io/g/vpp-dev/message/20231 Mute This Topic: https://lists.fd.io/mt/85796959/21656 Mute #vpp:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp Mute #socket-api:https://lists.fd.io/g/vpp-dev/mutehashtag/socket-api Mute #sock-api:https://lists.fd.io/g/vpp-dev/mutehashtag/sock-api Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] VPP Socket API how to use from the application #socket-api #vpp #sock-api
Hi Ole / Others, Thanks for your email, i getting following compilation error [root@8f57181df3a1 vpp_c_api_examples]#* gcc vpp_api_client_test3.c -o vpp_api_client_test3.o -lvlibmemoryclient -lsvm -lvppinfra -lvlib* In file included from /usr/include/vppinfra/error.h:41:0, from /usr/include/vlibapi/api.h:24, from vpp_api_client_test3.c:3: /usr/include/vppinfra/clib.h:43:18: error: missing binary operator before token "(" #if __has_include() ^ In file included from /usr/include/vppinfra/mem.h:49:0, from /usr/include/vppinfra/vec.h:42, from /usr/include/vppinfra/error.h:53, from /usr/include/vlibapi/api.h:24, from vpp_api_client_test3.c:3: /usr/include/vppinfra/string.h:92:34: error: expected ';', ',' or ')' before 'dst' clib_memcpy_fast (void *restrict dst, const void *restrict src, size_t n) ^ [root@8f57181df3a1 vpp_c_api_examples]# vim /usr/include/vppinfra/clib.h +43 [root@8f57181df3a1 vpp_c_api_examples]# vim /usr/include/vppinfra/clib.h +43 [root@8f57181df3a1 vpp_c_api_examples]# gcc --version gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44) Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root@8f57181df3a1 vpp_c_api_examples]# - c -code #include #include #include #include #include #define vl_typedefs #define vl_endianfun #include #undef vl_typedefs #undef vl_endianfun int main() { char *name = "vpp-test-app"; clib_mem_init_thread_safe (0, 64ULL << 20); if (vl_client_api_map("/vpe-api")) { printf("unable to map\n"); goto quit; } if (vl_client_connect("vpp-test-app", 0, 32) < 0) { printf("unable to connect \n"); vl_client_api_unmap(); goto quit; } printf("successfully connected... \n"); quit: return 0; } Can you please suggest what can i be doing worng ? Thanks, Regards, Venu On Thu, 30 Sept 2021 at 13:21, wrote: > Hi Venu, > > > Any examples for VAPI shared to use binary APIs ? > > Try this for a start: > https://git.fd.io/vpp/tree/src/vpp-api/vapi/vapi_c_test.c > > Cheers, > Ole > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20239): https://lists.fd.io/g/vpp-dev/message/20239 Mute This Topic: https://lists.fd.io/mt/85796959/21656 Mute #vpp:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp Mute #socket-api:https://lists.fd.io/g/vpp-dev/mutehashtag/socket-api Mute #sock-api:https://lists.fd.io/g/vpp-dev/mutehashtag/sock-api Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] VPP Socket API how to use from the application #socket-api #vpp #sock-api
Hi Benoit, Thanks for quick reply. I have docker with following [root@8f57181df3a1 vpp_c_api_examples]# rpm -qa | grep vpp vpp-lib-21.06.0-4~g0d9d3a0.x86_64 vpp-api-lua-21.06.0-4~g0d9d3a0.x86_64 vpp-api-python3-21.06.0-4~g0d9d3a0.x86_64 vpp-debuginfo-21.06.0-4~g0d9d3a0.x86_64 vpp-selinux-policy-21.06.0-4~g0d9d3a0.x86_64 vpp-21.06.0-4~g0d9d3a0.x86_64 vpp-plugins-21.06.0-4~g0d9d3a0.x86_64 vpp-devel-21.06.0-4~g0d9d3a0.x86_64 This will vpp running in it. [root@8f57181df3a1 /]# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core) [root@8f57181df3a1 /]# > Eg. use devtoolset-9 (gcc-9). How do I use it ? Thanks, Regards, Venu On Thu, 30 Sept 2021 at 18:47, Benoit Ganne (bganne) wrote: > You should upgrade your compiler... GCC-4 is way too old. > Eg. use devtoolset-9 (gcc-9). > > Best > ben > > > -Original Message- > > From: vpp-dev@lists.fd.io On Behalf Of Venumadhav > > Josyula > > Sent: jeudi 30 septembre 2021 14:49 > > To: otr...@employees.org > > Cc: RaviKiran Veldanda ; vpp-dev > d...@lists.fd.io> > > Subject: Re: [vpp-dev] VPP Socket API how to use from the application > > #socket-api #vpp #sock-api > > > > Hi Ole / Others, > > > > > > > > Thanks for your email, i getting following compilation error > > [root@8f57181df3a1 vpp_c_api_examples]# gcc vpp_api_client_test3.c -o > > vpp_api_client_test3.o -lvlibmemoryclient -lsvm -lvppinfra -lvlib > > In file included from /usr/include/vppinfra/error.h:41:0, > > from /usr/include/vlibapi/api.h:24, > > from vpp_api_client_test3.c:3: > > /usr/include/vppinfra/clib.h:43:18: error: missing binary operator before > > token "(" > > #if __has_include() > > ^ > > In file included from /usr/include/vppinfra/mem.h:49:0, > > from /usr/include/vppinfra/vec.h:42, > > from /usr/include/vppinfra/error.h:53, > > from /usr/include/vlibapi/api.h:24, > > from vpp_api_client_test3.c:3: > > /usr/include/vppinfra/string.h:92:34: error: expected ';', ',' or ')' > > before 'dst' > > clib_memcpy_fast (void *restrict dst, const void *restrict src, size_t > n) > > ^ > > [root@8f57181df3a1 vpp_c_api_examples]# vim /usr/include/vppinfra/clib.h > > +43 > > [root@8f57181df3a1 vpp_c_api_examples]# vim /usr/include/vppinfra/clib.h > > +43 > > [root@8f57181df3a1 vpp_c_api_examples]# gcc --version > > gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44) > > Copyright (C) 2015 Free Software Foundation, Inc. > > This is free software; see the source for copying conditions. There is > NO > > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR > > PURPOSE. > > > > [root@8f57181df3a1 vpp_c_api_examples]# > > > > > > - > > > > c -code > > > > > > > > #include > > #include > > #include > > #include > > #include > > > > #define vl_typedefs > > #define vl_endianfun > > #include > > #undef vl_typedefs > > #undef vl_endianfun > > > > int main() > > { > >char *name = "vpp-test-app"; > > > >clib_mem_init_thread_safe (0, 64ULL << 20); > > > >if (vl_client_api_map("/vpe-api")) > >{ > > printf("unable to map\n"); > > goto quit; > >} > >if (vl_client_connect("vpp-test-app", 0, 32) < 0) > >{ > > printf("unable to connect \n"); > > vl_client_api_unmap(); > > goto quit; > >} > >printf("successfully connected... \n"); > > quit: > > return 0; > > } > > > > > > > > > > > > Can you please suggest what can i be doing worng ? > > > > > > Thanks, > > Regards, > > Venu > > > > > > On Thu, 30 Sept 2021 at 13:21, > <mailto:otr...@employees.org> > wrote: > > > > > > Hi Venu, > > > > > Any examples for VAPI shared to use binary APIs ? > > > > Try this for a start: > > https://git.fd.io/vpp/tree/src/vpp-api/vapi/vapi_c_test.c > > > > Cheers, > > Ole > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20242): https://lists.fd.io/g/vpp-dev/message/20242 Mute This Topic: https://lists.fd.io/mt/85796959/21656 Mute #vpp:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp Mute #socket-api:https://lists.fd.io/g/vpp-dev/mutehashtag/socket-api Mute #sock-api:https://lists.fd.io/g/vpp-dev/mutehashtag/sock-api Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] VPP Socket API how to use from the application #socket-api #vpp #sock-api
Hi Akash, Thansks, now after devtoolset, @Benoit Ganne (bganne) , @Ole Troan i am getting following error [root@8f57181df3a1 vpp_c_api_examples]# gcc vpp_api_client_test3.c -o vpp_api_client_test3.o -lvlibmemoryclient -lsvm -lvppinfra -lvlib /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: /lib/../lib64/libvlib.so: undefined reference to `classify_get_trace_chain' /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: /lib/../lib64/libvlib.so: undefined reference to `stat_segment_register_gauge' /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: /lib/../lib64/libvlib.so: undefined reference to `os_exit' collect2: error: ld returned 1 exit status [root@8f57181df3a1 vpp_c_api_examples]# Let me paste the code again, #include #include #include #include #include #define vl_typedefs #define vl_endianfun #include #undef vl_typedefs #undef vl_endianfun int main() { char *name = "vpp-test-app"; clib_mem_init_thread_safe (0, 64ULL << 20); if (vl_client_api_map("/vpe-api")) { printf("unable to map\n"); goto quit; } if (vl_client_connect("vpp-test-app", 0, 32) < 0) { printf("unable to connect \n"); vl_client_api_unmap(); goto quit; } printf("successfully connected... \n"); quit: return 0; } Is this wrong way, i am trying to use APIs ? Thanks, Regards Venu On Thu, 30 Sept 2021 at 19:00, Akash S R wrote: > Hey Venu, > > Try "scl enable devtoolset-9 bash" inside your docker or update your gcc > version. > > > /Akash S R > > On Thu, Sep 30, 2021, 18:54 Venumadhav Josyula wrote: > >> Hi Benoit, >> >> Thanks for quick reply. >> >> I have docker with following >> [root@8f57181df3a1 vpp_c_api_examples]# rpm -qa | grep vpp >> vpp-lib-21.06.0-4~g0d9d3a0.x86_64 >> vpp-api-lua-21.06.0-4~g0d9d3a0.x86_64 >> vpp-api-python3-21.06.0-4~g0d9d3a0.x86_64 >> vpp-debuginfo-21.06.0-4~g0d9d3a0.x86_64 >> vpp-selinux-policy-21.06.0-4~g0d9d3a0.x86_64 >> vpp-21.06.0-4~g0d9d3a0.x86_64 >> vpp-plugins-21.06.0-4~g0d9d3a0.x86_64 >> vpp-devel-21.06.0-4~g0d9d3a0.x86_64 >> >> This will vpp running in it. >> >> [root@8f57181df3a1 /]# cat /etc/redhat-release >> CentOS Linux release 7.3.1611 (Core) >> [root@8f57181df3a1 /]# >> >> > Eg. use devtoolset-9 (gcc-9). >> >> How do I use it ? >> >> Thanks, >> Regards, >> Venu >> >> On Thu, 30 Sept 2021 at 18:47, Benoit Ganne (bganne) >> wrote: >> >>> You should upgrade your compiler... GCC-4 is way too old. >>> Eg. use devtoolset-9 (gcc-9). >>> >>> Best >>> ben >>> >>> > -Original Message- >>> > From: vpp-dev@lists.fd.io On Behalf Of >>> Venumadhav >>> > Josyula >>> > Sent: jeudi 30 septembre 2021 14:49 >>> > To: otr...@employees.org >>> > Cc: RaviKiran Veldanda ; vpp-dev >> > d...@lists.fd.io> >>> > Subject: Re: [vpp-dev] VPP Socket API how to use from the application >>> > #socket-api #vpp #sock-api >>> > >>> > Hi Ole / Others, >>> > >>> > >>> > >>> > Thanks for your email, i getting following compilation error >>> > [root@8f57181df3a1 vpp_c_api_examples]# gcc vpp_api_client_test3.c -o >>> > vpp_api_client_test3.o -lvlibmemoryclient -lsvm -lvppinfra -lvlib >>> > In file included from /usr/include/vppinfra/error.h:41:0, >>> > from /usr/include/vlibapi/api.h:24, >>> > from vpp_api_client_test3.c:3: >>> > /usr/include/vppinfra/clib.h:43:18: error: missing binary operator >>> before >>> > token "(" >>> > #if __has_include() >>> > ^ >>> > In file included from /usr/include/vppinfra/mem.h:49:0, >>> > from /usr/include/vppinfra/vec.h:42, >>> > from /usr/include/vppinfra/error.h:53, >>> > from /usr/include/vlibapi/api.h:24, >>> > from vpp_api_client_test3.c:3: >>> > /usr/include/vppinfra/string.h:92:34: error: expected ';', ',' or ')' >>> > before 'dst' >>> > clib_memcpy_fast (void *restrict dst, const void *restrict src, >>> size_t n) >>> > ^ >>> > [root@8f57181df3a1 vpp_c_api_examples]# vim >>> /usr/include/vppinfra/clib.h >>> > +43 >>>
Re: [vpp-dev] VPP Socket API how to use from the application #socket-api #vpp #sock-api
Hi Akash, Sure I can use help from anywhere. >I guess you are using centos and I have good experience on this. > print LD_LIBRARY_PATH and set the path to the path it says in error. Then push all the .so and other library files of VPP into this path and try. Can you elaborate more , you mean like this [root@8f57181df3a1 /]# find . -name libvlib.so ./usr/lib64/libvlib.so LD_LIBRARY_PATH=/usr/lib64 gcc vpp_api_client_test3.c -o vpp_api_client_test3.o -lvlibmemoryclient -lsvm -lvppinfra -lvlib ? >Also mention the path of your VPP /include directory and /library path in the compilation. [root@8f57181df3a1 /]# ls -al usr/include/ total 1652 .. .. ... -rw-r--r-- 1 root root 1962 Apr 28 13:34 values.h drwxr-xr-x 2 bin bin 12288 Sep 13 06:14 vapi drwxr-xr-x 2 bin bin4096 Sep 13 06:14 vat drwxr-xr-x 2 bin bin4096 Sep 13 06:14 vat2 drwxr-xr-x 2 bin bin4096 Sep 13 06:14 vcl drwxr-xr-x 1 root root 4096 Sep 30 13:29 video drwxr-xr-x 6 bin bin4096 Sep 13 06:14 vlib drwxr-xr-x 2 bin bin4096 Sep 13 06:14 vlibapi drwxr-xr-x 2 bin bin4096 Sep 13 06:14 vlibmemory drwxr-xr-x 53 bin bin4096 Sep 13 06:14 vnet drwxr-xr-x 4 bin bin4096 Sep 13 06:14 vpp drwxr-xr-x 3 bin bin4096 Sep 13 06:14 vpp-api drwxr-xr-x 60 bin bin4096 Sep 13 06:14 vpp_plugins drwxr-xr-x 3 bin bin4096 Sep 30 12:57 vppinfra -rw-r--r-- 1 root root 22 Apr 28 13:34 wait.h -rw-r--r-- 1 root root 32119 Apr 28 13:34 wchar.h -rw-r--r-- 1 root root 11155 Apr 28 13:34 wctype.h -rw-r--r-- 1 root root 2529 Apr 28 13:34 wordexp.h drwxr-xr-x 1 root root 4096 Sep 30 13:29 xen -rw-r--r-- 1 root root 1704 Apr 28 13:34 xlocale.h [root@8f57181df3a1 /]# ls -al usr/include/^C [root@8f57181df3a1 /]# cd - /root/vpp_c_api_examples [root@8f57181df3a1 vpp_c_api_examples]# LD_LIBRARY_PATH=/usr/lib64 gcc vpp_api_client_test3.c -o vpp_api_client_test3.o -lvlibmemoryclient -lsvm -lvppinfra -lvlib -I/usr/include Thanks, Regards, Venu On Thu, 30 Sept 2021 at 20:41, Akash S R wrote: > Hi Venu, > > can I answer this query? just asking as I have not been asked this :) > > I guess you are using centos and I have good experience on this. > print LD_LIBRARY_PATH and set the path to the path it says in error. Then > push all the .so and other library files of VPP into this path and try. > > Also mention the path of your VPP /include directory and /library path in > the compilation. > > > /Akash > > On Thu, Sep 30, 2021, 19:39 Venumadhav Josyula wrote: > >> Hi Akash, >> >> Thansks, now after devtoolset, >> >> @Benoit Ganne (bganne) , @Ole Troan >> >> i am getting following error >> >> [root@8f57181df3a1 vpp_c_api_examples]# gcc vpp_api_client_test3.c -o >> vpp_api_client_test3.o -lvlibmemoryclient -lsvm -lvppinfra -lvlib >> /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: >> /lib/../lib64/libvlib.so: undefined reference to `classify_get_trace_chain' >> /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: >> /lib/../lib64/libvlib.so: undefined reference to >> `stat_segment_register_gauge' >> /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: >> /lib/../lib64/libvlib.so: undefined reference to `os_exit' >> collect2: error: ld returned 1 exit status >> [root@8f57181df3a1 vpp_c_api_examples]# >> >> Let me paste the code again, >> #include >> #include >> #include >> #include >> #include >> >> #define vl_typedefs >> #define vl_endianfun >> #include >> #undef vl_typedefs >> #undef vl_endianfun >> >> int main() >> { >>char *name = "vpp-test-app"; >> >>clib_mem_init_thread_safe (0, 64ULL << 20); >> >>if (vl_client_api_map("/vpe-api")) >>{ >> printf("unable to map\n"); >> goto quit; >>} >>if (vl_client_connect("vpp-test-app", 0, 32) < 0) >>{ >> printf("unable to connect \n"); >> vl_client_api_unmap(); >> goto quit; >>} >>printf("successfully connected... \n"); >> quit: >> return 0; >> } >> >> Is this wrong way, i am trying to use APIs ? >> >> Thanks, >> Regards >> Venu >> >> On Thu, 30 Sept 2021 at 19:00, Akash S R >> wrote: >> >>> Hey Venu, >>> >>> Try "scl enable devtoolset-9 bash" inside your docker or update your gcc >>> version. >>> >>> >>> /Akash S R >>> >>> On Thu, Sep 30, 2021, 18:54 Venumadhav Josyula >>> wrote: >>> >>&g
Re: [vpp-dev] VPP Socket API how to use from the application #socket-api #vpp #sock-api
Hi Ole, My requirement is following i) Want to connect to vpp ii) use that send API messages to VPP iii) I used this example strongswan vac_create vac_t *vac_create(char *name) { private_vac_t *this; INIT(this, .public = { .destroy = _destroy, .send = _vac_send, .send_dump = _vac_send_dump, .register_event = _register_event, }, ... ... ... if (vl_client_api_map("/vpe-api")) { DBG1(DBG_KNL, "vac unable to map"); destroy(this); return NULL; } if (vl_client_connect(name, 0, 32) < 0) { DBG1(DBG_KNL, "vac unable to connect"); vl_client_api_unmap(); destroy(this); return NULL; } } iv) I have a similar requirement, as to use a PUNT socket to receive the data from vpp into our application and do certain processing. In order to use punt sockets, you need to register with VPP using VPP APIs. Could use goVPP but don't know time so want something working for our initial POC. As I am comfortable in C, I want C VPP APIs for the same. v) So the idea is to have an API message Forwarding application. Inside Fastpath POD, receive a socket forward API request to VPP. This API message for POC is coming from some other pod. V) Now if you suggest something to me, that would be great. I am currently clueless. Thanks, Regards, Venu On Thu, 30 Sept 2021 at 21:14, wrote: > Venu, > > Doesn't seem like you are using the higher level C VAPI API nor the > low-level API in vpp-api/client.c. > Are you sure this is what you want? > > O. > > > On 30 Sep 2021, at 16:09, Venumadhav Josyula wrote: > > > > Hi Akash, > > > > Thansks, now after devtoolset, > > > > @Benoit Ganne (bganne) , @Ole Troan > > i am getting following error > > > > [root@8f57181df3a1 vpp_c_api_examples]# gcc vpp_api_client_test3.c -o > vpp_api_client_test3.o -lvlibmemoryclient -lsvm -lvppinfra -lvlib > > /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: > /lib/../lib64/libvlib.so: undefined reference to `classify_get_trace_chain' > > /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: > /lib/../lib64/libvlib.so: undefined reference to > `stat_segment_register_gauge' > > /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: > /lib/../lib64/libvlib.so: undefined reference to `os_exit' > > collect2: error: ld returned 1 exit status > > [root@8f57181df3a1 vpp_c_api_examples]# > > > > Let me paste the code again, > > #include > > #include > > #include > > #include > > #include > > > > #define vl_typedefs > > #define vl_endianfun > > #include > > #undef vl_typedefs > > #undef vl_endianfun > > > > int main() > > { > >char *name = "vpp-test-app"; > > > >clib_mem_init_thread_safe (0, 64ULL << 20); > > > >if (vl_client_api_map("/vpe-api")) > >{ > > printf("unable to map\n"); > > goto quit; > >} > >if (vl_client_connect("vpp-test-app", 0, 32) < 0) > >{ > > printf("unable to connect \n"); > > vl_client_api_unmap(); > > goto quit; > >} > >printf("successfully connected... \n"); > > quit: > > return 0; > > } > > > > Is this wrong way, i am trying to use APIs ? > > > > Thanks, > > Regards > > Venu > > > > On Thu, 30 Sept 2021 at 19:00, Akash S R > wrote: > > Hey Venu, > > > > Try "scl enable devtoolset-9 bash" inside your docker or update your gcc > version. > > > > > > /Akash S R > > > > On Thu, Sep 30, 2021, 18:54 Venumadhav Josyula > wrote: > > Hi Benoit, > > > > Thanks for quick reply. > > > > I have docker with following > > [root@8f57181df3a1 vpp_c_api_examples]# rpm -qa | grep vpp > > vpp-lib-21.06.0-4~g0d9d3a0.x86_64 > > vpp-api-lua-21.06.0-4~g0d9d3a0.x86_64 > > vpp-api-python3-21.06.0-4~g0d9d3a0.x86_64 > > vpp-debuginfo-21.06.0-4~g0d9d3a0.x86_64 > > vpp-selinux-policy-21.06.0-4~g0d9d3a0.x86_64 > > vpp-21.06.0-4~g0d9d3a0.x86_64 > > vpp-plugins-21.06.0-4~g0d9d3a0.x86_64 > > vpp-devel-21.06.0-4~g0d9d3a0.x86_64 > > > > This will vpp running in it. > > > > [root@8f57181df3a1 /]# cat /etc/redhat-release > > CentOS Linux release 7.3.1611 (Core) > > [root@8f57181df3a1 /]# > > > > > Eg. use devtoolset-9 (gcc-9). > > >
Re: [vpp-dev] VPP Socket API how to use from the application #socket-api #vpp #sock-api
nnect: Assertion `clib_mem_get_heap ()' failed. Program received signal SIGABRT, Aborted. 0x77827387 in raise () from /lib64/libc.so.6 (gdb) bt #0 0x77827387 in raise () from /lib64/libc.so.6 #1 0x77828a78 in abort () from /lib64/libc.so.6 #2 0x778201a6 in __assert_fail_base () from /lib64/libc.so.6 #3 0x77820252 in __assert_fail () from /lib64/libc.so.6 #4 0x77f57bcd in vac_connect (name=0x402010 "vac_client", chroot_prefix=0x0, cb=0x4011d2 , rx_qlen=32) at /usr/src/debug/vpp-21.06.0/src/vpp-api/client/client.c:314 #5 0x00401227 in test_connect () #6 0x00401687 in main () (gdb) Startup.conf [root@8f57181df3a1 vpp_c_api_examples]# cat /etc/vpp/startup.conf unix { #nodaemon #interactive log /var/log/vpp/vpp.log cli-listen /run/vpp/cli.sock gid vpp #exec /etc/ipsec-setup.txt } cpu { main-core 2 } dpdk { dev default { num-rx-desc 512 num-tx-desc 512 } socket-mem 1024 dev :00:04.0 uio-driver uio_pci_generic } logging { default-log-level debug default-syslog-log-level info } [root@8f57181df3a1 vpp_c_api_examples]# I Is there some setting i need to do in the startup.conf ? Please suggest a way to fix this assert. Thanks, Regards Venu On Thu, 30 Sept 2021 at 21:08, Benoit Ganne (bganne) wrote: > You should remove -lvlib it is not needed here. > If you really want to link with vlib, you must fix the link ordering: vlib > depends upon vppinfra (where os_exit is defined) so you'd need link as > -lvlib -lvppinfra instead of the opposite (the C linker scan libraries > symbols in reverse order, so symbols declared in a library are available to > libraries listed *before*). > > Best > ben > > > -Original Message- > > From: vpp-dev@lists.fd.io On Behalf Of Venumadhav > > Josyula > > Sent: jeudi 30 septembre 2021 16:09 > > To: Akash S R > > Cc: Benoit Ganne (bganne) ; Ole Troan > > ; RaviKiran Veldanda ; vpp- > > dev > > Subject: Re: [vpp-dev] VPP Socket API how to use from the application > > #socket-api #vpp #sock-api > > > > Hi Akash, > > > > Thansks, now after devtoolset, > > > > > > @Benoit Ganne (bganne) <mailto:bga...@cisco.com> , @Ole Troan > > <mailto:otr...@employees.org> > > > > i am getting following error > > > > [root@8f57181df3a1 vpp_c_api_examples]# gcc vpp_api_client_test3.c -o > > vpp_api_client_test3.o -lvlibmemoryclient -lsvm -lvppinfra -lvlib > > /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: > > /lib/../lib64/libvlib.so: undefined reference to > > `classify_get_trace_chain' > > /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: > > /lib/../lib64/libvlib.so: undefined reference to > > `stat_segment_register_gauge' > > /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: > > /lib/../lib64/libvlib.so: undefined reference to `os_exit' > > collect2: error: ld returned 1 exit status > > [root@8f57181df3a1 vpp_c_api_examples]# > > > > Let me paste the code again, > > #include > > #include > > #include > > #include > > #include > > > > #define vl_typedefs > > #define vl_endianfun > > #include > > #undef vl_typedefs > > #undef vl_endianfun > > > > int main() > > { > >char *name = "vpp-test-app"; > > > >clib_mem_init_thread_safe (0, 64ULL << 20); > > > >if (vl_client_api_map("/vpe-api")) > >{ > > printf("unable to map\n"); > > goto quit; > >} > >if (vl_client_connect("vpp-test-app", 0, 32) < 0) > >{ > > printf("unable to connect \n"); > > vl_client_api_unmap(); > > goto quit; > >} > >printf("successfully connected... \n"); > > quit: > > return 0; > > } > > > > Is this wrong way, i am trying to use APIs ? > > > > Thanks, > > Regards > > Venu > > > > > > On Thu, 30 Sept 2021 at 19:00, Akash S R > <mailto:akashsr.akas...@gmail.com> > wrote: > > > > > > Hey Venu, > > > > Try "scl enable devtoolset-9 bash" inside your docker or update > your > > gcc version. > > > > > > /Akash S R > > > > On Thu, Sep 30, 2021, 18:54 Venumadhav Josyula > <mailto:vjosy...@gmail.com> > wrote: > > > > > > Hi Benoit, > > > > Thanks for quick reply. > > >
Re: [vpp-dev] VPP Socket API how to use from the application #socket-api #vpp #sock-api
Thanks, my mistake, it worked... On Fri, 1 Oct 2021 at 13:34, Stanislav Zaikin wrote: > You need to uncomment clib_mem_init > > On Fri, 1 Oct 2021 at 10:01, Venumadhav Josyula > wrote: > >> Hi Ole, >> >> So instead of the code below, I tried the code from >> "src/vpp-api/client/test.c". I directly copied this into my .c file. And >> following commands i used >> >> compilation + linking : - gcc vpp_api_client_vac_layer.c -o >> vpp_api_client_vac_layer.o -lpthread -lvlibmemoryclient -lvppinfra >> -lvppapiclient -I/usr/include/ >> code is below >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> >> #include >> #include >> >> #define vl_typedefs /* define message structures */ >> #include >> #undef vl_typedefs >> >> >> volatile int sigterm_received = 0; >> volatile u32 result_ready; >> volatile u16 result_msg_id; >> >> /* M_NOALLOC: construct, but don't yet send a message */ >> >> #define M_NOALLOC(T,t) \ >> do { \ >> result_ready = 0; \ >> clib_memset (mp, 0, sizeof (*mp)); \ >> mp->_vl_msg_id = ntohs (VL_API_##T);\ >> mp->client_index = am->my_client_index; \ >> } while(0); >> >> void >> wrap_vac_callback (unsigned char *data, int len) >> { >> result_ready = 1; >> result_msg_id = ntohs(*((u16 *)data)); >> } >> >> static void >> test_connect () >> { >> static int i; >> int rv = vac_connect("vac_client", NULL, wrap_vac_callback, 32 /* >> rx queue-length*/); >> if (rv != 0) { >> printf("Connect failed: %d\n", rv); >> exit(rv); >> } >> printf("."); >> vac_disconnect(); >> i++; >> } >> >> static void test_messages (void) >> { >> api_main_t * am = vlibapi_get_main(); >> vl_api_show_version_t message; >> vl_api_show_version_t *mp; >> int async = 1; >> >> int rv = vac_connect("vac_client", NULL, wrap_vac_callback, 32 /* >> rx queue-length*/); >> if (rv != 0) { >> printf("Connect failed: %d\n", rv); >> exit(rv); >> } >> >> double timestamp_start = unix_time_now_nsec() * 1e-6; >> >> /* >> * Test vpe_api_write and vpe_api_read to send and recv message >> for an >> * API >> */ >> int i; >> long int no_msgs = 1; >> mp = &message; >> >> for (i = 0; i < no_msgs; i++) { >> /* Construct the API message */ >> M_NOALLOC(SHOW_VERSION, show_version); >> vac_write((char *)mp, sizeof(*mp)); >> #ifndef __COVERITY__ >> /* As given, async is always 1. Shut up Coverity about it >> */ >> if (!async) >> while (result_ready == 0); >> #endif >> } >> if (async) { >> vl_api_control_ping_t control; >> vl_api_control_ping_t *mp; >> mp = &control; >> M_NOALLOC(CONTROL_PING, control_ping); >> vac_write((char *)mp, sizeof(*mp)); >> >> while (result_msg_id != VL_API_CONTROL_PING_REPLY); >> } >> >> double timestamp_end = unix_time_now_nsec() * 1e-6; >> printf("\nTook %.2f msec, %.0f msgs/msec \n", (timestamp_end - >> timestamp_start), >> no_msgs/(timestamp_end - timestamp_start)); >> printf("Exiting...\n"); >> vac_disconnect(); >> } >> >> >> int main (int argc, char ** argv) >> { >> #if 0 >> clib_mem_init (0, 3ULL << 30); >> test_stats(); >> #endif >> >> int i; >> >> for (i = 0; i < 1000; i++) { >> test_connect(); >> } >> >> test_messages(); >> exit (0); >> } >> >> It compiled successfully, i got following assert for
Re: [vpp-dev] VPP Socket API how to use from the application #socket-api #vpp #sock-api
ge id VL_API_PUNT_SOCKET_REGISTER %d",VL_API_CONTROL_PING_REPLY); if (async) { vl_api_control_ping_t control; vl_api_control_ping_t *mp; mp = &control; M_NOALLOC(CONTROL_PING, control_ping); printf(" writing control ping message...: \n"); vac_write((char *)mp, sizeof(*mp)); while (result_msg_id != VL_API_CONTROL_PING_REPLY); } double timestamp_end = unix_time_now_nsec() * 1e-6; printf("\nTook %.2f msec, %.0f msgs/msec \n", (timestamp_end - timestamp_start), 1/(timestamp_end - timestamp_start)); printf("Exiting...\n"); vac_disconnect(); } int main (int argc, char ** argv) { clib_mem_init (0, 3ULL << 30); #if 0 test_stats(); #endif int i; /* for (i = 0; i < 10; i++) { test_connect(); } */ /*test_messages();*/ test_punt_socket_register_message(); exit (0); } *Compilation Options used* gcc vpp_api_client_vac_layer.c -o vpp_api_client_vac_layer.o -lpthread -lvlibmemoryclient -lvppinfra -lvppapiclient -I/usr/include/ *Output* [root@8f57181df3a1 vpp_c_api_examples]# ./vpp_api_client_vac_layer.o Connected to vpp...: 0 message id VL_API_PUNT_SOCKET_REGISTER 538 message id VL_API_PUNT_SOCKET_REGISTER 539 writing punt socket register...: It is stuck, can you please suggest how to debug this ? Thanks, Regards, Venu On Fri, 1 Oct 2021 at 14:12, Venumadhav Josyula via lists.fd.io wrote: > Thanks, my mistake, it worked... > > On Fri, 1 Oct 2021 at 13:34, Stanislav Zaikin wrote: > >> You need to uncomment clib_mem_init >> >> On Fri, 1 Oct 2021 at 10:01, Venumadhav Josyula >> wrote: >> >>> Hi Ole, >>> >>> So instead of the code below, I tried the code from >>> "src/vpp-api/client/test.c". I directly copied this into my .c file. And >>> following commands i used >>> >>> compilation + linking : - gcc vpp_api_client_vac_layer.c -o >>> vpp_api_client_vac_layer.o -lpthread -lvlibmemoryclient -lvppinfra >>> -lvppapiclient -I/usr/include/ >>> code is below >>> #include >>> #include >>> #include >>> #include >>> #include >>> #include >>> #include >>> #include >>> #include >>> >>> #include >>> #include >>> >>> #define vl_typedefs /* define message structures */ >>> #include >>> #undef vl_typedefs >>> >>> >>> volatile int sigterm_received = 0; >>> volatile u32 result_ready; >>> volatile u16 result_msg_id; >>> >>> /* M_NOALLOC: construct, but don't yet send a message */ >>> >>> #define M_NOALLOC(T,t) \ >>> do { \ >>> result_ready = 0; \ >>> clib_memset (mp, 0, sizeof (*mp)); \ >>> mp->_vl_msg_id = ntohs (VL_API_##T);\ >>> mp->client_index = am->my_client_index; \ >>> } while(0); >>> >>> void >>> wrap_vac_callback (unsigned char *data, int len) >>> { >>> result_ready = 1; >>> result_msg_id = ntohs(*((u16 *)data)); >>> } >>> >>> static void >>> test_connect () >>> { >>> static int i; >>> int rv = vac_connect("vac_client", NULL, wrap_vac_callback, 32 >>> /* rx queue-length*/); >>> if (rv != 0) { >>> printf("Connect failed: %d\n", rv); >>> exit(rv); >>> } >>> printf("."); >>> vac_disconnect(); >>> i++; >>> } >>> >>> static void test_messages (void) >>> { >>> api_main_t * am = vlibapi_get_main(); >>> vl_api_show_version_t message; >>> vl_api_show_version_t *mp; >>> int async = 1; >>> >>> int rv = vac_connect("vac_client", NULL, wrap_vac_callback, 32 >>> /* rx queue-length*/); >>> if (rv != 0) { >>> printf("Connect failed: %d\n", rv); >>> exit(rv); >>> } >>> >>> double timestamp_start = unix_time_now_nsec() * 1e-6; >>> >>> /* >>>
Re: [vpp-dev] VPP Socket API how to use from the application #socket-api #vpp #sock-api
ge id VL_API_PUNT_SOCKET_REGISTER %d",VL_API_CONTROL_PING_REPLY); if (async) { vl_api_control_ping_t control; vl_api_control_ping_t *mp; mp = &control; M_NOALLOC(CONTROL_PING, control_ping); printf(" writing control ping message...: \n"); vac_write((char *)mp, sizeof(*mp)); while (result_msg_id != VL_API_CONTROL_PING_REPLY); } double timestamp_end = unix_time_now_nsec() * 1e-6; printf("\nTook %.2f msec, %.0f msgs/msec \n", (timestamp_end - timestamp_start), 1/(timestamp_end - timestamp_start)); printf("Exiting...\n"); vac_disconnect(); } int main (int argc, char ** argv) { clib_mem_init (0, 3ULL << 30); #if 0 test_stats(); #endif int i; /* for (i = 0; i < 10; i++) { test_connect(); } */ /*test_messages();*/ test_punt_socket_register_message(); exit (0); } *Compilation Options used* gcc vpp_api_client_vac_layer.c -o vpp_api_client_vac_layer.o -lpthread -lvlibmemoryclient -lvppinfra -lvppapiclient -I/usr/include/ *Output* [root@8f57181df3a1 vpp_c_api_examples]# ./vpp_api_client_vac_layer.o Connected to vpp...: 0 message id VL_API_PUNT_SOCKET_REGISTER 538 message id VL_API_PUNT_SOCKET_REGISTER 539 writing punt socket register...: *Startup conf * [root@8f57181df3a1 vpp_c_api_examples]# cat /etc/vpp/startup.conf unix { #nodaemon #interactive log /var/log/vpp/vpp.log cli-listen /run/vpp/cli.sock gid vpp #exec /etc/ipsec-setup.txt } cpu { main-core 2 } dpdk { dev default { num-rx-desc 512 num-tx-desc 512 } socket-mem 1024 dev :00:04.0 uio-driver uio_pci_generic } logging { default-log-level debug default-syslog-log-level info } socksvr { socket-name /run/vpp-api.sock} punt { socket /run/vpp-punt.sock } It is stuck, can you please suggest how to debug this ? Thanks, Regards, Venu On Fri, 8 Oct 2021 at 13:10, Venumadhav Josyula via lists.fd.io wrote: > Hi All, > > I am not getting reply for punt socket register for the following code > > > *C-Code* > volatile int sigterm_received = 0; > volatile u32 result_ready; > volatile u16 result_msg_id; > > /* M_NOALLOC: construct, but don't yet send a message */ > > #define M_NOALLOC(T,t) \ > do { \ > result_ready = 0; \ > clib_memset (mp, 0, sizeof (*mp)); \ > mp->_vl_msg_id = ntohs (VL_API_##T);\ > mp->client_index = am->my_client_index; \ > } while(0); > > void > wrap_vac_callback (unsigned char *data, int len) > { > result_ready = 1; > result_msg_id = ntohs(*((u16 *)data)); > vl_api_punt_socket_register_reply_t *rmp = > (vl_api_punt_socket_register_reply_t *)data; > printf(" vpp punt socket path \n", rmp->pathname); > printf("message id : %d\n", result_msg_id); > } > > static void > test_connect () > { > static int i; > int rv = vac_connect("vac_client", NULL, wrap_vac_callback, 32 /* > rx queue-length*/); > if (rv != 0) { > printf("Connect failed: %d\n", rv); > exit(rv); > } > printf("."); > vac_disconnect(); > i++; > } > > > static void test_messages (void) > { > api_main_t * am = vlibapi_get_main(); > vl_api_show_version_t message; > vl_api_show_version_t *mp; > int async = 1; > > int rv = vac_connect("vac_client", NULL, wrap_vac_callback, 32 /* > rx queue-length*/); > if (rv != 0) { > printf("Connect failed: %d\n", rv); > exit(rv); > } > > > printf("Connected to vpp...: %d\n", rv); > double timestamp_start = unix_time_now_nsec() * 1e-6; > > > > /* > * Test vpe_api_write and vpe_api_read to send and recv message > for an > * API > */ > int i; > long int no_msgs = 10; > mp = &message; > > for (i = 0; i < no_msgs; i++) { > /* Construct the API message */ > M_NOALLOC(SHOW_VERSION, show_version); > printf(" writing show version message: \n"); > vac_write((char *)mp, sizeof(*mp)); > #ifndef __COVERITY__ > /* As given, async is always 1. Shut up Coverity about it > */ > if (!async