docs/doc/source/node_management/kubernetes/hardware_acceleration_devices/modify-device-driver-4d0435064c4e.rst
Elisamara Aoki Goncalves 8f80c9459f Document change of device driver procedure (r8,dsR8)
Add missing commands in procedure.
Add Modify Device Driver section.

Closes-bug: 2015489

Signed-off-by: Elisamara Aoki Goncalves <elisamaraaoki.goncalves@windriver.com>
Change-Id: Ie594dc0991575be2ef2965abc9cf6504a53d4f41
2023-05-02 11:58:27 -03:00

8.5 KiB

Modify Device Driver

The following procedure shows an example how to modify the device driver from igb_uio to vfio-pci.

The system has been provisioned and unlocked.

  1. Source the platform environment.

    $ source /etc/platform/openrc
    ~(keystone_admin)]$
  2. Lock controller-0.

    ~(keystone_admin)$ system host-lock controller-0
  3. Show the existing device.

    ~(keystone_admin)$ system host-device-list controller-0
    ~(keystone_admin)$ system host-device-show controller-0 0000:18:00.0
    +-----------------------+---------------------------------------------------------------------------------------+
    | Property              | Value                                                                                 |
    +-----------------------+---------------------------------------------------------------------------------------+
    | name                  | pci_0000_18_00_0                                                                      |
    | address               | 0000:18:00.0                                                                          |
    | class id              | 120001                                                                                |
    | vendor id             | 8086                                                                                  |
    | device id             | 0d5c                                                                                  |
    | class name            | Processing accelerators                                                               |
    | vendor name           | Intel Corporation                                                                     |
    | device name           | Device 0d5c                                                                           |
    | numa_node             | 0                                                                                     |
    | enabled               | True                                                                                  |
    | sriov_totalvfs        | 16                                                                                    |
    | sriov_numvfs          | 1                                                                                     |
    | sriov_vfs_pci_address | 0000:19:00.0                                                                          |
    | sriov_vf_pdevice_id   | 0d5d                                                                                  |
    | extra_info            | {'expected_numvfs': 1, 'expected_driver': 'igb_uio', 'expected_vf_driver': 'igb_uio'} |
    | created_at            | 2023-03-28T15:39:33.083178+00:00                                                      |
    | updated_at            | 2023-03-28T18:27:23.950595+00:00                                                      |
    | root_key              | None                                                                                  |
    | revoked_key_ids       | None                                                                                  |
    | boot_page             | None                                                                                  |
    | bitstream_id          | None                                                                                  |
    | bmc_build_version     | None                                                                                  |
    | bmc_fw_version        | None                                                                                  |
    | retimer_a_version     | None                                                                                  |
    | retimer_b_version     | None                                                                                  |
    | driver                | igb_uio                                                                               |
    | sriov_vf_driver       | igb_uio                                                                               |
    +-----------------------+---------------------------------------------------------------------------------------+
  4. Remove the configuration for the device.

    ~(keystone_admin)$ system host-device-modify controller-0 0000:18:00.0 --vf-driver none -N 0
  5. Set the driver to vfio-pci.

    ~(keystone_admin)$ system host-device-modify controller-0 0000:18:00.0 --driver vfio-pci --vf-driver vfio -N 1
    +-----------------------+-------------------------------------------------------------------------------------+
    | Property              | Value                                                                               |
    +-----------------------+-------------------------------------------------------------------------------------+
    | name                  | pci_0000_18_00_0                                                                    |
    | address               | 0000:18:00.0                                                                        |
    | class id              | 120001                                                                              |
    | vendor id             | 8086                                                                                |
    | device id             | 0d5c                                                                                |
    | class name            | Processing accelerators                                                             |
    | vendor name           | Intel Corporation                                                                   |
    | device name           | Device 0d5c                                                                         |
    | numa_node             | 0                                                                                   |
    | enabled               | True                                                                                |
    | sriov_totalvfs        | 16                                                                                  |
    | sriov_numvfs          | 1                                                                                   |
    | sriov_vfs_pci_address | 0000:19:00.0                                                                        |
    | sriov_vf_pdevice_id   | 0d5d                                                                                |
    | extra_info            | {'expected_numvfs': 1, 'expected_driver': 'vfio-pci', 'expected_vf_driver': 'vfio'} |
    | created_at            | 2023-03-28T15:39:33.083178+00:00                                                    |
    | updated_at            | 2023-03-28T18:14:25.920137+00:00                                                    |
    | root_key              | None                                                                                |
    | revoked_key_ids       | None                                                                                |
    | boot_page             | None                                                                                |
    | bitstream_id          | None                                                                                |
    | bmc_build_version     | None                                                                                |
    | bmc_fw_version        | None                                                                                |
    | retimer_a_version     | None                                                                                |
    | retimer_b_version     | None                                                                                |
    | driver                | vfio-pci                                                                            |
    | sriov_vf_driver       | vfio                                                                                |
    +-----------------------+-------------------------------------------------------------------------------------+
  6. Unlock the host.

    $ system host-unlock controller-0