All of lore.kernel.org
 help / color / mirror / Atom feed
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 07/13] net/mlx5e: Expose function for building RSS params
Date: Mon,  1 Oct 2018 11:56:55 -0700	[thread overview]
Message-ID: <20181001185701.2944-8-saeedm@mellanox.com> (raw)
In-Reply-To: <20181001185701.2944-1-saeedm@mellanox.com>

From: Gavi Teitz <gavi@mellanox.com>

Towards enabling RSS for the vport representors, extract the
procedure for building a device's RSS params, and expose the
function.

Signed-off-by: Gavi Teitz <gavi@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en.h      |  1 +
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 13 +++++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
index 275af3bd63b3..98390a5b106a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
@@ -968,6 +968,7 @@ void mlx5e_build_nic_params(struct mlx5_core_dev *mdev,
 			    u16 max_channels, u16 mtu);
 void mlx5e_build_rq_params(struct mlx5_core_dev *mdev,
 			   struct mlx5e_params *params);
+void mlx5e_build_rss_params(struct mlx5e_params *params);
 u8 mlx5e_params_calculate_tx_min_inline(struct mlx5_core_dev *mdev);
 void mlx5e_rx_dim_work(struct work_struct *work);
 void mlx5e_tx_dim_work(struct work_struct *work);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 114f6226b17d..6086f874c7bf 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -4497,6 +4497,14 @@ void mlx5e_build_rq_params(struct mlx5_core_dev *mdev,
 	mlx5e_init_rq_type_params(mdev, params);
 }
 
+void mlx5e_build_rss_params(struct mlx5e_params *params)
+{
+	params->rss_hfunc = ETH_RSS_HASH_XOR;
+	netdev_rss_key_fill(params->toeplitz_hash_key, sizeof(params->toeplitz_hash_key));
+	mlx5e_build_default_indir_rqt(params->indirection_rqt,
+				      MLX5E_INDIR_RQT_SIZE, params->num_channels);
+}
+
 void mlx5e_build_nic_params(struct mlx5_core_dev *mdev,
 			    struct mlx5e_params *params,
 			    u16 max_channels, u16 mtu)
@@ -4545,10 +4553,7 @@ void mlx5e_build_nic_params(struct mlx5_core_dev *mdev,
 	params->tx_min_inline_mode = mlx5e_params_calculate_tx_min_inline(mdev);
 
 	/* RSS */
-	params->rss_hfunc = ETH_RSS_HASH_XOR;
-	netdev_rss_key_fill(params->toeplitz_hash_key, sizeof(params->toeplitz_hash_key));
-	mlx5e_build_default_indir_rqt(params->indirection_rqt,
-				      MLX5E_INDIR_RQT_SIZE, max_channels);
+	mlx5e_build_rss_params(params);
 }
 
 static void mlx5e_build_nic_netdev_priv(struct mlx5_core_dev *mdev,
-- 
2.17.1

  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 ` [net-next 04/13] net/mlx5e: Extract creation of rep's default flow rule Saeed Mahameed
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 ` Saeed Mahameed [this message]
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-8-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 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.