]>
git.proxmox.com Git - mirror_ovs.git/commit - utilities/gdb/ovs_gdb.py
Utilities: Add the simap and netdev_provider dump commands to gdb
This changes add two additional gdb commands:
- ovs_dump_netdev_provider
- ovs_dump_ovs_list <struct simap *>
Here are some examples of their output:
ovs_dump_netdev_provider:
=========================
(gdb) ovs_dump_netdev_provider
(struct netdev_registered_class *) 0x2b2c540: refcnt = {count = 3},
(struct netdev_class *) 0x9555c0 = {type = tap, is_pmd = false, ...},
(struct netdev_registered_class *) 0x2b2c5a0: refcnt = {count = 2},
(struct netdev_class *) 0xc439d8 = {type = vxlan, is_pmd = false, ...},
(struct vport_class *) 0xc439d0 = { dpif_port = vxlan_sys, ... }
(struct netdev_registered_class *) 0x2b2c960: refcnt = {count = 1},
(struct netdev_class *) 0xc442f8 = {type = ip6erspan, is_pmd = false, ...},
(struct vport_class *) 0xc442f0 = { dpif_port = ip6erspan_sys, ... }
(struct netdev_registered_class *) 0x2b2c980: refcnt = {count = 1},
(struct netdev_class *) 0xc44540 = {type = ip6gre, is_pmd = false, ...},
(struct vport_class *) 0xc44538 = { dpif_port = ip6gre_sys, ... }
(struct netdev_registered_class *) 0x2b2ebe0: refcnt = {count = 3},
(struct netdev_class *) 0x95b8c0 = {type = dpdk, is_pmd = true, ...},
ovs_dump_ovs_list:
==================
(gdb) b memory_report
Breakpoint 1 at 0x753190: file lib/memory.c, line 136.
(gdb) set want_report=1
(gdb) c
Continuing.
Breakpoint 1, memory_report (usage=usage@entry=0x7fff0683d920) at lib/memory.c:136
136 {
(gdb) p usage
$20 = (const struct simap *) 0x7fff0683d920
(gdb) p* usage
$21 = {map = {buckets = 0x2b64df0, one = 0x0, mask = 3, n = 4}}
(gdb) p *usage
(gdb) ovs_dump_simap usage
handlers : 40 / 0x28
ports : 6 / 0x6
revalidators: 16 / 0x10
rules : 10 / 0xa
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>