From: Jes Sorensen <jes.sorensen@gmail.com>
To: netdev@vger.kernel.org
Cc: kernel-team@fb.com, saeedm@mellanox.com, ilant@mellanox.com,
Jes Sorensen <jsorensen@fb.com>
Subject: [PATCH 5/7] mlx5: Stub out create_vport_rx_rule when eswitch_offloads disabled
Date: Fri, 26 May 2017 17:16:22 -0400 [thread overview]
Message-ID: <20170526211624.23133-6-jsorensen@fb.com> (raw)
In-Reply-To: <20170526211624.23133-1-jsorensen@fb.com>
One more vport related function to disable.
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
---
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 11 ++++++++---
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
index 6397384..9a395f3 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
@@ -295,6 +295,9 @@ void
mlx5_eswitch_del_offloaded_rule(struct mlx5_eswitch *esw,
struct mlx5_flow_handle *rule,
struct mlx5_esw_flow_attr *attr);
+struct mlx5_flow_handle *
+mlx5_eswitch_create_vport_rx_rule(struct mlx5_eswitch *esw, int vport, u32 tirn);
+
#else
static inline struct mlx5_flow_handle *
mlx5_eswitch_add_offloaded_rule(struct mlx5_eswitch *esw,
@@ -310,11 +313,13 @@ mlx5_eswitch_del_offloaded_rule(struct mlx5_eswitch *esw,
{
return;
}
+static inline struct mlx5_flow_handle *
+mlx5_eswitch_create_vport_rx_rule(struct mlx5_eswitch *esw, int vport, u32 tirn)
+{
+ return ERR_PTR(-EOPNOTSUPP);
+}
#endif
-struct mlx5_flow_handle *
-mlx5_eswitch_create_vport_rx_rule(struct mlx5_eswitch *esw, int vport, u32 tirn);
-
enum {
SET_VLAN_STRIP = BIT(0),
SET_VLAN_INSERT = BIT(1)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index 9278a33..2bda8f5 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -670,7 +670,6 @@ static void esw_destroy_vport_rx_group(struct mlx5_eswitch *esw)
{
mlx5_destroy_flow_group(esw->offloads.vport_rx_group);
}
-#endif
struct mlx5_flow_handle *
mlx5_eswitch_create_vport_rx_rule(struct mlx5_eswitch *esw, int vport, u32 tirn)
@@ -710,6 +709,7 @@ mlx5_eswitch_create_vport_rx_rule(struct mlx5_eswitch *esw, int vport, u32 tirn)
kvfree(spec);
return flow_rule;
}
+#endif
static int esw_offloads_start(struct mlx5_eswitch *esw)
{
--
2.9.4
next prev parent reply other threads:[~2017-05-26 21:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-26 21:16 [PATCH 0/7] mlx5: Make eswitch_offloads a compile option Jes Sorensen
2017-05-26 21:16 ` [PATCH 1/7] mlx5: Allow support for eswitch offloads to be disabled Jes Sorensen
2017-05-26 21:16 ` [PATCH 2/7] mlx5: eswitch vlan functionality is only called if SRIOV_OFFLOADS is set Jes Sorensen
2017-05-26 21:16 ` [PATCH 3/7] mlx5: Disable {add,del}_offloaded_rule() code if eswitch offloads are disabled Jes Sorensen
2017-05-26 21:16 ` [PATCH 4/7] mlx5: Stub out eswitch offload vport functions Jes Sorensen
2017-05-26 21:16 ` Jes Sorensen [this message]
2017-05-26 21:16 ` [PATCH 6/7] mlx5: Stub out sqs2vport functions Jes Sorensen
2017-05-26 21:16 ` [PATCH 7/7] mlx5: Do not build eswitch_offloads if CONFIG_MLX5_EN_ESWITCH_OFFLOADS is set Jes Sorensen
2017-05-27 21:02 ` Or Gerlitz
2017-05-28 2:23 ` Jes Sorensen
2017-05-28 6:03 ` Or Gerlitz
2017-06-02 20:22 ` Jes Sorensen
2017-06-03 19:37 ` Or Gerlitz
2017-06-03 22:06 ` Saeed Mahameed
2017-06-04 17:07 ` Or Gerlitz
2017-06-05 20:51 ` Jes Sorensen
2017-06-05 21:53 ` Saeed Mahameed
2017-06-06 21:46 ` Jes Sorensen
2017-06-07 4:06 ` Saeed Mahameed
2017-06-07 15:19 ` Jes Sorensen
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=20170526211624.23133-6-jsorensen@fb.com \
--to=jes.sorensen@gmail.com \
--cc=ilant@mellanox.com \
--cc=jsorensen@fb.com \
--cc=kernel-team@fb.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.