DPDK usage discussions
 help / color / mirror / Atom feed
* Rte_flow function
@ 2023-05-22 13:35 Aisenur Yoldaş
  2023-05-22 14:05 ` Dmitry Kozlyuk
  0 siblings, 1 reply; 2+ messages in thread
From: Aisenur Yoldaş @ 2023-05-22 13:35 UTC (permalink / raw)
  To: users

[-- Attachment #1: Type: text/plain, Size: 1882 bytes --]

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
 
 


[-- Attachment #2.1: Type: text/html, Size: 2546 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Rte_flow function
  2023-05-22 13:35 Rte_flow function Aisenur Yoldaş
@ 2023-05-22 14:05 ` Dmitry Kozlyuk
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Kozlyuk @ 2023-05-22 14:05 UTC (permalink / raw)
  To: Aisenur Yoldaş; +Cc: users

2023-05-22 16:35 (UTC+0300), Aisenur Yoldaş:
> 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
>  
> [...]
>  
> What is the correct way to use this function in order to reach all the flows of the port.

There is no API to query the list of flow rules of a port.

rte_flow_query() is to query the state a specific single flow rule.
For example, if the action list on flow rule creation included COUNT,
then rte_flow_query() would allow to get the counter value
(how many packets have hit the rule).
Your action list doesn't have a COUNT action (or any stateful action)
so there is nothing to query.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-22 14:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-22 13:35 Rte_flow function Aisenur Yoldaş
2023-05-22 14:05 ` Dmitry Kozlyuk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).