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

Function encap_apply

dpdk/lib/pipeline/rte_table_action.c:930–968  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

928}
929
930static int
931encap_apply(void *data,
932 struct rte_table_action_encap_params *p,
933 struct rte_table_action_encap_config *cfg,
934 struct rte_table_action_common_config *common_cfg)
935{
936 int status;
937
938 /* Check input arguments */
939 status = encap_apply_check(p, cfg);
940 if (status)
941 return status;
942
943 switch (p->type) {
944 case RTE_TABLE_ACTION_ENCAP_ETHER:
945 return encap_ether_apply(data, p, common_cfg);
946
947 case RTE_TABLE_ACTION_ENCAP_VLAN:
948 return encap_vlan_apply(data, p, common_cfg);
949
950 case RTE_TABLE_ACTION_ENCAP_QINQ:
951 return encap_qinq_apply(data, p, common_cfg);
952
953 case RTE_TABLE_ACTION_ENCAP_MPLS:
954 return encap_mpls_apply(data, p);
955
956 case RTE_TABLE_ACTION_ENCAP_PPPOE:
957 return encap_pppoe_apply(data, p);
958
959 case RTE_TABLE_ACTION_ENCAP_VXLAN:
960 return encap_vxlan_apply(data, p, cfg);
961
962 case RTE_TABLE_ACTION_ENCAP_QINQ_PPPOE:
963 return encap_qinq_pppoe_apply(data, p);
964
965 default:
966 return -EINVAL;
967 }
968}
969
970static __rte_always_inline uint16_t
971encap_vxlan_ipv4_checksum_update(uint16_t cksum0,

Callers 1

rte_table_action_applyFunction · 0.85

Calls 8

encap_apply_checkFunction · 0.85
encap_ether_applyFunction · 0.85
encap_vlan_applyFunction · 0.85
encap_qinq_applyFunction · 0.85
encap_mpls_applyFunction · 0.85
encap_pppoe_applyFunction · 0.85
encap_vxlan_applyFunction · 0.85
encap_qinq_pppoe_applyFunction · 0.85

Tested by

no test coverage detected