[VTN-95] Flowfilter action "vlan-pcp" is not listed in the flow entries installed to the switch. Created: 09/Jan/16  Updated: 19/Oct/17  Resolved: 28/Jan/16

Status: Resolved
Project: vtn
Component/s: VTN Manager
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Karthik Sivasamy Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Text File vlanpcp.log    
External issue ID: 4914

 Description   

I observed that when i create flowfilter by setting action vlan-pcp, creation and ping success.

But when i do dumpflow vlan-pcp entry is not set(it shows "vlan_tci=0x0000").

Attached Karaf log. Below are the steps

How to reproduce the issue:

Configuration:
Created VTN, VBR Interfaces
if1 portmapping - "tenant-name":"vtn1", "bridge-name":"vbr1", "interface-name":"if1", "node":"openflow:2", "port-name":"s2-eth1"
if2 portmapping - "tenant-name":"vtn1", "bridge-name":"vbr1", "interface-name":"if1", "node":"openflow:2", "port-name":"s2-eth1"

Flowcondition:
curl --user "admin":"admin" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/vtn-flow-condition:set-flow-condition -d '{"input":{"operation":"SET","present":"false","name":"cond_1","vtn-flow-match":[{"vtn-ether-match":{},"vtn-inet-match":

{"source-network":"10.0.0.1/32","destination-network":"10.0.0.3/32"}

,"index":"1"}]}}'

Flowfilter:
curl -v --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/vtn-flow-filter:set-flow-filter -d '{"input": { "tenant-name": "vtn1", "bridge-name": "vbr1", "interface-name": "if1", "vtn-flow-filter": [{"condition": "cond_1","index": "10", "vtn-pass-filter": {}, "vtn-flow-action": [{ "order": "1", "vtn-set-vlan-pcp-action": {"vlan-pcp": "7"}}]}]}}'

Ping Status:
mininet> h1 ping h3
PING 10.0.0.3 (10.0.0.3) 56(84) bytes of data.
64 bytes from 10.0.0.3: icmp_seq=1 ttl=64 time=24.1 ms
64 bytes from 10.0.0.3: icmp_seq=2 ttl=64 time=19.4 ms
64 bytes from 10.0.0.3: icmp_seq=3 ttl=64 time=0.662 ms

Dumpflow:

mininet> dpctl dump-flows

      • s1 ------------------------------------------------------------------------
        NXST_FLOW reply (xid=0x4):
        cookie=0x7f56000000000004, duration=12.523s, table=0, n_packets=12, n_bytes=1120, idle_age=3, priority=10,in_port=2,vlan_tci=0x0000,dl_src=5a:1a:e5:19:5d:68,dl_dst=8e:f4:bd:ac:60:73 actions=output:1
        cookie=0x7f56000000000006, duration=7.505s, table=0, n_packets=0, n_bytes=0, idle_age=7, priority=11,arp,in_port=1,vlan_tci=0x0000,dl_src=8e:f4:bd:ac:60:73,dl_dst=5a:1a:e5:19:5d:68 actions=output:2
        cookie=0x7f56000000000005, duration=11.517s, table=0, n_packets=10, n_bytes=980, idle_age=1, priority=13,ip,in_port=1,vlan_tci=0x0000,dl_src=8e:f4:bd:ac:60:73,dl_dst=5a:1a:e5:19:5d:68,nw_src=10.0.0.1,nw_dst=10.0.0.3 actions=output:2
      • s2 ------------------------------------------------------------------------
        NXST_FLOW reply (xid=0x4):
        cookie=0x7f56000000000004, duration=12.533s, table=0, n_packets=12, n_bytes=1120, idle_age=1, priority=10,in_port=3,vlan_tci=0x0000,dl_src=5a:1a:e5:19:5d:68,dl_dst=8e:f4:bd:ac:60:73 actions=output:1
        cookie=0x7f56000000000006, duration=7.513s, table=0, n_packets=0, n_bytes=0, idle_timeout=300, idle_age=7, priority=11,arp,in_port=1,vlan_tci=0x0000,dl_src=8e:f4:bd:ac:60:73,dl_dst=5a:1a:e5:19:5d:68 actions=output:3
        cookie=0x7f56000000000005, duration=11.524s, table=0, n_packets=10, n_bytes=980, idle_timeout=300, idle_age=1, priority=13,ip,in_port=1,vlan_tci=0x0000,dl_src=8e:f4:bd:ac:60:73,dl_dst=5a:1a:e5:19:5d:68,nw_src=10.0.0.1,nw_dst=10.0.0.3 actions=output:3
      • s3 ------------------------------------------------------------------------
        NXST_FLOW reply (xid=0x4):
        cookie=0x7f56000000000004, duration=12.538s, table=0, n_packets=12, n_bytes=1120, idle_timeout=300, idle_age=1, priority=10,in_port=1,vlan_tci=0x0000,dl_src=5a:1a:e5:19:5d:68,dl_dst=8e:f4:bd:ac:60:73 actions=output:3
        cookie=0x7f56000000000006, duration=7.524s, table=0, n_packets=0, n_bytes=0, idle_age=7, priority=11,arp,in_port=3,vlan_tci=0x0000,dl_src=8e:f4:bd:ac:60:73,dl_dst=5a:1a:e5:19:5d:68 actions=output:1
        cookie=0x7f56000000000005, duration=11.536s, table=0, n_packets=10, n_bytes=980, idle_age=1, priority=13,ip,in_port=3,vlan_tci=0x0000,dl_src=8e:f4:bd:ac:60:73,dl_dst=5a:1a:e5:19:5d:68,nw_src=10.0.0.1,nw_dst=10.0.0.3 actions=output:1
        mininet>


 Comments   
