hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/net/ethernet/mscc/ocelot_flower.c
....@@ -468,6 +468,18 @@
468468 flow_rule_match_control(rule, &match);
469469 }
470470
471
+ if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_VLAN)) {
472
+ struct flow_match_vlan match;
473
+
474
+ flow_rule_match_vlan(rule, &match);
475
+ filter->key_type = OCELOT_VCAP_KEY_ANY;
476
+ filter->vlan.vid.value = match.key->vlan_id;
477
+ filter->vlan.vid.mask = match.mask->vlan_id;
478
+ filter->vlan.pcp.value[0] = match.key->vlan_priority;
479
+ filter->vlan.pcp.mask[0] = match.mask->vlan_priority;
480
+ match_protocol = false;
481
+ }
482
+
471483 if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ETH_ADDRS)) {
472484 struct flow_match_eth_addrs match;
473485
....@@ -597,18 +609,6 @@
597609 filter->key.ipv4.sport.mask = ntohs(match.mask->src);
598610 filter->key.ipv4.dport.value = ntohs(match.key->dst);
599611 filter->key.ipv4.dport.mask = ntohs(match.mask->dst);
600
- match_protocol = false;
601
- }
602
-
603
- if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_VLAN)) {
604
- struct flow_match_vlan match;
605
-
606
- flow_rule_match_vlan(rule, &match);
607
- filter->key_type = OCELOT_VCAP_KEY_ANY;
608
- filter->vlan.vid.value = match.key->vlan_id;
609
- filter->vlan.vid.mask = match.mask->vlan_id;
610
- filter->vlan.pcp.value[0] = match.key->vlan_priority;
611
- filter->vlan.pcp.mask[0] = match.mask->vlan_priority;
612612 match_protocol = false;
613613 }
614614