Re: [vpp-dev] VXLAN overlay routing

2022-02-08 Thread David Gohberg
I've managed to setup VXLAN forwarding using the BVI approach, and have a question regarding the overlay VRF. when I create a vxlan tunnel using: create vxlan tunnel src 11.11.11.3 dst 100.0.0.2 vni 50 encap-vrf-id 1 decap-next l2 encap-vrf-id 1 is the underlay VRF. From what I can see, after p

Re: [vpp-dev] VXLAN overlay routing

2022-02-06 Thread David Gohberg
Hi, I'm not interested in bridging so I tried creating the tunnels in L3 mode and perform routing between VNI 50 and VNI 70 using 2 linux namespaces : > > create loopback interface > set interface mac address loop0 02:10:18:34:9f:cd > set interface ip address loop0  11.11.11.3/24 > set int l2 br

[vpp-dev] VXLAN overlay routing

2022-02-04 Thread David Gohberg
Hello, All of the VXLAN use cases I've found make VPP act as a VXLAN endpoint, example: https://wiki.fd.io/view/VPP/Using_VPP_as_a_VXLAN_Tunnel_Terminator The packet is either going through vxlan encap or decap. What I want is to have a packet flow that: 1. performs vxlan decap -> routing on th

Re: [vpp-dev] searching for all routes that point to an attached next-hop neighbor #routing

2021-12-29 Thread David Gohberg
Hi Neale, I have a custom plugin in which I want to extract this information and I much prefer this approach. Do you have any references on how to walk the FIB graph or existing features that perform similar tasks? -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View

Re: [vpp-dev] searching for all routes that point to an attached next-hop neighbor #routing

2021-12-23 Thread David Gohberg
posting again because not sure message went through: Thanks for the quick reply Stanislav, I'm inserting hooks into the VPP control plane in order to offload certain information to an external hardware dataplane. In the case of route resolutions, I want to be able to say : "Ok, I got the arp re

[vpp-dev] searching for all routes that point to an attached next-hop neighbor #routing

2021-12-23 Thread David Gohberg
Hello, >From reading the routing data model: https://fdio-vpp.readthedocs.io/en/latest/gettingstarted/developers/fib20/routes.html#id2 I understand that when I add a static route (using the "ip route add" command) to an attached next hop, VPP will resolve that route, which is triggered (in my cas

Re: [vpp-dev] vlib_buffer_clone behavior when trying to send to two interfaces

2021-04-14 Thread David Gohberg
using DPDK with Mellanox MT27800 [ConnectX-5] (100G) show buffers indeed shows a leak: Pool Name            Index NUMA  Size  Data Size  Total  Avail  Cached   Used default-numa-0         0     0   2496     2048   430185 430185     0       0 default-numa-1         1     1   2496     2048   430185 

Re: [vpp-dev] vlib_buffer_clone behavior when trying to send to two interfaces

2021-04-14 Thread David Gohberg
When testing Damjan's version under traffic (using trex with a few thousand pps) after about 5 minutes into the test vlib_buffer_clone fails to create 2 copies and vpp crashes due to double-free error. looks like the buffer pool leaks. 1. Is it the node function responsibility to vlib_buffer_free

Re: [vpp-dev] vlib_buffer_clone behavior when trying to send to two interfaces

2021-04-12 Thread David Gohberg
Hemant, in my case, VPP acts as a bump in the wire, not as an interface to an application, so my metadata about the original packet is limited. Damjan, the hack with reacquiring the pointer after the clone is working as expected. I found an example using the L2 flag approach in src/vnet/interfa

Re: [vpp-dev] vlib_buffer_clone behavior when trying to send to two interfaces

2021-04-12 Thread David Gohberg
Damjan, After looking at the vlib_buffer_clone_256 function I realize that it modifies the original buffer pointer, like you said. my packets are coming in down a custom node path (originating from an asic data plane), so they will always have the l2 header. The node that performs the cloning is

