DPDK usage discussions
 help / color / mirror / Atom feed
From: Tom Barbette <barbette@kth.se>
To: Shahaf Shuler <shahafs@mellanox.com>, users <users@dpdk.org>,
	Raslan Darawsheh <rasland@mellanox.com>
Cc: Olga Shern <olgas@mellanox.com>, Yongseok Koh <yskoh@mellanox.com>
Subject: Re: [dpdk-users] mlx5 flow MARK action does not work with RSS
Date: Thu, 31 Jan 2019 09:30:50 +0100	[thread overview]
Message-ID: <35494c8d-b3c1-dbef-1b0a-204db86440e8@kth.se> (raw)
In-Reply-To: <AM0PR0502MB3795616E36434242C3C3B2BBC3910@AM0PR0502MB3795.eurprd05.prod.outlook.com>

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

  reply	other threads:[~2019-01-31  8:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-30 17:47 Tom Barbette
2019-01-31  6:42 ` Shahaf Shuler
2019-01-31  8:30   ` Tom Barbette [this message]
2019-01-31 12:54     ` Tom Barbette
2019-01-31 14:04       ` Shahaf Shuler
2019-01-31 16:40         ` Tom Barbette
2019-02-03 12:44           ` Shahaf Shuler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=35494c8d-b3c1-dbef-1b0a-204db86440e8@kth.se \
    --to=barbette@kth.se \
    --cc=olgas@mellanox.com \
    --cc=rasland@mellanox.com \
    --cc=shahafs@mellanox.com \
    --cc=users@dpdk.org \
    --cc=yskoh@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).