Re: [vpp-dev] VPP Node Debug

2017-06-06 Thread otroan
, 2017 at 4:48 PM,  wrote:
> > Alessio,
> >
> > Run in the foreground with unix { interactive }.
> > And directly from a the build directory.
> > The vagrant stuff is mostly useful for demo and first look. Sounds like you 
> > really want to do some development.
> >
> > Cheers,
> > Ole
> >
> > > On 2 Jun 2017, at 13:31, Alessio Silvestro  
> > > wrote:
> > >
> > > I am running the vagrant machine provided, so I run on Ubuntu 16.04.02 
> > > TLS.
> > >
> > > I tried clib_warning(), clib_unix_warning(), clib_error() and 
> > > clib_unix_error().
> > >
> > > I inserted that line in both vvp/src/vnet/ip/punt.c and 
> > > vpp/src/vnet/ip/ip4_forward.c  in order to be sure that the packet was 
> > > actually reaching the node.
> > >
> > > However, there is no sign in /var/log/syslog or anywhere else I can think 
> > > of about that message
> > >
> > > Are you sure there is no other place where they can be printed?
> > >
> > > Thanks for the cooperation,
> > > Alessio
> > >
> > > On Thu, Jun 1, 2017 at 7:26 PM, John Lo (loj)  wrote:
> > > The output of clib_warning() call should be in the syslog. If running vpp 
> > > in Ubuntu, take a look in /var/log/syslog.  -John
> > >
> > >
> > >
> > > From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
> > > Behalf Of Alessio Silvestro
> > > Sent: Thursday, June 01, 2017 12:11 PM
> > > To: Luke, Chris 
> > > Cc: vpp-dev@lists.fd.io
> > > Subject: Re: [vpp-dev] VPP Node Debug
> > >
> > >
> > >
> > > I knew VPP run in user space and that printk is not the best option, 
> > > however from the documentation it is not clear to me how to do that.
> > >
> > >
> > >
> > > For example now I inserted the command clib_warning("I am here!") in the 
> > > node I create -- that from vppctl show trace I can see processes the 
> > > packets.
> > >
> > >
> > >
> > > Where does it prints?
> > >
> > >
> > >
> > > Still I cannot figure it out.
> > >
> > >
> > >
> > > Thanks,
> > >
> > > Alessio
> > >
> > >
> > >
> > > On Thu, Jun 1, 2017 at 6:00 PM, Luke, Chris  
> > > wrote:
> > >
> > > printk() is typically a kernel thing, no? This isn’t kernel code. 😊
> > >
> > >
> > >
> > > If you just want stuff on the console when running in a debugger, or 
> > > interactively, clib_warning() may be what you are looking for.
> > >
> > >
> > >
> > > Chris.
> > >
> > >
> > >
> > >
> > >
> > > From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
> > > Behalf Of Alessio Silvestro
> > > Sent: Thursday, June 1, 2017 10:35
> > > To: vpp-dev@lists.fd.io
> > > Subject: [vpp-dev] VPP Node Debug
> > >
> > >
> > >
> > > Hi all,
> > >
> > >
> > >
> > > I am using this code "https://gerrit.fd.io/r/#/c/6721/"; to in order to 
> > > enable an external process to receive UDP packets.
> > >
> > >
> > >
> > > I tried to use printk -- including module.h in the c file.
> > >
> > >
> > >
> > > When I compile VPP with:
> > >
> > >
> > >
> > > TOPDIR/vpp make build-release
> > >
> > >
> > >
> > > I got the following error
> > >
> > >
> > >
> > > fatal error: linux/module.h: No such file or directory
> > >
> > > compilation terminated.
> > >
> > >
> > >
> > > Do you have any idea why?
> > >
> > >
> > >
> > > Is there a better way to debug the code of a node in VPP?
> > >
> > >
> > >
> > > Thanks,
> > >
> > > Alessio
> > >
> > >
> > >
> > >
> > > ___
> > > vpp-dev mailing list
> > > vpp-dev@lists.fd.io
> > > https://lists.fd.io/mailman/listinfo/vpp-dev
> >
> >
> 
> 



