Hi VPP team,

I was working with the macswap example.
I made some changes, so that it no longer swaps source and destination Mac 
address.
It just sends out data about the ethernet packet type to another process over 
message queue.

This worked.

Now, I attempted to send the buffer to ethernet-input instead of 
interface-output. So that the packet could be processed as any normal ethernet 
packet.

But, when this is attempted, the program hits an assert and crashes.

/root/newvpp/vpp/src/vnet/fib/ip4_fib.h:115 (ip4_fib_get) assertion `! 
pool_is_free (ip4_main.v4_fibs, _e)' fails

Program received signal SIGABRT, Aborted.
0x00007ffff549e337 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:55
/usr/src/debug/glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/raise.c:55:1845:beg:0x7ffff549e337


Backtrace looks like this:
#0  0x00007ffff549e337 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:55
#1  0x00007ffff549fa28 in __GI_abort () at abort.c:90
#2  0x000000000040858e in os_panic () at 
/root/newvpp/vpp/src/vpp/vnet/main.c:371
#3  0x00007ffff623f8c9 in debugger () at 
/root/newvpp/vpp/src/vppinfra/error.c:84
#4  0x00007ffff623fcb4 in _clib_error (how_to_die=2, function_name=0x0, 
line_number=0,
    fmt=0x7ffff7a0b058 "%s:%d (%s) assertion `%s' fails") at 
/root/newvpp/vpp/src/vppinfra/error.c:143
#5  0x00007ffff6cb570a in ip4_fib_get (index=4) at 
/root/newvpp/vpp/src/vnet/fib/ip4_fib.h:115
#6  0x00007ffff6cb6b2c in ip4_lookup_inline (vm=0x7ffff7f8ca00 
<vlib_global_main>, node=0x7fffb4d403c0, frame=0x7fffb5d5acc0)
    at /root/newvpp/vpp/src/vnet/ip/ip4_forward.h:362
#7  0x00007ffff6cb71d8 in ip4_lookup_node_fn_hsw (vm=0x7ffff7f8ca00 
<vlib_global_main>, node=0x7fffb4d403c0, frame=0x7fffb5d5acc0)
    at /root/newvpp/vpp/src/vnet/ip/ip4_forward.c:98
#8  0x00007ffff7ee293d in dispatch_node (vm=0x7ffff7f8ca00 <vlib_global_main>, 
node=0x7fffb4d403c0, type=VLIB_NODE_TYPE_INTERNAL,
    dispatch_state=VLIB_NODE_STATE_POLLING, frame=0x7fffb5d5acc0, 
last_time_stamp=3816542098527306)
    at /root/newvpp/vpp/src/vlib/main.c:1235
#9  0x00007ffff7ee30f8 in dispatch_pending_node (vm=0x7ffff7f8ca00 
<vlib_global_main>, pending_frame_index=3,
    last_time_stamp=3816542098527306) at /root/newvpp/vpp/src/vlib/main.c:1403
#10 0x00007ffff7ee4f6b in vlib_main_or_worker_loop (vm=0x7ffff7f8ca00 
<vlib_global_main>, is_main=1)
    at /root/newvpp/vpp/src/vlib/main.c:1880
#11 0x00007ffff7ee59b2 in vlib_main_loop (vm=0x7ffff7f8ca00 <vlib_global_main>) 
at /root/newvpp/vpp/src/vlib/main.c:2008
#12 0x00007ffff7ee676c in vlib_main (vm=0x7ffff7f8ca00 <vlib_global_main>, 
input=0x7fffb4d2ffb0)
    at /root/newvpp/vpp/src/vlib/main.c:2254
#13 0x00007ffff7f4f778 in thread0 (arg=140737353665024) at 
/root/newvpp/vpp/src/vlib/unix/main.c:660
#14 0x00007ffff625e694 in clib_calljmp () at 
/root/newvpp/vpp/src/vppinfra/longjmp.S:123
#15 0x00007fffffffce60 in ?? ()
#16 0x00007ffff7f4fd19 in vlib_unix_main (argc=3, argv=0x7fffffffe328) at 
/root/newvpp/vpp/src/vlib/unix/main.c:733
#17 0x0000000000407eed in main (argc=3, argv=0x7fffffffe328) at 
/root/newvpp/vpp/src/vpp/vnet/main.c:296


The code changes I made are as follows:


  /* edit / add dispositions here */
  .next_nodes = {
    [SAMPLE_NEXT_INTERFACE_OUTPUT] = "interface-output",
    [SAMPLE_NEXT_ETHERNET_INPUT] = "ethernet-input",
  },

typedef enum
{
  SAMPLE_NEXT_INTERFACE_OUTPUT,
  SAMPLE_NEXT_ETHERNET_INPUT,
  SAMPLE_N_NEXT,
} sample_next_t;

And

          //u32 next0 = SAMPLE_NEXT_INTERFACE_OUTPUT;
          u32 next0 = SAMPLE_NEXT_ETHERNET_INPUT;


I am likely missing some step somewhere.
Can someone share which step I may have missed in choosing the next graph node?

Regards,
Surajit
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#16942): https://lists.fd.io/g/vpp-dev/message/16942
Mute This Topic: https://lists.fd.io/mt/75474270/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to