Re: [vpp-dev] how to use span api in c code?

2021-07-07 Thread hemant via lists.fd.io
Unfortunately, I am in C code of the VPP plugin and all I have for span src
and dst is names of the interfaces, "TenGigabitEthernet3/0/0",
"TenGigabitEthernet3/0/1".  Is there an unformat trick to convert the name
to sw_if_index - I see unformat_vnet_sw_interface but I don't have access to
any unformat_input_t*.  Am using C API for the first time.

 

Hemant

 

From: v...@barachs.net  
Sent: Wednesday, July 07, 2021 6:29 PM
To: hem...@mnkcg.com; vpp-dev@lists.fd.io
Subject: RE: [vpp-dev] how to use span api in c code?

 

That doc URL is from 17.04. 

 

See span_add_delete_entry() in span.[ch].

 

HTH... Dave 

 

From: vpp-dev@lists.fd.io   mailto:vpp-dev@lists.fd.io> > On Behalf Of hemant via lists.fd.io
Sent: Wednesday, July 7, 2021 5:40 PM
To: vpp-dev@lists.fd.io  
Subject: [vpp-dev] how to use span api in c code?

 

I see

 

https://docs.fd.io/vpp/17.04/span_doc.html

 

The link about says this is the api: : sw_interface_span_enable_disable

 

I call the API in C code as: 

sw_interface_span_enable_disable ("TenGigabitEthernet3/0/0",
"TenGigabitEthernet3/0/1", 3, true);

 

When I compile the code I get this error:

 

error: implicit declaration of function 'sw_interface_span_enable_disable'
is invalid in C99 [-Werror,-Wimplicit-function-declaration]

 

What header file do I need to include? Span.h doesn't include this api.

 

Hemant

 

 



smime.p7s
Description: S/MIME cryptographic signature

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19717): https://lists.fd.io/g/vpp-dev/message/19717
Mute This Topic: https://lists.fd.io/mt/84055396/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] how to use span api in c code?

2021-07-07 Thread hemant via lists.fd.io
Got it, Dave, thanks!

 

Hemant

 

From: vpp-dev@lists.fd.io  On Behalf Of Dave Barach
Sent: Wednesday, July 07, 2021 6:29 PM
To: hem...@mnkcg.com; vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] how to use span api in c code?

 

That doc URL is from 17.04. 

 

See span_add_delete_entry() in span.[ch].

 

HTH... Dave 

 

From: vpp-dev@lists.fd.io   mailto:vpp-dev@lists.fd.io> > On Behalf Of hemant via lists.fd.io
Sent: Wednesday, July 7, 2021 5:40 PM
To: vpp-dev@lists.fd.io  
Subject: [vpp-dev] how to use span api in c code?

 

I see

 

https://docs.fd.io/vpp/17.04/span_doc.html

 

The link about says this is the api: : sw_interface_span_enable_disable

 

I call the API in C code as: 

sw_interface_span_enable_disable ("TenGigabitEthernet3/0/0",
"TenGigabitEthernet3/0/1", 3, true);

 

When I compile the code I get this error:

 

error: implicit declaration of function 'sw_interface_span_enable_disable'
is invalid in C99 [-Werror,-Wimplicit-function-declaration]

 

What header file do I need to include? Span.h doesn't include this api.

 

Hemant

 

 



smime.p7s
Description: S/MIME cryptographic signature

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19716): https://lists.fd.io/g/vpp-dev/message/19716
Mute This Topic: https://lists.fd.io/mt/84055396/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] how to use span api in c code?

2021-07-07 Thread Dave Barach
That doc URL is from 17.04. 

 

See span_add_delete_entry() in span.[ch].

 

HTH... Dave 

 

From: vpp-dev@lists.fd.io  On Behalf Of hemant via
lists.fd.io
Sent: Wednesday, July 7, 2021 5:40 PM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] how to use span api in c code?

 

I see

 

https://docs.fd.io/vpp/17.04/span_doc.html

 

The link about says this is the api: : sw_interface_span_enable_disable

 

I call the API in C code as: 

sw_interface_span_enable_disable ("TenGigabitEthernet3/0/0",
"TenGigabitEthernet3/0/1", 3, true);

 

When I compile the code I get this error:

 

error: implicit declaration of function 'sw_interface_span_enable_disable'
is invalid in C99 [-Werror,-Wimplicit-function-declaration]

 

What header file do I need to include? Span.h doesn't include this api.

 

Hemant

 

 


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



[vpp-dev] how to use span api in c code?

2021-07-07 Thread hemant via lists.fd.io
I see

 

https://docs.fd.io/vpp/17.04/span_doc.html

 

The link about says this is the api: : sw_interface_span_enable_disable

 

I call the API in C code as: 

sw_interface_span_enable_disable ("TenGigabitEthernet3/0/0",
"TenGigabitEthernet3/0/1", 3, true);

 

When I compile the code I get this error:

 

error: implicit declaration of function 'sw_interface_span_enable_disable'
is invalid in C99 [-Werror,-Wimplicit-function-declaration]

 

What header file do I need to include? Span.h doesn't include this api.

 

Hemant

 

 



smime.p7s
Description: S/MIME cryptographic signature

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



[vpp-dev] Connecting to /run/vpp/api.sock

2021-07-07 Thread Faisal Ahmed
Hey Devs,

