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

Function flow_tunnel_add_default_miss

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

Source from the content-addressed store, hash-verified

11327 void *ctx, bool lock_op);
11328
11329static int
11330flow_tunnel_add_default_miss(struct rte_eth_dev *dev,
11331 struct rte_flow *flow,
11332 const struct rte_flow_attr *attr,
11333 const struct rte_flow_action *app_actions,
11334 uint32_t flow_idx,
11335 const struct mlx5_flow_tunnel *tunnel,
11336 struct tunnel_default_miss_ctx *ctx,
11337 struct rte_flow_error *error)
11338{
11339 struct mlx5_priv *priv = dev->data->dev_private;
11340 struct mlx5_flow *dev_flow;
11341 struct rte_flow_attr miss_attr = *attr;
11342 const struct rte_flow_item miss_items[2] = {
11343 {
11344 .type = RTE_FLOW_ITEM_TYPE_ETH,
11345 .spec = NULL,
11346 .last = NULL,
11347 .mask = NULL
11348 },
11349 {
11350 .type = RTE_FLOW_ITEM_TYPE_END,
11351 .spec = NULL,
11352 .last = NULL,
11353 .mask = NULL
11354 }
11355 };
11356 union tunnel_offload_mark mark_id;
11357 struct rte_flow_action_mark miss_mark;
11358 struct rte_flow_action miss_actions[3] = {
11359 [0] = { .type = RTE_FLOW_ACTION_TYPE_MARK, .conf = &miss_mark },
11360 [2] = { .type = RTE_FLOW_ACTION_TYPE_END, .conf = NULL }
11361 };
11362 const struct rte_flow_action_jump *jump_data;
11363 uint32_t i, flow_table = 0; /* prevent compilation warning */
11364 struct flow_grp_info grp_info = {
11365 .external = 1,
11366 .transfer = attr->transfer,
11367 .fdb_def_rule = !!priv->fdb_def_rule,
11368 .std_tbl_fix = 0,
11369 };
11370 int ret;
11371
11372 if (!attr->transfer) {
11373 uint32_t q_size;
11374
11375 miss_actions[1].type = RTE_FLOW_ACTION_TYPE_RSS;
11376 q_size = priv->reta_idx_n * sizeof(ctx->queue[0]);
11377 ctx->queue = mlx5_malloc(MLX5_MEM_SYS | MLX5_MEM_ZERO, q_size,
11378 0, SOCKET_ID_ANY);
11379 if (!ctx->queue)
11380 return rte_flow_error_set
11381 (error, ENOMEM,
11382 RTE_FLOW_ERROR_TYPE_ACTION_CONF,
11383 NULL, "invalid default miss RSS");
11384 ctx->action_rss.func = RTE_ETH_HASH_FUNCTION_DEFAULT,
11385 ctx->action_rss.level = 0,
11386 ctx->action_rss.types = priv->rss_conf.rss_hf,

Callers 1

flow_list_createFunction · 0.85

Calls 7

mlx5_mallocFunction · 0.85
rte_flow_error_setFunction · 0.85
mlx5_flow_group_to_tableFunction · 0.85
tunnel_flow_tbl_to_idFunction · 0.85
flow_drv_prepareFunction · 0.85
flow_drv_translateFunction · 0.85

Tested by

no test coverage detected