From: "Xueming(Steven) Li" <xuemingl@mellanox.com>
To: "Nélio Laranjeiro" <nelio.laranjeiro@6wind.com>
Cc: Shahaf Shuler <shahafs@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2 13/15] net/mlx5: setup RSS flow regardless of queue count
Date: Wed, 11 Apr 2018 13:01:13 +0000 [thread overview]
Message-ID: <VI1PR05MB167867002924C2FE98340788ACBD0@VI1PR05MB1678.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <20180411123721.dylf3ilszlg64sdc@laranjeiro-vm.dev.6wind.com>
Hi Nelio,
> -----Original Message-----
> From: Nélio Laranjeiro <nelio.laranjeiro@6wind.com>
> Sent: Wednesday, April 11, 2018 8:37 PM
> To: Xueming(Steven) Li <xuemingl@mellanox.com>
> Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
> Subject: Re: [PATCH v2 13/15] net/mlx5: setup RSS flow regardless of queue
> count
>
> On Tue, Apr 10, 2018 at 09:34:13PM +0800, Xueming Li wrote:
> > In some environments it is desirable to have the NIC perform RSS
> > normally on the packet regardless of the number of queues configured.
> > The RSS hash result that is stored in the mbuf can then be used by the
> > application to make decisions about how to distribute workloads to
> > threads, secondary processes, or even virtual machines if the
> > application is a virtual switch.
> >
> > Signed-off-by: Xueming Li <xuemingl@mellanox.com>
> > ---
> > drivers/net/mlx5/mlx5_flow.c | 71
> > +++++++++++++++++++-------------------------
> > 1 file changed, 30 insertions(+), 41 deletions(-)
> >
> > diff --git a/drivers/net/mlx5/mlx5_flow.c
> > b/drivers/net/mlx5/mlx5_flow.c index 5784f2ee0..9efe00086 100644
> > --- a/drivers/net/mlx5/mlx5_flow.c
> > +++ b/drivers/net/mlx5/mlx5_flow.c
> > @@ -1252,48 +1252,37 @@ mlx5_flow_convert_rss(struct rte_eth_dev *dev,
> struct mlx5_flow_parse *parser)
> > parser->queue[i].ibv_attr = NULL;
> > }
> > }
> > - if (parser->rss_conf.types) {
> > - /* Remove impossible flow according to the RSS configuration.
> */
> > - for (i = hmin; i != (hmax + 1); ++i) {
> > - if (!parser->queue[i].ibv_attr)
> > - continue;
> > - if (parser->rss_conf.types &
> > - hash_rxq_init[i].dpdk_rss_hf) {
> > - parser->queue[i].hash_fields =
> > - hash_rxq_init[i].hash_fields;
> > - found = 1;
> > - continue;
> > - }
> > - /* L4 flow could be used for L3 RSS. */
> > - if (i == parser->layer && i < ip &&
> > - (hash_rxq_init[ip].dpdk_rss_hf &
> > - parser->rss_conf.types)) {
> > - parser->queue[i].hash_fields =
> > - hash_rxq_init[ip].hash_fields;
> > - found = 1;
> > - continue;
> > - }
> > - /* L3 flow and L4 hash: non-rss L3 flow. */
> > - if (i == parser->layer && i == ip && found)
> > - /* IP pattern and L4 HF. */
> > - continue;
> > - rte_free(parser->queue[i].ibv_attr);
> > - parser->queue[i].ibv_attr = NULL;
> > + /* Remove impossible flow according to the RSS configuration. */
> > + for (i = hmin; i != (hmax + 1); ++i) {
> > + if (!parser->queue[i].ibv_attr)
> > + continue;
> > + if (parser->rss_conf.types &
> > + hash_rxq_init[i].dpdk_rss_hf) {
> > + parser->queue[i].hash_fields =
> > + hash_rxq_init[i].hash_fields;
> > + found = 1;
> > + continue;
> > }
> > - if (!found)
> > - DRV_LOG(WARNING,
> > - "port %u rss hash function doesn't match "
> > - "pattern", dev->data->port_id);
> > - } else {
> > - /* Remove any other flow. */
> > - for (i = hmin; i != (hmax + 1); ++i) {
> > - if (i == parser->layer || !parser->queue[i].ibv_attr)
> > - continue;
> > - rte_free(parser->queue[i].ibv_attr);
> > - parser->queue[i].ibv_attr = NULL;
> > + /* L4 flow could be used for L3 RSS. */
> > + if (i == parser->layer && i < ip &&
> > + (hash_rxq_init[ip].dpdk_rss_hf &
> > + parser->rss_conf.types)) {
> > + parser->queue[i].hash_fields =
> > + hash_rxq_init[ip].hash_fields;
> > + found = 1;
> > + continue;
> > }
> > - parser->rss_conf.queue_num = 1;
> > + /* L3 flow and L4 hash: non-rss L3 flow. */
> > + if (i == parser->layer && i == ip && found)
> > + /* IP pattern and L4 HF. */
> > + continue;
> > + rte_free(parser->queue[i].ibv_attr);
> > + parser->queue[i].ibv_attr = NULL;
> > }
> > + if (!found)
> > + DRV_LOG(WARNING,
> > + "port %u rss hash function doesn't match "
> > + "pattern", dev->data->port_id);
> > return 0;
> > }
> >
> > @@ -2326,8 +2315,8 @@ mlx5_flow_dump(struct rte_eth_dev *dev
> __rte_unused,
> > (void *)flow->frxq[i].hrxq->ind_table,
> > flow->frxq[i].hash_fields |
> > (flow->tunnel &&
> > - flow->rss_conf.rss_level ? (uint32_t)IBV_RX_HASH_INNER : 0),
> > - flow->queues_n,
> > + flow->rss_conf.level ? (uint32_t)IBV_RX_HASH_INNER : 0),
> > + flow->rss_conf.queue_num,
> > flow->frxq[i].ibv_attr->num_of_specs,
> > flow->frxq[i].ibv_attr->size,
> > flow->frxq[i].ibv_attr->priority,
> > --
> > 2.13.3
>
> Seems, this code should make part of
> "[PATCH v2 07/15] net/mlx5: support tunnel RSS level", as it re-works the
> code added there, in addition this feature is already present in tree for
> non tunnel packets.
>
> Any reason why it is not merged in the previous commit?
This feature is developed much later than the patch 7/15, but I think you are
right, will merge them together.
>
> Thanks,
>
> --
> Nélio Laranjeiro
> 6WIND
next prev parent reply other threads:[~2018-04-11 13:01 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-10 13:34 [dpdk-dev] [PATCH v2 00/15] mlx5 Rx tunnel offloading Xueming Li
2018-04-10 13:34 ` [dpdk-dev] [PATCH v2 01/15] net/mlx5: support 16 hardware priorities Xueming Li
2018-04-10 14:41 ` Nélio Laranjeiro
2018-04-10 15:22 ` Xueming(Steven) Li
2018-04-12 9:09 ` Nélio Laranjeiro
2018-04-12 13:43 ` Xueming(Steven) Li
2018-04-12 14:02 ` Nélio Laranjeiro
2018-04-12 14:46 ` Xueming(Steven) Li
2018-04-10 13:34 ` [dpdk-dev] [PATCH v2 02/15] net/mlx5: support GRE tunnel flow Xueming Li
2018-04-10 13:34 ` [dpdk-dev] [PATCH v2 03/15] net/mlx5: support L3 vxlan flow Xueming Li
2018-04-10 14:53 ` Nélio Laranjeiro
2018-04-10 13:34 ` [dpdk-dev] [PATCH v2 04/15] net/mlx5: support Rx tunnel type identification Xueming Li
2018-04-10 15:17 ` Nélio Laranjeiro
2018-04-11 8:11 ` Xueming(Steven) Li
2018-04-12 9:50 ` Nélio Laranjeiro
2018-04-12 14:27 ` Xueming(Steven) Li
2018-04-13 8:37 ` Nélio Laranjeiro
2018-04-13 12:09 ` Xueming(Steven) Li
2018-04-10 13:34 ` [dpdk-dev] [PATCH v2 05/15] net/mlx5: support tunnel inner checksum offloads Xueming Li
2018-04-10 15:27 ` Nélio Laranjeiro
2018-04-11 8:46 ` Xueming(Steven) Li
2018-04-10 13:34 ` [dpdk-dev] [PATCH v2 06/15] net/mlx5: split flow RSS handling logic Xueming Li
2018-04-10 15:28 ` Nélio Laranjeiro
2018-04-10 13:34 ` [dpdk-dev] [PATCH v2 07/15] net/mlx5: support tunnel RSS level Xueming Li
2018-04-11 8:55 ` Nélio Laranjeiro
2018-04-14 12:25 ` Xueming(Steven) Li
2018-04-16 7:14 ` Nélio Laranjeiro
2018-04-16 7:46 ` Xueming(Steven) Li
2018-04-16 8:09 ` Nélio Laranjeiro
2018-04-16 10:06 ` Xueming(Steven) Li
2018-04-16 12:27 ` Nélio Laranjeiro
2018-04-10 13:34 ` [dpdk-dev] [PATCH v2 08/15] net/mlx5: add hardware flow debug dump Xueming Li
2018-04-10 13:34 ` [dpdk-dev] [PATCH v2 09/15] net/mlx5: introduce VXLAN-GPE tunnel type Xueming Li
2018-04-10 13:34 ` [dpdk-dev] [PATCH v2 10/15] net/mlx5: allow flow tunnel ID 0 with outer pattern Xueming Li
2018-04-11 12:25 ` Nélio Laranjeiro
2018-04-10 13:34 ` [dpdk-dev] [PATCH v2 11/15] net/mlx5: support MPLS-in-GRE and MPLS-in-UDP Xueming Li
2018-04-10 13:34 ` [dpdk-dev] [PATCH v2 12/15] doc: update mlx5 guide on tunnel offloading Xueming Li
2018-04-11 12:32 ` Nélio Laranjeiro
2018-04-11 12:43 ` Thomas Monjalon
2018-04-10 13:34 ` [dpdk-dev] [PATCH v2 13/15] net/mlx5: setup RSS flow regardless of queue count Xueming Li
2018-04-11 12:37 ` Nélio Laranjeiro
2018-04-11 13:01 ` Xueming(Steven) Li [this message]
2018-04-10 13:34 ` [dpdk-dev] [PATCH v2 14/15] net/mlx5: fix invalid flow item check Xueming Li
2018-04-10 13:34 ` [dpdk-dev] [PATCH v2 15/15] net/mlx5: support RSS configuration in isolated mode Xueming Li
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=VI1PR05MB167867002924C2FE98340788ACBD0@VI1PR05MB1678.eurprd05.prod.outlook.com \
--to=xuemingl@mellanox.com \
--cc=dev@dpdk.org \
--cc=nelio.laranjeiro@6wind.com \
--cc=shahafs@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).