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) <l...@cisco.com> 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 <chris_l...@comcast.com>
> *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 <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] *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

Reply via email to