On 7/21/2023 2:01 AM, Tian, Kevin wrote:
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
From: Brett Creeley <brett.creeley@xxxxxxx>
Sent: Thursday, July 20, 2023 6:35 AM
+void pds_vfio_unregister_client_cmd(struct pds_vfio_pci_device *pds_vfio)
+{
+ struct pci_dev *pdev = pds_vfio_to_pci_dev(pds_vfio);
+ int err;
+
+ err = pds_client_unregister(pci_physfn(pdev), pds_vfio->client_id);
+ if (err)
+ dev_err(&pdev->dev, "unregister from DSC failed: %pe\n",
+ ERR_PTR(err));
Why using ERR_PTR() here? it looks a common pattern used cross
this series.
Yes, this is intentional. This is more readable than just printing out
the error value.
@@ -34,12 +34,13 @@ enum pds_core_vif_types {
#define PDS_DEV_TYPE_CORE_STR "Core"
#define PDS_DEV_TYPE_VDPA_STR "vDPA"
-#define PDS_DEV_TYPE_VFIO_STR "VFio"
+#define PDS_DEV_TYPE_VFIO_STR "vfio"
#define PDS_DEV_TYPE_ETH_STR "Eth"
#define PDS_DEV_TYPE_RDMA_STR "RDMA"
#define PDS_DEV_TYPE_LM_STR "LM"
#define PDS_VDPA_DEV_NAME "."
PDS_DEV_TYPE_VDPA_STR
+#define PDS_LM_DEV_NAME PDS_CORE_DRV_NAME "."
PDS_DEV_TYPE_LM_STR "." PDS_DEV_TYPE_VFIO_STR
then should the name be changed to PDS_VFIO_LM_DEV_NAME?
Or is mentioning *LM* important? what would be the problem to just
use "pds_core.vfio"?
LM is important for the device. I don't plan to change this.