signature.asc
Description: Message signed with OpenPGP
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] VPP Node Debug

2017-06-06 Thread Alessio Silvestro
 > I tried clib_warning(), clib_unix_warning(), clib_error() and
> clib_unix_error().
> > >
> > > I inserted that line in both vvp/src/vnet/ip/punt.c and
> vpp/src/vnet/ip/ip4_forward.c  in order to be sure that the packet was
> actually reaching the node.
> > >
> > > However, there is no sign in /var/log/syslog or anywhere else I can
> think of about that message
> > >
> > > Are you sure there is no other place where they can be printed?
> > >
> > > Thanks for the cooperation,
> > > Alessio
> > >
> > > On Thu, Jun 1, 2017 at 7:26 PM, John Lo (loj)  wrote:
> > > The output of clib_warning() call should be in the syslog. If running
> vpp in Ubuntu, take a look in /var/log/syslog.  -John
> > >
> > >
> > >
> > > From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io]
> On Behalf Of Alessio Silvestro
> > > Sent: Thursday, June 01, 2017 12:11 PM
> > > To: Luke, Chris 
> > > Cc: vpp-dev@lists.fd.io
> > > Subject: Re: [vpp-dev] VPP Node Debug
> > >
> > >
> > >
> > > I knew VPP run in user space and that printk is not the best option,
> however from the documentation it is not clear to me how to do that.
> > >
> > >
> > >
> > > For example now I inserted the command clib_warning("I am here!") in
> the node I create -- that from vppctl show trace I can see processes the
> packets.
> > >
> > >
> > >
> > > Where does it prints?
> > >
> > >
> > >
> > > Still I cannot figure it out.
> > >
> > >
> > >
> > > Thanks,
> > >
> > > Alessio
> > >
> > >
> > >
> > > On Thu, Jun 1, 2017 at 6:00 PM, Luke, Chris 
> wrote:
> > >
> > > printk() is typically a kernel thing, no? This isn’t kernel code. 😊
> > >
> > >
> > >
> > > If you just want stuff on the console when running in a debugger, or
> interactively, clib_warning() may be what you are looking for.
> > >
> > >
> > >
> > > Chris.
> > >
> > >
> > >
> > >
> > >
> > > From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io]
> On Behalf Of Alessio Silvestro
> > > Sent: Thursday, June 1, 2017 10:35
> > > To: vpp-dev@lists.fd.io
> > > Subject: [vpp-dev] VPP Node Debug
> > >
> > >
> > >
> > > Hi all,
> > >
> > >
> > >
> > > I am using this code "https://gerrit.fd.io/r/#/c/6721/"; to in order
> to enable an external process to receive UDP packets.
> > >
> > >
> > >
> > > I tried to use printk -- including module.h in the c file.
> > >
> > >
> > >
> > > When I compile VPP with:
> > >
> > >
> > >
> > > TOPDIR/vpp make build-release
> > >
> > >
> > >
> > > I got the following error
> > >
> > >
> > >
> > > fatal error: linux/module.h: No such file or directory
> > >
> > > compilation terminated.
> > >
> > >
> > >
> > > Do you have any idea why?
> > >
> > >
> > >
> > > Is there a better way to debug the code of a node in VPP?
> > >
> > >
> > >
> > > Thanks,
> > >
> > > Alessio
> > >
> > >
> > >
> > >
> > > ___
> > > vpp-dev mailing list
> > > vpp-dev@lists.fd.io
> > > https://lists.fd.io/mailman/listinfo/vpp-dev
> >
> >
>
>
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] VPP Node Debug

2017-06-06 Thread otroan
Hi Alessio,

If you want to extend what I did (with the punt socket.

You need to also start VPP with:
punt { socket }

Then you should see the print messages you added in on the VPP console / cli.

Best regards,
Ole

> On 5 Jun 2017, at 19:49, Alessio Silvestro  wrote:
> 
> Dear Ole,
> 
> In order to avoid problems with vagrant, I installed VPP on ubuntu server 
> 16.04.
> 
> I start vpp with the command! $ sudo vpp unix interactive.
> 
> After configuring correctly the interface I do $ set punt udp  in order 
> to accept UDP traffic on the port .
> 
> When I send 1 UDP packet I see the following trace:
> 
> "
> 
> vpp# show trace
> 
> --- Start of thread 0 vpp_main ---
> 
> Packet 1
> 
> 00:00:49:978247: dpdk-input
> 
>   GigabitEthernet0/9/0 rx queue 0
> 
>   buffer 0x4db5: current data 14, length 46, free-list 0, clone-count 0, 
> totlen-nifb 0, trace 0x0
> 
>   PKT MBUF: port 0, nb_segs 1, pkt_len 60
> 
> buf_len 2176, data_len 60, ol_flags 0x0, data_off 128, phys_addr 
> 0x8ec36d80
> 
> packet_type 0x0
> 
>   IP4: 08:00:27:42:3e:65 -> 08:00:27:93:9a:be
> 
>   UDP: 172.28.128.6 -> 172.28.128.5
> 
> tos 0x00, ttl 64, length 35, checksum 0x49dc
> 
> fragment id 0x98a9, flags DONT_FRAGMENT
> 
>   UDP: 47743 -> 
> 
> length 15, checksum 0x8a50
> 
> 00:00:49:978287: ip4-input
> 
>   UDP: 172.28.128.6 -> 172.28.128.5
> 
> tos 0x00, ttl 64, length 35, checksum 0x49dc
> 
> fragment id 0x98a9, flags DONT_FRAGMENT
> 
>   UDP: 47743 -> 
> 
> length 15, checksum 0x8a50
> 
> 00:00:49:978292: ip4-lookup
> 
>   fib 0 dpo-idx 6 flow hash: 0x
> 
>   UDP: 172.28.128.6 -> 172.28.128.5
> 
> tos 0x00, ttl 64, length 35, checksum 0x49dc
> 
> fragment id 0x98a9, flags DONT_FRAGMENT
> 
>   UDP: 47743 -> 
> 
> length 15, checksum 0x8a50
> 
> 00:00:49:978297: ip4-local
> 
> UDP: 172.28.128.6 -> 172.28.128.5
> 
>   tos 0x00, ttl 64, length 35, checksum 0x49dc
> 
>   fragment id 0x98a9, flags DONT_FRAGMENT
> 
> UDP: 47743 -> 
> 
>   length 15, checksum 0x8a50
> 
> 00:00:49:978299: ip4-udp-lookup
> 
>   UDP: src-port 47743 dst-port 
> 
> 00:00:49:978302: error-punt
> 
>   ip4-udp-punt: udp port punt
> 
> "
> 
> which to me looks like the UDP traffic has been correctly received.
> 
> My goal is to modify your code, which is at $TOPDIR/vpp/src/vnet/ip/punt.c, 
> in order to start and understand how to deploy new code with VPP.
> 
> I inserted several clib_warning("I am here") in the code. Then I run 
> $TOPDIR/vpp make build-release to compile the new code. However, even if I am 
> pretty sure the your code runs because of the trace above, I cannot see any 
> output in /var/log/syslog as suggested by Chris nor in the console (I run 
> with unix interactive).
> 
> Do you have any idea why I cannot see any message in the log and/or how I can 
> modify/debug your code with some prints and look at them somewhere?
> 
> Thanks for the help.
> 
> Best regards,
> Alessio
> 
> 
> 
> On Fri, Jun 2, 2017 at 4:48 PM,  wrote:
> Alessio,
> 
> Run in the foreground with unix { interactive }.
> And directly from a the build directory.
> The vagrant stuff is mostly useful for demo and first look. Sounds like you 
> really want to do some development.
> 
> Cheers,
> Ole
> 
> > On 2 Jun 2017, at 13:31, Alessio Silvestro  wrote:
> >
> > I am running the vagrant machine provided, so I run on Ubuntu 16.04.02 TLS.
> >
> > I tried clib_warning(), clib_unix_warning(), clib_error() and 
> > clib_unix_error().
> >
> > I inserted that line in both vvp/src/vnet/ip/punt.c and 
> > vpp/src/vnet/ip/ip4_forward.c  in order to be sure that the packet was 
> > actually reaching the node.
> >
> > However, there is no sign in /var/log/syslog or anywhere else I can think 
> > of about that message
> >
> > Are you sure there is no other place where they can be printed?
> >
> > Thanks for the cooperation,
> > Alessio
> >
> > On Thu, Jun 1, 2017 at 7:26 PM, John Lo (loj)  wrote:
> > The output of clib_warning() call should be in the syslog. If running vpp 
> > in Ubuntu, take a look in /var/log/syslog.  -John
> >
> >
> >
> > From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
> > Behalf Of Alessio Silvestro
> > Sent: Thursday, June 01, 2017 12:11 PM
> > To: Luke, Chris 
> > Cc: vpp-dev@lists.fd.io
> > Subject: 

Re: [vpp-dev] VPP Node Debug

2017-06-05 Thread Alessio Silvestro
Dear Ole,

In order to avoid problems with vagrant, I installed VPP on ubuntu server
16.04.

I start vpp with the command! $ sudo vpp unix interactive.

After configuring correctly the interface I do $ set punt udp  in order
to accept UDP traffic on the port .

When I send 1 UDP packet I see the following trace:

"

vpp# show trace

--- Start of thread 0 vpp_main ---

Packet 1

00:00:49:978247: dpdk-input

  GigabitEthernet0/9/0 rx queue 0

  buffer 0x4db5: current data 14, length 46, free-list 0, clone-count 0,
totlen-nifb 0, trace 0x0

  PKT MBUF: port 0, nb_segs 1, pkt_len 60

buf_len 2176, data_len 60, ol_flags 0x0, data_off 128, phys_addr
0x8ec36d80

packet_type 0x0

  IP4: 08:00:27:42:3e:65 -> 08:00:27:93:9a:be

  UDP: 172.28.128.6 -> 172.28.128.5

tos 0x00, ttl 64, length 35, checksum 0x49dc

fragment id 0x98a9, flags DONT_FRAGMENT

  UDP: 47743 -> 

length 15, checksum 0x8a50

00:00:49:978287: ip4-input

  UDP: 172.28.128.6 -> 172.28.128.5

tos 0x00, ttl 64, length 35, checksum 0x49dc

fragment id 0x98a9, flags DONT_FRAGMENT

  UDP: 47743 -> 

length 15, checksum 0x8a50

00:00:49:978292: ip4-lookup

  fib 0 dpo-idx 6 flow hash: 0x

  UDP: 172.28.128.6 -> 172.28.128.5

tos 0x00, ttl 64, length 35, checksum 0x49dc

fragment id 0x98a9, flags DONT_FRAGMENT

  UDP: 47743 -> 

length 15, checksum 0x8a50

00:00:49:978297: ip4-local

UDP: 172.28.128.6 -> 172.28.128.5

  tos 0x00, ttl 64, length 35, checksum 0x49dc

  fragment id 0x98a9, flags DONT_FRAGMENT

UDP: 47743 -> 

  length 15, checksum 0x8a50

00:00:49:978299: ip4-udp-lookup

  UDP: src-port 47743 dst-port 

00:00:49:978302: error-punt

  ip4-udp-punt: udp port punt
"

which to me looks like the UDP traffic has been correctly received.

My goal is to modify your code, which is at $TOPDIR/vpp/src/vnet/ip/punt.c,
in order to start and understand how to deploy new code with VPP.

I inserted several clib_warning("I am here") in the code. Then I run
$TOPDIR/vpp make build-release to compile the new code. However, even if I
am pretty sure the your code runs because of the trace above, I cannot see
any output in /var/log/syslog as suggested by Chris nor in the console (I
run with unix interactive).

Do you have any idea why I cannot see any message in the log and/or how I
can modify/debug your code with some prints and look at them somewhere?

Thanks for the help.

Best regards,
Alessio



On Fri, Jun 2, 2017 at 4:48 PM,  wrote:

> Alessio,
>
> Run in the foreground with unix { interactive }.
> And directly from a the build directory.
> The vagrant stuff is mostly useful for demo and first look. Sounds like
> you really want to do some development.
>
> Cheers,
> Ole
>
> > On 2 Jun 2017, at 13:31, Alessio Silvestro 
> wrote:
> >
> > I am running the vagrant machine provided, so I run on Ubuntu 16.04.02
> TLS.
> >
> > I tried clib_warning(), clib_unix_warning(), clib_error() and
> clib_unix_error().
> >
> > I inserted that line in both vvp/src/vnet/ip/punt.c and
> vpp/src/vnet/ip/ip4_forward.c  in order to be sure that the packet was
> actually reaching the node.
> >
> > However, there is no sign in /var/log/syslog or anywhere else I can
> think of about that message
> >
> > Are you sure there is no other place where they can be printed?
> >
> > Thanks for the cooperation,
> > Alessio
> >
> > On Thu, Jun 1, 2017 at 7:26 PM, John Lo (loj)  wrote:
> > The output of clib_warning() call should be in the syslog. If running
> vpp in Ubuntu, take a look in /var/log/syslog.  -John
> >
> >
> >
> > From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io]
> On Behalf Of Alessio Silvestro
> > Sent: Thursday, June 01, 2017 12:11 PM
> > To: Luke, Chris 
> > Cc: vpp-dev@lists.fd.io
> > Subject: Re: [vpp-dev] VPP Node Debug
> >
> >
> >
> > I knew VPP run in user space and that printk is not the best option,
> however from the documentation it is not clear to me how to do that.
> >
> >
> >
> > For example now I inserted the command clib_warning("I am here!") in the
> node I create -- that from vppctl show trace I can see processes the
> packets.
> >
> >
> >
> > Where does it prints?
> >
> >
> >
> > Still I cannot figure it out.
> >
> >
> >
> > Thanks,
> >
> > Alessio
> >
> >
> >
> > On Thu, Jun 1, 2017 at 6:00 PM, Luke, Chris 
> wrote:
> >
> > printk() is typically a kernel thing, no? This isn’t kernel code. 😊
> >
> >
> >
> > If you just want stuff on the console when ru

