Hi,
I am trying to use the rte_flow_query function to find all the flow rules in a port, but when it comes the action parameter i cannot find the right way because when I use count action like in the ipsec example
 
struct rte_flow_action action;
action.type = RTE_FLOW_ACTION_TYPE_COUNT;
rte_errno = 0;
ret = rte_flow_query(port_id,flow_local,action,&count_query,&error);
if (ret) {
std::cout<<error.message<<error.type<<std::endl;
printf("Error meaning:%d%d%s\n",ret,rte_errno,rte_strerror(-ret));
}
it gives me  "Error meaning:-22 22 Invalid argument".
And when i try to use my original flow rule
 
struct rte_flow_action action[4];

structrte_flow_action_rssrss;
structrte_flow_action_markmark;

staticuint8_thash_key[RSS_HASH_KEY_LENGTH] = {
0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
};
rss.key = hash_key;
rss.key_len = RSS_HASH_KEY_LENGTH;
rss.func = RTE_ETH_HASH_FUNCTION_DEFAULT;
 
rss.types = RTE_ETH_RSS_IP;
rss.queue_num = 1;
rss.level = 0;

mark.id = 0;

action[0].type = RTE_FLOW_ACTION_TYPE_MARK;
action[0].conf = &mark;
action[1].type = RTE_FLOW_ACTION_TYPE_RSS;
action[1].conf = &rss;
action[2].type = RTE_FLOW_ACTION_TYPE_END;
rte_errno = 0;
ret = rte_flow_query(port_id,flow_local,action,&count_query,&error);
if (ret) {
std::cout<<error.message<<error.type<<std::endl;
printf("Error meaning:%d%d%s\n",ret,rte_errno,rte_strerror(-ret));
}
 
it gives me "Error meaning:-95 95 Operation not supported".
 
What is the correct way to use this function in order to reach all the flows of the port.
 
Thanks,
Aisenur Yoldas