[NETVIRT-145] push vlan rules in table=220 are creating a different vlan header than the incoming one Created: 14/Sep/16  Updated: 07/Dec/16  Resolved: 07/Dec/16

Status: Resolved
Project: netvirt
Component/s: General
Affects Version/s: Boron
Fix Version/s: None

Type: Bug
Reporter: Koby Aizer Assignee: Koby Aizer
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 6723

 Description   

When working with a vlan provider external network, those are the rules which are created

In table 0, we pop the vlan=805:
cookie=0x8000000, duration=9604.760s, table=0, n_packets=152, n_bytes=10102, priority=10,in_port=1,dl_vlan=805 actions=pop_vlan,write_metadata:0x130000000001/0xffffff0000000001,goto_table:17

In table 220, when we output to the external gateway, we set the same VID but with an extra DEI/CFI bit (bit 13):
cookie=0x8000007, duration=9604.716s, table=220, n_packets=50, n_bytes=2430, priority=7,reg6=0x1300 actions=push_vlan:0x8100,set_field:4901->vlan_vid,output:1

Seems to be originated in the openflowplugin code which is used in netvirt:
In FlowConvertor.injectPushActionToInstruction()

pushVlanActionBuilder.setCfi(new VlanCfi(1))
.setVlanId(setVlanIdActionCase.getSetVlanIdAction().getVlanId())
.setEthernetType(PUSH_VLAN)
.setTag(PUSH_VLAN);
pushVlanActionCaseBuilder.setPushVlanAction(pushVlanActionBuilder.build());



 Comments   
Comment by Alon Kochba [ 29/Nov/16 ]

(In reply to Koby Aizer from comment #0)
> When working with a vlan provider external network, those are the rules
> which are created
>
> In table 0, we pop the vlan=805:
> cookie=0x8000000, duration=9604.760s, table=0, n_packets=152, n_bytes=10102,
> priority=10,in_port=1,dl_vlan=805
> actions=pop_vlan,write_metadata:0x130000000001/0xffffff0000000001,goto_table:
> 17
>
> In table 220, when we output to the external gateway, we set the same VID
> but with an extra DEI/CFI bit (bit 13):
> cookie=0x8000007, duration=9604.716s, table=220, n_packets=50, n_bytes=2430,
> priority=7,reg6=0x1300
> actions=push_vlan:0x8100,set_field:4901->vlan_vid,output:1
>
>
> Seems to be originated in the openflowplugin code which is used in netvirt:
> In FlowConvertor.injectPushActionToInstruction()
>
> pushVlanActionBuilder.setCfi(new VlanCfi(1))
>
> .setVlanId(setVlanIdActionCase.getSetVlanIdAction().getVlanId())
> .setEthernetType(PUSH_VLAN)
> .setTag(PUSH_VLAN);
>
> pushVlanActionCaseBuilder.setPushVlanAction(pushVlanActionBuilder.build());

Though very annoying, it seems this is according to the standard..
Maybe we can use an alternate match/action so they at least look similar, but it has to be correct:

See OF_VLAN_VID in p56 - https://www.opennetworking.org/images/stories/downloads/sdn-resources/onf-specifications/openflow/openflow-spec-v1.3.3.pdf

OXM_OF_VLAN_VID 12+1 2 Yes None VLAN-ID from 802.1Q header. The CFI bit indicate
the presence of a valid VLAN-ID, see below.

Generated at Wed Feb 07 20:20:49 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.