Re: [vpp-dev] VPP Node Debug

2017-06-02 Thread otroan
Alessio,

Run in the foreground with unix { interactive }.
And directly from a the build directory.
The vagrant stuff is mostly useful for demo and first look. Sounds like you 
really want to do some development.

Cheers,
Ole

> On 2 Jun 2017, at 13:31, Alessio Silvestro  wrote:
> 
> I am running the vagrant machine provided, so I run on Ubuntu 16.04.02 TLS.
> 
> I tried clib_warning(), clib_unix_warning(), clib_error() and 
> clib_unix_error().
> 
> I inserted that line in both vvp/src/vnet/ip/punt.c and 
> vpp/src/vnet/ip/ip4_forward.c  in order to be sure that the packet was 
> actually reaching the node.
> 
> However, there is no sign in /var/log/syslog or anywhere else I can think of 
> about that message
> 
> Are you sure there is no other place where they can be printed?
> 
> Thanks for the cooperation,
> Alessio
> 
> On Thu, Jun 1, 2017 at 7:26 PM, John Lo (loj)  wrote:
> The output of clib_warning() call should be in the syslog. If running vpp in 
> Ubuntu, take a look in /var/log/syslog.  -John
> 
> 
> 
> From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
> Behalf Of Alessio Silvestro
> Sent: Thursday, June 01, 2017 12:11 PM
> To: Luke, Chris 
> Cc: vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] VPP Node Debug
> 
> 
> 
> I knew VPP run in user space and that printk is not the best option, however 
> from the documentation it is not clear to me how to do that.
> 
> 
> 
> For example now I inserted the command clib_warning("I am here!") in the node 
> I create -- that from vppctl show trace I can see processes the packets.
> 
> 
> 
> Where does it prints?
> 
> 
> 
> Still I cannot figure it out.
> 
> 
> 
> Thanks,
> 
> Alessio
> 
> 
> 
> On Thu, Jun 1, 2017 at 6:00 PM, Luke, Chris  wrote:
> 
> printk() is typically a kernel thing, no? This isn’t kernel code. 😊
> 
> 
> 
> If you just want stuff on the console when running in a debugger, or 
> interactively, clib_warning() may be what you are looking for.
> 
> 
> 
> Chris.
> 
> 
> 
> 
> 
> From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
> Behalf Of Alessio Silvestro
> Sent: Thursday, June 1, 2017 10:35
> To: vpp-dev@lists.fd.io
> Subject: [vpp-dev] VPP Node Debug
> 
> 
> 
> Hi all,
> 
> 
> 
> I am using this code "https://gerrit.fd.io/r/#/c/6721/"; to in order to enable 
> an external process to receive UDP packets.
> 
> 
> 
> I tried to use printk -- including module.h in the c file.
> 
> 
> 
> When I compile VPP with:
> 
> 
> 
> TOPDIR/vpp make build-release
> 
> 
> 
> I got the following error
> 
> 
> 
> fatal error: linux/module.h: No such file or directory
> 
> compilation terminated.
> 
> 
> 
> Do you have any idea why?
> 
> 
> 
> Is there a better way to debug the code of a node in VPP?
> 
> 
> 
> Thanks,
> 
> Alessio
> 
> 
> 
> 
> ___
> vpp-dev mailing list
> vpp-dev@lists.fd.io
> https://lists.fd.io/mailman/listinfo/vpp-dev



signature.asc
Description: Message signed with OpenPGP
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] VPP Node Debug

2017-06-02 Thread Alessio Silvestro
I am running the vagrant machine provided, so I run on Ubuntu 16.04.02 TLS.

I tried clib_warning(), clib_unix_warning(), clib_error() and
clib_unix_error().

I inserted that line in both vvp/src/vnet/ip/punt.c and
vpp/src/vnet/ip/ip4_forward.c  in order to be sure that the packet was
actually reaching the node.

However, there is no sign in /var/log/syslog or anywhere else I can think
of about that message

Are you sure there is no other place where they can be printed?

Thanks for the cooperation,
Alessio

On Thu, Jun 1, 2017 at 7:26 PM, John Lo (loj)  wrote:

> The output of clib_warning() call should be in the syslog. If running vpp
> in Ubuntu, take a look in /var/log/syslog.  -John
>
>
>
> *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On
> Behalf Of *Alessio Silvestro
> *Sent:* Thursday, June 01, 2017 12:11 PM
> *To:* Luke, Chris 
> *Cc:* vpp-dev@lists.fd.io
> *Subject:* Re: [vpp-dev] VPP Node Debug
>
>
>
> I knew VPP run in user space and that printk is not the best option,
> however from the documentation it is not clear to me how to do that.
>
>
>
> For example now I inserted the command clib_warning("I am here!") in the
> node I create -- that from vppctl show trace I can see processes the
> packets.
>
>
>
> Where does it prints?
>
>
>
> Still I cannot figure it out.
>
>
>
> Thanks,
>
> Alessio
>
>
>
> On Thu, Jun 1, 2017 at 6:00 PM, Luke, Chris 
> wrote:
>
> printk() is typically a kernel thing, no? This isn’t kernel code. 😊
>
>
>
> If you just want stuff on the console when running in a debugger, or
> interactively, clib_warning() may be what you are looking for.
>
>
>
> Chris.
>
>
>
>
>
> *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On
> Behalf Of *Alessio Silvestro
> *Sent:* Thursday, June 1, 2017 10:35
> *To:* vpp-dev@lists.fd.io
> *Subject:* [vpp-dev] VPP Node Debug
>
>
>
> Hi all,
>
>
>
> I am using this code "https://gerrit.fd.io/r/#/c/6721/"; to in order to
> enable an external process to receive UDP packets.
>
>
>
> I tried to use printk -- including module.h in the c file.
>
>
>
> When I compile VPP with:
>
>
>
> TOPDIR/vpp make build-release
>
>
>
> I got the following error
>
>
>
> fatal error: linux/module.h: No such file or directory
>
> compilation terminated.
>
>
>
> Do you have any idea why?
>
>
>
> Is there a better way to debug the code of a node in VPP?
>
>
>
> Thanks,
>
> Alessio
>
>
>
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] VPP Node Debug

