Eelco Chaudron
cd5b89a5a9
utilities: Add smap related command and iterator to the GDB script
...
Adds "ovs_dump_smap <struct smap *>" command
Example output:
Breakpoint 1, trtcm_policer_qos_construct (details=0x135bad0, conf=0x7ffd31f5da28) at lib/netdev-dpdk.c:4154
(gdb) ovs_dump_smap 0x135bad0
cbs: 2048
cir: 151800
eir: 151800
pbs: 2048
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-12-12 08:40:55 -08:00
Eelco Chaudron
4ef1edf085
utilities: Update gdb script to include mac_learning counters
...
This patch updates the GDB script "ovs_show_fdb" command to include
the new per mac_learning instance counters.
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-07-06 14:26:20 -07:00
Eelco Chaudron
b23d42a68d
utilities: Add upcall related commands to the GDB script
...
This commit adds ovs_dump_udpif_keys and ovs_show_upcall commands to the GDB script.
Here are some examples of the output:
(gdb) ovs_show_upcall
netdev@ovs-netdev:
flows : (current 0) (avg 0) (max 0) (limit 10000)
dump duration : 1ms
ufid enabled : true
39: (keys 0)
42: (keys 0)
41: (keys 0)
43: (keys 0)
44: (keys 0)
45: (keys 0)
system@ovs-system:
flows : (current 4000) (avg 4031) (max 4064) (limit 139000)
dump duration : 4ms
ufid enabled : true
99: (keys 676)
102: (keys 665)
101: (keys 656)
103: (keys 648)
104: (keys 642)
105: (keys 713)
(gdb) ovs_dump_udpif_keys
(struct udpif *) 0x1ebb830: name = netdev@ovs-netdev, total keys = 2
(struct udpif *) 0x20c6f00: name = system@ovs-system, total keys = 0
(gdb) ovs_dump_udpif_keys 0x1ebb830
(struct umap *) 0x1ef9328:
(struct udpif_key *) 0x7f36e0004e40: key_len = 132, mask_len = 144
ufid = 3e529416-83bf-bab4-5c6e-421127a9143a
hash = 0x3d96b11d, pmd_id = 1
state = UKEY_OPERATIONAL
n_packets = 2, n_bytes = 68
used = 1397047436, tcp_flags = 0x0000
(struct umap *) 0x1efb740:
(struct udpif_key *) 0x7f36dc004c20: key_len = 132, mask_len = 144
ufid = ee98d69f-8298-04dd-844a-4d2abee9f773
hash = 0x2e8077c2, pmd_id = 15
state = UKEY_OPERATIONAL
n_packets = 0, n_bytes = 0
used = 0, tcp_flags = 0x0000
(gdb) ovs_dump_udpif_keys 0x1ebb830 short
(struct umap *) 0x1ef9328:
(struct udpif_key *) 0x7f36e0004e40:
(struct umap *) 0x1efb740:
(struct udpif_key *) 0x7f36dc004c20:
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-07-06 14:18:21 -07:00
Eelco Chaudron
ef557e2c55
utilities: Add the ovs_show_fdb command to gdb
...
This adds the ovs_show_fdb command:
Usage: ovs_show_fdb {<bridge_name> {dbg} {hash}}
<bridge_name> : Optional bridge name, if not supplied FDB summary
information is displayed for all bridges.
dbg : Will show structure address information
hash : Will display the forwarding table using the hash
table, rather than the rlu list.
Some examples:
(gdb) ovs_show_fdb
br0 : (struct mac_learning *) 0x139c160
table.n : 0
secret : 0x6c42c707
idle_time : 300
max_entries : 2048
ref_count : 2
need_revalidate : false
ports_by_ptr.n : 0
ports_by_usage.n: 0
br1 : (struct mac_learning *) 0x139b0b0
table.n : 0
secret : 0xcf8efaf8
idle_time : 300
max_entries : 2048
ref_count : 2
need_revalidate : false
ports_by_ptr.n : 0
ports_by_usage.n: 0
ovs_pvp_br0: (struct mac_learning *) 0x137b470
table.n : 4
secret : 0x623e75ad
idle_time : 300
max_entries : 2048
ref_count : 2
need_revalidate : false
ports_by_ptr.n : 4
ports_by_usage.n: 4
(gdb) ovs_show_fdb ovs_pvp_br0
table.n : 4
secret : 0x623e75ad
idle_time : 300
max_entries : 2048
ref_count : 2
need_revalidate : false
ports_by_ptr.n : 4
ports_by_usage.n: 4
FDB "lrus" table:
port VLAN MAC Age out @
----------------- ---- ----------------- ---------
02[vnet2] 0 52:54:00:b6:de:1e 81501
01[vnet0] 0 52:54:00:0b:60:6e 81501
03[vnet4] 0 52:54:00:89:32:4c 81501
0LOCAL[ovs_pvp_br 0 5e:26:7b:41:28:46 81501
Total MAC entries: 4
Current time is between 81198 and 81203 seconds.
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-06-20 10:20:06 -07:00
Eelco Chaudron
425620614f
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>
2018-06-15 11:47:24 -07:00
Eelco Chaudron
b9683ff014
Utilities: Add the ovs_dump_dp_provider command to the gdb script
...
This change adds the ovs_dump_dp_provider command, which allows
dumping of all the registered registered_dpif_class structures.
In addition it has some small internal cleanups.
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-06-15 11:46:41 -07:00
Eelco Chaudron
5d0a62672d
utilities: Add gdb debug commands to dump lists and pmd info
...
Adds back-end support for walking ovs cmaps, and the following
commands to the gdb script:
- Dump all poll_thread info added to a specific struct dp_netdev*.
Usage: ovs_dump_dp_netdev_poll_threads <struct dp_netdev *>
- Dump all nodes of an ovs_list:
Usage: ovs_dump_ovs_list <struct ovs_list *> {[<structure>] [<member>] {dump}]}
For example dump all the none quiescent OvS RCU threads:
(gdb) ovs_dump_ovs_list &ovsrcu_threads
(struct ovs_list *) 0x7f2a14000900
(struct ovs_list *) 0x7f2acc000900
(struct ovs_list *) 0x7f2a680668d0
This is not very useful, so please use this with the container_of mode:
(gdb) ovs_dump_ovs_list &ovsrcu_threads 'struct ovsrcu_perthread' list_node
(struct ovsrcu_perthread *) 0x7f2a14000900
(struct ovsrcu_perthread *) 0x7f2acc000900
(struct ovsrcu_perthread *) 0x7f2a680668d0
Now you can manually use the print command to show the content, or use the
dump option to dump the structure for all nodes:
(gdb) ovs_dump_ovs_list &ovsrcu_threads 'struct ovsrcu_perthread' list_node dump
(struct ovsrcu_perthread *) 0x7f2a14000900 =
{list_node = {prev = 0xf48e80 <ovsrcu_threads>, next = 0x7f2acc000900}, mutex...
(struct ovsrcu_perthread *) 0x7f2acc000900 =
{list_node = {prev = 0x7f2a14000900, next = 0x7f2a680668d0}, mutex ...
(struct ovsrcu_perthread *) 0x7f2a680668d0 =
{list_node = {prev = 0x7f2acc000900, next = 0xf48e80 <ovsrcu_threads>}, ...
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-05-16 15:42:51 -07:00
Eelco Chaudron
0a3348d1a9
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>
2018-05-09 13:14:34 -07:00