Dan Carpenter
2022-Jun-07 06:49 UTC
[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") Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com> --->From review. (Not tested).drivers/vdpa/mlx5/net/mlx5_vnet.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index b7a955479156..c964f4161d7f 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c @@ -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
Dan Carpenter
2022-Jun-07 06:50 UTC
[PATCH 2/2] vdpa/mlx5: clean up indenting in handle_ctrl_vlan()
These lines were supposed to be indented. Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com> --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index c964f4161d7f..83607b7488f1 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c @@ -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
On 6/6/2022 11:49 PM, Dan Carpenter wrote:> 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") > Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>Acked-by: Si-Wei Liu <si-wei.liu at oracle.com>> --- > From review. (Not tested). > > drivers/vdpa/mlx5/net/mlx5_vnet.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c > index b7a955479156..c964f4161d7f 100644 > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c > @@ -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;