netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [pull request][net 0/3] Mellanox, mlx5 fixes 2018-12-19
@ 2018-12-19 21:34 Saeed Mahameed
  2018-12-19 21:34 ` [net 1/3] net/mlx5e: RX, Fix wrong early return in receive queue poll Saeed Mahameed
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Saeed Mahameed @ 2018-12-19 21:34 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Saeed Mahameed

Hi Dave,

This series includes some fixes to mlx5 driver.

Please pull and let me know if there is any problem.

Thanks,
Saeed.

---
The following changes since commit fb24274546310872eeeaf3d1d53799d8414aa0f2:

  ipv6: explicitly initialize udp6_addr in udp_sock_create6() (2018-12-19 12:09:00 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git tags/mlx5-fixes-2018-12-19

for you to fetch changes up to 4765420439e758bfa4808392d18b0a4cb6f06065:

  net/mlx5e: Remove the false indication of software timestamping support (2018-12-19 13:31:16 -0800)

----------------------------------------------------------------
mlx5-fixes-2018-12-19

Some fixes for the mlx5 driver

----------------------------------------------------------------
Alaa Hleihel (1):
      net/mlx5e: Remove the false indication of software timestamping support

Tariq Toukan (1):
      net/mlx5e: RX, Fix wrong early return in receive queue poll

Yuval Avnery (1):
      net/mlx5: Typo fix in del_sw_hw_rule

 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 11 +++--------
 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c      | 10 ++++++----
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c    |  2 +-
 3 files changed, 10 insertions(+), 13 deletions(-)

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

* [net 1/3] net/mlx5e: RX, Fix wrong early return in receive queue poll
  2018-12-19 21:34 [pull request][net 0/3] Mellanox, mlx5 fixes 2018-12-19 Saeed Mahameed
@ 2018-12-19 21:34 ` Saeed Mahameed
  2018-12-19 21:34 ` [net 2/3] net/mlx5: Typo fix in del_sw_hw_rule Saeed Mahameed
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Saeed Mahameed @ 2018-12-19 21:34 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Tariq Toukan, Saeed Mahameed

From: Tariq Toukan <tariqt@mellanox.com>

When the completion queue of the RQ is empty, do not immediately return.
If left-over decompressed CQEs (from the previous cycle) were processed,
need to go to the finalization part of the poll function.

Bug exists only when CQE compression is turned ON.

This solves the following issue:
mlx5_core 0000:82:00.1: mlx5_eq_int:544:(pid 0): CQ error on CQN 0xc08, syndrome 0x1
mlx5_core 0000:82:00.1 p4p2: mlx5e_cq_error_event: cqn=0x000c08 event=0x04

Fixes: 4b7dfc992514 ("net/mlx5e: Early-return on empty completion queues")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
index 624eed345b5d..0b5ef6d4e815 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
@@ -1190,7 +1190,7 @@ void mlx5e_handle_rx_cqe_mpwrq(struct mlx5e_rq *rq, struct mlx5_cqe64 *cqe)
 int mlx5e_poll_rx_cq(struct mlx5e_cq *cq, int budget)
 {
 	struct mlx5e_rq *rq = container_of(cq, struct mlx5e_rq, cq);
-	struct mlx5e_xdpsq *xdpsq;
+	struct mlx5e_xdpsq *xdpsq = &rq->xdpsq;
 	struct mlx5_cqe64 *cqe;
 	int work_done = 0;
 
@@ -1201,10 +1201,11 @@ int mlx5e_poll_rx_cq(struct mlx5e_cq *cq, int budget)
 		work_done += mlx5e_decompress_cqes_cont(rq, cq, 0, budget);
 
 	cqe = mlx5_cqwq_get_cqe(&cq->wq);
-	if (!cqe)
+	if (!cqe) {
+		if (unlikely(work_done))
+			goto out;
 		return 0;
-
-	xdpsq = &rq->xdpsq;
+	}
 
 	do {
 		if (mlx5_get_cqe_format(cqe) == MLX5_COMPRESSED) {
@@ -1219,6 +1220,7 @@ int mlx5e_poll_rx_cq(struct mlx5e_cq *cq, int budget)
 		rq->handle_rx_cqe(rq, cqe);
 	} while ((++work_done < budget) && (cqe = mlx5_cqwq_get_cqe(&cq->wq)));
 
+out:
 	if (xdpsq->doorbell) {
 		mlx5e_xmit_xdp_doorbell(xdpsq);
 		xdpsq->doorbell = false;
-- 
2.19.2

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

* [net 2/3] net/mlx5: Typo fix in del_sw_hw_rule
  2018-12-19 21:34 [pull request][net 0/3] Mellanox, mlx5 fixes 2018-12-19 Saeed Mahameed
  2018-12-19 21:34 ` [net 1/3] net/mlx5e: RX, Fix wrong early return in receive queue poll Saeed Mahameed
@ 2018-12-19 21:34 ` Saeed Mahameed
  2018-12-19 21:34 ` [net 3/3] net/mlx5e: Remove the false indication of software timestamping support Saeed Mahameed
  2018-12-19 21:44 ` [pull request][net 0/3] Mellanox, mlx5 fixes 2018-12-19 David Miller
  3 siblings, 0 replies; 7+ messages in thread
From: Saeed Mahameed @ 2018-12-19 21:34 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Yuval Avnery, Saeed Mahameed

From: Yuval Avnery <yuvalav@mellanox.com>

Expression terminated with "," instead of ";", resulted in
set_fte getting bad value for modify_enable_mask field.

Fixes: bd5251dbf156 ("net/mlx5_core: Introduce flow steering destination of type counter")
Signed-off-by: Yuval Avnery <yuvalav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 +-
 1 file changed, 1 insertion(+), 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 9d73eb955f75..08233cf44871 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
@@ -452,7 +452,7 @@ static void del_sw_hw_rule(struct fs_node *node)
 
 	if ((fte->action.action & MLX5_FLOW_CONTEXT_ACTION_FWD_DEST) &&
 	    --fte->dests_size) {
-		modify_mask = BIT(MLX5_SET_FTE_MODIFY_ENABLE_MASK_DESTINATION_LIST),
+		modify_mask = BIT(MLX5_SET_FTE_MODIFY_ENABLE_MASK_DESTINATION_LIST);
 		update_fte = true;
 	}
 out:
-- 
2.19.2

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

* [net 3/3] net/mlx5e: Remove the false indication of software timestamping support
  2018-12-19 21:34 [pull request][net 0/3] Mellanox, mlx5 fixes 2018-12-19 Saeed Mahameed
  2018-12-19 21:34 ` [net 1/3] net/mlx5e: RX, Fix wrong early return in receive queue poll Saeed Mahameed
  2018-12-19 21:34 ` [net 2/3] net/mlx5: Typo fix in del_sw_hw_rule Saeed Mahameed
@ 2018-12-19 21:34 ` Saeed Mahameed
  2018-12-19 21:44 ` [pull request][net 0/3] Mellanox, mlx5 fixes 2018-12-19 David Miller
  3 siblings, 0 replies; 7+ messages in thread
From: Saeed Mahameed @ 2018-12-19 21:34 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Alaa Hleihel, Saeed Mahameed

From: Alaa Hleihel <alaa@mellanox.com>

mlx5 driver falsely advertises support of software timestamping.
Fix it by removing the false indication.

Fixes: ef9814deafd0 ("net/mlx5e: Add HW timestamping (TS) support")
Signed-off-by: Alaa Hleihel <alaa@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index 25c1c4f96841..f480763dcd0d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -1190,11 +1190,6 @@ int mlx5e_ethtool_get_ts_info(struct mlx5e_priv *priv,
 			      struct ethtool_ts_info *info)
 {
 	struct mlx5_core_dev *mdev = priv->mdev;
-	int ret;
-
-	ret = ethtool_op_get_ts_info(priv->netdev, info);
-	if (ret)
-		return ret;
 
 	info->phc_index = mlx5_clock_get_ptp_index(mdev);
 
@@ -1202,9 +1197,9 @@ int mlx5e_ethtool_get_ts_info(struct mlx5e_priv *priv,
 	    info->phc_index == -1)
 		return 0;
 
-	info->so_timestamping |= SOF_TIMESTAMPING_TX_HARDWARE |
-				 SOF_TIMESTAMPING_RX_HARDWARE |
-				 SOF_TIMESTAMPING_RAW_HARDWARE;
+	info->so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE |
+				SOF_TIMESTAMPING_RX_HARDWARE |
+				SOF_TIMESTAMPING_RAW_HARDWARE;
 
 	info->tx_types = BIT(HWTSTAMP_TX_OFF) |
 			 BIT(HWTSTAMP_TX_ON);
-- 
2.19.2

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

* Re: [pull request][net 0/3] Mellanox, mlx5 fixes 2018-12-19
  2018-12-19 21:34 [pull request][net 0/3] Mellanox, mlx5 fixes 2018-12-19 Saeed Mahameed
                   ` (2 preceding siblings ...)
  2018-12-19 21:34 ` [net 3/3] net/mlx5e: Remove the false indication of software timestamping support Saeed Mahameed
@ 2018-12-19 21:44 ` David Miller
  2018-12-19 23:38   ` Saeed Mahameed
  3 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2018-12-19 21:44 UTC (permalink / raw)
  To: saeedm; +Cc: netdev

From: Saeed Mahameed <saeedm@mellanox.com>
Date: Wed, 19 Dec 2018 13:34:11 -0800

> This series includes some fixes to mlx5 driver.
> 
> Please pull and let me know if there is any problem.

Pulled, thanks Saeed.

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

* Re: [pull request][net 0/3] Mellanox, mlx5 fixes 2018-12-19
  2018-12-19 21:44 ` [pull request][net 0/3] Mellanox, mlx5 fixes 2018-12-19 David Miller
