* [PATCH 0/3] vDPA/ifcvf: enables Intel C5000X-PL virtio-net
@ 2021-03-05 14:19 Zhu Lingshan
2021-03-05 14:19 ` [PATCH 1/3] vDPA/ifcvf: get_vendor_id returns a device specific vendor id Zhu Lingshan
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Zhu Lingshan @ 2021-03-05 14:19 UTC (permalink / raw)
To: jasowang, mst, lulu
Cc: virtualization, netdev, kvm, linux-kernel, Zhu Lingshan
This series enabled Intel FGPA SmartNIC C5000X-PL virtio-net
for vDPA
Zhu Lingshan (3):
vDPA/ifcvf: get_vendor_id returns a device specific vendor id
vDPA/ifcvf: enable Intel C5000X-PL virtio-net for vDPA
vDPA/ifcvf: bump version string to 1.0
drivers/vdpa/ifcvf/ifcvf_base.h | 13 +++++++++----
drivers/vdpa/ifcvf/ifcvf_main.c | 20 ++++++++++++++------
2 files changed, 23 insertions(+), 10 deletions(-)
--
2.27.0
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 1/3] vDPA/ifcvf: get_vendor_id returns a device specific vendor id 2021-03-05 14:19 [PATCH 0/3] vDPA/ifcvf: enables Intel C5000X-PL virtio-net Zhu Lingshan @ 2021-03-05 14:19 ` Zhu Lingshan 2021-03-08 2:51 ` Jason Wang 2021-03-05 14:19 ` [PATCH 2/3] vDPA/ifcvf: enable Intel C5000X-PL virtio-net for vDPA Zhu Lingshan 2021-03-05 14:20 ` [PATCH 3/3] vDPA/ifcvf: bump version string to 1.0 Zhu Lingshan 2 siblings, 1 reply; 8+ messages in thread From: Zhu Lingshan @ 2021-03-05 14:19 UTC (permalink / raw) To: jasowang, mst, lulu Cc: virtualization, netdev, kvm, linux-kernel, Zhu Lingshan In this commit, ifcvf_get_vendor_id() will return a device specific vendor id of the probed pci device than a hard code. Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> --- drivers/vdpa/ifcvf/ifcvf_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c index fa1af301cf55..e501ee07de17 100644 --- a/drivers/vdpa/ifcvf/ifcvf_main.c +++ b/drivers/vdpa/ifcvf/ifcvf_main.c @@ -324,7 +324,10 @@ static u32 ifcvf_vdpa_get_device_id(struct vdpa_device *vdpa_dev) static u32 ifcvf_vdpa_get_vendor_id(struct vdpa_device *vdpa_dev) { - return IFCVF_SUBSYS_VENDOR_ID; + struct ifcvf_adapter *adapter = vdpa_to_adapter(vdpa_dev); + struct pci_dev *pdev = adapter->pdev; + + return pdev->subsystem_vendor; } static u32 ifcvf_vdpa_get_vq_align(struct vdpa_device *vdpa_dev) -- 2.27.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] vDPA/ifcvf: get_vendor_id returns a device specific vendor id 2021-03-05 14:19 ` [PATCH 1/3] vDPA/ifcvf: get_vendor_id returns a device specific vendor id Zhu Lingshan @ 2021-03-08 2:51 ` Jason Wang 0 siblings, 0 replies; 8+ messages in thread From: Jason Wang @ 2021-03-08 2:51 UTC (permalink / raw) To: Zhu Lingshan, mst, lulu; +Cc: virtualization, netdev, kvm, linux-kernel On 2021/3/5 10:19 下午, Zhu Lingshan wrote: > In this commit, ifcvf_get_vendor_id() will return > a device specific vendor id of the probed pci device > than a hard code. > > Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> > --- > drivers/vdpa/ifcvf/ifcvf_main.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c > index fa1af301cf55..e501ee07de17 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_main.c > +++ b/drivers/vdpa/ifcvf/ifcvf_main.c > @@ -324,7 +324,10 @@ static u32 ifcvf_vdpa_get_device_id(struct vdpa_device *vdpa_dev) > > static u32 ifcvf_vdpa_get_vendor_id(struct vdpa_device *vdpa_dev) > { > - return IFCVF_SUBSYS_VENDOR_ID; > + struct ifcvf_adapter *adapter = vdpa_to_adapter(vdpa_dev); > + struct pci_dev *pdev = adapter->pdev; > + > + return pdev->subsystem_vendor; > } Acked-by: Jason Wang <jasowang@redhat.com> > > static u32 ifcvf_vdpa_get_vq_align(struct vdpa_device *vdpa_dev) ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/3] vDPA/ifcvf: enable Intel C5000X-PL virtio-net for vDPA 2021-03-05 14:19 [PATCH 0/3] vDPA/ifcvf: enables Intel C5000X-PL virtio-net Zhu Lingshan 2021-03-05 14:19 ` [PATCH 1/3] vDPA/ifcvf: get_vendor_id returns a device specific vendor id Zhu Lingshan @ 2021-03-05 14:19 ` Zhu Lingshan 2021-03-08 2:53 ` Jason Wang 2021-03-05 14:20 ` [PATCH 3/3] vDPA/ifcvf: bump version string to 1.0 Zhu Lingshan 2 siblings, 1 reply; 8+ messages in thread From: Zhu Lingshan @ 2021-03-05 14:19 UTC (permalink / raw) To: jasowang, mst, lulu Cc: virtualization, netdev, kvm, linux-kernel, Zhu Lingshan This commit enabled Intel FPGA SmartNIC C5000X-PL virtio-net for vDPA. C5000X-PL vendor id 0x1AF4, device id 0x1000, subvendor id 0x8086, sub device id 0x0001 To distinguish C5000X-PL from other ifcvf driven devices, the original ifcvf device is named "N3000". Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> --- drivers/vdpa/ifcvf/ifcvf_base.h | 13 +++++++++---- drivers/vdpa/ifcvf/ifcvf_main.c | 13 +++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/drivers/vdpa/ifcvf/ifcvf_base.h b/drivers/vdpa/ifcvf/ifcvf_base.h index 64696d63fe07..794d1505d857 100644 --- a/drivers/vdpa/ifcvf/ifcvf_base.h +++ b/drivers/vdpa/ifcvf/ifcvf_base.h @@ -18,10 +18,15 @@ #include <uapi/linux/virtio_config.h> #include <uapi/linux/virtio_pci.h> -#define IFCVF_VENDOR_ID 0x1AF4 -#define IFCVF_DEVICE_ID 0x1041 -#define IFCVF_SUBSYS_VENDOR_ID 0x8086 -#define IFCVF_SUBSYS_DEVICE_ID 0x001A +#define N3000_VENDOR_ID 0x1AF4 +#define N3000_DEVICE_ID 0x1041 +#define N3000_SUBSYS_VENDOR_ID 0x8086 +#define N3000_SUBSYS_DEVICE_ID 0x001A + +#define C5000X_PL_VENDOR_ID 0x1AF4 +#define C5000X_PL_DEVICE_ID 0x1000 +#define C5000X_PL_SUBSYS_VENDOR_ID 0x8086 +#define C5000X_PL_SUBSYS_DEVICE_ID 0x0001 #define IFCVF_SUPPORTED_FEATURES \ ((1ULL << VIRTIO_NET_F_MAC) | \ diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c index e501ee07de17..fd5befc5cbcc 100644 --- a/drivers/vdpa/ifcvf/ifcvf_main.c +++ b/drivers/vdpa/ifcvf/ifcvf_main.c @@ -480,10 +480,15 @@ static void ifcvf_remove(struct pci_dev *pdev) } static struct pci_device_id ifcvf_pci_ids[] = { - { PCI_DEVICE_SUB(IFCVF_VENDOR_ID, - IFCVF_DEVICE_ID, - IFCVF_SUBSYS_VENDOR_ID, - IFCVF_SUBSYS_DEVICE_ID) }, + { PCI_DEVICE_SUB(N3000_VENDOR_ID, + N3000_DEVICE_ID, + N3000_SUBSYS_VENDOR_ID, + N3000_SUBSYS_DEVICE_ID) }, + { PCI_DEVICE_SUB(C5000X_PL_VENDOR_ID, + C5000X_PL_DEVICE_ID, + C5000X_PL_SUBSYS_VENDOR_ID, + C5000X_PL_SUBSYS_DEVICE_ID) }, + { 0 }, }; MODULE_DEVICE_TABLE(pci, ifcvf_pci_ids); -- 2.27.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] vDPA/ifcvf: enable Intel C5000X-PL virtio-net for vDPA 2021-03-05 14:19 ` [PATCH 2/3] vDPA/ifcvf: enable Intel C5000X-PL virtio-net for vDPA Zhu Lingshan @ 2021-03-08 2:53 ` Jason Wang 0 siblings, 0 replies; 8+ messages in thread From: Jason Wang @ 2021-03-08 2:53 UTC (permalink / raw) To: Zhu Lingshan, mst, lulu; +Cc: virtualization, netdev, kvm, linux-kernel On 2021/3/5 10:19 下午, Zhu Lingshan wrote: > This commit enabled Intel FPGA SmartNIC C5000X-PL virtio-net > for vDPA. > C5000X-PL vendor id 0x1AF4, device id 0x1000, > subvendor id 0x8086, sub device id 0x0001 > > To distinguish C5000X-PL from other ifcvf driven devices, > the original ifcvf device is named "N3000". > > Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> > --- > drivers/vdpa/ifcvf/ifcvf_base.h | 13 +++++++++---- > drivers/vdpa/ifcvf/ifcvf_main.c | 13 +++++++++---- > 2 files changed, 18 insertions(+), 8 deletions(-) > > diff --git a/drivers/vdpa/ifcvf/ifcvf_base.h b/drivers/vdpa/ifcvf/ifcvf_base.h > index 64696d63fe07..794d1505d857 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_base.h > +++ b/drivers/vdpa/ifcvf/ifcvf_base.h > @@ -18,10 +18,15 @@ > #include <uapi/linux/virtio_config.h> > #include <uapi/linux/virtio_pci.h> > > -#define IFCVF_VENDOR_ID 0x1AF4 > -#define IFCVF_DEVICE_ID 0x1041 > -#define IFCVF_SUBSYS_VENDOR_ID 0x8086 > -#define IFCVF_SUBSYS_DEVICE_ID 0x001A > +#define N3000_VENDOR_ID 0x1AF4 > +#define N3000_DEVICE_ID 0x1041 > +#define N3000_SUBSYS_VENDOR_ID 0x8086 > +#define N3000_SUBSYS_DEVICE_ID 0x001A Patch looks good, I wonder if it's better to do the rename separately. Thanks > + > +#define C5000X_PL_VENDOR_ID 0x1AF4 > +#define C5000X_PL_DEVICE_ID 0x1000 > +#define C5000X_PL_SUBSYS_VENDOR_ID 0x8086 > +#define C5000X_PL_SUBSYS_DEVICE_ID 0x0001 > > #define IFCVF_SUPPORTED_FEATURES \ > ((1ULL << VIRTIO_NET_F_MAC) | \ > diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c > index e501ee07de17..fd5befc5cbcc 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_main.c > +++ b/drivers/vdpa/ifcvf/ifcvf_main.c > @@ -480,10 +480,15 @@ static void ifcvf_remove(struct pci_dev *pdev) > } > > static struct pci_device_id ifcvf_pci_ids[] = { > - { PCI_DEVICE_SUB(IFCVF_VENDOR_ID, > - IFCVF_DEVICE_ID, > - IFCVF_SUBSYS_VENDOR_ID, > - IFCVF_SUBSYS_DEVICE_ID) }, > + { PCI_DEVICE_SUB(N3000_VENDOR_ID, > + N3000_DEVICE_ID, > + N3000_SUBSYS_VENDOR_ID, > + N3000_SUBSYS_DEVICE_ID) }, > + { PCI_DEVICE_SUB(C5000X_PL_VENDOR_ID, > + C5000X_PL_DEVICE_ID, > + C5000X_PL_SUBSYS_VENDOR_ID, > + C5000X_PL_SUBSYS_DEVICE_ID) }, > + > { 0 }, > }; > MODULE_DEVICE_TABLE(pci, ifcvf_pci_ids); ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/3] vDPA/ifcvf: bump version string to 1.0 2021-03-05 14:19 [PATCH 0/3] vDPA/ifcvf: enables Intel C5000X-PL virtio-net Zhu Lingshan 2021-03-05 14:19 ` [PATCH 1/3] vDPA/ifcvf: get_vendor_id returns a device specific vendor id Zhu Lingshan 2021-03-05 14:19 ` [PATCH 2/3] vDPA/ifcvf: enable Intel C5000X-PL virtio-net for vDPA Zhu Lingshan @ 2021-03-05 14:20 ` Zhu Lingshan 2021-03-07 9:01 ` Leon Romanovsky 2 siblings, 1 reply; 8+ messages in thread From: Zhu Lingshan @ 2021-03-05 14:20 UTC (permalink / raw) To: jasowang, mst, lulu Cc: virtualization, netdev, kvm, linux-kernel, Zhu Lingshan This commit bumps ifcvf driver version string to 1.0 Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> --- drivers/vdpa/ifcvf/ifcvf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c index fd5befc5cbcc..56a0974cf93c 100644 --- a/drivers/vdpa/ifcvf/ifcvf_main.c +++ b/drivers/vdpa/ifcvf/ifcvf_main.c @@ -14,7 +14,7 @@ #include <linux/sysfs.h> #include "ifcvf_base.h" -#define VERSION_STRING "0.1" +#define VERSION_STRING "1.0" #define DRIVER_AUTHOR "Intel Corporation" #define IFCVF_DRIVER_NAME "ifcvf" -- 2.27.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] vDPA/ifcvf: bump version string to 1.0 2021-03-05 14:20 ` [PATCH 3/3] vDPA/ifcvf: bump version string to 1.0 Zhu Lingshan @ 2021-03-07 9:01 ` Leon Romanovsky 2021-03-08 2:40 ` Zhu, Lingshan 0 siblings, 1 reply; 8+ messages in thread From: Leon Romanovsky @ 2021-03-07 9:01 UTC (permalink / raw) To: Zhu Lingshan Cc: jasowang, mst, lulu, virtualization, netdev, kvm, linux-kernel On Fri, Mar 05, 2021 at 10:20:00PM +0800, Zhu Lingshan wrote: > This commit bumps ifcvf driver version string to 1.0 > > Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> > --- > drivers/vdpa/ifcvf/ifcvf_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c > index fd5befc5cbcc..56a0974cf93c 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_main.c > +++ b/drivers/vdpa/ifcvf/ifcvf_main.c > @@ -14,7 +14,7 @@ > #include <linux/sysfs.h> > #include "ifcvf_base.h" > > -#define VERSION_STRING "0.1" > +#define VERSION_STRING "1.0" Please delete it instead of bumping it. We are not supposed to use in-kernel version for years already. https://lore.kernel.org/ksummit-discuss/20170625072423.GR1248@mtr-leonro.local/ Thanks ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] vDPA/ifcvf: bump version string to 1.0 2021-03-07 9:01 ` Leon Romanovsky @ 2021-03-08 2:40 ` Zhu, Lingshan 0 siblings, 0 replies; 8+ messages in thread From: Zhu, Lingshan @ 2021-03-08 2:40 UTC (permalink / raw) To: Leon Romanovsky Cc: jasowang, mst, lulu, virtualization, netdev, kvm, linux-kernel Hi Leon, Thanks for point this out, will send a V2 patchset delete it. Thanks Zhu Lingshan On 3/7/2021 5:01 PM, Leon Romanovsky wrote: > On Fri, Mar 05, 2021 at 10:20:00PM +0800, Zhu Lingshan wrote: >> This commit bumps ifcvf driver version string to 1.0 >> >> Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> >> --- >> drivers/vdpa/ifcvf/ifcvf_main.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c >> index fd5befc5cbcc..56a0974cf93c 100644 >> --- a/drivers/vdpa/ifcvf/ifcvf_main.c >> +++ b/drivers/vdpa/ifcvf/ifcvf_main.c >> @@ -14,7 +14,7 @@ >> #include <linux/sysfs.h> >> #include "ifcvf_base.h" >> >> -#define VERSION_STRING "0.1" >> +#define VERSION_STRING "1.0" > Please delete it instead of bumping it. > We are not supposed to use in-kernel version for years already. > https://lore.kernel.org/ksummit-discuss/20170625072423.GR1248@mtr-leonro.local/ > > Thanks ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-03-08 2:54 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-03-05 14:19 [PATCH 0/3] vDPA/ifcvf: enables Intel C5000X-PL virtio-net Zhu Lingshan 2021-03-05 14:19 ` [PATCH 1/3] vDPA/ifcvf: get_vendor_id returns a device specific vendor id Zhu Lingshan 2021-03-08 2:51 ` Jason Wang 2021-03-05 14:19 ` [PATCH 2/3] vDPA/ifcvf: enable Intel C5000X-PL virtio-net for vDPA Zhu Lingshan 2021-03-08 2:53 ` Jason Wang 2021-03-05 14:20 ` [PATCH 3/3] vDPA/ifcvf: bump version string to 1.0 Zhu Lingshan 2021-03-07 9:01 ` Leon Romanovsky 2021-03-08 2:40 ` Zhu, Lingshan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).