Lines Matching refs:encap

1248 			p.encap.encap_mask = 1LLU << RTE_TABLE_ACTION_ENCAP_ETHER;  in cmd_table_action_profile()
1250 p.encap.encap_mask = 1LLU << RTE_TABLE_ACTION_ENCAP_VLAN; in cmd_table_action_profile()
1252 p.encap.encap_mask = 1LLU << RTE_TABLE_ACTION_ENCAP_QINQ; in cmd_table_action_profile()
1254 p.encap.encap_mask = 1LLU << RTE_TABLE_ACTION_ENCAP_MPLS; in cmd_table_action_profile()
1256 p.encap.encap_mask = 1LLU << RTE_TABLE_ACTION_ENCAP_PPPOE; in cmd_table_action_profile()
1270 if (parser_read_uint32(&p.encap.vxlan.data_offset, in cmd_table_action_profile()
1278 p.encap.vxlan.ip_version = 1; in cmd_table_action_profile()
1280 p.encap.vxlan.ip_version = 0; in cmd_table_action_profile()
1294 p.encap.vxlan.vlan = 1; in cmd_table_action_profile()
1296 p.encap.vxlan.vlan = 0; in cmd_table_action_profile()
1303 p.encap.encap_mask = 1LLU << RTE_TABLE_ACTION_ENCAP_VXLAN; in cmd_table_action_profile()
1306 p.encap.encap_mask = in cmd_table_action_profile()
3329 parse_mac_addr(tokens[1], &a->encap.ether.ether.da) || in parse_table_action_encap()
3330 parse_mac_addr(tokens[2], &a->encap.ether.ether.sa)) in parse_table_action_encap()
3333 a->encap.type = RTE_TABLE_ACTION_ENCAP_ETHER; in parse_table_action_encap()
3343 parse_mac_addr(tokens[1], &a->encap.vlan.ether.da) || in parse_table_action_encap()
3344 parse_mac_addr(tokens[2], &a->encap.vlan.ether.sa) || in parse_table_action_encap()
3353 a->encap.vlan.vlan.pcp = pcp & 0x7; in parse_table_action_encap()
3354 a->encap.vlan.vlan.dei = dei & 0x1; in parse_table_action_encap()
3355 a->encap.vlan.vlan.vid = vid & 0xFFF; in parse_table_action_encap()
3356 a->encap.type = RTE_TABLE_ACTION_ENCAP_VLAN; in parse_table_action_encap()
3367 parse_mac_addr(tokens[1], &a->encap.qinq.ether.da) || in parse_table_action_encap()
3368 parse_mac_addr(tokens[2], &a->encap.qinq.ether.sa) || in parse_table_action_encap()
3383 a->encap.qinq.svlan.pcp = svlan_pcp & 0x7; in parse_table_action_encap()
3384 a->encap.qinq.svlan.dei = svlan_dei & 0x1; in parse_table_action_encap()
3385 a->encap.qinq.svlan.vid = svlan_vid & 0xFFF; in parse_table_action_encap()
3386 a->encap.qinq.cvlan.pcp = cvlan_pcp & 0x7; in parse_table_action_encap()
3387 a->encap.qinq.cvlan.dei = cvlan_dei & 0x1; in parse_table_action_encap()
3388 a->encap.qinq.cvlan.vid = cvlan_vid & 0xFFF; in parse_table_action_encap()
3389 a->encap.type = RTE_TABLE_ACTION_ENCAP_QINQ; in parse_table_action_encap()
3401 &a->encap.qinq_pppoe.ether.da) || in parse_table_action_encap()
3403 &a->encap.qinq_pppoe.ether.sa) || in parse_table_action_encap()
3416 parser_read_uint16(&a->encap.qinq_pppoe.pppoe.session_id, in parse_table_action_encap()
3420 a->encap.qinq_pppoe.svlan.pcp = svlan_pcp & 0x7; in parse_table_action_encap()
3421 a->encap.qinq_pppoe.svlan.dei = svlan_dei & 0x1; in parse_table_action_encap()
3422 a->encap.qinq_pppoe.svlan.vid = svlan_vid & 0xFFF; in parse_table_action_encap()
3423 a->encap.qinq_pppoe.cvlan.pcp = cvlan_pcp & 0x7; in parse_table_action_encap()
3424 a->encap.qinq_pppoe.cvlan.dei = cvlan_dei & 0x1; in parse_table_action_encap()
3425 a->encap.qinq_pppoe.cvlan.vid = cvlan_vid & 0xFFF; in parse_table_action_encap()
3426 a->encap.type = RTE_TABLE_ACTION_ENCAP_QINQ_PPPOE; in parse_table_action_encap()
3440 a->encap.mpls.unicast = 1; in parse_table_action_encap()
3442 a->encap.mpls.unicast = 0; in parse_table_action_encap()
3446 if (parse_mac_addr(tokens[2], &a->encap.mpls.ether.da) || in parse_table_action_encap()
3447 parse_mac_addr(tokens[3], &a->encap.mpls.ether.sa) || in parse_table_action_encap()
3457 a->encap.mpls.mpls[0].label = label; in parse_table_action_encap()
3458 a->encap.mpls.mpls[0].tc = tc; in parse_table_action_encap()
3459 a->encap.mpls.mpls[0].ttl = ttl; in parse_table_action_encap()
3465 a->encap.mpls.mpls_count = 1; in parse_table_action_encap()
3466 a->encap.type = RTE_TABLE_ACTION_ENCAP_MPLS; in parse_table_action_encap()
3480 a->encap.mpls.mpls[1].label = label; in parse_table_action_encap()
3481 a->encap.mpls.mpls[1].tc = tc; in parse_table_action_encap()
3482 a->encap.mpls.mpls[1].ttl = ttl; in parse_table_action_encap()
3488 a->encap.mpls.mpls_count = 2; in parse_table_action_encap()
3489 a->encap.type = RTE_TABLE_ACTION_ENCAP_MPLS; in parse_table_action_encap()
3503 a->encap.mpls.mpls[2].label = label; in parse_table_action_encap()
3504 a->encap.mpls.mpls[2].tc = tc; in parse_table_action_encap()
3505 a->encap.mpls.mpls[2].ttl = ttl; in parse_table_action_encap()
3511 a->encap.mpls.mpls_count = 3; in parse_table_action_encap()
3512 a->encap.type = RTE_TABLE_ACTION_ENCAP_MPLS; in parse_table_action_encap()
3526 a->encap.mpls.mpls[3].label = label; in parse_table_action_encap()
3527 a->encap.mpls.mpls[3].tc = tc; in parse_table_action_encap()
3528 a->encap.mpls.mpls[3].ttl = ttl; in parse_table_action_encap()
3530 a->encap.mpls.mpls_count = 4; in parse_table_action_encap()
3531 a->encap.type = RTE_TABLE_ACTION_ENCAP_MPLS; in parse_table_action_encap()
3539 parse_mac_addr(tokens[1], &a->encap.pppoe.ether.da) || in parse_table_action_encap()
3540 parse_mac_addr(tokens[2], &a->encap.pppoe.ether.sa) || in parse_table_action_encap()
3541 parser_read_uint16(&a->encap.pppoe.pppoe.session_id, in parse_table_action_encap()
3545 a->encap.type = RTE_TABLE_ACTION_ENCAP_PPPOE; in parse_table_action_encap()
3561 parse_mac_addr(tokens[1], &a->encap.vxlan.ether.da) || in parse_table_action_encap()
3562 parse_mac_addr(tokens[2], &a->encap.vxlan.ether.sa)) in parse_table_action_encap()
3582 a->encap.vxlan.vlan.pcp = pcp; in parse_table_action_encap()
3583 a->encap.vxlan.vlan.dei = dei; in parse_table_action_encap()
3584 a->encap.vxlan.vlan.vid = vid; in parse_table_action_encap()
3605 a->encap.vxlan.ipv4.sa = rte_be_to_cpu_32(sa.s_addr); in parse_table_action_encap()
3606 a->encap.vxlan.ipv4.da = rte_be_to_cpu_32(da.s_addr); in parse_table_action_encap()
3607 a->encap.vxlan.ipv4.dscp = dscp; in parse_table_action_encap()
3608 a->encap.vxlan.ipv4.ttl = ttl; in parse_table_action_encap()
3627 memcpy(a->encap.vxlan.ipv6.sa, sa.s6_addr, 16); in parse_table_action_encap()
3628 memcpy(a->encap.vxlan.ipv6.da, da.s6_addr, 16); in parse_table_action_encap()
3629 a->encap.vxlan.ipv6.flow_label = flow_label; in parse_table_action_encap()
3630 a->encap.vxlan.ipv6.dscp = dscp; in parse_table_action_encap()
3631 a->encap.vxlan.ipv6.hop_limit = hop_limit; in parse_table_action_encap()
3642 parser_read_uint16(&a->encap.vxlan.udp.sp, tokens[1]) || in parse_table_action_encap()
3643 parser_read_uint16(&a->encap.vxlan.udp.dp, tokens[2])) in parse_table_action_encap()
3653 parser_read_uint32(&a->encap.vxlan.vxlan.vni, tokens[1]) || in parse_table_action_encap()
3654 (a->encap.vxlan.vxlan.vni > 0xFFFFFF)) in parse_table_action_encap()
3661 a->encap.type = RTE_TABLE_ACTION_ENCAP_VXLAN; in parse_table_action_encap()
4962 switch (a->encap.type) { in table_rule_show()
4965 ether_addr_show(f, &a->encap.ether.ether.da); in table_rule_show()
4967 ether_addr_show(f, &a->encap.ether.ether.sa); in table_rule_show()
4973 ether_addr_show(f, &a->encap.vlan.ether.da); in table_rule_show()
4975 ether_addr_show(f, &a->encap.vlan.ether.sa); in table_rule_show()
4977 a->encap.vlan.vlan.pcp, in table_rule_show()
4978 a->encap.vlan.vlan.dei, in table_rule_show()
4979 a->encap.vlan.vlan.vid); in table_rule_show()
4984 ether_addr_show(f, &a->encap.qinq.ether.da); in table_rule_show()
4986 ether_addr_show(f, &a->encap.qinq.ether.sa); in table_rule_show()
4988 a->encap.qinq.svlan.pcp, in table_rule_show()
4989 a->encap.qinq.svlan.dei, in table_rule_show()
4990 a->encap.qinq.svlan.vid, in table_rule_show()
4991 a->encap.qinq.cvlan.pcp, in table_rule_show()
4992 a->encap.qinq.cvlan.dei, in table_rule_show()
4993 a->encap.qinq.cvlan.vid); in table_rule_show()
4997 fprintf(f, "mpls %s ", (a->encap.mpls.unicast) ? in table_rule_show()
4999 ether_addr_show(f, &a->encap.mpls.ether.da); in table_rule_show()
5001 ether_addr_show(f, &a->encap.mpls.ether.sa); in table_rule_show()
5003 for (i = 0; i < a->encap.mpls.mpls_count; i++) { in table_rule_show()
5005 &a->encap.mpls.mpls[i]; in table_rule_show()
5017 ether_addr_show(f, &a->encap.pppoe.ether.da); in table_rule_show()
5019 ether_addr_show(f, &a->encap.pppoe.ether.sa); in table_rule_show()
5020 fprintf(f, " %u ", a->encap.pppoe.pppoe.session_id); in table_rule_show()
5025 ether_addr_show(f, &a->encap.vxlan.ether.da); in table_rule_show()
5027 ether_addr_show(f, &a->encap.vxlan.ether.sa); in table_rule_show()
5028 if (table->ap->params.encap.vxlan.vlan) in table_rule_show()
5030 a->encap.vxlan.vlan.pcp, in table_rule_show()
5031 a->encap.vxlan.vlan.dei, in table_rule_show()
5032 a->encap.vxlan.vlan.vid); in table_rule_show()
5033 if (table->ap->params.encap.vxlan.ip_version) { in table_rule_show()
5035 ipv4_addr_show(f, a->encap.vxlan.ipv4.sa); in table_rule_show()
5037 ipv4_addr_show(f, a->encap.vxlan.ipv4.da); in table_rule_show()
5039 (uint32_t)a->encap.vxlan.ipv4.dscp, in table_rule_show()
5040 (uint32_t)a->encap.vxlan.ipv4.ttl); in table_rule_show()
5043 ipv6_addr_show(f, a->encap.vxlan.ipv6.sa); in table_rule_show()
5045 ipv6_addr_show(f, a->encap.vxlan.ipv6.da); in table_rule_show()
5047 a->encap.vxlan.ipv6.flow_label, in table_rule_show()
5048 (uint32_t)a->encap.vxlan.ipv6.dscp, in table_rule_show()
5049 (uint32_t)a->encap.vxlan.ipv6.hop_limit); in table_rule_show()
5051 a->encap.vxlan.udp.sp, in table_rule_show()
5052 a->encap.vxlan.udp.dp, in table_rule_show()
5053 a->encap.vxlan.vxlan.vni); in table_rule_show()