[ovs-discuss] Possible bug on vlan_vid match

Eder Leao Fernandes ederlf at cpqd.com.br
Tue Nov 5 19:08:39 UTC 2013


Update:

I have found that if you add a flow with dl_vlan the packet is sent to the
output port.

Then I looked at the packets generated by ofctl with vlan_vid and with
dl_vlan.
The vlan_vid value has not the cfi set, while the message sent with dl_vlan
had.

A quick search for vlan_vid into the code took me to this function.

flow_set_vlan_vid(struct flow *flow, ovs_be16 vid)
{
    ovs_be16 mask = htons(VLAN_VID_MASK | VLAN_CFI);
    flow->vlan_tci &= ~mask;
    flow->vlan_tci |= vid & mask;
}

For the scenario presented, taking vlan_vid=100, the value will always be
100 and the CFI bit will never be set.
My question is if the vid should have this bit previously set, or it should
be done on that function?

I want to know this, so I can try to provide a patch for the issue.

Best Regards,
Eder.






On Thu, Oct 31, 2013 at 2:04 PM, Eder Leao Fernandes <ederlf at cpqd.com.br>wrote:

> Hi,
>
> I'm trying to match on vlan_vid using Open vSwitch, set as an OpenFlow 1.3
> switch.
> The flows are the following:
>
> At table 0:  tag the packet, set the vid to 100 and send it to table 1.
> $ sudo ovs-ofctl -O OpenFlow13 add-flow s1
> table=0,in_port=1,actions=push_vlan:0x8100,set_field:100-\>vlan_vid,goto_table:1
>
> At table 1: Match on in_port and vlan_vid, then output to port 2
> $ sudo ovs-ofctl -O OpenFlow13 add-flow s1
> table=1,in_port=1,vlan_vid=100,actions=output:2
>
> Sending packets through the interface 1, the packets match the flow at
> table 0, but do not match the flow at table 2.
>
> This is the dump flows result
> $ sudo  ovs-ofctl -O OpenFlow13  dump-flows s1
> OFPST_FLOW reply (OF1.3) (xid=0x2):
>  cookie=0x0, duration=94.936s, table=0, n_packets=7, n_bytes=294, in_port=1
> actions=push_vlan:0x8100,set_field:100->vlan_vid,goto_table:1
>  cookie=0x0, duration=75.93s, table=1, n_packets=0, n_bytes=0,
> in_port=1,vlan_tci=0x0064/0x1fff actions=output:2
>
> Reading the ofctl man page I can see that the vlan_tci  value shown by the
> dump-flows looks right
>
> ovs-vswitchd (Open vSwitch) 2.0.90
>
> Git commit number: 61ed018a6bb5e8857a285ea391a028c38c766846
>
> Regards,
>
> --
> Eder Leão Fernandes, Jr Researcher
> Converged Networks Business Unit
> CPqD - Center for Research and Development in Telecommunications
> Tel.:+55 19-3705-5932 / Cel.: +55 19-983 006 776
>



-- 
Eder Leão Fernandes, Jr Researcher
Converged Networks Business Unit
CPqD - Center for Research and Development in Telecommunications
Tel.:+55 19-3705-5932 / Cel.: +55 19-983 006 776
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20131105/ea50231c/attachment.html>


More information about the discuss mailing list