[dpdk-users] mlx5 flow MARK action does not work with RSS
Tom Barbette
barbette at kth.se
Thu Jan 31 09:30:50 CET 2019
On 2019-01-31 07:42, Shahaf Shuler wrote:
>
> It is not expected, Mark action can set along w/ RSS.
I therefore tried different things and found that the problem was a
misconfiguration of the RSS action. Thanks!
For future relevance, here is a working piece of code for RSS + MARK
(+END) action :
struct rte_flow_action action[3];
struct rte_flow_action_mark mark;
struct rte_flow_action_rss rss;
memset(action, 0, sizeof(action));
memset(&rss, 0, sizeof(rss));
action[0].type = RTE_FLOW_ACTION_TYPE_MARK;
mark.id = _matches.size();
action[0].conf = &mark;
action[1].type = RTE_FLOW_ACTION_TYPE_RSS;
uint16_t queue[RTE_MAX_QUEUES_PER_PORT];
queue[0] = 0;
//TODO : enable all the queues of interest
uint8_t rss_key[40];
struct rte_eth_rss_conf rss_conf;
rss_conf.rss_key = rss_key;
rss_conf.rss_key_len = 40;
rte_eth_dev_rss_hash_conf_get(port_id, &rss_conf);
rss.types = rss_conf.rss_hf;
rss.key_len = rss_conf.rss_key_len;
rss.queue_num = 1;
rss.key = rss_key;
rss.queue = queue;
rss.level = 0;
rss.func = RTE_ETH_HASH_FUNCTION_DEFAULT;
action[1].conf = &rss;
action[2].type = RTE_FLOW_ACTION_TYPE_END;
Thanks!
Tom
More information about the users
mailing list