[v4] vdpa/ifc: Match default subsystem IDs for modern virtio-blk devices

Message ID 20221215034818.2145612-1-abhishek.maheshwari@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers
Series [v4] vdpa/ifc: Match default subsystem IDs for modern virtio-blk devices |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-x86_64-compile-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS

Commit Message

Abhishek Maheshwari Dec. 15, 2022, 3:48 a.m. UTC
  Amending the match table for vdpa/ifcvf driver to work with virtio-blk
devices that have default subsystem IDs.

Cc: stable@dpdk.org

Signed-off-by: Abhishek Maheshwari <abhishek.maheshwari@intel.com>

---
v3:
* Removing match with ANY_IDs
* Adding support for only default subsystem IDs

v2:
* commit message update
---
 drivers/vdpa/ifc/base/ifcvf.h | 1 +
 drivers/vdpa/ifc/ifcvf_vdpa.c | 7 +++++++
 2 files changed, 8 insertions(+)
  

Comments

Pei, Andy Dec. 16, 2022, 1:58 a.m. UTC | #1
Hi

Code looks good to me.

> -----Original Message-----
> From: Abhishek Maheshwari <abhishek.maheshwari@intel.com>
> Sent: Thursday, December 15, 2022 11:48 AM
> To: Wang, Xiao W <xiao.w.wang@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org; Xia, Chenbo <Chenbo.Xia@intel.com>;
> Mandal, Purna Chandra <Purna.Chandra.Mandal@intel.com>; Maheshwari,
> Abhishek <Abhishek.Maheshwari@intel.com>
> Subject: [PATCH v4] vdpa/ifc: Match default subsystem IDs for modern virtio-
> blk devices
> 
> Amending the match table for vdpa/ifcvf driver to work with virtio-blk
> devices that have default subsystem IDs.
> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: Abhishek Maheshwari <abhishek.maheshwari@intel.com>
> 
> ---
> v3:
> * Removing match with ANY_IDs
> * Adding support for only default subsystem IDs
> 
> v2:
> * commit message update
> ---
>  drivers/vdpa/ifc/base/ifcvf.h | 1 +
>  drivers/vdpa/ifc/ifcvf_vdpa.c | 7 +++++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/drivers/vdpa/ifc/base/ifcvf.h b/drivers/vdpa/ifc/base/ifcvf.h
> index 3726da7a33..04c81c8196 100644
> --- a/drivers/vdpa/ifc/base/ifcvf.h
> +++ b/drivers/vdpa/ifc/base/ifcvf.h
> @@ -20,6 +20,7 @@
>  #define IFCVF_SUBSYS_DEVICE_ID              0x001A
>  #define IFCVF_SUBSYS_NET_DEVICE_ID          0x0001
>  #define IFCVF_SUBSYS_BLK_DEVICE_ID          0x0002
> +#define IFCVF_SUBSYS_DEFAULT_DEVICE_ID      0x0000
> 
>  #define IFCVF_MAX_QUEUES		32
> 
> diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
> index 49d68ad1b1..edc6db545d 100644
> --- a/drivers/vdpa/ifc/ifcvf_vdpa.c
> +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
> @@ -1849,6 +1849,13 @@ static const struct rte_pci_id pci_id_ifcvf_map[] =
> {
>  	  .subsystem_device_id = IFCVF_SUBSYS_BLK_DEVICE_ID,
>  	},
> 
> +	{ .class_id = RTE_CLASS_ANY_ID,
> +	  .vendor_id = IFCVF_VENDOR_ID,
> +	  .device_id = IFCVF_BLK_MODERN_DEVICE_ID,
> +	  .subsystem_vendor_id = IFCVF_SUBSYS_VENDOR_ID,
> +	  .subsystem_device_id = IFCVF_SUBSYS_DEFAULT_DEVICE_ID,
> +	}, /* virtio-blk devices with default subsystem IDs */
> +
>  	{ .vendor_id = 0, /* sentinel */
>  	},
>  };
> --
> 2.31.1

Acked-by: Andy Pei <andy.pei@intel.com>
  
Maxime Coquelin Jan. 19, 2023, 2:09 p.m. UTC | #2
Hi Abhishek,

On 12/15/22 04:48, Abhishek Maheshwari wrote:
> Amending the match table for vdpa/ifcvf driver to work with virtio-blk
> devices that have default subsystem IDs.
> 
> Cc: stable@dpdk.org

Is that really a fix? If so, you need to add the Fixes tag so that LTS
maintainers know on which LTS it applies.

Other than that:
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

If you provide me with the faulty commit, I can add it when applying.

Thanks,
Maxime


Thanks,
Maxime

> 
> Signed-off-by: Abhishek Maheshwari <abhishek.maheshwari@intel.com>
> 
> ---
> v3:
> * Removing match with ANY_IDs
> * Adding support for only default subsystem IDs
> 
> v2:
> * commit message update
> ---
>   drivers/vdpa/ifc/base/ifcvf.h | 1 +
>   drivers/vdpa/ifc/ifcvf_vdpa.c | 7 +++++++
>   2 files changed, 8 insertions(+)
> 
> diff --git a/drivers/vdpa/ifc/base/ifcvf.h b/drivers/vdpa/ifc/base/ifcvf.h
> index 3726da7a33..04c81c8196 100644
> --- a/drivers/vdpa/ifc/base/ifcvf.h
> +++ b/drivers/vdpa/ifc/base/ifcvf.h
> @@ -20,6 +20,7 @@
>   #define IFCVF_SUBSYS_DEVICE_ID              0x001A
>   #define IFCVF_SUBSYS_NET_DEVICE_ID          0x0001
>   #define IFCVF_SUBSYS_BLK_DEVICE_ID          0x0002
> +#define IFCVF_SUBSYS_DEFAULT_DEVICE_ID      0x0000
>   
>   #define IFCVF_MAX_QUEUES		32
>   
> diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
> index 49d68ad1b1..edc6db545d 100644
> --- a/drivers/vdpa/ifc/ifcvf_vdpa.c
> +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
> @@ -1849,6 +1849,13 @@ static const struct rte_pci_id pci_id_ifcvf_map[] = {
>   	  .subsystem_device_id = IFCVF_SUBSYS_BLK_DEVICE_ID,
>   	},
>   
> +	{ .class_id = RTE_CLASS_ANY_ID,
> +	  .vendor_id = IFCVF_VENDOR_ID,
> +	  .device_id = IFCVF_BLK_MODERN_DEVICE_ID,
> +	  .subsystem_vendor_id = IFCVF_SUBSYS_VENDOR_ID,
> +	  .subsystem_device_id = IFCVF_SUBSYS_DEFAULT_DEVICE_ID,
> +	}, /* virtio-blk devices with default subsystem IDs */
> +
>   	{ .vendor_id = 0, /* sentinel */
>   	},
>   };
  
Maxime Coquelin Feb. 3, 2023, 2:57 p.m. UTC | #3
On 12/15/22 04:48, Abhishek Maheshwari wrote:
> Amending the match table for vdpa/ifcvf driver to work with virtio-blk
> devices that have default subsystem IDs.
> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: Abhishek Maheshwari <abhishek.maheshwari@intel.com>
> 
> ---
> v3:
> * Removing match with ANY_IDs
> * Adding support for only default subsystem IDs
> 
> v2:
> * commit message update
> ---
>   drivers/vdpa/ifc/base/ifcvf.h | 1 +
>   drivers/vdpa/ifc/ifcvf_vdpa.c | 7 +++++++
>   2 files changed, 8 insertions(+)
> 

Applied to dpdk-next-virtio/main.

Thanks,
Maxime
  

Patch

diff --git a/drivers/vdpa/ifc/base/ifcvf.h b/drivers/vdpa/ifc/base/ifcvf.h
index 3726da7a33..04c81c8196 100644
--- a/drivers/vdpa/ifc/base/ifcvf.h
+++ b/drivers/vdpa/ifc/base/ifcvf.h
@@ -20,6 +20,7 @@ 
 #define IFCVF_SUBSYS_DEVICE_ID              0x001A
 #define IFCVF_SUBSYS_NET_DEVICE_ID          0x0001
 #define IFCVF_SUBSYS_BLK_DEVICE_ID          0x0002
+#define IFCVF_SUBSYS_DEFAULT_DEVICE_ID      0x0000
 
 #define IFCVF_MAX_QUEUES		32
 
diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
index 49d68ad1b1..edc6db545d 100644
--- a/drivers/vdpa/ifc/ifcvf_vdpa.c
+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
@@ -1849,6 +1849,13 @@  static const struct rte_pci_id pci_id_ifcvf_map[] = {
 	  .subsystem_device_id = IFCVF_SUBSYS_BLK_DEVICE_ID,
 	},
 
+	{ .class_id = RTE_CLASS_ANY_ID,
+	  .vendor_id = IFCVF_VENDOR_ID,
+	  .device_id = IFCVF_BLK_MODERN_DEVICE_ID,
+	  .subsystem_vendor_id = IFCVF_SUBSYS_VENDOR_ID,
+	  .subsystem_device_id = IFCVF_SUBSYS_DEFAULT_DEVICE_ID,
+	}, /* virtio-blk devices with default subsystem IDs */
+
 	{ .vendor_id = 0, /* sentinel */
 	},
 };