| 603 | } |
| 604 | |
| 605 | static int |
| 606 | encap_ether_apply(void *data, |
| 607 | struct rte_table_action_encap_params *p, |
| 608 | struct rte_table_action_common_config *common_cfg) |
| 609 | { |
| 610 | struct encap_ether_data *d = data; |
| 611 | uint16_t ethertype = (common_cfg->ip_version) ? |
| 612 | RTE_ETHER_TYPE_IPV4 : |
| 613 | RTE_ETHER_TYPE_IPV6; |
| 614 | |
| 615 | /* Ethernet */ |
| 616 | rte_ether_addr_copy(&p->ether.ether.da, &d->ether.dst_addr); |
| 617 | rte_ether_addr_copy(&p->ether.ether.sa, &d->ether.src_addr); |
| 618 | d->ether.ether_type = rte_htons(ethertype); |
| 619 | |
| 620 | return 0; |
| 621 | } |
| 622 | |
| 623 | static int |
| 624 | encap_vlan_apply(void *data, |
no test coverage detected