From: Leon Romanovsky <leon@kernel.org>
To: Doug Ledford <dledford@redhat.com>, Jason Gunthorpe <jgg@mellanox.com>
Cc: Leon Romanovsky <leonro@mellanox.com>,
RDMA mailing list <linux-rdma@vger.kernel.org>,
Maor Gottlieb <maorg@mellanox.com>,
Mark Bloch <markb@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>,
linux-netdev <netdev@vger.kernel.org>
Subject: [PATCH mlx5-next 01/12] net/mlx5: E-Switch, don't use hardcoded values for FDB prios
Date: Thu, 28 Mar 2019 15:27:31 +0200 [thread overview]
Message-ID: <20190328132742.12070-2-leon@kernel.org> (raw)
In-Reply-To: <20190328132742.12070-1-leon@kernel.org>
From: Mark Bloch <markb@mellanox.com>
When creating the FDB prios, use the enum values already defined and not
the hardcoded values.
Signed-off-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 5 -----
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 5 +++--
include/linux/mlx5/fs.h | 5 +++++
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index f2260391be5b..6c8a17ca236e 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -43,11 +43,6 @@
#include "ecpf.h"
#include "lib/eq.h"
-enum {
- FDB_FAST_PATH = 0,
- FDB_SLOW_PATH
-};
-
/* There are two match-all miss flows, one for unicast dst mac and
* one for multicast.
*/
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
index 0be3eb86dd84..f34515d03a3b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
@@ -2517,7 +2517,8 @@ static int init_fdb_root_ns(struct mlx5_flow_steering *steering)
return -ENOMEM;
levels = 2 * FDB_MAX_PRIO * (FDB_MAX_CHAIN + 1);
- maj_prio = fs_create_prio_chained(&steering->fdb_root_ns->ns, 0,
+ maj_prio = fs_create_prio_chained(&steering->fdb_root_ns->ns,
+ FDB_FAST_PATH,
levels);
if (IS_ERR(maj_prio)) {
err = PTR_ERR(maj_prio);
@@ -2542,7 +2543,7 @@ static int init_fdb_root_ns(struct mlx5_flow_steering *steering)
steering->fdb_sub_ns[chain] = ns;
}
- maj_prio = fs_create_prio(&steering->fdb_root_ns->ns, 1, 1);
+ maj_prio = fs_create_prio(&steering->fdb_root_ns->ns, FDB_SLOW_PATH, 1);
if (IS_ERR(maj_prio)) {
err = PTR_ERR(maj_prio);
goto out_err;
diff --git a/include/linux/mlx5/fs.h b/include/linux/mlx5/fs.h
index 9df51da04621..3eeb04154317 100644
--- a/include/linux/mlx5/fs.h
+++ b/include/linux/mlx5/fs.h
@@ -75,6 +75,11 @@ enum mlx5_flow_namespace_type {
MLX5_FLOW_NAMESPACE_EGRESS,
};
+enum {
+ FDB_FAST_PATH,
+ FDB_SLOW_PATH,
+};
+
struct mlx5_flow_table;
struct mlx5_flow_group;
struct mlx5_flow_namespace;
--
2.20.1
next prev parent reply other threads:[~2019-03-28 13:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-28 13:27 [PATCH rdma-next 00/12] Move IB representors to single IB device multiple ports Leon Romanovsky
2019-03-28 13:27 ` Leon Romanovsky [this message]
2019-03-28 13:27 ` [PATCH mlx5-next 02/12] net/mlx5: E-Switch, add a new prio to be used by the RDMA side Leon Romanovsky
2019-03-28 13:27 ` [PATCH rdma-next 03/12] RDMA/mlx5: Move netdev info into the port struct Leon Romanovsky
2019-03-28 13:27 ` [PATCH rdma-next 04/12] RDMA/mlx5: Free IB device on remove Leon Romanovsky
2019-03-28 13:27 ` [PATCH rdma-next 05/12] RDMA/mlx5: Move ports allocation to outside of INIT stage Leon Romanovsky
2019-03-28 13:27 ` [PATCH rdma-next 06/12] RDMA/mlx5: Use correct size for device resources Leon Romanovsky
2019-03-28 13:27 ` [PATCH rdma-next 07/12] RDMA/mlx5: Move rep into port struct Leon Romanovsky
2019-03-28 13:27 ` [PATCH rdma-next 08/12] RDMA/mlx5: Move default representors SQ steering to rule to modify QP Leon Romanovsky
2019-03-28 13:27 ` [PATCH rdma-next 09/12] RDMA/mlx5: Refactor netdev affinity code Leon Romanovsky
2019-03-28 13:27 ` [PATCH rdma-next 10/12] RDMA/mlx5: Move SMI caps logic Leon Romanovsky
2019-03-28 13:27 ` [PATCH rdma-next 11/12] RDMA/mlx5: Move to single device multiport ports in switchdev mode Leon Romanovsky
2019-03-28 13:27 ` [PATCH rdma-next 12/12] RDMA/mlx5: Remove VF representor profile Leon Romanovsky
2019-04-04 13:02 ` [PATCH rdma-next 00/12] Move IB representors to single IB device multiple ports Jason Gunthorpe
2019-04-04 17:42 ` Leon Romanovsky
2019-04-10 6:48 ` Leon Romanovsky
2019-04-10 18:06 ` Jason Gunthorpe
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=20190328132742.12070-2-leon@kernel.org \
--to=leon@kernel.org \
--cc=dledford@redhat.com \
--cc=jgg@mellanox.com \
--cc=leonro@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
--cc=maorg@mellanox.com \
--cc=markb@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@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).