I'm still new to VPP, I've played around with the CLI following tutorials,
Need some help in understand the api socket,
I've connected to the API socket using netcat
sudo nc -U /run/vpp/api.sock

However none of my inputs get a response, Do i need to send in bincode or
is there a manual I can follow, It would be great if I could understand one
api message being sent from here and i can figure it out the rest

Thank you,
Faisal Ahmed Farooq
[image: image.png]

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19713): https://lists.fd.io/g/vpp-dev/message/19713
Mute This Topic: https://lists.fd.io/mt/84049931/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] VRRP issue when using interface in a table

2021-07-07 Thread Mechthild Buescher via lists.fd.io
Hi Matt,

Thanks for the patch. I can confirm that the patch solves the vrrp issue and 
from what we see until now, it doesn’t break other traffic handled by that 
interface. So everything is fine 

Fyi: We applied the patch on VPP 21.06.1

Thank you very much for your help!

BR/Mechthild

From: Matthew Smith 
Sent: Friday, 2 July 2021 23:01
To: Mechthild Buescher 
Cc: Neale Ranns ; vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] VRRP issue when using interface in a table


Hi Mechthild,

Here is a patch you can try - 
https://gerrit.fd.io/r/c/vpp/+/32999.

Let me know if it works for you. I don't have an i40e readily available to test 
it on and my local build is still using DPDK 21.01 while the current gerrit 
master branch uses DPDK 21.05 by default. So I could not test it against the 
current gerrit master branch. The exact same patch works against DPDK 21.01 and 
the function it modifies was not changed between 21.01 and 21.05 so I expect it 
ought to work, but. YMMV.

I'll set the review score to -2 until I receive confirmation from you that it 
is working.

-Matt


On Fri, Jul 2, 2021 at 11:48 AM Mechthild Buescher 
mailto:mechthild.buesc...@ericsson.com>> wrote:
Hi Matt,

Thanks for your fast reply. Yes, it seems to be the “source pruning” issue on 
X710/XL710.

When both VRs are in the master state, I can’t see any VRRP messages in the 
dpdk-input trace. Furthermore, I tried VRRP with Intel e1000 NICs where it 
behaves correctly: When the interface of the VRRP master goes down, the VRRP 
backup changes to state master and when the VRRP master recovers (ie. Interface 
is up), the peer node changes back to state backup.

It would be nice if you can tell me how to disable source pruning with DPDK PMD.

Thank you,

BR/Mechthild

From: Matthew Smith mailto:mgsm...@netgate.com>>
Sent: Friday, 2 July 2021 16:06
To: Neale Ranns mailto:ne...@graphiant.com>>
Cc: Mechthild Buescher 
mailto:mechthild.buesc...@ericsson.com>>; 
vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] VRRP issue when using interface in a table


There could be an issue with the NIC:

vpp# show hardware-interfaces
  NameIdx   Link  Hardware
Ext-0  1 up   Ext-0
  Link speed: 10 Gbps
  Ethernet address e4:43:4b:ed:59:10
  Intel X710/XL710 Family

With certain versions of firmware, these interfaces have a feature called 
"source pruning" enabled by default. When a MAC address is added on a 
X710/XL710 interface, packets which arrive with that address as their source 
MAC address are filtered by the NIC. Since VRRP uses a virtual MAC address as 
the source address of advertisements sent to peers, source pruning causes 
problems for it. A VRRP VR entering the master state will add the virtual MAC 
address to the NIC and henceforth the NIC will filter any higher priority 
advertisements that a peer might send because they are sourced from the virtual 
MAC address. I reported a bug to DPDK about it which has more details - 
https://bugs.dpdk.org/show_bug.cgi?id=648.

Mechthild, you can check whether this is the issue you're experiencing by 
taking a packet trace on node 1 when both VRs are in the master state. If 
source pruning is causing the problem, you will not see any received 
advertisements from the peer in the trace because they will have been filtered 
by the hardware and never reach VPP. There is no supported way to disable 
source pruning when using the DPDK PMD, but if your packet trace indicates that 
this appears to be the issue I can give you a patch to try which should disable 
it. If not, please send the output from the packet trace anyway so I can try to 
diagnose what else might be going on.

Thanks,
-Matt



On Fri, Jul 2, 2021 at 4:04 AM Neale Ranns 
mailto:ne...@graphiant.com>> wrote:

Hi Mechthild,

Core VRRP issues I can’t help with, I no next to nothing about VRRP. I’ll hand 
over to those who do.

/neale


From: vpp-dev@lists.fd.io 
mailto:vpp-dev@lists.fd.io>> on behalf of Mechthild 
Buescher via 
lists.fd.io
 mailto:ericsson@lists.fd.io>>
Date: Thursday, 1 July 2021 at 22:55
To: vpp-dev@lists.fd.io 
mailto:vpp-dev@lists.fd.io>>
Subject: Re: [vpp-dev] VRRP issue when using interface in a table
Hi Neale,

I did some deeper investigations on the vrrp issue. What I observed is as 
follows:

On one node1 the VRRP config is:
set interface state Ext-0 

[vpp-dev] having problem pinging gtpu_tunnel0 interface, says Failed: no source address for egress interface

2021-07-07 Thread Venumadhav Josyula
 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]
-=-=-=-=-=-=-=-=-=-=-=-