| .. | .. |
|---|
| 468 | 468 | flow_rule_match_control(rule, &match); |
|---|
| 469 | 469 | } |
|---|
| 470 | 470 | |
|---|
| 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 | + |
|---|
| 471 | 483 | if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ETH_ADDRS)) { |
|---|
| 472 | 484 | struct flow_match_eth_addrs match; |
|---|
| 473 | 485 | |
|---|
| .. | .. |
|---|
| 597 | 609 | filter->key.ipv4.sport.mask = ntohs(match.mask->src); |
|---|
| 598 | 610 | filter->key.ipv4.dport.value = ntohs(match.key->dst); |
|---|
| 599 | 611 | 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; |
|---|
| 612 | 612 | match_protocol = false; |
|---|
| 613 | 613 | } |
|---|
| 614 | 614 | |
|---|