[ovs-dev] [PATCH] Utilities: Add the ovs_dump_ofpacts command to gdb
Eelco Chaudron
echaudro at redhat.com
Mon Apr 20 08:02:15 UTC 2020
On 19 Apr 2020, at 17:58, William Tu wrote:
> On Fri, Apr 17, 2020 at 02:51:34PM +0200, Eelco Chaudron wrote:
>> This adds the ovs_dump_ifpacts command:
>>
>> (gdb) help ovs_dump_ofpacts
>> Dump all actions in an ofpacts set
>> Usage: ovs_dump_ofpacts <struct ofpact *> <ofpacts_len>
>>
>> <struct ofpact *> : Pointer to set of ofpact structures.
>> <ofpacts_len> : Total length of the set.
>>
>> Example dumping all actions when in the clone_xlate_actions()
>> function:
>>
>> (gdb) ovs_dump_ofpacts actions actions_len
>> (struct ofpact *) 0x561c7be487c8: {type = OFPACT_SET_FIELD, raw =
>> 255 '', len = 24}
>> (struct ofpact *) 0x561c7be487e0: {type = OFPACT_SET_FIELD, raw =
>> 255 '', len = 24}
>> (struct ofpact *) 0x561c7be487f8: {type = OFPACT_SET_FIELD, raw =
>> 255 '', len = 24}
>> (struct ofpact *) 0x561c7be48810: {type = OFPACT_SET_FIELD, raw =
>> 255 '', len = 32}
>> (struct ofpact *) 0x561c7be48830: {type = OFPACT_SET_FIELD, raw =
>> 255 '', len = 24}
>> (struct ofpact *) 0x561c7be48848: {type = OFPACT_RESUBMIT, raw =
>> 38 '&', len = 16}
>>
>> Signed-off-by: Eelco Chaudron <echaudro at redhat.com>
>> ---
> Hi Eelco,
>
> I'm trying to test this patch. But I hit another problem.
> Can you help me with the issue? Sorry this is not related to your
> patch.
>
> root at osboxes:~/ovs# gdb $(which ovs-vswitchd) $(pidof ovs-vswitchd)
> GNU gdb (GDB) 8.0.50.20170501-git
> Copyright (C) 2017 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show
> copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-pc-linux-gnu".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
> <http://www.gnu.org/software/gdb/documentation/>.
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from /usr/local/sbin/ovs-vswitchd...done.
> Attaching to program: /usr/local/sbin/ovs-vswitchd, process 58469
> [New LWP 58473]
> [New LWP 58474]
> [New LWP 58475]
> [New LWP 58484]
> [New LWP 58485]
> [New LWP 58486]
> [New LWP 58487]
> [New LWP 58578]
> [New LWP 58579]
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library
> "/lib/x86_64-linux-gnu/libthread_db.so.1".
> 0x00007fe63d33774d in poll () from /lib/x86_64-linux-gnu/libc.so.6
> (gdb) source ./utilities/gdb/ovs_gdb.py
> File "./utilities/gdb/ovs_gdb.py", line 164
> print(self.message, end='')
The script should work with both versions of python. Is the above the
only error you get? Or did you forget to cut/paste the actual error
message?
> Is this due to python2/3? My python version:
> boxes:~/ovs# python
> Python 3.5.2 (default, Oct 8 2019, 13:06:37)
> [GCC 5.4.0 20160609] on linux
> Type "help", "copyright", "credits" or "license" for more information.
More information about the dev
mailing list