Commit dc54ef36 authored by Ethan Jackson's avatar Ethan Jackson

ofproto: Track subfacet stats in the backer.

Subfacets being per-datapath entities, their statistics are really
only interesting at per-datapath granularity.  This patch moves
them to the dpif_backer and makes some related simplifications.
Signed-off-by: default avatarEthan Jackson <ethan@nicira.com>
parent 9fc0165a
......@@ -5,15 +5,11 @@ equivalent \fBovs\-dpctl\fR commands.
.IP "\fBdpif/dump\-dps\fR"
Prints the name of each configured datapath on a separate line.
.
.IP "\fBdpif/show\fR [\fIdp\fR...]"
.IP "\fBdpif/show\fR"
Prints a summary of configured datapaths, including statistics and a
list of connected ports. The port information includes the OpenFlow
port number, datapath port number, and the type. (The local port is
identified as OpenFlow port 65534.)
.IP
If one or more datapaths are specified, information on only those
datapaths are displayed. Otherwise, information about all configured
datapaths are shown.
.
.IP "\fBdpif/dump\-flows \fIdp\fR"
Prints to the console all flow entries in datapath \fIdp\fR's
......
This diff is collapsed.
......@@ -2029,29 +2029,16 @@ ADD_OF_PORTS([br0], [1], [2])
ADD_OF_PORTS([br1], [3])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
br0 (dummy@ovs-dummy):
lookups: hit:0 missed:0
flows: cur: 0, avg: 0, max: 0, life span: 0(ms)
overall avg: add rate: 0.000/min, del rate: 0.000/min
br0 65534/100: (dummy)
p1 1/1: (dummy)
p2 2/2: (dummy)
br1 (dummy@ovs-dummy):
lookups: hit:0 missed:0
flows: cur: 0, avg: 0, max: 0, life span: 0(ms)
overall avg: add rate: 0.000/min, del rate: 0.000/min
br1 65534/101: (dummy)
p3 3/3: (dummy)
])
AT_CHECK([ovs-appctl dpif/show br0], [0], [dnl
br0 (dummy@ovs-dummy):
lookups: hit:0 missed:0
flows: cur: 0, avg: 0, max: 0, life span: 0(ms)
overall avg: add rate: 0.000/min, del rate: 0.000/min
br0 65534/100: (dummy)
p1 1/1: (dummy)
p2 2/2: (dummy)
dummy@ovs-dummy: hit:0 missed:0
flows: cur: 0, avg: 0, max: 0, life span: 0ms
overall avg: add rate: 0.000/min, del rate: 0.000/min
br0: hit:0 missed:0
br0 65534/100: (dummy)
p1 1/1: (dummy)
p2 2/2: (dummy)
br1: hit:0 missed:0
br1 65534/101: (dummy)
p3 3/3: (dummy)
])
OVS_VSWITCHD_STOP
AT_CLEANUP
......@@ -2135,20 +2122,17 @@ warped
])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
br0 (dummy@ovs-dummy):
lookups: hit:9 missed:1
flows: cur: 1, avg: 0, max: 1, life span: 1250(ms)
overall avg: add rate: 0.000/min, del rate: 0.000/min
br0 65534/100: (dummy)
p2 2/2: (dummy)
pbr0 1/none: (patch: peer=pbr1)
br1 (dummy@ovs-dummy):
lookups: hit:4 missed:1
flows: cur: 1, avg: 0, max: 1, life span: 1250(ms)
overall avg: add rate: 0.000/min, del rate: 0.000/min
br1 65534/101: (dummy)
p3 3/3: (dummy)
pbr1 1/none: (patch: peer=pbr0)
dummy@ovs-dummy: hit:13 missed:2
flows: cur: 2, avg: 1, max: 2, life span: 1250ms
overall avg: add rate: 0.000/min, del rate: 0.000/min
br0: hit:9 missed:1
br0 65534/100: (dummy)
p2 2/2: (dummy)
pbr0 1/none: (patch: peer=pbr1)
br1: hit:4 missed:1
br1 65534/101: (dummy)
p3 3/3: (dummy)
pbr1 1/none: (patch: peer=pbr0)
])
AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_USED], [0], [dnl
......@@ -2190,14 +2174,14 @@ AT_CHECK([ovs-appctl time/warp 10000], [0], [warped
])
AT_CHECK([ovs-appctl dpif/show | sed 's/ 10[[0-9]]\{3\}(ms)$/ 10000(ms)/'], [0], [dnl
br0 (dummy@ovs-dummy):
lookups: hit:0 missed:61
flows: cur: 0, avg: 0, max: 1, life span: 1666(ms)
hourly avg: add rate: 0.641/min, del rate: 0.641/min
overall avg: add rate: 1.000/min, del rate: 1.000/min
br0 65534/100: (dummy)
p1 1/1: (dummy)
p2 2/2: (dummy)
dummy@ovs-dummy: hit:0 missed:61
flows: cur: 0, avg: 0, max: 1, life span: 1666ms
hourly avg: add rate: 0.641/min, del rate: 0.641/min
overall avg: add rate: 1.000/min, del rate: 1.000/min
br0: hit:0 missed:61
br0 65534/100: (dummy)
p1 1/1: (dummy)
p2 2/2: (dummy)
])
OVS_VSWITCHD_STOP
......
......@@ -14,15 +14,11 @@ actions=IN_PORT
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
br0 (dummy@ovs-dummy):
lookups: hit:0 missed:0
flows: cur: 0, avg: 0, max: 0, life span: 0(ms)
overall avg: add rate: 0.000/min, del rate: 0.000/min
br0 65534/100: (dummy)
p1 1/1: (gre: remote_ip=1.1.1.1)
p2 2/1: (gre: local_ip=2.2.2.2, remote_ip=1.1.1.1)
p3 3/1: (gre: remote_ip=2.2.2.2)
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
br0 65534/100: (dummy)
p1 1/1: (gre: remote_ip=1.1.1.1)
p2 2/1: (gre: local_ip=2.2.2.2, remote_ip=1.1.1.1)
p3 3/1: (gre: remote_ip=2.2.2.2)
])
dnl remote_ip
......@@ -41,15 +37,11 @@ dnl reconfigure, local_ip, remote_ip
AT_CHECK([ovs-vsctl set Interface p2 type=gre options:local_ip=2.2.2.3 \
options:df_default=false options:ttl=1 options:csum=true \
-- set Interface p3 type=gre64])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
br0 (dummy@ovs-dummy):
lookups: hit:0 missed:0
flows: cur: 0, avg: 0, max: 0, life span: 0(ms)
overall avg: add rate: 0.000/min, del rate: 0.000/min
br0 65534/100: (dummy)
p1 1/1: (gre: remote_ip=1.1.1.1)
p2 2/1: (gre: csum=true, df_default=false, local_ip=2.2.2.3, remote_ip=1.1.1.1, ttl=1)
p3 3/64: (gre64: remote_ip=2.2.2.2)
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
br0 65534/100: (dummy)
p1 1/1: (gre: remote_ip=1.1.1.1)
p2 2/1: (gre: csum=true, df_default=false, local_ip=2.2.2.3, remote_ip=1.1.1.1, ttl=1)
p3 3/64: (gre64: remote_ip=2.2.2.2)
])
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
AT_CHECK([tail -1 stdout], [0],
......@@ -80,14 +72,10 @@ actions=2
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
br0 (dummy@ovs-dummy):
lookups: hit:0 missed:0
flows: cur: 0, avg: 0, max: 0, life span: 0(ms)
overall avg: add rate: 0.000/min, del rate: 0.000/min
br0 65534/100: (dummy)
p1 1/1: (gre: remote_ip=1.1.1.1)
p2 2/2: (dummy)
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
br0 65534/100: (dummy)
p1 1/1: (gre: remote_ip=1.1.1.1)
p2 2/2: (dummy)
])
dnl Tunnel CE and encapsulated packet CE
......@@ -128,14 +116,10 @@ actions=output:1
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
br0 (dummy@ovs-dummy):
lookups: hit:0 missed:0
flows: cur: 0, avg: 0, max: 0, life span: 0(ms)
overall avg: add rate: 0.000/min, del rate: 0.000/min
br0 65534/100: (dummy)
p1 1/1: (gre: key=5, local_ip=2.2.2.2, remote_ip=1.1.1.1)
p2 2/2: (dummy)
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
br0 65534/100: (dummy)
p1 1/1: (gre: key=5, local_ip=2.2.2.2, remote_ip=1.1.1.1)
p2 2/2: (dummy)
])
dnl Basic
......@@ -164,14 +148,10 @@ actions=output:1
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
br0 (dummy@ovs-dummy):
lookups: hit:0 missed:0
flows: cur: 0, avg: 0, max: 0, life span: 0(ms)
overall avg: add rate: 0.000/min, del rate: 0.000/min
br0 65534/100: (dummy)
p1 1/1: (gre: remote_ip=1.1.1.1, tos=inherit, ttl=inherit)
p2 2/2: (dummy)
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
br0 65534/100: (dummy)
p1 1/1: (gre: remote_ip=1.1.1.1, tos=inherit, ttl=inherit)
p2 2/2: (dummy)
])
dnl Basic
......@@ -210,16 +190,12 @@ actions=set_tunnel:1,output:1,set_tunnel:2,output:2,set_tunnel:3,output:3,set_tu
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
br0 (dummy@ovs-dummy):
lookups: hit:0 missed:0
flows: cur: 0, avg: 0, max: 0, life span: 0(ms)
overall avg: add rate: 0.000/min, del rate: 0.000/min
br0 65534/100: (dummy)
p1 1/1: (gre: key=flow, remote_ip=1.1.1.1)
p2 2/1: (gre: key=flow, remote_ip=2.2.2.2)
p3 3/1: (gre: key=flow, remote_ip=3.3.3.3)
p4 4/1: (gre: key=flow, remote_ip=4.4.4.4)
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
br0 65534/100: (dummy)
p1 1/1: (gre: key=flow, remote_ip=1.1.1.1)
p2 2/1: (gre: key=flow, remote_ip=2.2.2.2)
p3 3/1: (gre: key=flow, remote_ip=3.3.3.3)
p4 4/1: (gre: key=flow, remote_ip=4.4.4.4)
])
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(100),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
......@@ -246,15 +222,11 @@ actions=IN_PORT,output:1,output:2,output:3
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
br0 (dummy@ovs-dummy):
lookups: hit:0 missed:0
flows: cur: 0, avg: 0, max: 0, life span: 0(ms)
overall avg: add rate: 0.000/min, del rate: 0.000/min
br0 65534/100: (dummy)
p1 1/1: (gre: key=1, remote_ip=1.1.1.1)
p2 2/1: (gre: in_key=2, out_key=3, remote_ip=1.1.1.1)
p3 3/1: (gre: out_key=5, remote_ip=1.1.1.1)
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
br0 65534/100: (dummy)
p1 1/1: (gre: key=1, remote_ip=1.1.1.1)
p2 2/1: (gre: in_key=2, out_key=3, remote_ip=1.1.1.1)
p3 3/1: (gre: out_key=5, remote_ip=1.1.1.1)
])
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x1,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
......@@ -302,17 +274,13 @@ tun_id=4,actions=output:5
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
br0 (dummy@ovs-dummy):
lookups: hit:0 missed:0
flows: cur: 0, avg: 0, max: 0, life span: 0(ms)
overall avg: add rate: 0.000/min, del rate: 0.000/min
br0 65534/100: (dummy)
p1 1/1: (gre: key=flow, remote_ip=1.1.1.1)
p2 2/1: (gre: key=3, remote_ip=3.3.3.3)
p3 3/3: (dummy)
p4 4/4: (dummy)
p5 5/5: (dummy)
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
br0 65534/100: (dummy)
p1 1/1: (gre: key=flow, remote_ip=1.1.1.1)
p2 2/1: (gre: key=3, remote_ip=3.3.3.3)
p3 3/3: (dummy)
p4 4/4: (dummy)
p5 5/5: (dummy)
])
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x2,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
......@@ -342,13 +310,9 @@ AT_SETUP([tunnel - VXLAN])
OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=vxlan \
options:remote_ip=1.1.1.1 ofport_request=1])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
br0 (dummy@ovs-dummy):
lookups: hit:0 missed:0
flows: cur: 0, avg: 0, max: 0, life span: 0(ms)
overall avg: add rate: 0.000/min, del rate: 0.000/min
br0 65534/100: (dummy)
p1 1/1: (vxlan: remote_ip=1.1.1.1)
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
br0 65534/100: (dummy)
p1 1/1: (vxlan: remote_ip=1.1.1.1)
])
OVS_VSWITCHD_STOP
......@@ -358,13 +322,9 @@ AT_SETUP([tunnel - LISP])
OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=lisp \
options:remote_ip=1.1.1.1 ofport_request=1])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
br0 (dummy@ovs-dummy):
lookups: hit:0 missed:0
flows: cur: 0, avg: 0, max: 0, life span: 0(ms)
overall avg: add rate: 0.000/min, del rate: 0.000/min
br0 65534/100: (dummy)
p1 1/1: (lisp: remote_ip=1.1.1.1)
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
br0 65534/100: (dummy)
p1 1/1: (lisp: remote_ip=1.1.1.1)
])
OVS_VSWITCHD_STOP
......@@ -374,39 +334,27 @@ AT_SETUP([tunnel - different VXLAN UDP port])
OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=vxlan \
options:remote_ip=1.1.1.1 ofport_request=1 options:dst_port=4341])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
br0 (dummy@ovs-dummy):
lookups: hit:0 missed:0
flows: cur: 0, avg: 0, max: 0, life span: 0(ms)
overall avg: add rate: 0.000/min, del rate: 0.000/min
br0 65534/100: (dummy)
p1 1/1: (vxlan: dst_port=4341, remote_ip=1.1.1.1)
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
br0 65534/100: (dummy)
p1 1/1: (vxlan: dst_port=4341, remote_ip=1.1.1.1)
])
dnl change UDP port
AT_CHECK([ovs-vsctl -- set Interface p1 options:dst_port=5000])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
br0 (dummy@ovs-dummy):
lookups: hit:0 missed:0
flows: cur: 0, avg: 0, max: 0, life span: 0(ms)
overall avg: add rate: 0.000/min, del rate: 0.000/min
br0 65534/100: (dummy)
p1 1/2: (vxlan: dst_port=5000, remote_ip=1.1.1.1)
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
br0 65534/100: (dummy)
p1 1/2: (vxlan: dst_port=5000, remote_ip=1.1.1.1)
])
dnl change UDP port to default
AT_CHECK([ovs-vsctl -- set Interface p1 options:dst_port=4789])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
br0 (dummy@ovs-dummy):
lookups: hit:0 missed:0
flows: cur: 0, avg: 0, max: 0, life span: 0(ms)
overall avg: add rate: 0.000/min, del rate: 0.000/min
br0 65534/100: (dummy)
p1 1/1: (vxlan: remote_ip=1.1.1.1)
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
br0 65534/100: (dummy)
p1 1/1: (vxlan: remote_ip=1.1.1.1)
])
OVS_VSWITCHD_STOP
AT_CLEANUP
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment