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

Function port_action_handle_query

dpdk/app/test-pmd/config.c:2072–2100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2070}
2071
2072int
2073port_action_handle_query(portid_t port_id, uint32_t id)
2074{
2075 struct rte_flow_error error;
2076 struct port_indirect_action *pia;
2077 union port_action_query query;
2078
2079 pia = action_get_by_id(port_id, id);
2080 if (!pia)
2081 return -EINVAL;
2082 switch (pia->type) {
2083 case RTE_FLOW_ACTION_TYPE_AGE:
2084 case RTE_FLOW_ACTION_TYPE_COUNT:
2085 case RTE_FLOW_ACTION_TYPE_QUOTA:
2086 break;
2087 default:
2088 fprintf(stderr,
2089 "Indirect action %u (type: %d) on port %u doesn't support query\n",
2090 id, pia->type, port_id);
2091 return -ENOTSUP;
2092 }
2093 /* Poisoning to make sure PMDs update it in case of error. */
2094 memset(&error, 0x55, sizeof(error));
2095 memset(&query, 0, sizeof(query));
2096 if (rte_flow_action_handle_query(port_id, pia->handle, &query, &error))
2097 return port_flow_complain(&error);
2098 port_action_handle_query_dump(port_id, pia, &query);
2099 return 0;
2100}
2101
2102static struct port_flow_tunnel *
2103port_flow_tunnel_offload_cmd_prep(portid_t port_id,

Callers 1

cmd_flow_parsedFunction · 0.85

Calls 5

action_get_by_idFunction · 0.85
memsetFunction · 0.85
port_flow_complainFunction · 0.70

Tested by

no test coverage detected