summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authormweglicx <michalx.weglicki@intel.com>2016-05-05 09:46:01 +0100
committerBen Pfaff <blp@ovn.org>2016-05-06 15:28:56 -0700
commitd6e3feb57c44e18580015d8e99dd751cff4f2c9e (patch)
tree2d243eed928b2b3fad094e9990f98713176adbc4 /tests
parent104aec4e0c57bc92a3c22cea9dff69f74adda861 (diff)
downloadopenvswitch-d6e3feb57c44e18580015d8e99dd751cff4f2c9e.tar.gz
Add support for extended netdev statistics based on RFC 2819.
Implementation of new statistics extension for DPDK ports: - Add new counters definition to netdev struct and open flow, based on RFC2819. - Initialize netdev statistics as "filtered out" before passing it to particular netdev implementation (because of that change, statistics which are not collected are reported as filtered out, and some unit tests were modified in this respect). - New statistics are retrieved using experimenter code and are printed as a result to ofctl dump-ports. - New counters are available for OpenFlow 1.4+. - Add new vendor id: INTEL_VENDOR_ID. - New statistics are printed to output via ofctl only if those are present in reply message. - Add new file header: include/openflow/intel-ext.h which contains new statistics definition. - Extended statistics are implemented only for dpdk-physical and dpdk-vhost port types. - Dpdk-physical implementation uses xstats to collect statistics. - Dpdk-vhost implements only part of statistics (RX packet sized based counters). Signed-off-by: Michal Weglicki <michalx.weglicki@intel.com> [blp@ovn.org made software devices more consistent] Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/learn.at24
-rw-r--r--tests/ofproto-dpif.at68
-rw-r--r--tests/ofproto.at12
-rw-r--r--tests/tunnel-push-pop-ipv6.at6
-rw-r--r--tests/tunnel-push-pop.at6
5 files changed, 58 insertions, 58 deletions
diff --git a/tests/learn.at b/tests/learn.at
index 31ff4fd0c..68bde874a 100644
--- a/tests/learn.at
+++ b/tests/learn.at
@@ -329,11 +329,11 @@ NXST_FLOW reply:
AT_CHECK(
[(ovs-ofctl dump-ports br0 2; ovs-ofctl dump-ports br0 3) | strip_xids], [0],
[OFPST_PORT reply: 1 ports
- port 2: rx pkts=0, bytes=0, drop=0, errs=0, frame=0, over=0, crc=0
- tx pkts=1, bytes=60, drop=0, errs=0, coll=0
+ port 2: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
+ tx pkts=1, bytes=60, drop=?, errs=?, coll=?
OFPST_PORT reply: 1 ports
- port 3: rx pkts=0, bytes=0, drop=0, errs=0, frame=0, over=0, crc=0
- tx pkts=9, bytes=540, drop=0, errs=0, coll=0
+ port 3: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
+ tx pkts=9, bytes=540, drop=?, errs=?, coll=?
])
OVS_VSWITCHD_STOP
@@ -380,11 +380,11 @@ done
AT_CHECK(
[(ovs-ofctl dump-ports br0 2; ovs-ofctl dump-ports br0 3) | strip_xids], [0],
[OFPST_PORT reply: 1 ports
- port 2: rx pkts=0, bytes=0, drop=0, errs=0, frame=0, over=0, crc=0
- tx pkts=2, bytes=120, drop=0, errs=0, coll=0
+ port 2: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
+ tx pkts=2, bytes=120, drop=?, errs=?, coll=?
OFPST_PORT reply: 1 ports
- port 3: rx pkts=0, bytes=0, drop=0, errs=0, frame=0, over=0, crc=0
- tx pkts=18, bytes=1080, drop=0, errs=0, coll=0
+ port 3: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
+ tx pkts=18, bytes=1080, drop=?, errs=?, coll=?
])
# Check for the learning entry.
@@ -466,11 +466,11 @@ done
AT_CHECK(
[(ovs-ofctl dump-ports br0 2; ovs-ofctl dump-ports br0 3) | strip_xids], [0],
[OFPST_PORT reply: 1 ports
- port 2: rx pkts=0, bytes=0, drop=0, errs=0, frame=0, over=0, crc=0
- tx pkts=3, bytes=180, drop=0, errs=0, coll=0
+ port 2: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
+ tx pkts=3, bytes=180, drop=?, errs=?, coll=?
OFPST_PORT reply: 1 ports
- port 3: rx pkts=0, bytes=0, drop=0, errs=0, frame=0, over=0, crc=0
- tx pkts=17, bytes=1020, drop=0, errs=0, coll=0
+ port 3: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
+ tx pkts=17, bytes=1020, drop=?, errs=?, coll=?
])
# Check for the learning entry.
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index 014903beb..29d936998 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -5163,17 +5163,17 @@ IFCOUNTERS
status=0
in_octets=0
in_unicasts=0
- in_multicasts=0
+ in_multicasts=4294967295
in_broadcasts=4294967295
- in_discards=0
- in_errors=0
+ in_discards=4294967295
+ in_errors=4294967295
in_unknownprotos=4294967295
out_octets=120
out_unicasts=2
out_multicasts=4294967295
out_broadcasts=4294967295
- out_discards=0
- out_errors=0
+ out_discards=4294967295
+ out_errors=4294967295
promiscuous=0
IFCOUNTERS
dgramSeqNo=2
@@ -5186,17 +5186,17 @@ IFCOUNTERS
status=0
in_octets=138
in_unicasts=3
- in_multicasts=0
+ in_multicasts=4294967295
in_broadcasts=4294967295
- in_discards=0
- in_errors=0
+ in_discards=4294967295
+ in_errors=4294967295
in_unknownprotos=4294967295
out_octets=120
out_unicasts=2
out_multicasts=4294967295
out_broadcasts=4294967295
- out_discards=0
- out_errors=0
+ out_discards=4294967295
+ out_errors=4294967295
promiscuous=0
IFCOUNTERS
dgramSeqNo=2
@@ -5209,17 +5209,17 @@ IFCOUNTERS
status=0
in_octets=84
in_unicasts=2
- in_multicasts=0
+ in_multicasts=4294967295
in_broadcasts=4294967295
- in_discards=0
- in_errors=0
+ in_discards=4294967295
+ in_errors=4294967295
in_unknownprotos=4294967295
out_octets=180
out_unicasts=3
out_multicasts=4294967295
out_broadcasts=4294967295
- out_discards=0
- out_errors=0
+ out_discards=4294967295
+ out_errors=4294967295
promiscuous=0
IFCOUNTERS
dgramSeqNo=3
@@ -5232,17 +5232,17 @@ IFCOUNTERS
status=0
in_octets=0
in_unicasts=0
- in_multicasts=0
+ in_multicasts=4294967295
in_broadcasts=4294967295
- in_discards=0
- in_errors=0
+ in_discards=4294967295
+ in_errors=4294967295
in_unknownprotos=4294967295
out_octets=120
out_unicasts=2
out_multicasts=4294967295
out_broadcasts=4294967295
- out_discards=0
- out_errors=0
+ out_discards=4294967295
+ out_errors=4294967295
promiscuous=0
IFCOUNTERS
dgramSeqNo=3
@@ -5255,17 +5255,17 @@ IFCOUNTERS
status=0
in_octets=138
in_unicasts=3
- in_multicasts=0
+ in_multicasts=4294967295
in_broadcasts=4294967295
- in_discards=0
- in_errors=0
+ in_discards=4294967295
+ in_errors=4294967295
in_unknownprotos=4294967295
out_octets=120
out_unicasts=2
out_multicasts=4294967295
out_broadcasts=4294967295
- out_discards=0
- out_errors=0
+ out_discards=4294967295
+ out_errors=4294967295
promiscuous=0
IFCOUNTERS
dgramSeqNo=3
@@ -5278,17 +5278,17 @@ IFCOUNTERS
status=0
in_octets=84
in_unicasts=2
- in_multicasts=0
+ in_multicasts=4294967295
in_broadcasts=4294967295
- in_discards=0
- in_errors=0
+ in_discards=4294967295
+ in_errors=4294967295
in_unknownprotos=4294967295
out_octets=180
out_unicasts=3
out_multicasts=4294967295
out_broadcasts=4294967295
- out_discards=0
- out_errors=0
+ out_discards=4294967295
+ out_errors=4294967295
promiscuous=0
OPENFLOWPORT
datapath_id=18364758544493064720
@@ -6212,14 +6212,14 @@ skb_priority(0/0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(101),eth(src=5
AT_CHECK([ovs-ofctl dump-ports br0 pbr0], [0], [dnl
OFPST_PORT reply (xid=0x4): 1 ports
- port 1: rx pkts=5, bytes=300, drop=0, errs=0, frame=0, over=0, crc=0
- tx pkts=10, bytes=600, drop=0, errs=0, coll=0
+ port 1: rx pkts=5, bytes=300, drop=?, errs=?, frame=?, over=?, crc=?
+ tx pkts=10, bytes=600, drop=?, errs=?, coll=?
])
AT_CHECK([ovs-ofctl dump-ports br1 pbr1], [0], [dnl
OFPST_PORT reply (xid=0x4): 1 ports
- port 1: rx pkts=10, bytes=600, drop=0, errs=0, frame=0, over=0, crc=0
- tx pkts=5, bytes=300, drop=0, errs=0, coll=0
+ port 1: rx pkts=10, bytes=600, drop=?, errs=?, frame=?, over=?, crc=?
+ tx pkts=5, bytes=300, drop=?, errs=?, coll=?
])
OVS_VSWITCHD_STOP
diff --git a/tests/ofproto.at b/tests/ofproto.at
index c4260ab27..f8c0d0732 100644
--- a/tests/ofproto.at
+++ b/tests/ofproto.at
@@ -84,8 +84,8 @@ OVS_VSWITCHD_START
AT_CHECK([ovs-ofctl -vwarn dump-ports br0], [0], [stdout])
AT_CHECK([strip_xids < stdout], [0], [dnl
OFPST_PORT reply: 1 ports
- port LOCAL: rx pkts=0, bytes=0, drop=0, errs=0, frame=0, over=0, crc=0
- tx pkts=0, bytes=0, drop=0, errs=0, coll=0
+ port LOCAL: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
+ tx pkts=0, bytes=0, drop=?, errs=?, coll=?
])
OVS_VSWITCHD_STOP
AT_CLEANUP
@@ -95,8 +95,8 @@ OVS_VSWITCHD_START
AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-ports br0], [0], [stdout])
AT_CHECK([strip_xids < stdout], [0], [dnl
OFPST_PORT reply (OF1.2): 1 ports
- port LOCAL: rx pkts=0, bytes=0, drop=0, errs=0, frame=0, over=0, crc=0
- tx pkts=0, bytes=0, drop=0, errs=0, coll=0
+ port LOCAL: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
+ tx pkts=0, bytes=0, drop=?, errs=?, coll=?
])
OVS_VSWITCHD_STOP
AT_CLEANUP
@@ -107,8 +107,8 @@ AT_CHECK([ovs-ofctl -O OpenFlow14 -vwarn dump-ports br0], [0], [stdout])
AT_CHECK([strip_xids < stdout | sed 's/duration=[[0-9.]]*s/duration=?s/'],
[0], [dnl
OFPST_PORT reply (OF1.4): 1 ports
- port LOCAL: rx pkts=0, bytes=0, drop=0, errs=0, frame=0, over=0, crc=0
- tx pkts=0, bytes=0, drop=0, errs=0, coll=0
+ port LOCAL: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
+ tx pkts=0, bytes=0, drop=?, errs=?, coll=?
duration=?s
])
OVS_VSWITCHD_STOP
diff --git a/tests/tunnel-push-pop-ipv6.at b/tests/tunnel-push-pop-ipv6.at
index ee8c48f4e..f8bb8004c 100644
--- a/tests/tunnel-push-pop-ipv6.at
+++ b/tests/tunnel-push-pop-ipv6.at
@@ -129,7 +129,7 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab6486dd600000
ovs-appctl time/warp 1000
AT_CHECK([ovs-ofctl dump-ports int-br | grep 'port 3'], [0], [dnl
- port 3: rx pkts=1, bytes=98, drop=0, errs=0, frame=0, over=0, crc=0
+ port 3: rx pkts=1, bytes=98, drop=?, errs=?, frame=?, over=?, crc=?
])
dnl Check GRE only accepts encapsulated Ethernet frames
@@ -137,7 +137,7 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab6486dd600000
ovs-appctl time/warp 1000
AT_CHECK([ovs-ofctl dump-ports int-br | grep 'port 3'], [0], [dnl
- port 3: rx pkts=1, bytes=98, drop=0, errs=0, frame=0, over=0, crc=0
+ port 3: rx pkts=1, bytes=98, drop=?, errs=?, frame=?, over=?, crc=?
])
dnl Check decapsulation of Geneve packet with options
@@ -157,7 +157,7 @@ icmp,vlan_tci=0x0000,dl_src=be:b6:f4:e1:49:4a,dl_dst=fe:71:d8:83:72:4f,nw_src=30
])
AT_CHECK([ovs-ofctl dump-ports int-br | grep 'port 5'], [0], [dnl
- port 5: rx pkts=1, bytes=98, drop=0, errs=0, frame=0, over=0, crc=0
+ port 5: rx pkts=1, bytes=98, drop=?, errs=?, frame=?, over=?, crc=?
])
AT_CHECK([ovs-appctl dpif/dump-flows int-br], [0], [dnl
tunnel(tun_id=0x7b,ipv6_src=2001:cafe::92,ipv6_dst=2001:cafe::88,geneve({class=0xffff,type=0x80,len=4,0xa/0xf}{class=0xffff,type=0,len=4}),flags(-df-csum+key)),skb_mark(0),recirc_id(0),in_port(6081),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:userspace(pid=0,slow_path(controller))
diff --git a/tests/tunnel-push-pop.at b/tests/tunnel-push-pop.at
index a7909d326..99523067b 100644
--- a/tests/tunnel-push-pop.at
+++ b/tests/tunnel-push-pop.at
@@ -129,7 +129,7 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab640800450000
ovs-appctl time/warp 1000
AT_CHECK([ovs-ofctl dump-ports int-br | grep 'port 3'], [0], [dnl
- port 3: rx pkts=1, bytes=98, drop=0, errs=0, frame=0, over=0, crc=0
+ port 3: rx pkts=1, bytes=98, drop=?, errs=?, frame=?, over=?, crc=?
])
dnl Check GRE only accepts encapsulated Ethernet frames
@@ -137,7 +137,7 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab640800450000
ovs-appctl time/warp 1000
AT_CHECK([ovs-ofctl dump-ports int-br | grep 'port 3'], [0], [dnl
- port 3: rx pkts=1, bytes=98, drop=0, errs=0, frame=0, over=0, crc=0
+ port 3: rx pkts=1, bytes=98, drop=?, errs=?, frame=?, over=?, crc=?
])
dnl Check decapsulation of Geneve packet with options
@@ -157,7 +157,7 @@ icmp,vlan_tci=0x0000,dl_src=be:b6:f4:e1:49:4a,dl_dst=fe:71:d8:83:72:4f,nw_src=30
])
AT_CHECK([ovs-ofctl dump-ports int-br | grep 'port 5'], [0], [dnl
- port 5: rx pkts=1, bytes=98, drop=0, errs=0, frame=0, over=0, crc=0
+ port 5: rx pkts=1, bytes=98, drop=?, errs=?, frame=?, over=?, crc=?
])
AT_CHECK([ovs-appctl dpif/dump-flows int-br], [0], [dnl
tunnel(tun_id=0x7b,src=1.1.2.92,dst=1.1.2.88,geneve({class=0xffff,type=0x80,len=4,0xa/0xf}{class=0xffff,type=0,len=4}),flags(-df-csum+key)),skb_mark(0),recirc_id(0),in_port(6081),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:userspace(pid=0,slow_path(controller))