Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests-1.0 - several tests create an invalid match when here is no VLAN by using packet_to_flow_match_v1 #139

Open
alonkochba opened this issue Jul 27, 2014 · 1 comment

Comments

@alonkochba
Copy link

Several 1.0 tests (flow_expire.FlowExpire, flow_stats.AggregateFlowStats and flow_stats.SingleFlowStats) create a match from a packet, and then compare that match to the stats request received.

The packet match created when there is no VLAN is vlan VID = OFP_VLAN_NONE and PCP=0, however according to errata 1.0.1 this is an illegal match:
_"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."_

Propose to change the match created from packet when there is no VLAN in the following manner:

    diff --git src/python/oftest/parse.py src/python/oftest/parse.py
    index 0d57443..f3edea2 100644
    --- src/python/oftest/parse.py
    +++ src/python/oftest/parse.py
    @@ -123,11 +123,10 @@ def packet_to_flow_match_v1(packet):
             match.vlan_vid = dot1q.vlan
             match.vlan_pcp = dot1q.prio
             match.eth_type = dot1q.type
    +       match.wildcards &= ~ofp.OFPFW_DL_VLAN_PCP
         else:
             match.vlan_vid = ofp.OFP_VLAN_NONE
    -        match.vlan_pcp = 0
         match.wildcards &= ~ofp.OFPFW_DL_VLAN
    -    match.wildcards &= ~ofp.OFPFW_DL_VLAN_PCP
@tony-vanderpeet
Copy link

I have a pull request in that solves this in another way, by modifying the match on the tests in question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants