All of lore.kernel.org
 help / color / mirror / Atom feed
* [pull request][net 0/7] Mellanox, mlx5 fixes 2018-04-26
@ 2018-04-26 19:58 Saeed Mahameed
  2018-04-26 19:58 ` [net 1/7] net/mlx5e: Allow offloading ipv4 header re-write for icmp Saeed Mahameed
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Saeed Mahameed @ 2018-04-26 19:58 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Saeed Mahameed

Hi Dave,

This pull request includes fixes for mlx5 core and netdev driver.

Please pull and let me know if there's any problems.

For -stable v4.12
    net/mlx5e: TX, Use correct counter in dma_map error flow
For -stable v4.13
    net/mlx5: Avoid cleaning flow steering table twice during error flow
For -stable v4.14
    net/mlx5e: Allow offloading ipv4 header re-write for icmp
For -stable v4.15
    net/mlx5e: DCBNL fix min inline header size for dscp
For -stable v4.16
    net/mlx5: Fix mlx5_get_vector_affinity function

Thanks,
Saeed.

---

The following changes since commit 25eb0ea7174c6e84f21fa59dccbddd0318b17b12:

  Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf (2018-04-25 22:55:33 -0400)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git tags/mlx5-fixes-2018-04-25

for you to fetch changes up to 202854e9f4df99df1f79962a9e8f94a7de602f7b:

  net/mlx5: Properly deal with flow counters when deleting rules (2018-04-26 12:43:21 -0700)

----------------------------------------------------------------
mlx5-fixes-2018-04-25

----------------------------------------------------------------
Chris Mi (1):
      net/mlx5: Properly deal with flow counters when deleting rules

Huy Nguyen (1):
      net/mlx5e: DCBNL fix min inline header size for dscp

Israel Rukshin (1):
      net/mlx5: Fix mlx5_get_vector_affinity function

Jianbo Liu (1):
      net/mlx5e: Allow offloading ipv4 header re-write for icmp

Shahar Klein (1):
      net/mlx5e: Fix traffic between VF and representor

Talat Batheesh (1):
      net/mlx5: Avoid cleaning flow steering table twice during error flow

Tariq Toukan (1):
      net/mlx5e: TX, Use correct counter in dma_map error flow

 drivers/infiniband/hw/mlx5/main.c                  |  2 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c |  8 ++++---
 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c   |  5 +++--
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c    |  3 ++-
 drivers/net/ethernet/mellanox/mlx5/core/en_tx.c    | 20 ++++++++---------
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c  | 26 +++++++++++++---------
 include/linux/mlx5/driver.h                        | 12 +++-------
 7 files changed, 40 insertions(+), 36 deletions(-)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [net 1/7] net/mlx5e: Allow offloading ipv4 header re-write for icmp
  2018-04-26 19:58 [pull request][net 0/7] Mellanox, mlx5 fixes 2018-04-26 Saeed Mahameed
@ 2018-04-26 19:58 ` Saeed Mahameed
  2018-04-26 19:58 ` [net 2/7] net/mlx5e: DCBNL fix min inline header size for dscp Saeed Mahameed
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Saeed Mahameed @ 2018-04-26 19:58 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Jianbo Liu, Saeed Mahameed

From: Jianbo Liu <jianbol@mellanox.com>

For ICMPv4, the checksum is calculated from the ICMP headers and data.
Since the ICMPv4 checksum doesn't cover the IP header, we can allow to
do L3 header re-write for this protocol.

Fixes: bdd66ac0aeed ('net/mlx5e: Disallow TC offloading of unsupported match/action combinations')
Signed-off-by: Jianbo Liu <jianbol@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index 4197001f9801..3c534fc43400 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -1864,7 +1864,8 @@ static bool modify_header_match_supported(struct mlx5_flow_spec *spec,
 	}
 
 	ip_proto = MLX5_GET(fte_match_set_lyr_2_4, headers_v, ip_protocol);
-	if (modify_ip_header && ip_proto != IPPROTO_TCP && ip_proto != IPPROTO_UDP) {
+	if (modify_ip_header && ip_proto != IPPROTO_TCP &&
+	    ip_proto != IPPROTO_UDP && ip_proto != IPPROTO_ICMP) {
 		pr_info("can't offload re-write of ip proto %d\n", ip_proto);
 		return false;
 	}
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [net 2/7] net/mlx5e: DCBNL fix min inline header size for dscp
  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 ` Saeed Mahameed
  2018-04-26 19:58 ` [net 3/7] net/mlx5: Fix mlx5_get_vector_affinity function Saeed Mahameed
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Saeed Mahameed @ 2018-04-26 19:58 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Huy Nguyen, Saeed Mahameed

From: Huy Nguyen <huyn@mellanox.com>

When the trust state is set to dscp and the netdev is down, the inline
header size is not updated. When netdev is up, the inline header size
stays at L2 instead of IP.

Fix this issue by updating the private parameter when the netdev is in
down so that when netdev is up, it picks up the right header size.

Fixes: fbcb127e89ba ("net/mlx5e: Support DSCP trust state ...")
Signed-off-by: Huy Nguyen <huyn@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
index 3d46ef48d5b8..c641d5656b2d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
@@ -1007,12 +1007,14 @@ static void mlx5e_trust_update_sq_inline_mode(struct mlx5e_priv *priv)
 
 	mutex_lock(&priv->state_lock);
 
-	if (!test_bit(MLX5E_STATE_OPENED, &priv->state))
-		goto out;
-
 	new_channels.params = priv->channels.params;
 	mlx5e_trust_update_tx_min_inline_mode(priv, &new_channels.params);
 
+	if (!test_bit(MLX5E_STATE_OPENED, &priv->state)) {
+		priv->channels.params = new_channels.params;
+		goto out;
+	}
+
 	/* Skip if tx_min_inline is the same */
 	if (new_channels.params.tx_min_inline_mode ==
 	    priv->channels.params.tx_min_inline_mode)
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [net 3/7] net/mlx5: Fix mlx5_get_vector_affinity function
  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 ` Saeed Mahameed
  2018-04-26 19:58 ` [net 4/7] net/mlx5e: TX, Use correct counter in dma_map error flow Saeed Mahameed
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Saeed Mahameed @ 2018-04-26 19:58 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Israel Rukshin, Saeed Mahameed

From: Israel Rukshin <israelr@mellanox.com>

Adding the vector offset when calling to mlx5_vector2eqn() is wrong.
This is because mlx5_vector2eqn() checks if EQ index is equal to vector number
and the fact that the internal completion vectors that mlx5 allocates
don't get an EQ index.

The second problem here is that using effective_affinity_mask gives the same
CPU for different vectors.
This leads to unmapped queues when calling it from blk_mq_rdma_map_queues().
This doesn't happen when using affinity_hint mask.

Fixes: 2572cf57d75a ("mlx5: fix mlx5_get_vector_affinity to start from completion vector 0")
Fixes: 05e0cc84e00c ("net/mlx5: Fix get vector affinity helper function")
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/infiniband/hw/mlx5/main.c |  2 +-
 include/linux/mlx5/driver.h       | 12 +++---------
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index daa919e5a442..241cf4ff9901 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -4757,7 +4757,7 @@ mlx5_ib_get_vector_affinity(struct ib_device *ibdev, int comp_vector)
 {
 	struct mlx5_ib_dev *dev = to_mdev(ibdev);
 
-	return mlx5_get_vector_affinity(dev->mdev, comp_vector);
+	return mlx5_get_vector_affinity_hint(dev->mdev, comp_vector);
 }
 
 /* The mlx5_ib_multiport_mutex should be held when calling this function */
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 767d193c269a..2a156c5dfadd 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -1284,25 +1284,19 @@ enum {
 };
 
 static inline const struct cpumask *
-mlx5_get_vector_affinity(struct mlx5_core_dev *dev, int vector)
+mlx5_get_vector_affinity_hint(struct mlx5_core_dev *dev, int vector)
 {
-	const struct cpumask *mask;
 	struct irq_desc *desc;
 	unsigned int irq;
 	int eqn;
 	int err;
 
-	err = mlx5_vector2eqn(dev, MLX5_EQ_VEC_COMP_BASE + vector, &eqn, &irq);
+	err = mlx5_vector2eqn(dev, vector, &eqn, &irq);
 	if (err)
 		return NULL;
 
 	desc = irq_to_desc(irq);
-#ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK
-	mask = irq_data_get_effective_affinity_mask(&desc->irq_data);
-#else
-	mask = desc->irq_common_data.affinity;
-#endif
-	return mask;
+	return desc->affinity_hint;
 }
 
 #endif /* MLX5_DRIVER_H */
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [net 4/7] net/mlx5e: TX, Use correct counter in dma_map error flow
  2018-04-26 19:58 [pull request][net 0/7] Mellanox, mlx5 fixes 2018-04-26 Saeed Mahameed
                   ` (2 preceding siblings ...)
  2018-04-26 19:58 ` [net 3/7] net/mlx5: Fix mlx5_get_vector_affinity function Saeed Mahameed
@ 2018-04-26 19:58 ` Saeed Mahameed
  2018-04-26 19:58 ` [net 5/7] net/mlx5: Avoid cleaning flow steering table twice during " Saeed Mahameed
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Saeed Mahameed @ 2018-04-26 19:58 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Tariq Toukan, Saeed Mahameed

From: Tariq Toukan <tariqt@mellanox.com>

In case of a dma_mapping_error, do not use wi->num_dma
as a parameter for dma unmap function because it's yet
to be set, and holds an out-of-date value.
Use actual value (local variable num_dma) instead.

Fixes: 34802a42b352 ("net/mlx5e: Do not modify the TX SKB")
Fixes: e586b3b0baee ("net/mlx5: Ethernet Datapath files")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
index 20297108528a..5532aa3675c7 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
@@ -255,7 +255,7 @@ mlx5e_txwqe_build_dsegs(struct mlx5e_txqsq *sq, struct sk_buff *skb,
 		dma_addr = dma_map_single(sq->pdev, skb_data, headlen,
 					  DMA_TO_DEVICE);
 		if (unlikely(dma_mapping_error(sq->pdev, dma_addr)))
-			return -ENOMEM;
+			goto dma_unmap_wqe_err;
 
 		dseg->addr       = cpu_to_be64(dma_addr);
 		dseg->lkey       = sq->mkey_be;
@@ -273,7 +273,7 @@ mlx5e_txwqe_build_dsegs(struct mlx5e_txqsq *sq, struct sk_buff *skb,
 		dma_addr = skb_frag_dma_map(sq->pdev, frag, 0, fsz,
 					    DMA_TO_DEVICE);
 		if (unlikely(dma_mapping_error(sq->pdev, dma_addr)))
-			return -ENOMEM;
+			goto dma_unmap_wqe_err;
 
 		dseg->addr       = cpu_to_be64(dma_addr);
 		dseg->lkey       = sq->mkey_be;
@@ -285,6 +285,10 @@ mlx5e_txwqe_build_dsegs(struct mlx5e_txqsq *sq, struct sk_buff *skb,
 	}
 
 	return num_dma;
+
+dma_unmap_wqe_err:
+	mlx5e_dma_unmap_wqe_err(sq, num_dma);
+	return -ENOMEM;
 }
 
 static inline void
@@ -380,17 +384,15 @@ static netdev_tx_t mlx5e_sq_xmit(struct mlx5e_txqsq *sq, struct sk_buff *skb,
 	num_dma = mlx5e_txwqe_build_dsegs(sq, skb, skb_data, headlen,
 					  (struct mlx5_wqe_data_seg *)cseg + ds_cnt);
 	if (unlikely(num_dma < 0))
-		goto dma_unmap_wqe_err;
+		goto err_drop;
 
 	mlx5e_txwqe_complete(sq, skb, opcode, ds_cnt + num_dma,
 			     num_bytes, num_dma, wi, cseg);
 
 	return NETDEV_TX_OK;
 
-dma_unmap_wqe_err:
+err_drop:
 	sq->stats.dropped++;
-	mlx5e_dma_unmap_wqe_err(sq, wi->num_dma);
-
 	dev_kfree_skb_any(skb);
 
 	return NETDEV_TX_OK;
@@ -645,17 +647,15 @@ netdev_tx_t mlx5i_sq_xmit(struct mlx5e_txqsq *sq, struct sk_buff *skb,
 	num_dma = mlx5e_txwqe_build_dsegs(sq, skb, skb_data, headlen,
 					  (struct mlx5_wqe_data_seg *)cseg + ds_cnt);
 	if (unlikely(num_dma < 0))
-		goto dma_unmap_wqe_err;
+		goto err_drop;
 
 	mlx5e_txwqe_complete(sq, skb, opcode, ds_cnt + num_dma,
 			     num_bytes, num_dma, wi, cseg);
 
 	return NETDEV_TX_OK;
 
-dma_unmap_wqe_err:
+err_drop:
 	sq->stats.dropped++;
-	mlx5e_dma_unmap_wqe_err(sq, wi->num_dma);
-
 	dev_kfree_skb_any(skb);
 
 	return NETDEV_TX_OK;
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [net 5/7] net/mlx5: Avoid cleaning flow steering table twice during error flow
  2018-04-26 19:58 [pull request][net 0/7] Mellanox, mlx5 fixes 2018-04-26 Saeed Mahameed
                   ` (3 preceding siblings ...)
  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 ` Saeed Mahameed
  2018-04-26 19:58 ` [net 6/7] net/mlx5e: Fix traffic between VF and representor Saeed Mahameed
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Saeed Mahameed @ 2018-04-26 19:58 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Talat Batheesh, Saeed Mahameed

From: Talat Batheesh <talatb@mellanox.com>

When we fail to initialize the RX root namespace, we need
to clean only that and not the entire flow steering.

Currently the code may try to clean the flow steering twice
on error witch leads to null pointer deference.
Make sure we clean correctly.

Fixes: fba53f7b5719 ("net/mlx5: Introduce mlx5_flow_steering structure")
Signed-off-by: Talat Batheesh <talatb@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
index de51e7c39bc8..2595c67ea39e 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
@@ -187,6 +187,7 @@ static void del_sw_ns(struct fs_node *node);
 static void del_sw_hw_rule(struct fs_node *node);
 static bool mlx5_flow_dests_cmp(struct mlx5_flow_destination *d1,
 				struct mlx5_flow_destination *d2);
+static void cleanup_root_ns(struct mlx5_flow_root_namespace *root_ns);
 static struct mlx5_flow_rule *
 find_flow_rule(struct fs_fte *fte,
 	       struct mlx5_flow_destination *dest);
@@ -2351,23 +2352,27 @@ static int create_anchor_flow_table(struct mlx5_flow_steering *steering)
 
 static int init_root_ns(struct mlx5_flow_steering *steering)
 {
+	int err;
+
 	steering->root_ns = create_root_ns(steering, FS_FT_NIC_RX);
 	if (!steering->root_ns)
-		goto cleanup;
+		return -ENOMEM;
 
-	if (init_root_tree(steering, &root_fs, &steering->root_ns->ns.node))
-		goto cleanup;
+	err = init_root_tree(steering, &root_fs, &steering->root_ns->ns.node);
+	if (err)
+		goto out_err;
 
 	set_prio_attrs(steering->root_ns);
-
-	if (create_anchor_flow_table(steering))
-		goto cleanup;
+	err = create_anchor_flow_table(steering);
+	if (err)
+		goto out_err;
 
 	return 0;
 
-cleanup:
-	mlx5_cleanup_fs(steering->dev);
-	return -ENOMEM;
+out_err:
+	cleanup_root_ns(steering->root_ns);
+	steering->root_ns = NULL;
+	return err;
 }
 
 static void clean_tree(struct fs_node *node)
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [net 6/7] net/mlx5e: Fix traffic between VF and representor
  2018-04-26 19:58 [pull request][net 0/7] Mellanox, mlx5 fixes 2018-04-26 Saeed Mahameed
                   ` (4 preceding siblings ...)
  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
  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
  7 siblings, 0 replies; 9+ messages in thread
From: Saeed Mahameed @ 2018-04-26 19:58 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Shahar Klein, Saeed Mahameed

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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [net 7/7] net/mlx5: Properly deal with flow counters when deleting rules
  2018-04-26 19:58 [pull request][net 0/7] Mellanox, mlx5 fixes 2018-04-26 Saeed Mahameed
                   ` (5 preceding siblings ...)
  2018-04-26 19:58 ` [net 6/7] net/mlx5e: Fix traffic between VF and representor Saeed Mahameed
@ 2018-04-26 19:58 ` Saeed Mahameed
  2018-04-27 18:32 ` [pull request][net 0/7] Mellanox, mlx5 fixes 2018-04-26 David Miller
  7 siblings, 0 replies; 9+ messages in thread
From: Saeed Mahameed @ 2018-04-26 19:58 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Chris Mi, Jianbo Liu, Saeed Mahameed

From: Chris Mi <chrism@mellanox.com>

When deleting a flow counter, the modify mask should be the action and
the flow counter. Otherwise the flow counter is not deleted and we'll
get a firmware warning when deleting the remaining destinations on the
same FTE.

It only happens in the presence of flow counter and multiple vport
destinations. If there is only one vport destination, there is no
need to update the FTE when deleting the only vport destination,
we just delete the FTE.

Fixes: ae05831424ed ("net/mlx5: Add option to add fwd rule with counter")
Signed-off-by: Chris Mi <chrism@mellanox.com>
Signed-off-by: Jianbo Liu <jianbol@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
index 2595c67ea39e..c39c1692e674 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
@@ -482,7 +482,8 @@ static void del_sw_hw_rule(struct fs_node *node)
 
 	if (rule->dest_attr.type == MLX5_FLOW_DESTINATION_TYPE_COUNTER  &&
 	    --fte->dests_size) {
-		modify_mask = BIT(MLX5_SET_FTE_MODIFY_ENABLE_MASK_ACTION);
+		modify_mask = BIT(MLX5_SET_FTE_MODIFY_ENABLE_MASK_ACTION) |
+			      BIT(MLX5_SET_FTE_MODIFY_ENABLE_MASK_FLOW_COUNTERS);
 		fte->action.action &= ~MLX5_FLOW_CONTEXT_ACTION_COUNT;
 		update_fte = true;
 		goto out;
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [pull request][net 0/7] Mellanox, mlx5 fixes 2018-04-26
  2018-04-26 19:58 [pull request][net 0/7] Mellanox, mlx5 fixes 2018-04-26 Saeed Mahameed
                   ` (6 preceding siblings ...)
  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 ` David Miller
  7 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2018-04-27 18:32 UTC (permalink / raw)
  To: saeedm; +Cc: netdev

From: Saeed Mahameed <saeedm@mellanox.com>
Date: Thu, 26 Apr 2018 12:58:35 -0700

> This pull request includes fixes for mlx5 core and netdev driver.
> 
> Please pull and let me know if there's any problems.

Pulled.

> For -stable v4.12
>     net/mlx5e: TX, Use correct counter in dma_map error flow
> For -stable v4.13
>     net/mlx5: Avoid cleaning flow steering table twice during error flow
> For -stable v4.14
>     net/mlx5e: Allow offloading ipv4 header re-write for icmp
> For -stable v4.15
>     net/mlx5e: DCBNL fix min inline header size for dscp
> For -stable v4.16
>     net/mlx5: Fix mlx5_get_vector_affinity function

Queued up for -stable, thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-04-27 18:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [net 6/7] net/mlx5e: Fix traffic between VF and representor Saeed Mahameed
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

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.