From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Gavi Teitz <gavi@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>
Subject: [net-next 04/13] net/mlx5e: Extract creation of rep's default flow rule
Date: Mon, 1 Oct 2018 11:56:52 -0700 [thread overview]
Message-ID: <20181001185701.2944-5-saeedm@mellanox.com> (raw)
In-Reply-To: <20181001185701.2944-1-saeedm@mellanox.com>
From: Gavi Teitz <gavi@mellanox.com>
Cleaning up the flow of the representors' rx initialization, towards
enabling RSS for the representors.
Signed-off-by: Gavi Teitz <gavi@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
.../net/ethernet/mellanox/mlx5/core/en_rep.c | 25 ++++++++++++-------
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
index 08ba2063e8f6..84946870d164 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
@@ -1003,13 +1003,25 @@ static void mlx5e_init_rep(struct mlx5_core_dev *mdev,
mlx5e_timestamp_init(priv);
}
-static int mlx5e_init_rep_rx(struct mlx5e_priv *priv)
+static int mlx5e_create_rep_vport_rx_rule(struct mlx5e_priv *priv)
{
struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
struct mlx5e_rep_priv *rpriv = priv->ppriv;
struct mlx5_eswitch_rep *rep = rpriv->rep;
- struct mlx5_core_dev *mdev = priv->mdev;
struct mlx5_flow_handle *flow_rule;
+
+ flow_rule = mlx5_eswitch_create_vport_rx_rule(esw,
+ rep->vport,
+ priv->direct_tir[0].tirn);
+ if (IS_ERR(flow_rule))
+ return PTR_ERR(flow_rule);
+ rpriv->vport_rx_rule = flow_rule;
+ return 0;
+}
+
+static int mlx5e_init_rep_rx(struct mlx5e_priv *priv)
+{
+ struct mlx5_core_dev *mdev = priv->mdev;
int err;
mlx5e_init_l2_addr(priv);
@@ -1028,14 +1040,9 @@ static int mlx5e_init_rep_rx(struct mlx5e_priv *priv)
if (err)
goto err_destroy_direct_rqts;
- flow_rule = mlx5_eswitch_create_vport_rx_rule(esw,
- rep->vport,
- priv->direct_tir[0].tirn);
- if (IS_ERR(flow_rule)) {
- err = PTR_ERR(flow_rule);
+ err = mlx5e_create_rep_vport_rx_rule(priv);
+ if (err)
goto err_destroy_direct_tirs;
- }
- rpriv->vport_rx_rule = flow_rule;
return 0;
--
2.17.1
next prev parent reply other threads:[~2018-10-02 1:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-01 18:56 [pull request][net-next 00/13] Mellanox, mlx5e updates 2018-10-01 Saeed Mahameed
2018-10-01 18:56 ` [net-next 01/13] net/mlx5e: Ethtool steering, Support masks for l3/l4 filters Saeed Mahameed
2018-10-01 18:56 ` [net-next 02/13] net/mlx5e: Change VF representors' RQ type Saeed Mahameed
2018-10-01 18:56 ` [net-next 03/13] net/mlx5e: Enable stateless offloads for VF representor netdevs Saeed Mahameed
2018-10-01 18:56 ` Saeed Mahameed [this message]
2018-10-01 18:56 ` [net-next 05/13] net/mlx5: E-Switch, Provide flow dest when creating vport rx rule Saeed Mahameed
2018-10-01 18:56 ` [net-next 06/13] net/mlx5e: Provide explicit directive if to create inner indirect tirs Saeed Mahameed
2018-10-01 18:56 ` [net-next 07/13] net/mlx5e: Expose function for building RSS params Saeed Mahameed
2018-10-01 18:56 ` [net-next 08/13] net/mlx5e: Expose ethtool rss key size / indirection table functions Saeed Mahameed
2018-10-01 18:56 ` [net-next 09/13] net/mlx5e: Enable multi-queue and RSS for VF representors Saeed Mahameed
2018-10-01 18:56 ` [net-next 10/13] net/mlx5e: Add ethtool control of ring params to " Saeed Mahameed
2018-10-01 18:56 ` [net-next 11/13] net/mlx5e: Enable reporting checksum unnecessary also for L3 packets Saeed Mahameed
2018-10-01 18:57 ` [net-next 12/13] net/mlx5e: Allow reporting of checksum unnecessary Saeed Mahameed
2018-10-01 18:57 ` [net-next 13/13] net/mlx5: Cache the system image guid Saeed Mahameed
2018-10-01 22:49 ` [pull request][net-next 00/13] Mellanox, mlx5e updates 2018-10-01 David Miller
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=20181001185701.2944-5-saeedm@mellanox.com \
--to=saeedm@mellanox.com \
--cc=davem@davemloft.net \
--cc=gavi@mellanox.com \
--cc=netdev@vger.kernel.org \
/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