[ovs-discuss] Possible bug on vlan_vid match

Jesse Gross jesse at nicira.com
Sat Nov 9 06:49:05 UTC 2013


On Wed, Nov 6, 2013 at 3:08 AM, Eder Leao Fernandes <ederlf at cpqd.com.br> wrote:
> 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?

OVS uses the CFI bit internally to indicate whether a vlan tag is
present (to differentiate between no tag and an all-zeros tag). This
function is only setting the value of a tag, not adding one, so it
avoids changing that bit. I would expect the CFI bit to be set when a
tag is actually pushed.



More information about the discuss mailing list