[ovs-discuss] new header/field masking bug

Cody Doucette doucette at bu.edu
Wed Feb 24 17:28:14 UTC 2016


As a simple example to start a larger project, I'm trying to add a new
header ("XIA") to OVS and recognize a single, 8-bit field ("version").

Everything seems to be working except reading and matching against the
value in the packet. I suspect that I introduced a bug in how to
wildcard/mask the field, but I can't figure out what's wrong.

For example, I can add a rule and show that it exists:

$ sudo ovs-ofctl add-flow s1 xia,xia_version=1,action=drop
$ sudo ovs-ofctl dump-flows s1
 cookie=0x0, duration=39.477s, table=0, n_packets=0, n_bytes=0,
idle_age=39, xia,xia_version=1 actions=drop

I then send packets through the switch, but OVS is reading the packets'
version number as 0 instead of 1:

$ sudo ovs-ofctl dump-flows s1
 cookie=0x0, duration=2.785s, table=0, n_packets=0, n_bytes=0,
idle_timeout=60, idle_age=2,
priority=65535,xia,xia_version=0,in_port=1,vlan_tci=0x0000,dl_src=4a:89:41:15:23:cc,dl_dst=86:95:6d:92:55:55
actions=output:2
 cookie=0x0, duration=2.775s, table=0, n_packets=0, n_bytes=0,
idle_timeout=60, idle_age=2,
priority=65535,xia,xia_version=0,in_port=2,vlan_tci=0x0000,dl_src=86:95:6d:92:55:55,dl_dst=4a:89:41:15:23:cc
actions=output:1
 cookie=0x0, duration=39.477s, table=0, n_packets=0, n_bytes=0,
idle_age=39, xia,xia_version=1 actions=drop

I verified that the packet has a version number of 1 by using Wireshark and
by printing out the packet's value when it is received in
miniflow_extract(). Sometime after that, the 1 is lost.

I'd appreciate any tips on where to look for this bug, or quick peek at
what I've added so far:

https://github.com/cjdoucette/ovs/commit/4a5d81c31a903e892940cb5fd79467d7dc81fb92

Thanks for any help,
Cody
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20160224/1a7e8df2/attachment-0002.html>


More information about the discuss mailing list