From: Pablo Neira Ayuso <pablo@netfilter.org>
To: saeedm@mellanox.com
Cc: netfilter-devel@vger.kernel.org, davem@davemloft.net,
netdev@vger.kernel.org
Subject: [PATCH mlx5-next 1/7] net/mlx5: Simplify fdb chain and prio eswitch defines
Date: Tue, 12 Nov 2019 00:34:24 +0100 [thread overview]
Message-ID: <20191111233430.25120-2-pablo@netfilter.org> (raw)
In-Reply-To: <20191111233430.25120-1-pablo@netfilter.org>
From: Paul Blakey <paulb@mellanox.com>
FDB_MAX_CHAIN and FDB_MAX_PRIO were defined differently depending
on if CONFIG_MLX5_ESWITCH is enabled to save space on allocations.
This is a minor space saving, and there is no real need for it.
Simplify things instead, and define them the same in both cases.
Issue: 1929510
Change-Id: Ib8123cc14ac73fa532df466156e326ce3587d509
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
index 804a7ed2b969..25ecf0c516d6 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
@@ -43,6 +43,10 @@
#include <linux/mlx5/fs.h>
#include "lib/mpfs.h"
+#define FDB_MAX_CHAIN 3
+#define FDB_SLOW_PATH_CHAIN (FDB_MAX_CHAIN + 1)
+#define FDB_MAX_PRIO 16
+
#ifdef CONFIG_MLX5_ESWITCH
#define MLX5_MAX_UC_PER_VPORT(dev) \
@@ -59,10 +63,6 @@
#define mlx5_esw_has_fwd_fdb(dev) \
MLX5_CAP_ESW_FLOWTABLE(dev, fdb_multi_path_to_table)
-#define FDB_MAX_CHAIN 3
-#define FDB_SLOW_PATH_CHAIN (FDB_MAX_CHAIN + 1)
-#define FDB_MAX_PRIO 16
-
struct vport_ingress {
struct mlx5_flow_table *acl;
struct mlx5_flow_group *allow_untagged_spoofchk_grp;
@@ -613,10 +613,6 @@ static inline const u32 *mlx5_esw_query_functions(struct mlx5_core_dev *dev)
static inline void mlx5_eswitch_update_num_of_vfs(struct mlx5_eswitch *esw, const int num_vfs) {}
-#define FDB_MAX_CHAIN 1
-#define FDB_SLOW_PATH_CHAIN (FDB_MAX_CHAIN + 1)
-#define FDB_MAX_PRIO 1
-
#endif /* CONFIG_MLX5_ESWITCH */
#endif /* __MLX5_ESWITCH_H__ */
--
2.11.0
next prev parent reply other threads:[~2019-11-11 23:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-11 23:34 [PATCH mlx5-next 0/7] netfilter flowtable hardware offload support Pablo Neira Ayuso
2019-11-11 23:34 ` Pablo Neira Ayuso [this message]
2019-11-11 23:34 ` [PATCH mlx5-next 2/7] net/mlx5: Rename FDB_* tc related defines to FDB_TC_* defines Pablo Neira Ayuso
2019-11-11 23:34 ` [PATCH mlx5-next 3/7] net/mlx5: Define fdb tc levels per prio Pablo Neira Ayuso
2019-11-11 23:34 ` [PATCH mlx5-next 4/7] net/mlx5: Accumulate levels for chains prio namespaces Pablo Neira Ayuso
2019-11-11 23:34 ` [PATCH mlx5-next 5/7] net/mlx5: Refactor creating fast path prio chains Pablo Neira Ayuso
2019-11-11 23:34 ` [PATCH mlx5-next 6/7] net/mlx5: Add new chain for netfilter flow table offload Pablo Neira Ayuso
2019-11-11 23:34 ` [PATCH mlx5-next 7/7] net/mlx5: TC: Offload flow table rules Pablo Neira Ayuso
2019-11-12 0:37 ` Saeed Mahameed
2019-11-12 20:32 ` Pablo Neira Ayuso
2019-11-13 22:01 ` [PATCH mlx5-next 0/7] netfilter flowtable hardware offload support Saeed Mahameed
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=20191111233430.25120-2-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@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).