Comment by Karthik Sivasamy [ 09/Jan/16 ]

Attachment vlanpcp.log has been added with description: Karaf log enabled TRACE

Comment by Karthik Sivasamy [ 11/Jan/16 ]

I have Tested in both Master and Stable/Lithium code, and vlanpcp is not listed in flow entries.

Here i adding the configurations which i tested in Stable/Li,

Created VTN, VBR, Interfaces, portmapping,

Scenario1:
Without setting in vlan-id in flowcondition

Flowcondition:
curl -v --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X PUT http://localhost:8282/controller/nb/v2/vtn/default/flowconditions/cond_1 -d '{"name": "cond_1","match": [ {"index": 10,"inetMatch": {"inet4":

{ "src": "10.0.0.1","dst": "10.0.0.3"}

}}]}'

FLowfilter:
curl -v --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X PUT http://localhost:8282/controller/nb/v2/vtn/default/vtns/Tenant1/vbridges/vBridge1/interfaces/if1/flowfilters/in/10 -d '{"index":10,"condition":"cond_1","filterType":{"pass":{}},"actions":[{"vlanpcp":{"priority": 6}}]}'

Scenario 2:
With vlan id in flowcondition and vlanpcp in flowfilter action

Flowcondition:
curl -v --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X PUT http://localhost:8282/controller/nb/v2/vtn/default/flowconditions/cond_1 -d '{"name": "cond_1","match": [ {"index": 10,"inetMatch": {"inet4": { "src": "10.0.0.1","dst": "10.0.0.3"}},"ethernet": {"vlan": 6}}]}'

Flowfilter:
curl -v --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X PUT http://localhost:8282/controller/nb/v2/vtn/default/vtns/Tenant1/vbridges/vBridge1/interfaces/if1/flowfilters/in/10 -d '{"index":10,"condition":"cond_1","filterType":{"pass":{}},"actions":[{"vlanpcp":{"priority": 6}}]}'

Comment by Hideyuki Tai [ 15/Jan/16 ]

(In reply to Karthik Sivasamy from comment #0)
> Created attachment 745 [details]
> Karaf log enabled TRACE
>
> I observed that when i create flowfilter by setting action vlan-pcp,
> creation and ping success.
>
> But when i do dumpflow vlan-pcp entry is not set(it shows "vlan_tci=0x0000").
>

I don't think this is a bug.

I think the action "vtn-set-vlan-pcp-action" should affect only packets which have an 802.1Q header, since this is the action which sets the specified VLAN priority into the IEEE 802.1Q header.
However, you just sent packets which didn't have an 802.1Q header, so I think it is OK that VTN Manger did not set the action which changed the value of the VLAN priority on the 802.1Q header.

Am I missing something here?
Could you explain what you are expecting?

Comment by Karthik Sivasamy [ 28/Jan/16 ]

Yes it is not a bug.
As you said issue which i faced was due to 802.1Q header is not set in packet.

I didnt face any issue while following below steps. And i can see vlan-pcp in flow entries.

1) Run mininet with vlan topology (example. https://wiki.opendaylight.org/view/OpenDaylight_Virtual_Tenant_Network_(VTN):Scripts:Mininet#Network_with_hosts_in_different_vlan)

2) Create VTN, VBR, vlan-map
3) Flowlist with source and destination ip (example: h1 and h3 )
4) VBR flowfilter with action vlan-pcp "7"
5) Ping h1 and h3.
6) check flow entries, Got below flows which has vlan-pcp entry in it.

NXST_FLOW reply (xid=0x4):
cookie=0x7f56000000000013, duration=24.831s, table=0, n_packets=17, n_bytes=1670, idle_age=7, priority=13,ip,in_port=1,dl_vlan=200,dl_src=62:af:51:18:7d:3f,dl_dst=06:61:73:92:6d:64,nw_src=10.0.0.1,nw_dst=10.0.0.3 actions=mod_vlan_pcp:7,output:3

Comment by Karthik Sivasamy [ 28/Jan/16 ]

Verified in wireshark by capturing packet flows, and i can see vlan pcp in the name of VLAN PRI =7, which is below

802.1Q Virtual LAN, PRI: 7, CFI: 0, ID: 200

Comment by Hideyuki Tai [ 28/Jan/16 ]

(In reply to Karthik Sivasamy from comment #3)
> Yes it is not a bug.
> As you said issue which i faced was due to 802.1Q header is not set in
> packet.
>
> I didnt face any issue while following below steps. And i can see vlan-pcp
> in flow entries.
>
> 1) Run mininet with vlan topology (example.
> https://wiki.opendaylight.org/view/OpenDaylight_Virtual_Tenant_Network_(VTN):
> Scripts:Mininet#Network_with_hosts_in_different_vlan)
>
> 2) Create VTN, VBR, vlan-map
> 3) Flowlist with source and destination ip (example: h1 and h3 )
> 4) VBR flowfilter with action vlan-pcp "7"
> 5) Ping h1 and h3.
> 6) check flow entries, Got below flows which has vlan-pcp entry in it.
>
>
> NXST_FLOW reply (xid=0x4):
> cookie=0x7f56000000000013, duration=24.831s, table=0, n_packets=17,
> n_bytes=1670, idle_age=7,
> priority=13,ip,in_port=1,dl_vlan=200,dl_src=62:af:51:18:7d:3f,dl_dst=06:61:
> 73:92:6d:64,nw_src=10.0.0.1,nw_dst=10.0.0.3 actions=mod_vlan_pcp:7,output:3

Hi Karthik,

Thank you for your test!

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