@ 2018-12-19 23:38   ` Saeed Mahameed
  2018-12-19 23:55     ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Saeed Mahameed @ 2018-12-19 23:38 UTC (permalink / raw)
  To: davem; +Cc: netdev

On Wed, 2018-12-19 at 13:44 -0800, David Miller wrote:
> From: Saeed Mahameed <saeedm@mellanox.com>
> Date: Wed, 19 Dec 2018 13:34:11 -0800
> 
> > This series includes some fixes to mlx5 driver.
> > 
> > Please pull and let me know if there is any problem.
> 
> Pulled, thanks Saeed.

Thanks Dave, Sorry i forgot to mark -stable patches.

if it is not too late:

For -stable v4.10
('net/mlx5: Typo fix in del_sw_hw_rule')

For -stable v4.15
('net/mlx5e: Remove the false indication of software timestamping 
support')

For -stable v4.19
('net/mlx5e: RX, Fix wrong early return in receive queue poll')


Much appreciated,
Saeed.


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

* Re: [pull request][net 0/3] Mellanox, mlx5 fixes 2018-12-19
  2018-12-19 23:38   ` Saeed Mahameed
@ 2018-12-19 23:55     ` David Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2018-12-19 23:55 UTC (permalink / raw)
  To: saeedm; +Cc: netdev

From: Saeed Mahameed <saeedm@mellanox.com>
Date: Wed, 19 Dec 2018 23:38:27 +0000

> On Wed, 2018-12-19 at 13:44 -0800, David Miller wrote:
>> From: Saeed Mahameed <saeedm@mellanox.com>
>> Date: Wed, 19 Dec 2018 13:34:11 -0800
>> 
>> > This series includes some fixes to mlx5 driver.
>> > 
>> > Please pull and let me know if there is any problem.
>> 
>> Pulled, thanks Saeed.
> 
> Thanks Dave, Sorry i forgot to mark -stable patches.
> 
> if it is not too late:

Never too late :-)

> For -stable v4.10
> ('net/mlx5: Typo fix in del_sw_hw_rule')
> 
> For -stable v4.15
> ('net/mlx5e: Remove the false indication of software timestamping 
> support')
> 
> For -stable v4.19
> ('net/mlx5e: RX, Fix wrong early return in receive queue poll')

Queued up, thanks.

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

end of thread, other threads:[~2018-12-19 23:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-19 21:34 [pull request][net 0/3] Mellanox, mlx5 fixes 2018-12-19 Saeed Mahameed
2018-12-19 21:34 ` [net 1/3] net/mlx5e: RX, Fix wrong early return in receive queue poll Saeed Mahameed
2018-12-19 21:34 ` [net 2/3] net/mlx5: Typo fix in del_sw_hw_rule Saeed Mahameed
2018-12-19 21:34 ` [net 3/3] net/mlx5e: Remove the false indication of software timestamping support Saeed Mahameed
2018-12-19 21:44 ` [pull request][net 0/3] Mellanox, mlx5 fixes 2018-12-19 David Miller
2018-12-19 23:38   ` Saeed Mahameed
2018-12-19 23:55     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).