MCPcopy Create free account
hub / github.com/F-Stack/f-stack / encap_ether_apply

Function encap_ether_apply

dpdk/lib/pipeline/rte_table_action.c:605–621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

603}
604
605static int
606encap_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
623static int
624encap_vlan_apply(void *data,

Callers 1

encap_applyFunction · 0.85

Calls 1

rte_ether_addr_copyFunction · 0.85

Tested by

no test coverage detected