Re: [vpp-dev] vlib_buffer_clone behavior when trying to send to two interfaces

2021-04-12 Thread David Gohberg
[Edited Message Follows] moving the buffer backwards by 14 looks correct for small packets, but for 1500 byte packets I get `truncated-ip - 14 bytes missing` error from tcpdump. After the clone I'm restoring the original offset: vlib_buffer_advance (b0, -14); u16 n_cloned = vlib_buffer_clone (vm

Re: [vpp-dev] vlib_buffer_clone behavior when trying to send to two interfaces

2021-04-12 Thread David Gohberg
moving the buffer backwards by 14 looks correct for small packets, but for 1500 byte packets I get `truncated-ip - 14 bytes missing` error from tcpdump -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19176): https://lists.fd.io/g/vpp-dev/message/191

Re: [vpp-dev] vlib_buffer_clone behavior when trying to send to two interfaces

2021-04-12 Thread David Gohberg
Hemant, I think you meant a negative 14, since the buffer points to the start of the IP header, and we need to go backwards the size of the Ethernet header. Is there a programmatic way to set the buffer to point to the start of the data, without knowing the packet structure? offset calculations

Re: [vpp-dev] vlib_buffer_clone behavior when trying to send to two interfaces

2021-04-11 Thread David Gohberg
Damjan's version works :) However, according to tcpdump the packet going to the host interface contains only IP information, even though I'm cloning bi0 buffer which also contains the Ethernet header. How do I make it send the entire raw packet to the host interface? -=-=-=-=-=-=-=-=-=-=-=- Links

Re: [vpp-dev] vlib_buffer_clone behavior when trying to send to two interfaces

2021-04-08 Thread David Gohberg
Damjan, I'll test your version later today and report Hemant, Correct me if I'm wrong, but span mirroring mirrors all the traffic between physical interfaces. My use case is mirroring some of the traffic coming to a node (according to some business logic) to a host interface. -=-=-=-=-=-=-=-=

Re: [vpp-dev] vlib_buffer_clone behavior when trying to send to two interfaces

2021-04-08 Thread David Gohberg
> why do you need to open host_if_frame for each packet If you refer to the fact that I can just create one frame outside the loop, you are correct :). I tried to get the code to the simplest working example that will correctly mirror the packets so I started to "dumb down" things :) I'm aware t

Re: [vpp-dev] vlib_buffer_clone behavior when trying to send to two interfaces

2021-04-08 Thread David Gohberg
; > Executing `to_frame = vlib_get_frame_to_node (vm, node_index);` > n_left_from times and `vlib_put_frame_to_node (vm, node_index, to_frame);` > only once doesn’t sound sane. You are leaking frames… > > — > Damjan > > > > On 08.04.2021., at 14:12, David Gohberg wrote: > > &

Re: [vpp-dev] vlib_buffer_clone behavior when trying to send to two interfaces

2021-04-08 Thread David Gohberg
On Thu, Apr 8, 2021 at 2:35 PM Damjan Marion wrote: > > Setting frame->n_vectors may help :) > > — > Damjan > > On 08.04.2021., at 13:11, David Gohberg wrote: > > Thanks Damjan, > > This clarifies things regarding the cloning mechanism. However using > n_clon

Re: [vpp-dev] vlib_buffer_clone behavior when trying to send to two interfaces

2021-04-08 Thread David Gohberg
bytes of payload from > original buffer >- set b->next_buffer_index to point to the original buffer > - advance b->current_data for VLIB_BUFFER_CLONE_HEAD_SIZE > - set b->ref_cnt of the original buffer (and all his tails) to be n_clones > > > Hope this explains… > &g

[vpp-dev] vlib_buffer_clone behavior when trying to send to two interfaces

2021-04-08 Thread David Gohberg
Hi, In my node processing function, I want some buffers to be cloned and sent to a specific host interface while also be sent to the "normal" interface resolved in the node. At the end, the node should be able to send the buffers to two different interfaces simultaneously. packet -> node -> inter