RE: [PATCH] vdpa: allow vdpa dev_del management operation to return failure

From
Parav Pandit via Virtualization <hidden>
Date
2022-06-08 10:43:58
Also in
lkml, netdev
From: Dawar, Gautam <redacted>
Sent: Wednesday, June 8, 2022 6:30 AM
To: Jason Wang <redacted>
Cc: netdev <redacted>; linux-net-drivers (AMD-Xilinx) <linux-
net-drivers@amd.com>; Anand, Harpreet [off-list ref];
Michael S. Tsirkin [off-list ref]; Zhu Lingshan
[off-list ref]; Xie Yongji [off-list ref]; Eli
Cohen [off-list ref]; Parav Pandit [off-list ref]; Si-Wei Liu <si-
wei.liu@oracle.com>; Stefano Garzarella [off-list ref]; Wan
Jiabing [off-list ref]; Dan Carpenter
[off-list ref]; virtualization <virtualization@lists.linux-
foundation.org>; linux-kernel [off-list ref]
Subject: RE: [PATCH] vdpa: allow vdpa dev_del management operation to
return failure

[AMD Official Use Only - General]

Hi Gautam:
[GD>>] Hi Jason,

On Fri, Jun 3, 2022 at 6:34 PM Gautam Dawar [off-list ref]
wrote:
quoted
Currently, the vdpa_nl_cmd_dev_del_set_doit() implementation allows
returning a value to depict the operation status but the return type
of dev_del() callback is void. So, any error while deleting the vdpa
device in the vdpa parent driver can't be returned to the management
layer.
I wonder under which cognition we can hit an error in dev_del()?
[GD>>] In the AMD-Xilinx vDPA driver, on receiving vdpa device deletion
request, I try to identify if the vdpa device is in use by any virtio-net driver
(through any vdpa bus driver) by looking at the vdpa device status value. In
case the vdpa device status is >= VIRTIO_CONFIG_S_DRIVER, -EBUSY is
returned.
This is to avoid side-effects as noted in
https://bugzilla.kernel.org/show_bug.cgi?id=213179 caused by deleting the
vdpa device when it is being used.
quoted
User should be able to delete the device anytime.
Upper layers who are unable to perform teardown sequence should be fixed.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Thread (3 messages) 3 messages, 2 authors, last reply 2022-06-12
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help