2017-06-01 Thread otroan
Alessio,

you may start VPP with the unix {interactive} options too...
e.g. put that line in the configuration file pointed to by STARTUP_CONF 
environment variable (see make help).
then do "make run" or "make debug".

please let me know your success with the punt socket feature. it is a little 
experimental.

Best regards,
Ole

> On 1 Jun 2017, at 18:10, Alessio Silvestro  wrote:
> 
> I knew VPP run in user space and that printk is not the best option, however 
> from the documentation it is not clear to me how to do that.
> 
> For example now I inserted the command clib_warning("I am here!") in the node 
> I create -- that from vppctl show trace I can see processes the packets.
> 
> Where does it prints?
> 
> Still I cannot figure it out.
> 
> Thanks,
> Alessio
> 
> On Thu, Jun 1, 2017 at 6:00 PM, Luke, Chris  wrote:
> printk() is typically a kernel thing, no? This isn’t kernel code. 😊
> 
> 
> 
> If you just want stuff on the console when running in a debugger, or 
> interactively, clib_warning() may be what you are looking for.
> 
> 
> 
> Chris.
> 
> 
> 
> 
> 
> From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
> Behalf Of Alessio Silvestro
> Sent: Thursday, June 1, 2017 10:35
> To: vpp-dev@lists.fd.io
> Subject: [vpp-dev] VPP Node Debug
> 
> 
> 
> Hi all,
> 
> 
> 
> I am using this code "https://gerrit.fd.io/r/#/c/6721/"; to in order to enable 
> an external process to receive UDP packets.
> 
> 
> 
> I tried to use printk -- including module.h in the c file.
> 
> 
> 
> When I compile VPP with:
> 
> 
> 
> TOPDIR/vpp make build-release
> 
> 
> 
> I got the following error
> 
> 
> 
> fatal error: linux/module.h: No such file or directory
> 
> compilation terminated.
> 
> 
> 
> Do you have any idea why?
> 
> 
> 
> Is there a better way to debug the code of a node in VPP?
> 
> 
> 
> Thanks,
> 
> Alessio
> 
> 
> ___
> vpp-dev mailing list
> vpp-dev@lists.fd.io
> https://lists.fd.io/mailman/listinfo/vpp-dev



