On 23 March 2016 at 07:16, Rajasekaran, Monica < monica.rajaseka...@us.fujitsu.com> wrote:
> Hi guru, > > > > Thanks for that useful information. I am trying to print in the datapath > (vport.càovs_vport_send) using printk at log level of KERN_CRIT. But, I > do not see it anywhere. Not on the console or in var/log/messages or in > dmesg. Any input from your side on this? > If you haven't worked with linux kernel modules before, I suggest writing your own "hello world" program once to understand the lifecycle of inserting and removing kernel modules. > > > Note- my current console log level is 4. So kern_crit which has a ‘2’ > should appear somewhere right. > > > > *Thanks* > > > > *From:* Guru Shetty [mailto:g...@ovn.org] > *Sent:* Tuesday, March 22, 2016 2:02 PM > > *To:* Rajasekaran, Monica <monica.rajaseka...@us.fujitsu.com> > *Cc:* discuss@openvswitch.org > *Subject:* Re: [ovs-discuss] Debugging through OVS > > > > > > > > On 22 March 2016 at 11:53, Rajasekaran, Monica < > monica.rajaseka...@us.fujitsu.com> wrote: > > Hi Guru, > > > > I would like to add vlog_info messages for datapath/actions.c. I see that > none of the files in datapath support vlog. > > > > Everything inside the datapath/ directory is part of the Linux kernel > module. All the linux kernel module coding requirements apply there too. So > you cannot add things like printf. You should probably read about printk. > > > > > > I have added “#include <openvswitch/vlog.h>” and > “VLOG_DEFINE_THIS_MODULE(dpactions)” to datapath/actions.c. What other > changes do I need to make to perform a vlog/set to info for actions.c > (ovs-appctl vlog/set dpactions:any:info) ? > > > > It won't work. Don't go down that path. > > > > > > *Thanks* > > > > *From:* Guru Shetty [mailto:g...@ovn.org] > *Sent:* Monday, March 21, 2016 1:33 PM > > > *To:* Rajasekaran, Monica <monica.rajaseka...@us.fujitsu.com> > *Cc:* discuss@openvswitch.org > *Subject:* Re: [ovs-discuss] Debugging through OVS > > > > > > > > On 21 March 2016 at 10:37, Rajasekaran, Monica < > monica.rajaseka...@us.fujitsu.com> wrote: > > This is what I have: “ovs-vswitchd –pidfile –log-file” > > > > Logging to console should have worked from the above. Are you saying that > you don't see any messages logged? Or are you saying that the messaged you > want logged are not getting logged? > > > > > > And, I changed vlog/set as well. > > > > *Thanks,* > > *Monica * > > > > *From:* Guru Shetty [mailto:g...@ovn.org] > *Sent:* Monday, March 21, 2016 12:13 PM > > > *To:* Rajasekaran, Monica <monica.rajaseka...@us.fujitsu.com> > *Cc:* discuss@openvswitch.org > *Subject:* Re: [ovs-discuss] Debugging through OVS > > > > > > > > On 20 March 2016 at 18:24, Rajasekaran, Monica < > monica.rajaseka...@us.fujitsu.com> wrote: > > Hi Guru, > > > > Thanks for your input. > > > > It is specified that “—log-file” is used when “Regardless of the log > levels set for file, logging to a *FILE* will not take place > unless ovs-vswitchd was invoked with the --log-file option”. But, I am only > trying to log to the console and not to a file. > > > > “—detach” seems to be an option which (as a side effect) disables logging > to the console. > > > > I still do not understand why my ovs does not log to the console though I > have enabled DBG level logging for all modules. > > > > Please let me know if I am missing something here. > > > > Paste your ovs-vswitchd arguments. Does it have -vconsole set? > > > > > > > > *Thanks,* > > *Monica * > > > > *From:* Guru Shetty [mailto:g...@ovn.org] > *Sent:* Friday, March 18, 2016 5:03 PM > *To:* Rajasekaran, Monica <monica.rajaseka...@us.fujitsu.com> > *Cc:* discuss@openvswitch.org > *Subject:* Re: [ovs-discuss] Debugging through OVS > > > > Please read about the following options in 'man ovs-vswitchd' > > 1. --log-file > > 2. "Logging Options" > > 3. --detach > > > > And then follow it by the section on "LOGGING COMMANDS" in 'man ovs-appctl' > > > > On 18 March 2016 at 14:54, Rajasekaran, Monica < > monica.rajaseka...@us.fujitsu.com> wrote: > > Hi guys, > > > > While trying to understand parts of the code, I would like to print stuff > to the terminal so that I know how the flow works. But I tried printf, even > vlog/set to DBG. Nothing gets printed though my OVS is working perfectly! > Am I missing something ? > > > > *Side Note: I even tried with a print inside vport-internal_dev.c à > internal_dev_xmit(). That’s not the first function to be called when a > packet enters ovs but it is pretty initial. That’s the one that calls > ovs_vport_receive(). > > > > Any help is greatly appreciated! > > > > *Thanks.* > > > > > _______________________________________________ > discuss mailing list > discuss@openvswitch.org > http://openvswitch.org/mailman/listinfo/discuss > > > > > > > > >
_______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss