Skip to contentSkip to conversation

vdpa/mlx5: fix error code for deleting vlan

PATCH In review Dan Carpenter 3 participants 6 messages Jun 7, 2022 – Jun 8, 2022

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

PATCH 1/2 vdpa/mlx5: fix error code for deleting vlan

Return success if we were able to delete a vlan. The current code always returns failure.

Fixes baf2ad3f6a98 ("vdpa/mlx5: Add RX MAC VLAN filter support")

---
From review. (Not tested).

 drivers/vdpa/mlx5/net/mlx5_vnet.c | 1 +
 1 file changed, 1 insertion(+)
drivers/vdpa/mlx5/net/mlx5_vnet.c +1 -0
index b7a955479156..c964f4161d7f 100644
@@ -1814,6 +1814,7 @@ static virtio_net_ctrl_ack handle_ctrl_vlan(struct mlx5_vdpa_dev *mvdev, u8 cmd)
 
 		id = mlx5vdpa16_to_cpu(mvdev, vlan);
 		mac_vlan_del(ndev, ndev->config.mac, id, true);
+		status = VIRTIO_NET_OK;
 		break;
 	default:
 	break;
Signature · 6 lines
2.35.1

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
#1 lore raw

PATCH 2/2 vdpa/mlx5: clean up indenting in handle_ctrl_vlan()

These lines were supposed to be indented.

---
 drivers/vdpa/mlx5/net/mlx5_vnet.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/vdpa/mlx5/net/mlx5_vnet.c +3 -3
index c964f4161d7f..83607b7488f1 100644
@@ -1817,10 +1817,10 @@ static virtio_net_ctrl_ack handle_ctrl_vlan(struct mlx5_vdpa_dev *mvdev, u8 cmd)
 		status = VIRTIO_NET_OK;
 		break;
 	default:
-	break;
-}
+		break;
+	}
 
-return status;
+	return status;
 }
 
 static void mlx5_cvq_kick_handler(struct work_struct *work)
Signature · 6 lines
2.35.1

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Acked-by on v1 2/2
#2 lore raw

RE: [PATCH 2/2] vdpa/mlx5: clean up indenting in handle_ctrl_vlan()

Quoted 11 lines

From: Dan Carpenter <[email protected]>
Sent: Tuesday, June 7, 2022 9:50 AM
To: Michael S. Tsirkin <[email protected]>; Eli Cohen <[email protected]>
Cc: Jason Wang <[email protected]>; Si-Wei Liu <[email protected]>; Parav Pandit <[email protected]>; [email protected]; [email protected]
Subject: [PATCH 2/2] vdpa/mlx5: clean up indenting in handle_ctrl_vlan()

These lines were supposed to be indented.

---

Quoted 23 lines
 drivers/vdpa/mlx5/net/mlx5_vnet.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/vdpa/mlx5/net/mlx5_vnet.c +3 -4
index c964f4161d7f..83607b7488f1 100644
@@ -1817,10 +1817,10 @@ static virtio_net_ctrl_ack handle_ctrl_vlan(struct mlx5_vdpa_dev *mvdev, u8 cmd)
 		status = VIRTIO_NET_OK;
 		break;
 	default:
-	break;
-}
+		break;
+	}
 
-return status;
+	return status;
 }
 
 static void mlx5_cvq_kick_handler(struct work_struct *work)
--

2.35.1

Acked-by on v1 1/2
#4 lore raw
In reply to Dan Carpenter
Quoted 7 lines

From: Dan Carpenter <[email protected]>
Sent: Tuesday, June 7, 2022 9:49 AM
To: Michael S. Tsirkin <[email protected]>; Eli Cohen <[email protected]>
Cc: Jason Wang <[email protected]>; Si-Wei Liu <[email protected]>; Parav Pandit <[email protected]>; [email protected]; [email protected]
Subject: [PATCH 1/2] vdpa/mlx5: fix error code for deleting vlan

Quoted 7 lines

Return success if we were able to delete a vlan. The current code always returns failure.

Fixes baf2ad3f6a98 ("vdpa/mlx5: Add RX MAC VLAN filter support")

---
From review. (Not tested).

Quoted 18 lines
 drivers/vdpa/mlx5/net/mlx5_vnet.c | 1 +
 1 file changed, 1 insertion(+)
drivers/vdpa/mlx5/net/mlx5_vnet.c +1 -1
index b7a955479156..c964f4161d7f 100644
@@ -1814,6 +1814,7 @@ static virtio_net_ctrl_ack handle_ctrl_vlan(struct mlx5_vdpa_dev *mvdev, u8 cmd)
 
 		id = mlx5vdpa16_to_cpu(mvdev, vlan);
 		mac_vlan_del(ndev, ndev->config.mac, id, true);
+		status = VIRTIO_NET_OK;
 		break;
 	default:
 	break;
--

2.35.1

Acked-by on v1 1/2
#5 lore raw
In reply to Dan Carpenter
Quoted 5 lines · Dan Carpenter

Return success if we were able to delete a vlan. The current code always returns failure.

Fixes baf2ad3f6a98 ("vdpa/mlx5: Add RX MAC VLAN filter support")
Quoted 11 lines

---
From review. (Not tested).

  drivers/vdpa/mlx5/net/mlx5_vnet.c | 1 +
  1 file changed, 1 insertion(+)
drivers/vdpa/mlx5/net/mlx5_vnet.c +0 -0
index b7a955479156..c964f4161d7f 100644

drivers/vdpa/mlx5/net/mlx5_vnet.c static virtio_net_ctrl_ack handle_ctrl_vlan(struct mlx5_vdpa_dev *mvdev, u8 cmd) · line 1820

Quoted 7 lines
drivers/vdpa/mlx5/net/mlx5_vnet.c +1 -0
@@ -1814,6 +1814,7 @@ static virtio_net_ctrl_ack handle_ctrl_vlan(struct mlx5_vdpa_dev *mvdev, u8 cmd)
 
  		id = mlx5vdpa16_to_cpu(mvdev, vlan);
  		mac_vlan_del(ndev, ndev->config.mac, id, true);
+		status = VIRTIO_NET_OK;
  		break;
  	default:
  	break;

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Acked-by on v1 2/2
#3 lore raw

Re: [PATCH 2/2] vdpa/mlx5: clean up indenting in handle_ctrl_vlan()

In reply to Dan Carpenter
Quoted 3 lines · Dan Carpenter

These lines were supposed to be indented.

Quoted 12 lines
---
  drivers/vdpa/mlx5/net/mlx5_vnet.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/vdpa/mlx5/net/mlx5_vnet.c +0 -0
index c964f4161d7f..83607b7488f1 100644
@@ -1817,10 +1817,10 @@ static virtio_net_ctrl_ack handle_ctrl_vlan(struct mlx5_vdpa_dev *mvdev, u8 cmd)
  		status = VIRTIO_NET_OK;
  		break;
  	default:

drivers/vdpa/mlx5/net/mlx5_vnet.c static virtio_net_ctrl_ack handle_ctrl_vlan(struct mlx5_vdpa_dev *mvdev, u8 cmd) · line 1826

Quoted 10 lines
drivers/vdpa/mlx5/net/mlx5_vnet.c +3 -3
-	break;
-}
+		break;
+	}
 
-return status;
+	return status;
  }
 
  static void mlx5_cvq_kick_handler(struct work_struct *work)

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization