Re: [vpp-dev] about iOAM configuration

2018-07-04 Thread Shwetha bhandari via Lists.Fd.Io
Hi Hadi,
Good to know!
Classification is needed for encap and decap not for transit processing.
Transit processes the options if present. Transit nodes only need node-id and 
application data if trace option includes it.
Thanks,
Shwetha

From: HADI SHAIKHZAKER 
Date: Thursday, July 5, 2018 at 7:57 AM
To: Shwetha bhandari , "vpp-dev@lists.fd.io" 

Cc: 井上 勝晴 
Subject: RE: [vpp-dev] about iOAM configuration

Just updating.
Configuration in the LXC setup works fine.
Now all the three nodes (encap, transit and decap) works fine.
[0] ttl 0x3e node id 0x3 ts 0x1b0364ae
[1] ttl 0x3f node id 0x2 ts 0x1b0c2f8d
[2] ttl 0x40 node id 0x1 ts 0x1b04e395
Thank you so much again Shewtha.

Regards,
Hadi

From: HADI SHAIKHZAKER
Sent: Thursday, July 05, 2018 10:01 AM
To: 'Shwetha Bhandari (shwethab)' ; vpp-dev@lists.fd.io
Cc: 井上 勝晴 
Subject: RE: [vpp-dev] about iOAM configuration

Thanks Shewtha!

I am going to check the lxc setup.
https://github.com/CiscoDevNet/iOAM/tree/master/scripts/vpp_sandbox/example/simple-ip6

By the way in 17.04 there is no classification configuration for transit VPP.
So how that transit VPP understand which packet to rewrite and which not to.
I have tried 17.04 configuration in 18.04 VPP, but seems like as there is no 
classification part,
“show errors ” counter in transit vpp doesn’t count up and also “show trace” 
doesn’t shows the IP6_HOP_BY_HOP part.

Regards,
Hadi

From: Shwetha Bhandari (shwethab) [mailto:shwet...@cisco.com]
Sent: Thursday, July 05, 2018 9:48 AM
To: HADI SHAIKHZAKER mailto:h-za...@netone.co.jp>>; 
vpp-dev@lists.fd.io
Cc: 井上 勝晴 mailto:i-masah...@netone.co.jp>>
Subject: Re: [vpp-dev] about iOAM configuration

Hi Hadi,


> set ioam rewrite trace-type 0x1f trace-elts 4 trace-tsp 1 node-id 0x1 
> app-data 0x1234
To setup the node id and app-data that is needed on transit and decap you need 
a trace profile configs:
Example: set ioam-trace profile trace-type 0x9 trace-elts 3 trace-tsp 2 node-id 
0x2

I see that 17.04 had the working configs – this is not correct in 18.04 and 
latest docs. I will fix the documentation in the latest.

Till then follow https://docs.fd.io/vpp/17.04/ioam_ipv6_doc.html.

Can you please try this:
https://github.com/CiscoDevNet/iOAM/tree/master/scripts/vpp_sandbox/example/simple-ip6
The scripts bring up lxc setup with 3 VPPs for encap, transit, decap along with 
the necessary configs.

Thanks,
Shwetha
From: mailto:vpp-dev@lists.fd.io>> on behalf of HADI 
SHAIKHZAKER mailto:h-za...@netone.co.jp>>
Date: Tuesday, July 3, 2018 at 1:21 PM
To: "vpp-dev@lists.fd.io" 
mailto:vpp-dev@lists.fd.io>>
Cc: 井上 勝晴 mailto:i-masah...@netone.co.jp>>
Subject: [vpp-dev] about iOAM configuration


Hi vpp-dev team,



I am trying to check the iOAM feature of VPP.

Do you have any working config sample for this?



I have checked the following url's and the configuration mentioned, was 
sometimes rejected by the CLI or had no effect.

[URL1] https://docs.fd.io/vpp/18.04/ioam_plugin_doc.html

[URL2] https://docs.fd.io/vpp/17.04/ioam_ipv6_doc.html



I have 3 VPPs

2102:1100::100-->[Encap VPP]>[Transit VPP]>[Decap VPP]-->2102:3100::100

 ^this is the src host 
^this one is the dst host



I have the following configuration for Encap Vpp

[Encap Vpp] *Want to add iOAM info to all the traffic towards 2102:3100::100

classify table miss-next ip6-node ip6-lookup mask l3 ip6 dst

classify session acl-hit-next ip6-node ip6-add-hop-by-hop table-index 0 match 
l3 ip6 dst 2102:3100::100

set int input acl intfc GigabitEthernet1b/0/0 ip6-table 0

set ioam-trace profile trace-type 0x1f trace-elts 4 trace-tsp 1 node-id 0x1 
app-data 0x1234

set ioam rewrite trace



Seems like it does encap the info I wanted

==

Trace results

[Encap Vpp]

  IP6_HOP_BY_HOP: next index 12 len 72 traced 72  Trace Type 0x1f , 3 elts left

[0] ttl 0x0 node id 0x0 ingress 0x0 egress 0x0 ts 0x0

app 0x0

[1] ttl 0x0 node id 0x0 ingress 0x0 egress 0x0 ts 0x0

app 0x0

[2] ttl 0x0 node id 0x0 ingress 0x0 egress 0x0 ts 0x0

app 0x0

[3] ttl 0x40 node id 0x1 ingress 0x3 egress 0x1 ts 0x5efba500  < I 
think this one is working fine

app 0x1234



The problem I am facing is, configuration for VPP 18.04 as mentioned in the URL

"set ioam rewrite trace-type 0x1f trace-elts 4 trace-tsp 1 node-id 0x1 app-data 
0x1234"

Is being rejected by the cli, so I have changed it as mentioned above.

vpp# set ioam rewrite trace-type 0x1f trace-elts 4 trace-tsp 1 node-id 0x1 
app-data 0x1234

unknown input `-type 0x1f trace-elts 4 trace-...'

There are some other problems also, like “node” is also rejected by cli, so I 
used ip6-node and this one works

vpp# classify table miss-next node ip6-lookup mask l3 ip6 dst

classify table: Mask required

vpp# classify table miss-next ip6-node ip6-lookup mask l3 ip6 dst

vpp#



And url also showing that this 

Re: [vpp-dev] about iOAM configuration

2018-07-04 Thread Shwetha bhandari via Lists.Fd.Io
Hi Hadi,


> set ioam rewrite trace-type 0x1f trace-elts 4 trace-tsp 1 node-id 0x1 
> app-data 0x1234
To setup the node id and app-data that is needed on transit and decap you need 
a trace profile configs:
Example: set ioam-trace profile trace-type 0x9 trace-elts 3 trace-tsp 2 node-id 
0x2

I see that 17.04 had the working configs – this is not correct in 18.04 and 
latest docs. I will fix the documentation in the latest.

Till then follow https://docs.fd.io/vpp/17.04/ioam_ipv6_doc.html.

Can you please try this:
https://github.com/CiscoDevNet/iOAM/tree/master/scripts/vpp_sandbox/example/simple-ip6
The scripts bring up lxc setup with 3 VPPs for encap, transit, decap along with 
the necessary configs.

Thanks,
Shwetha
From:  on behalf of HADI SHAIKHZAKER 
Date: Tuesday, July 3, 2018 at 1:21 PM
To: "vpp-dev@lists.fd.io" 
Cc: 井上 勝晴 
Subject: [vpp-dev] about iOAM configuration


Hi vpp-dev team,



I am trying to check the iOAM feature of VPP.

Do you have any working config sample for this?



I have checked the following url's and the configuration mentioned, was 
sometimes rejected by the CLI or had no effect.

[URL1] https://docs.fd.io/vpp/18.04/ioam_plugin_doc.html

[URL2] https://docs.fd.io/vpp/17.04/ioam_ipv6_doc.html



I have 3 VPPs

2102:1100::100-->[Encap VPP]>[Transit VPP]>[Decap VPP]-->2102:3100::100

 ^this is the src host 
^this one is the dst host



I have the following configuration for Encap Vpp

[Encap Vpp] *Want to add iOAM info to all the traffic towards 2102:3100::100

classify table miss-next ip6-node ip6-lookup mask l3 ip6 dst

classify session acl-hit-next ip6-node ip6-add-hop-by-hop table-index 0 match 
l3 ip6 dst 2102:3100::100

set int input acl intfc GigabitEthernet1b/0/0 ip6-table 0

set ioam-trace profile trace-type 0x1f trace-elts 4 trace-tsp 1 node-id 0x1 
app-data 0x1234

set ioam rewrite trace



Seems like it does encap the info I wanted

==

Trace results

[Encap Vpp]

  IP6_HOP_BY_HOP: next index 12 len 72 traced 72  Trace Type 0x1f , 3 elts left

[0] ttl 0x0 node id 0x0 ingress 0x0 egress 0x0 ts 0x0

app 0x0

[1] ttl 0x0 node id 0x0 ingress 0x0 egress 0x0 ts 0x0

app 0x0

[2] ttl 0x0 node id 0x0 ingress 0x0 egress 0x0 ts 0x0

app 0x0

[3] ttl 0x40 node id 0x1 ingress 0x3 egress 0x1 ts 0x5efba500  < I 
think this one is working fine

app 0x1234



The problem I am facing is, configuration for VPP 18.04 as mentioned in the URL

"set ioam rewrite trace-type 0x1f trace-elts 4 trace-tsp 1 node-id 0x1 app-data 
0x1234"

Is being rejected by the cli, so I have changed it as mentioned above.

vpp# set ioam rewrite trace-type 0x1f trace-elts 4 trace-tsp 1 node-id 0x1 
app-data 0x1234

unknown input `-type 0x1f trace-elts 4 trace-...'

There are some other problems also, like “node” is also rejected by cli, so I 
used ip6-node and this one works

vpp# classify table miss-next node ip6-lookup mask l3 ip6 dst

classify table: Mask required

vpp# classify table miss-next ip6-node ip6-lookup mask l3 ip6 dst

vpp#



And url also showing that this config is required for transit and decap VPP 
also.

So do any one have any working configuration for iOAM?



Regards,

Hadi
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

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


Re: [EXTERNAL] [vpp-dev] Using Ncurses library in VPP CLI

2018-07-04 Thread Chris Luke
Correction, it seems the modern ncurses, built with wide character support, 
does support multiple sessions. It’s poorly documented and would still be 
difficult to integrate properly. I stand by the position that fancy rendering 
belongs in an API-driven application.

Chris.

From: vpp-dev@lists.fd.io  On Behalf Of Chris Luke
Sent: Wednesday, July 4, 2018 9:07
To: david.leitch@gmail.com; vpp-dev@lists.fd.io
Subject: Re: [EXTERNAL] [vpp-dev] Using Ncurses library in VPP CLI

David,

Ncurses will never work for socket connections since it makes assumptions about 
having a tty device and only uses stdin/stdout. It also does not allow more 
than one ncurses instance at the same time; all its state is global, so it will 
never work for multiple CLI sessions.

The CLI code does track if the session is ANSI capable so you can emit your own 
sequences. If you have fancy things in mind, you’re probably generally better 
off writing an independent application that makes use of the API. (which is 
what I did for the – as yet unreleased – vpptop utility)

One key issue with the snippet below, if you built it in to a VPP CLI command, 
is it will block the main thread indefinitely waiting for that keypress. There 
are ways around that, but not the stdin/stdout/tty/session issue.

Chris

From: vpp-dev@lists.fd.io 
mailto:vpp-dev@lists.fd.io>> On Behalf Of 
david.leitch@gmail.com
Sent: Wednesday, July 4, 2018 4:00
To: vpp-dev@lists.fd.io
Subject: [EXTERNAL] [vpp-dev] Using Ncurses library in VPP CLI

Hi,
Is it possible to use Ncurses library function on VPP CLI Command to have nice 
view,
i used  a basic sample but does not work, compile with -lncurses and use this 
commands :

  initscr(); /* Start curses mode  */
 printw("Hello World !!!"); /* Print Hello World  */
 refresh(); /* Print it on to the real screen */
 getch();   /* Wait for user input*/
 endwin();  /* End curses mode*/


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

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


Re: [EXTERNAL] [vpp-dev] Using Ncurses library in VPP CLI

2018-07-04 Thread Chris Luke
David,

Ncurses will never work for socket connections since it makes assumptions about 
having a tty device and only uses stdin/stdout. It also does not allow more 
than one ncurses instance at the same time; all its state is global, so it will 
never work for multiple CLI sessions.

The CLI code does track if the session is ANSI capable so you can emit your own 
sequences. If you have fancy things in mind, you’re probably generally better 
off writing an independent application that makes use of the API. (which is 
what I did for the – as yet unreleased – vpptop utility)

One key issue with the snippet below, if you built it in to a VPP CLI command, 
is it will block the main thread indefinitely waiting for that keypress. There 
are ways around that, but not the stdin/stdout/tty/session issue.

Chris

From: vpp-dev@lists.fd.io  On Behalf Of 
david.leitch@gmail.com
Sent: Wednesday, July 4, 2018 4:00
To: vpp-dev@lists.fd.io
Subject: [EXTERNAL] [vpp-dev] Using Ncurses library in VPP CLI

Hi,
Is it possible to use Ncurses library function on VPP CLI Command to have nice 
view,
i used  a basic sample but does not work, compile with -lncurses and use this 
commands :

  initscr(); /* Start curses mode  */
 printw("Hello World !!!"); /* Print Hello World  */
 refresh(); /* Print it on to the real screen */
 getch();   /* Wait for user input*/
 endwin();  /* End curses mode*/


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

View/Reply Online (#9778): https://lists.fd.io/g/vpp-dev/message/9778
Mute This Topic: https://lists.fd.io/mt/23038782/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] VPP C++ API

2018-07-04 Thread Klement Sekera via Lists.Fd.Io
Hi,

this should fix your issue

https://gerrit.fd.io/r/#/c/13349/

Thanks,
Klement

On Mon, 2018-07-02 at 13:57 +0300, Alexander Gryanko wrote:
> Stack trace for thread 2:
> 
> Thread 2 "main" received signal SIGABRT, Aborted.
> [Switching to Thread 0x7fffedbff700 (LWP 814141)]
> 0x7529c428 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  0x7529c428 in __GI_raise (sig=sig@entry=6) at
> ../sysdeps/unix/sysv/linux/raise.c:54
> #1  0x7529e02a in __GI_abort () at abort.c:89
> #2  0x75294bd7 in __assert_fail_base (fmt=,
> assertion=assertion@entry=0x75bcb5f5 "id <=
> __vapi_metadata.count",
> file=file@entry=0x75bcb530
> "/place/home/xpahos/git/vpp/build-data/../src/vpp-api/vapi/vapi.c",
> line=line@entry=696, function=function@entry=0x75bcb6f0
> <__PRETTY_FUNCTION__.39669> "vapi_msg_is_with_context") at
> assert.c:92
> #3  0x75294c82 in __GI___assert_fail
> (assertion=assertion@entry=0x75bcb5f5
> "id <= __vapi_metadata.count", file=file@entry=0x75bcb530
> "/place/home/xpahos/git/vpp/build-data/../src/vpp-api/vapi/vapi.c",
> line=line@entry=696, function=function@entry=0x75bcb6f0
> <__PRETTY_FUNCTION__.39669> "vapi_msg_is_with_context") at
> assert.c:101
> #4  0x75bcac0b in vapi_msg_is_with_context (id=id@entry=32001
> 71710)
> at /place/home/xpahos/git/vpp/build-data/../src/vpp-
> api/vapi/vapi.c:696
> #5  0x7646f2a0 in vapi::Connection::dispatch (time=5,
> limit=0x0,
> this=0x61109500) at
> /place/home/xpahos/git/vpp/build-root/install-vpp-
> native/vpp/include/vapi/vapi.hpp:270
> #6  VOM::HW::cmd_q::rx_run (this=0x61007d40) at
> /place/home/xpahos/git/vpp/build-data/../extras/vom/vom/hw.cpp:45
> #7  0x758ffc80 in ?? () from
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> #8  0x750516ba in start_thread (arg=0x7fffedbff700) at
> pthread_create.c:333
> #9  0x7536e41d in clone () at
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
> 
> Values:
> 
> Thread 2 "main" hit Breakpoint 1, vapi_msg_is_with_context (id=id@ent
> ry=130)
> at /place/home/xpahos/git/vpp/build-data/../src/vpp-
> api/vapi/vapi.c:696
> 696   assert (id <= __vapi_metadata.count);
> (gdb) print id
> $1 = 130
> (gdb) c
> Continuing.
> Mon Jul  2 13:52:37 2018 [debug]rpc_cmd.hpp:120 operator()() itf-
> events 0
> Started
> 
> Thread 2 "main" hit Breakpoint 1, vapi_msg_is_with_context
> (id=id@entry=3200171710)
> at /place/home/xpahos/git/vpp/build-data/../src/vpp-
> api/vapi/vapi.c:696
> 696   assert (id <= __vapi_metadata.count);
> (gdb) print id
> $2 = 3200171710
> 
> Shared memory message:
> 
> (gdb) print shm_data_size
> $3 = 10
> (gdb) print shm_data
> $4 = (void *) 0x30045a74
> (gdb) x/10h 0x30045a74
> 0x30045a74: 5376 0 0 0 0 0 0 0
> 0x30045a84: 0 0
> 
> On Mon, 2 Jul 2018 at 10:40, Klement Sekera 
> wrote:
> 
> > 
> > Hi,
> > 
> > can you please run in gdb (or open core) and pass us a stack trace?
> > 
> > Thanks,
> > Klement
> > 
> > On Sun, 2018-07-01 at 19:36 -0700, xpa...@gmail.com wrote:
> > > 
> > > Hello,
> > > I'm trying to understand how works VOM wrapper for C++ API.
> > > VOM manager header: https://pastebin.com/BgG7td5s
> > > VOM manager cpp: https://pastebin.com/890jjUJm
> > > main.cpp:
> > > 
> > > int main() {
> > > TVppManager manager;
> > > std::cout << "Starting\n";
> > > manager.Start();
> > > 
> > > sleep(60);
> > > 
> > > manager.Stop();
> > > }
> > > 
> > > When I'm trying to run sudo ./main a I got error:
> > > Starting
> > > Calling connect
> > > Manager is connected
> > > Mon Jul  2 05:33:55 2018 [debug]hw.cpp:129 write() itf-events
> > > Mon Jul  2 05:33:55 2018 [debug]rpc_cmd.hpp:120 operator()() itf-
> > > events 0
> > > Started
> > > main: /place/home/xpahos/git/vpp/build-data/../src/vpp-
> > > api/vapi/vapi.c:696: vapi_msg_is_with_context: Assertion `id <=
> > > __vapi_metadata.count' failed.
> > > Aborted
> > > 
> > > I found that id looks like unsigned value overflow. How can I
> > > debug
> > > this? I don't see anything in trace dump.
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > > Links: You receive all messages sent to this group.
> > > 
> > > View/Reply Online (#9753): https://lists.fd.io/g/vpp-dev/message/
> > > 9753
> > > Mute This Topic: https://lists.fd.io/mt/22999158/675704
> > > Group Owner: vpp-dev+ow...@lists.fd.io
> > > Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [ksekera@cisco.
> > > com]
> > > -=-=-=-=-=-=-=-=-=-=-=-
> 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

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


[vpp-dev] Using Ncurses library in VPP CLI

2018-07-04 Thread david . leitch . vpp
Hi,
Is it possible to use Ncurses library function on VPP CLI Command to have nice 
view,
i used  a basic sample but does not work, compile with -lncurses and use this 
commands :
 
 initscr();                     /* Start curses mode              */ 
 printw("Hello World !!!");     /* Print Hello World              */
 refresh();                     /* Print it on to the real screen */
 getch();                       /* Wait for user input            */
 endwin();                      /* End curses mode                */
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

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