signature.asc
Description: Message signed with OpenPGP
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] VPP Node Debug

2017-06-01 Thread John Lo (loj)
The output of clib_warning() call should be in the syslog. If running vpp in 
Ubuntu, take a look in /var/log/syslog.  -John

From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of Alessio Silvestro
Sent: Thursday, June 01, 2017 12:11 PM
To: Luke, Chris 
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] VPP Node Debug

I knew VPP run in user space and that printk is not the best option, however 
from the documentation it is not clear to me how to do that.

For example now I inserted the command clib_warning("I am here!") in the node I 
create -- that from vppctl show trace I can see processes the packets.

Where does it prints?

Still I cannot figure it out.

Thanks,
Alessio

On Thu, Jun 1, 2017 at 6:00 PM, Luke, Chris 
mailto:chris_l...@comcast.com>> wrote:
printk() is typically a kernel thing, no? This isn’t kernel code. 😊

If you just want stuff on the console when running in a debugger, or 
interactively, clib_warning() may be what you are looking for.

Chris.


From: vpp-dev-boun...@lists.fd.io<mailto:vpp-dev-boun...@lists.fd.io> 
[mailto:vpp-dev-boun...@lists.fd.io<mailto:vpp-dev-boun...@lists.fd.io>] On 
Behalf Of Alessio Silvestro
Sent: Thursday, June 1, 2017 10:35
To: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>
Subject: [vpp-dev] VPP Node Debug

