ofp-util: For OF1.0, don't wildcard PCP field when 802.1Q header absent.
authorBen Pfaff <blp@nicira.com>
Fri, 21 Aug 2015 00:07:40 +0000 (17:07 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 24 Aug 2015 18:01:00 +0000 (11:01 -0700)
commit053df7bda62b6892029b2f9306f3d0481b69dea9
tree4a1b76479013ad59f240793d7fc7f0f8bddd89c2
parent419eed6182ccb28fbdaab05d483bb9089c1a3ef1
ofp-util: For OF1.0, don't wildcard PCP field when 802.1Q header absent.

OpenFlow 1.0.1 says:

    The dl_vlan_pcp field must be ignored when the OFPFW_DL_VLAN wildcard
    bit is set or when the dl_vlan value is set to OFP_VLAN_NONE.  Fields
    that are ignored don’t need to be wildcarded and should be set to 0.

Previously, OVS wildcarded the PCP field when dl_vlan was OFP_VLAN_NONE,
but this commit changes the behavior to that suggested above: the PCP
field should not be wildcarded (and should be set to 0, but the code
already did that).

This commit only changes the translation from OVS's internal flow format
to the OpenFlow 1.0 wire format.  Translation in the other direction and
to other formats is unaffected.

Found by OFTest.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
DESIGN.md
lib/ofp-util.c
tests/flowgen.pl
tests/ovs-ofctl.at