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, Shahar Klein <shahark@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>
Subject: [net 6/7] net/mlx5e: Fix traffic between VF and representor
Date: Thu, 26 Apr 2018 12:58:41 -0700	[thread overview]
Message-ID: <20180426195842.29665-7-saeedm@mellanox.com> (raw)
In-Reply-To: <20180426195842.29665-1-saeedm@mellanox.com>

From: Shahar Klein <shahark@mellanox.com>

After the cited commit, WQE RQ size is calculated based on sw_mtu but it
was not set for representors. This commit fixes that.

Fixes: 472a1e44b349 ("net/mlx5e: Save MTU in channels params")
Signed-off-by: Shahar Klein <shahark@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
index d8f68e4d1018..876c3e4c6193 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
@@ -877,13 +877,14 @@ static const struct net_device_ops mlx5e_netdev_ops_rep = {
 };
 
 static void mlx5e_build_rep_params(struct mlx5_core_dev *mdev,
-				   struct mlx5e_params *params)
+				   struct mlx5e_params *params, u16 mtu)
 {
 	u8 cq_period_mode = MLX5_CAP_GEN(mdev, cq_period_start_from_cqe) ?
 					 MLX5_CQ_PERIOD_MODE_START_FROM_CQE :
 					 MLX5_CQ_PERIOD_MODE_START_FROM_EQE;
 
 	params->hard_mtu    = MLX5E_ETH_HARD_MTU;
+	params->sw_mtu      = mtu;
 	params->log_sq_size = MLX5E_REP_PARAMS_LOG_SQ_SIZE;
 	params->rq_wq_type  = MLX5_WQ_TYPE_LINKED_LIST;
 	params->log_rq_mtu_frames = MLX5E_REP_PARAMS_LOG_RQ_SIZE;
@@ -931,7 +932,7 @@ static void mlx5e_init_rep(struct mlx5_core_dev *mdev,
 
 	priv->channels.params.num_channels = profile->max_nch(mdev);
 
-	mlx5e_build_rep_params(mdev, &priv->channels.params);
+	mlx5e_build_rep_params(mdev, &priv->channels.params, netdev->mtu);
 	mlx5e_build_rep_netdev(netdev);
 
 	mlx5e_timestamp_init(priv);
-- 
2.14.3

  parent reply	other threads:[~2018-04-26 19:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-26 19:58 [pull request][net 0/7] Mellanox, mlx5 fixes 2018-04-26 Saeed Mahameed
2018-04-26 19:58 ` [net 1/7] net/mlx5e: Allow offloading ipv4 header re-write for icmp Saeed Mahameed
2018-04-26 19:58 ` [net 2/7] net/mlx5e: DCBNL fix min inline header size for dscp Saeed Mahameed
2018-04-26 19:58 ` [net 3/7] net/mlx5: Fix mlx5_get_vector_affinity function Saeed Mahameed
2018-04-26 19:58 ` [net 4/7] net/mlx5e: TX, Use correct counter in dma_map error flow Saeed Mahameed
2018-04-26 19:58 ` [net 5/7] net/mlx5: Avoid cleaning flow steering table twice during " Saeed Mahameed
2018-04-26 19:58 ` Saeed Mahameed [this message]
2018-04-26 19:58 ` [net 7/7] net/mlx5: Properly deal with flow counters when deleting rules Saeed Mahameed
2018-04-27 18:32 ` [pull request][net 0/7] Mellanox, mlx5 fixes 2018-04-26 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=20180426195842.29665-7-saeedm@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=shahark@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.