Hi all,

I am using this code "https://gerrit.fd.io/r/#/c/6721/"; to in order to enable 
an external process to receive UDP packets.

I tried to use printk -- including module.h in the c file.

When I compile VPP with:

TOPDIR/vpp make build-release

I got the following error

fatal error: linux/module.h: No such file or directory
compilation terminated.

Do you have any idea why?

Is there a better way to debug the code of a node in VPP?

Thanks,
Alessio

___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] VPP Node Debug

2017-06-01 Thread Alessio Silvestro
I knew VPP run in user space and that printk is not the best option,
however from the documentation it is not clear to me how to do that.

For example now I inserted the command clib_warning("I am here!") in the
node I create -- that from vppctl show trace I can see processes the
packets.

Where does it prints?

Still I cannot figure it out.

Thanks,
Alessio

On Thu, Jun 1, 2017 at 6:00 PM, Luke, Chris  wrote:

> printk() is typically a kernel thing, no? This isn’t kernel code. 😊
>
>
>
> If you just want stuff on the console when running in a debugger, or
> interactively, clib_warning() may be what you are looking for.
>
>
>
> Chris.
>
>
>
>
>
> *From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On
> Behalf Of *Alessio Silvestro
> *Sent:* Thursday, June 1, 2017 10:35
> *To:* vpp-dev@lists.fd.io
> *Subject:* [vpp-dev] VPP Node Debug
>
>
>
> Hi all,
>
>
>
> I am using this code "https://gerrit.fd.io/r/#/c/6721/"; to in order to
> enable an external process to receive UDP packets.
>
>
>
> I tried to use printk -- including module.h in the c file.
>
>
>
> When I compile VPP with:
>
>
>
> TOPDIR/vpp make build-release
>
>
>
> I got the following error
>
>
>
> fatal error: linux/module.h: No such file or directory
>
> compilation terminated.
>
>
>
> Do you have any idea why?
>
>
>
> Is there a better way to debug the code of a node in VPP?
>
>
>
> Thanks,
>
> Alessio
>
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] VPP Node Debug

2017-06-01 Thread Luke, Chris
printk() is typically a kernel thing, no? This isn’t kernel code. 😊

If you just want stuff on the console when running in a debugger, or 
interactively, clib_warning() may be what you are looking for.

Chris.


From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of Alessio Silvestro
Sent: Thursday, June 1, 2017 10:35
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] VPP Node Debug

Hi all,

I am using this code "https://gerrit.fd.io/r/#/c/6721/"; to in order to enable 
an external process to receive UDP packets.

I tried to use printk -- including module.h in the c file.

When I compile VPP with:

TOPDIR/vpp make build-release

I got the following error

fatal error: linux/module.h: No such file or directory
compilation terminated.

Do you have any idea why?

Is there a better way to debug the code of a node in VPP?

Thanks,
Alessio
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] VPP Node Debug

2017-06-01 Thread Alessio Silvestro
Hi all,

I am using this code "https://gerrit.fd.io/r/#/c/6721/"; to in order to
enable an external process to receive UDP packets.

I tried to use printk -- including module.h in the c file.

When I compile VPP with:

TOPDIR/vpp make build-release

I got the following error

fatal error: linux/module.h: No such file or directory
compilation terminated.

Do you have any idea why?

Is there a better way to debug the code of a node in VPP?

Thanks,
Alessio
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev