| 56d61ae5 | 02-Feb-2024 |
Zhu Lingshan <lingshan.zhu@intel.com> |
vDPA/ifcvf: implement vdpa_config_ops.get_vq_num_min
IFCVF HW supports operation with vq size less than the max size, as the spec required.
This commit implements vdpa_config_ops.get_vq_num_min to
vDPA/ifcvf: implement vdpa_config_ops.get_vq_num_min
IFCVF HW supports operation with vq size less than the max size, as the spec required.
This commit implements vdpa_config_ops.get_vq_num_min to report the minimal size of the virtqueues, which gives vDPA framework a chance to reduce the vring size.
We need at least one descriptor to be functional, but it is better no less than 64 to meet ceratin performance requirements. Actually the framework would allocate at least a PAGE for the vq.
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> Message-Id: <20240202163905.8834-11-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
| cd214706 | 02-Feb-2024 |
Zhu Lingshan <lingshan.zhu@intel.com> |
vDPA/ifcvf: get_max_vq_size to return max size
Since we already implemented vdpa_config_ops.get_vq_size, so get_max_vq_size can return the acutal max size of the virtqueues other than the max allowe
vDPA/ifcvf: get_max_vq_size to return max size
Since we already implemented vdpa_config_ops.get_vq_size, so get_max_vq_size can return the acutal max size of the virtqueues other than the max allowed safe size.
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> Message-Id: <20240202163905.8834-10-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
| 4cf8b6d0 | 12-Jun-2023 |
Zhu Lingshan <lingshan.zhu@intel.com> |
vDPA/ifcvf: implement new accessors for vq_state
This commit implements a better layout of the live migration bar, therefore the accessors for virtqueue state have been refactored.
This commit also
vDPA/ifcvf: implement new accessors for vq_state
This commit implements a better layout of the live migration bar, therefore the accessors for virtqueue state have been refactored.
This commit also add a comment to the probing-ids list, indicating this driver drives F2000X-PL virtio-net
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> Message-Id: <20230612151420.1019504-4-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
| ae904d9c | 12-Jun-2023 |
Zhu Lingshan <lingshan.zhu@intel.com> |
vDPA/ifcvf: detect and report max allowed vq size
Rather than a hardcode, this commit detects and reports the max value of allowed size of the virtqueues
Signed-off-by: Zhu Lingshan <lingshan.zhu@i
vDPA/ifcvf: detect and report max allowed vq size
Rather than a hardcode, this commit detects and reports the max value of allowed size of the virtqueues
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> Message-Id: <20230612151420.1019504-3-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
| 49a64c6d | 26-May-2023 |
Zhu Lingshan <lingshan.zhu@intel.com> |
vDPA/ifcvf: a vendor driver should not set _CONFIG_S_FAILED
VIRTIO_CONFIG_S_FAILED indicates the guest driver has given up the device due to fatal errors. So it is the guest decision, the vendor dri
vDPA/ifcvf: a vendor driver should not set _CONFIG_S_FAILED
VIRTIO_CONFIG_S_FAILED indicates the guest driver has given up the device due to fatal errors. So it is the guest decision, the vendor driver should not set this status to the device.
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20230526145254.39537-6-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
| 386a2620 | 26-May-2023 |
Zhu Lingshan <lingshan.zhu@intel.com> |
vDPA/ifcvf: synchronize irqs in the reset routine
This commit synchronize irqs of the virtqueues and config space in the reset routine. Thus ifcvf_stop() and reset() are refactored as well. This com
vDPA/ifcvf: synchronize irqs in the reset routine
This commit synchronize irqs of the virtqueues and config space in the reset routine. Thus ifcvf_stop() and reset() are refactored as well. This commit renames ifcvf_stop_hw() to ifcvf_stop()
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20230526145254.39537-5-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
| aeb5ef30 | 26-May-2023 |
Zhu Lingshan <lingshan.zhu@intel.com> |
vDPA/ifcvf: retire ifcvf_start_datapath and ifcvf_add_status
Rather than former lazy-initialization mechanism, now the virtqueue operations and driver_features related ops access the virtio register
vDPA/ifcvf: retire ifcvf_start_datapath and ifcvf_add_status
Rather than former lazy-initialization mechanism, now the virtqueue operations and driver_features related ops access the virtio registers directly to take immediate actions. So ifcvf_start_datapath() should retire.
ifcvf_add_status() is retierd because we should not change device status by a vendor driver's decision, this driver should only set device status which is from virito drivers upon vdpa_ops.set_status()
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20230526145254.39537-4-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
| 1a252f03 | 26-May-2023 |
Zhu Lingshan <lingshan.zhu@intel.com> |
vDPA/ifcvf: get_driver_features from virtio registers
This commit implements a new function ifcvf_get_driver_feature() which read driver_features from virtio registers.
To be less ambiguous, ifcvf_
vDPA/ifcvf: get_driver_features from virtio registers
This commit implements a new function ifcvf_get_driver_feature() which read driver_features from virtio registers.
To be less ambiguous, ifcvf_set_features() is renamed to ifcvf_set_driver_features(), and ifcvf_get_features() is renamed to ifcvf_get_dev_features() which returns the provisioned vDPA device features.
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20230526145254.39537-3-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
| 46fc0917 | 25-Nov-2022 |
Zhu Lingshan <lingshan.zhu@intel.com> |
vDPA/ifcvf: implement features provisioning
This commit implements features provisioning for ifcvf, that means: 1)checkk whether the provisioned features are supported by the management device 2)vDP
vDPA/ifcvf: implement features provisioning
This commit implements features provisioning for ifcvf, that means: 1)checkk whether the provisioned features are supported by the management device 2)vDPA device only presents selected feature bits
Examples: a)The management device supported features: $ vdpa mgmtdev show pci/0000:01:00.5 pci/0000:01:00.5: supported_classes net max_supported_vqs 9 dev_features MTU MAC MRG_RXBUF CTRL_VQ MQ ANY_LAYOUT VERSION_1 ACCESS_PLATFORM
b)Provision a vDPA device with all supported features: $ vdpa dev add name vdpa0 mgmtdev pci/0000:01:00.5 $ vdpa/vdpa dev config show vdpa0 vdpa0: mac 00:e8:ca:11:be:05 link up link_announce false max_vq_pairs 4 mtu 1500 negotiated_features MRG_RXBUF CTRL_VQ MQ VERSION_1 ACCESS_PLATFORM
c)Provision a vDPA device with a subset of the supported features: $ vdpa dev add name vdpa0 mgmtdev pci/0000:01:00.5 device_features 0x300020020 $ vdpa dev config show vdpa0 mac 00:e8:ca:11:be:05 link up link_announce false negotiated_features CTRL_VQ VERSION_1 ACCESS_PLATFORM
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> Message-Id: <20221125145724.1129962-13-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
| 267000e9 | 25-Nov-2022 |
Zhu Lingshan <lingshan.zhu@intel.com> |
vDPA/ifcvf: retire ifcvf_private_to_vf
This commit retires ifcvf_private_to_vf, because the vf is already a member of the adapter, so it could be easily addressed by adapter->vf.
Signed-off-by: Zhu
vDPA/ifcvf: retire ifcvf_private_to_vf
This commit retires ifcvf_private_to_vf, because the vf is already a member of the adapter, so it could be easily addressed by adapter->vf.
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> Message-Id: <20221125145724.1129962-12-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
| 93139037 | 25-Nov-2022 |
Zhu Lingshan <lingshan.zhu@intel.com> |
vDPA/ifcvf: allocate the adapter in dev_add()
The adapter is the container of the vdpa_device, this commits allocate the adapter in dev_add() rather than in probe(). So that the vdpa_device() could
vDPA/ifcvf: allocate the adapter in dev_add()
The adapter is the container of the vdpa_device, this commits allocate the adapter in dev_add() rather than in probe(). So that the vdpa_device() could be re-created when the userspace creates the vdpa device, and free-ed in dev_del()
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> Cc: stable@vger.kernel.org Message-Id: <20221125145724.1129962-11-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
| 6a3b2f17 | 25-Nov-2022 |
Zhu Lingshan <lingshan.zhu@intel.com> |
vDPA/ifcvf: manage ifcvf_hw in the mgmt_dev
This commit allocates the hw structure in the management device structure. So the hardware can be initialized once the management device is allocated in p
vDPA/ifcvf: manage ifcvf_hw in the mgmt_dev
This commit allocates the hw structure in the management device structure. So the hardware can be initialized once the management device is allocated in probe.
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> Cc: stable@vger.kernel.org Message-Id: <20221125145724.1129962-10-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
| 7cfd36b7 | 25-Nov-2022 |
Zhu Lingshan <lingshan.zhu@intel.com> |
vDPA/ifcvf: ifcvf_request_irq works on ifcvf_hw
All ifcvf_request_irq's callees are refactored to work on ifcvf_hw, so it should be decoupled from the adapter as well
Signed-off-by: Zhu Lingshan <l
vDPA/ifcvf: ifcvf_request_irq works on ifcvf_hw
All ifcvf_request_irq's callees are refactored to work on ifcvf_hw, so it should be decoupled from the adapter as well
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> Cc: stable@vger.kernel.org Message-Id: <20221125145724.1129962-9-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
| a70d833e | 25-Nov-2022 |
Zhu Lingshan <lingshan.zhu@intel.com> |
vDPA/ifcvf: decouple config/dev IRQ requester and vectors allocator from the adapter
This commit decouples the config irq requester, the device shared irq requester and the MSI vectors allocator fro
vDPA/ifcvf: decouple config/dev IRQ requester and vectors allocator from the adapter
This commit decouples the config irq requester, the device shared irq requester and the MSI vectors allocator from the adapter. So they can be safely invoked since probe before the adapter is allocated.
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> Cc: stable@vger.kernel.org Message-Id: <20221125145724.1129962-8-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
| f9a9ffb2 | 25-Nov-2022 |
Zhu Lingshan <lingshan.zhu@intel.com> |
vDPA/ifcvf: decouple vq irq requester from the adapter
This commit decouples the vq irq requester from the adapter, so that these functions can be invoked since probe.
Signed-off-by: Zhu Lingshan <
vDPA/ifcvf: decouple vq irq requester from the adapter
This commit decouples the vq irq requester from the adapter, so that these functions can be invoked since probe.
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com> Cc: stable@vger.kernel.org Message-Id: <20221125145724.1129962-7-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|