Re: [vpp-dev] how to allocate new buffer correctly

2021-01-18 Thread Stanislav Zaikin
Hi Matthew, Many thanks for opening my eyes. Now everything is perfectly clear for me. On Mon, 18 Jan 2021 at 18:10, Matthew Smith wrote: > > Hi Stanislav, > > As you noted, vlib_buffer_validate_alloc_free() is the only place that > would change the "known state" of a buffer. All of the calls t

Re: [vpp-dev] how to allocate new buffer correctly

2021-01-18 Thread Matthew Smith via lists.fd.io
Hi Stanislav, As you noted, vlib_buffer_validate_alloc_free() is the only place that would change the "known state" of a buffer. All of the calls to that function are in vlib/buffer_funcs.h in inline functions in conditional blocks with a condition like 'if (CLIB_DEBUG > 0)'. One of those calls is

Re: [vpp-dev] how to allocate new buffer correctly

2021-01-18 Thread Benoit Ganne (bganne) via lists.fd.io
nvier 2021 12:50 > To: vpp-dev > Subject: Re: [vpp-dev] how to allocate new buffer correctly > > I've dug more into this issue. And I noticed strange thing: > 187 { > (gdb) next > 188 tap_inject_main_t * im = tap_inject_get_main (); > (gd

Re: [vpp-dev] how to allocate new buffer correctly

2021-01-16 Thread Stanislav Zaikin
I've dug more into this issue. And I noticed strange thing: 187 { (gdb) next 188 tap_inject_main_t * im = tap_inject_get_main (); (gdb) 190 u32 bi = ~0; (gdb) 194 sw_if_index = tap_inject_lookup_sw_if_index_from_tap_fd (fd); (gdb) 195 if (sw_if_index == ~0) (gdb) 199

Re: [vpp-dev] how to allocate new buffer correctly

2021-01-16 Thread Stanislav Zaikin
Hello Damjan, Thanks for the response. Nothing special happens, I just want to send this packet to another interface. Interface TX is just a regular VPP node (TX for tapv2/virtio). This packet went to error-node because the interface was down. But if I set interface up, everything looks just the s

Re: [vpp-dev] how to allocate new buffer correctly

2021-01-15 Thread Damjan Marion via lists.fd.io
This looks right (except the wrong assumption that vlib_get_frame_to_node will give you empty frame). What happens between this code and error-drop node? Is interface TX also your custom code? — Damjan > On 15.01.2021., at 17:03, Stanislav Zaikin wrote: > > Hello, > > I'm trying to rein