Skip to contentSkip to conversation

Mellanox, mlx5 fixes 2018-12-19

GIT PULL New Saeed Mahameed 2 participants 7 messages Dec 19, 2018

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

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(-)
#1 lore raw

PATCH 1/3 net/mlx5e: RX, Fix wrong early return in receive queue poll

From: Tariq Toukan <[email protected]>

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")
---
 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +6 -4
index 624eed345b5d..0b5ef6d4e815 100644
@@ -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;
Signature · 1 line
2.19.2
#2 lore raw

PATCH 2/3 net/mlx5: Typo fix in del_sw_hw_rule

In reply to Saeed Mahameed

From: Yuval Avnery <[email protected]>

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")
---
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +1 -1
index 9d73eb955f75..08233cf44871 100644
@@ -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:
Signature · 1 line
2.19.2
#3 lore raw

PATCH 3/3 net/mlx5e: Remove the false indication of software timestamping support

In reply to Saeed Mahameed

From: Alaa Hleihel <[email protected]>

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

Fixes ef9814deafd0 ("net/mlx5e: Add HW timestamping (TS) support")
---
 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +3 -8
index 25c1c4f96841..f480763dcd0d 100644
@@ -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);
Signature · 1 line
2.19.2
#5 lore raw
Quoted 8 lines · David Miller

From: Saeed Mahameed <[email protected]>
Date: Wed, 19 Dec 2018 13:34:11 -0800

Quoted 3 lines

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.

maintainer Applied
#6 lore raw

From: Saeed Mahameed <[email protected]>
Date: Wed, 19 Dec 2018 23:38:27 +0000

Quoted 6 lines · David Miller
Quoted 5 lines

From: Saeed Mahameed <[email protected]>
Date: Wed, 19 Dec 2018 13:34:11 -0800

Quoted 2 lines

This series includes some fixes to mlx5 driver.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

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 :-)

Quoted 9 lines

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.