diff options
author | Eelco Chaudron <echaudro@redhat.com> | 2018-05-09 13:47:26 +0200 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-05-09 13:14:34 -0700 |
commit | 0a3348d1a9e3f8b1bc943ed21b5d3c47258cf669 (patch) | |
tree | d2e1447de25a8f5f0bbeec15a6af1f99e6345e3b /Documentation/tutorials | |
parent | 2c00b26f10090f972510eb17ee0f0be1e8dcc91b (diff) | |
download | openvswitch-0a3348d1a9e3f8b1bc943ed21b5d3c47258cf669.tar.gz |
utilities: Add some GDB macros for ovs-vswitchd
This commit adds basic GDB macro's for ovs-vswitchd:
- ovs_dump_bridge [ports|wanted]
- ovs_dump_bridge_ports <struct bridge *>
- ovs_dump_dp_netdev [ports]
- ovs_dump_dp_netdev_ports <struct dp_netdev *>
- ovs_dump_netdev
These dump functions show limited info, but you can simply cut/paste
the address and get the full structure info. For example:
(gdb) ovs_dump_netdev
(struct netdev *) 0x555771ed89e0: name = ovs-netdev , auto_classified = false, netdev_class = 0x5557714413c0 <netdev_tap_class>
(struct netdev *) 0x555771fc62a0: name = ovs_pvp_br0 , auto_classified = false, netdev_class = 0x5557714413c0 <netdev_tap_class>
(struct netdev *) 0x555771fc9660: name = vnet0 , auto_classified = true , netdev_class = 0x555771445e00 <netdev_linux_class>
(struct netdev *) 0x555771fc78d0: name = virbr0 , auto_classified = true , netdev_class = 0x555771445e00 <netdev_linux_class>
(struct netdev *) 0x7fbefffb5540: name = dpdk0 , auto_classified = false, netdev_class = 0x5557714419e0 <dpdk_class>
(struct netdev *) 0x555771fc98b0: name = em3 , auto_classified = true , netdev_class = 0x555771445e00 <netdev_linux_class>
(struct netdev *) 0x7fbea0a31c40: name = vhost0 , auto_classified = false, netdev_class = 0x555771442040 <dpdk_vhost_client_class>
(gdb) p *((struct netdev *) 0x7fbefffb5540)
$1 = {name = 0x555771ecef70 "dpdk0", netdev_class = 0x5557714419e0 <dpdk_class>, auto_classified = false, mtu_user_config = true, ref_cnt = 2, change_seq = 12,
reconfigure_seq = 0x555771ecf2e0, last_reconfigure_seq = 110, n_txq = 2, n_rxq = 1, node = 0x555771efafe0, saved_flags_list = {prev = 0x7fbefffb5580, next = 0x7fbefffb5580}}
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'Documentation/tutorials')
-rw-r--r-- | Documentation/tutorials/ovs-advanced.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/tutorials/ovs-advanced.rst b/Documentation/tutorials/ovs-advanced.rst index 676137f3c..992182d0e 100644 --- a/Documentation/tutorials/ovs-advanced.rst +++ b/Documentation/tutorials/ovs-advanced.rst @@ -145,6 +145,10 @@ can be passed via the ``SANDBOXFLAGS`` environment variable. ``make sandbox SANDBOXFLAGS=-g`` will start the sandbox with ovs-vswitchd running under GDB in its own xterm if X is available. +In addition, a set of GDB macros are available in ``utilities/gdb/ovs_gdb.py``. +Which are able to dump various internal data structures. See the header of the +file itself for some more details and an example. + Motivation ---------- |