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

Function mlx5_flow_tunnel_validate

dpdk/drivers/net/mlx5/mlx5_flow.c:11819–11850  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11817}
11818
11819static inline int
11820mlx5_flow_tunnel_validate(struct rte_eth_dev *dev,
11821 struct rte_flow_tunnel *tunnel,
11822 struct rte_flow_error *error)
11823{
11824 struct mlx5_priv *priv = dev->data->dev_private;
11825
11826 if (!priv->sh->config.dv_flow_en)
11827 return rte_flow_error_set(error, ENOTSUP,
11828 RTE_FLOW_ERROR_TYPE_ACTION_CONF, NULL,
11829 "flow DV interface is off");
11830 if (!is_tunnel_offload_active(dev))
11831 return rte_flow_error_set(error, ENOTSUP,
11832 RTE_FLOW_ERROR_TYPE_ACTION_CONF, NULL,
11833 "tunnel offload was not activated, consider setting dv_xmeta_en=3");
11834 if (!tunnel)
11835 return rte_flow_error_set(error, EINVAL,
11836 RTE_FLOW_ERROR_TYPE_ACTION_CONF, NULL,
11837 "no application tunnel");
11838 switch (tunnel->type) {
11839 default:
11840 return rte_flow_error_set(error, EINVAL,
11841 RTE_FLOW_ERROR_TYPE_ACTION_CONF, NULL,
11842 "unsupported tunnel type");
11843 case RTE_FLOW_ITEM_TYPE_VXLAN:
11844 case RTE_FLOW_ITEM_TYPE_GRE:
11845 case RTE_FLOW_ITEM_TYPE_NVGRE:
11846 case RTE_FLOW_ITEM_TYPE_GENEVE:
11847 break;
11848 }
11849 return 0;
11850}
11851
11852static int
11853mlx5_flow_tunnel_decap_set(struct rte_eth_dev *dev,

Callers 2

mlx5_flow_tunnel_matchFunction · 0.85

Calls 2

rte_flow_error_setFunction · 0.85
is_tunnel_offload_activeFunction · 0.85

Tested by

no test coverage detected