Re: [vpp-dev] question about the VCL

2018-05-15 Thread Florin Coras
Xyxue,

VCL hasn’t yet been updated to work in dgram mode. Try the builtin udp echo 
client/server or tests/vnet/session/udp_echo. Note however that you can’t 
expect udp to deliver all the bytes from one end to the other because of packet 
drops so try half-duplex testing. For some examples see [1].

Florin

[1] https://wiki.fd.io/view/VPP/HostStack/EchoClientServer 


> On May 14, 2018, at 11:59 PM, xyxue  wrote:
> 
> 
> Hi Florin, Ed,
> 
> I'm testing VCL , and the IPPROTO_RAW is a test case .Since it is not 
> supported ,I'm testing the UDP mode:
> 
> server:./vcl_test_server -D 2
> client:./vcl_test_client -D 2.1.1.1 2 
> 
> An assert occure when client startup. More info is shown below:
> DBGvpp# 0: /home/vpp/build-data/../src/vnet/session/session_node.c:214 
> (session_tx_fill_buffer) assertion `n_bytes_read > 0' fails
> 
> Thread 1 "vpp_main" received signal SIGABRT, Aborted.
> 0x75c39428 in __GI_raise (sig=sig@entry=6) at 
> ../sysdeps/unix/sysv/linux/raise.c:54
> 54../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
> (gdb) bt
> #0  0x75c39428 in __GI_raise (sig=sig@entry=6) at 
> ../sysdeps/unix/sysv/linux/raise.c:54
> #1  0x75c3b02a in __GI_abort () at abort.c:89
> #2  0x004074de in os_panic () at 
> /home/vpp/build-data/../src/vpp/vnet/main.c:310
> #3  0x764202be in debugger () at 
> /home/vpp/build-data/../src/vppinfra/error.c:84
> #4  0x764206f6 in _clib_error (how_to_die=2, function_name=0x0, 
> line_number=0, fmt=0x774e8b18 "%s:%d (%s) assertion `%s' fails")
> at /home/vpp/build-data/../src/vppinfra/error.c:143
> #5  0x771d2d48 in session_tx_fill_buffer (vm=0x77b8a980 
> , ctx=0x7fffb61e1100, b=0x7ffe87338a80, 
> n_bufs=0x7fffb6aaf996, 
> peek_data=0 '\000') at 
> /home/vpp/build-data/../src/vnet/session/session_node.c:214
> #6  0x771d3e34 in session_tx_fifo_read_and_snd_i (vm=0x77b8a980 
> , node=0x7fffb6bb2900, e=0x7fffb63b1dd0, 
> s=0x7fffb6149c80, n_tx_packets=0x7fffb6aafb4c, peek_data=0 '\000') at 
> /home/vpp/build-data/../src/vnet/session/session_node.c:449
> #7  0x771d4847 in session_tx_fifo_dequeue_and_snd (vm=0x77b8a980 
> , node=0x7fffb6bb2900, e0=0x7fffb63b1dd0, 
> s0=0x7fffb6149c80, n_tx_pkts=0x7fffb6aafb4c) at 
> /home/vpp/build-data/../src/vnet/session/session_node.c:536
> #8  0x771d567c in session_queue_node_fn (vm=0x77b8a980 
> , node=0x7fffb6bb2900, frame=0x0)
> at /home/vpp/build-data/../src/vnet/session/session_node.c:789
> #9  0x778de072 in dispatch_node (vm=0x77b8a980 
> , node=0x7fffb6bb2900, type=VLIB_NODE_TYPE_INPUT, 
> dispatch_state=VLIB_NODE_STATE_POLLING, frame=0x0, 
> last_time_stamp=2385171693806) at /home/vpp/build-data/../src/vlib/main.c:988
> #10 0x778dff5f in vlib_main_or_worker_loop (vm=0x77b8a980 
> , is_main=1) at /home/vpp/build-data/../src/vlib/main.c:1505
> #11 0x778e0a12 in vlib_main_loop (vm=0x77b8a980 
> ) at /home/vpp/build-data/../src/vlib/main.c:1633
> #12 0x778e1438 in vlib_main (vm=0x77b8a980 , 
> input=0x7fffb6aaffb0) at /home/vpp/build-data/../src/vlib/main.c:1787
> #13 0x7794e264 in thread0 (arg=140737349462400) at 
> /home/vpp/build-data/../src/vlib/unix/main.c:568
> #14 0x76445090 in clib_calljmp () at 
> /home/vpp/build-data/../src/vppinfra/longjmp.S:110
> #15 0x7fffd1c0 in ?? ()
> #16 0x7794e6e5 in vlib_unix_main (argc=3, argv=0x7fffe418) at 
> /home/vpp/build-data/../src/vlib/unix/main.c:632
> #17 0x00406f22 in main (argc=3, argv=0x7fffe418) at 
> /home/vpp/build-data/../src/vpp/vnet/main.c:249
> (gdb) 
> 
> Is there anything I can do to fix it?
> 
> Thanks,
> Xyxue
> 
> 



Re: [vpp-dev] question about the VCL

2018-05-15 Thread xyxue

Hi Florin, Ed,

I'm testing VCL , and the IPPROTO_RAW is a test case .Since it is not supported 
,I'm testing the UDP mode:

server:./vcl_test_server -D 2
client:./vcl_test_client -D 2.1.1.1 2 

An assert occure when client startup. More info is shown below:
DBGvpp# 0: /home/vpp/build-data/../src/vnet/session/session_node.c:214 
(session_tx_fill_buffer) assertion `n_bytes_read > 0' fails

Thread 1 "vpp_main" received signal SIGABRT, Aborted.
0x75c39428 in __GI_raise (sig=sig@entry=6) at 
../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x75c39428 in __GI_raise (sig=sig@entry=6) at 
../sysdeps/unix/sysv/linux/raise.c:54
#1  0x75c3b02a in __GI_abort () at abort.c:89
#2  0x004074de in os_panic () at 
/home/vpp/build-data/../src/vpp/vnet/main.c:310
#3  0x764202be in debugger () at 
/home/vpp/build-data/../src/vppinfra/error.c:84
#4  0x764206f6 in _clib_error (how_to_die=2, function_name=0x0, 
line_number=0, fmt=0x774e8b18 "%s:%d (%s) assertion `%s' fails")
at /home/vpp/build-data/../src/vppinfra/error.c:143
#5  0x771d2d48 in session_tx_fill_buffer (vm=0x77b8a980 
, ctx=0x7fffb61e1100, b=0x7ffe87338a80, 
n_bufs=0x7fffb6aaf996, 
peek_data=0 '\000') at 
/home/vpp/build-data/../src/vnet/session/session_node.c:214
#6  0x771d3e34 in session_tx_fifo_read_and_snd_i (vm=0x77b8a980 
, node=0x7fffb6bb2900, e=0x7fffb63b1dd0, 
s=0x7fffb6149c80, n_tx_packets=0x7fffb6aafb4c, peek_data=0 '\000') at 
/home/vpp/build-data/../src/vnet/session/session_node.c:449
#7  0x771d4847 in session_tx_fifo_dequeue_and_snd (vm=0x77b8a980 
, node=0x7fffb6bb2900, e0=0x7fffb63b1dd0, 
s0=0x7fffb6149c80, n_tx_pkts=0x7fffb6aafb4c) at 
/home/vpp/build-data/../src/vnet/session/session_node.c:536
#8  0x771d567c in session_queue_node_fn (vm=0x77b8a980 
, node=0x7fffb6bb2900, frame=0x0)
at /home/vpp/build-data/../src/vnet/session/session_node.c:789
#9  0x778de072 in dispatch_node (vm=0x77b8a980 , 
node=0x7fffb6bb2900, type=VLIB_NODE_TYPE_INPUT, 
dispatch_state=VLIB_NODE_STATE_POLLING, frame=0x0, 
last_time_stamp=2385171693806) at /home/vpp/build-data/../src/vlib/main.c:988
#10 0x778dff5f in vlib_main_or_worker_loop (vm=0x77b8a980 
, is_main=1) at /home/vpp/build-data/../src/vlib/main.c:1505
#11 0x778e0a12 in vlib_main_loop (vm=0x77b8a980 ) 
at /home/vpp/build-data/../src/vlib/main.c:1633
#12 0x778e1438 in vlib_main (vm=0x77b8a980 , 
input=0x7fffb6aaffb0) at /home/vpp/build-data/../src/vlib/main.c:1787
#13 0x7794e264 in thread0 (arg=140737349462400) at 
/home/vpp/build-data/../src/vlib/unix/main.c:568
#14 0x76445090 in clib_calljmp () at 
/home/vpp/build-data/../src/vppinfra/longjmp.S:110
#15 0x7fffd1c0 in ?? ()
#16 0x7794e6e5 in vlib_unix_main (argc=3, argv=0x7fffe418) at 
/home/vpp/build-data/../src/vlib/unix/main.c:632
#17 0x00406f22 in main (argc=3, argv=0x7fffe418) at 
/home/vpp/build-data/../src/vpp/vnet/main.c:249
(gdb) 

Is there anything I can do to fix it?

Thanks,
Xyxue




Re: [vpp-dev] question about the VCL

2018-05-14 Thread Edward Warnicke
Xyxue,

If you want to move raw IP/Ethernet around, I'd suggest looking at memif :)

Ed

On Mon, May 14, 2018 at 3:44 AM Florin Coras  wrote:

> Hi Xyxue,
>
> No, the stack does not support IPPROTO_RAW. Given that this is a user
> space stack and that you have access to things like memif, may I ask what
> use case you would need that for?
>
> Florin
>
>
> On May 14, 2018, at 12:58 AM, xyxue  wrote:
>
>
> Hi guys,
>
> Is the VCL support RAW_IP now ? Or is there a plan to support it?
>
> Thanks,
> Xyxue
>
>
> 
>


Re: [vpp-dev] question about the VCL

2018-05-14 Thread Florin Coras
Hi Xyxue, 

No, the stack does not support IPPROTO_RAW. Given that this is a user space 
stack and that you have access to things like memif, may I ask what use case 
you would need that for?

Florin

> On May 14, 2018, at 12:58 AM, xyxue  wrote:
> 
> 
> Hi guys,
> 
> Is the VCL support RAW_IP now ? Or is there a plan to support it? 
> 
> Thanks,
> Xyxue
> 



[vpp-dev] question about the VCL

2018-05-14 Thread xyxue

Hi guys,

Is the VCL support RAW_IP now ? Or is there a plan to support it? 

Thanks,
Xyxue