Jump to: navigation, search

Difference between revisions of "Cyborg/TestReport/IntelNic"

(Created page with "== Intel x710 Nic Cyborg Driver Test Report == This test report shows the current intel nic driver is well tested in local env where Intel x710 Niccard located. Instead of a...")
 
(Enable intel nic driver in cyborg agent section)
Line 5: Line 5:
 
=== report part ===
 
=== report part ===
 
==== Enable intel nic driver in cyborg agent section ====
 
==== Enable intel nic driver in cyborg agent section ====
     $ cat /etc/cyborg/cyborg.conf | grep intel
+
* add intel_nic_driver in enabled_drivers
     enabled_drivers = intel_nic_driver
+
* set "enabled_nic_types"  to "x710_static", this means the pre-porgrammed NICs are supported.
 +
* set "physical_device_mappings" and "function_device_mappings" in "x710_static" section, indicating tha mapping relation between physnet/device, function/device.
 +
     $ vim /etc/cyborg/cyborg.conf
 +
    [agent]
 +
     enabled_drivers = fake_driver,intel_nic_driver
 +
 
 +
    [nic_devices]
 +
    enabled_nic_types = x710_static
 +
 
 +
    [x710_static]
 +
    physical_device_mappings = physnet1:eth2;eth3
 +
    function_device_mappings = GTPv1:eth3;eth2
  
 
===== Report logs =====
 
===== Report logs =====
Line 49: Line 60:
 
     | CUSTOM_NIC    |              1.0 |        1 |        1 |        0 |        1 |    1 |
 
     | CUSTOM_NIC    |              1.0 |        1 |        1 |        0 |        1 |    1 |
 
     +----------------+------------------+----------+----------+----------+-----------+-------+
 
     +----------------+------------------+----------+----------+----------+-----------+-------+
 
  
 
=== Boot a VM with NIC VF attached ===
 
=== Boot a VM with NIC VF attached ===

Revision as of 03:26, 3 February 2021

Intel x710 Nic Cyborg Driver Test Report

This test report shows the current intel nic driver is well tested in local env where Intel x710 Niccard located. Instead of a 3rd party CI, this report can be the proof.

report part

Enable intel nic driver in cyborg agent section

  • add intel_nic_driver in enabled_drivers
  • set "enabled_nic_types" to "x710_static", this means the pre-porgrammed NICs are supported.
  • set "physical_device_mappings" and "function_device_mappings" in "x710_static" section, indicating tha mapping relation between physnet/device, function/device.
   $ vim /etc/cyborg/cyborg.conf
   [agent]
   enabled_drivers = fake_driver,intel_nic_driver
   [nic_devices]
   enabled_nic_types = x710_static
   [x710_static]
   physical_device_mappings = physnet1:eth2;eth3
   function_device_mappings = GTPv1:eth3;eth2
Report logs
   cyborg-conductor: we can see cyborg conductor call placement API to create releated resource providerFeb 02 03:10:04 newbuy1217.maas cyborg-conductor[1836836]: 2021-02-02 
   03:10:04.476 1836836 INFO cyborg.common.placement_client [req-27d71744-8a79-4fb6-a2ca-2595b464051c - - - - -] Creating resource provider newbuy1217.maas_0000:86:02.3
   Feb 02 03:10:04 newbuy1217.maas cyborg-conductor[1836836]: 2021-02-02 03:10:04.485 1836836 INFO cyborg.common.placement_client [req-27d71744-8a79-4fb6-a2ca- 
   2595b464051c - - - - -] [req-b6cbe2bb-201a-4c86-9789-02c0a4648be1] Created resource provider record via placement API for resource provider with UUID 5fe904cf-5d52-3dff-9a25- 
   635841deed1a and name newbuy1217.maas_0000:86:02.3.
   Feb 02 03:10:04 newbuy1217.maas cyborg-conductor[1836836]: 2021-02-02 03:10:04.520 1836836 INFO cyborg.common.placement_client [req-27d71744-8a79-4fb6-a2ca- 
   2595b464051c - - - - -] Trait CUSTOM_VF already existed
   Feb 02 03:10:04 newbuy1217.maas cyborg-conductor[1836836]: 2021-02-02 03:10:04.530 1836836 INFO cyborg.common.placement_client [req-27d71744-8a79-4fb6-a2ca- 
  2595b464051c - - - - -] Trait CUSTOM_GTPV1 already existed
  Feb 02 03:10:04 newbuy1217.maas cyborg-conductor[1836836]: 2021-02-02 03:10:04.540 1836836 INFO cyborg.common.placement_client [req-27d71744-8a79-4fb6-a2ca- 
  2595b464051c - - - - -] Trait CUSTOM_PHYSNET1 already existed
   Feb 02 03:10:04 newbuy1217.maas cyborg-conductor[1836836]: 2021-02-02 03:10:04.580 1836836 INFO cyborg.common.placement_client [req-27d71744-8a79-4fb6-a2ca- 
  2595b464051c - - - - -] Resource class  CUSTOM_NIC already exists
   Feb 02 03:10:04 newbuy1217.maas cyborg-conductor[1836836]: 2021-02-02 03:10:04.587 1836836 INFO cyborg.common.placement_client [req-27d71744-8a79-4fb6-a2ca- 
  2595b464051c - - - - -] Creating resource provider newbuy1217.maas_0000:86:02.1


check placement record
   $ openstack resource provider list
   +--------------------------------------+------------------------------+------------+
   | uuid                                 | name                         | generation |
   +--------------------------------------+------------------------------+------------+
   | 5977653e-12df-319f-a420-17716b7e5123 | newbuy1217.maas_0000:86:00.1 |          2 |
   | e71b41e9-da06-3b85-8131-b753c01c224b | newbuy1217.maas_0000:86:02.2 |          2 |
   | 84cd0653-049d-36c7-8ad3-d02f9bad4a8c | newbuy1217.maas_0000:86:02.0 |          2 |
   | 5fe904cf-5d52-3dff-9a25-635841deed1a | newbuy1217.maas_0000:86:02.3 |          2 |
   | e95f79d4-8ac1-3b0d-b1ce-002cb073fc9c | newbuy1217.maas_0000:86:02.1 |          2 |
   +--------------------------------------+------------------------------+------------+


There are 5 RPs created because in this env, there are 2 NIC PFs, one of them is virtualized into 6 VFs, the other is not virtualized.

   $ openstack resource provider inventory list 5fe904cf-5d52-3dff-9a25-635841deed1a
   +----------------+------------------+----------+----------+----------+-----------+-------+
   | resource_class | allocation_ratio | min_unit | max_unit | reserved | step_size | total |
   +----------------+------------------+----------+----------+----------+-----------+-------+
   | CUSTOM_NIC     |              1.0 |        1 |        1 |        0 |         1 |     1 |
   +----------------+------------------+----------+----------+----------+-----------+-------+

Boot a VM with NIC VF attached

create device profile and flavor

   $ export GRP=[{\"resources\:CUSTOM_NIC\"\:\"1\"\,\"trait:CUSTOM_GTPV1\":\"required\"\,\"trait:CUSTOM_VF\":\"required\"}]
   $ openstack accelerator device profile create sriovdp $GRP
   $ openstack accelerator device profile show d30efbf9-bdf5-45d1-9d34-74d720121971
   +------------+--------------------------------------------------------------------------------------------------+
   | Field      | Value                                                                                            |
   +------------+--------------------------------------------------------------------------------------------------+
   | created_at | 2021-01-14T08:11:32+00:00                                                                        |
   | updated_at | None                                                                                             |
   | uuid       | d30efbf9-bdf5-45d1-9d34-74d720121971                                                             |
   | name       | sriovdp                                                                                       |
   | groups     | [{'resources:CUSTOM_NIC': '1', 'trait:CUSTOM_GTPV1': 'required', 'trait:CUSTOM_VF': 'required'}] |
   +------------+--------------------------------------------------------------------------------------------------+
   $ openstack port create test --network public  --device-profile new-sriovdp --vnic-type=accelerator-direct

boot a VM with x710 NIC VF attached

   $ nova boot testbackend  --flavor m1.tiny --image cirros-0.5.1-x86_64-disk  --nic port-id=$ID
Nova get DP details
   Aug 18 02:03:09 newbuy1217 devstack@cyborg-api.service[2243671]: 2020-08-18 02:03:09.631 2243678 INFO cyborg.api.controllers.v2.device_profiles [req-75741c76-593a-40bf- 
   8955-80eb0ec29c63 1f86481df3024d8bb74e213e23dcc2e4 7cd6c62783934a148605e271b4f6f922 - default default] [device_profiles] get_all returned: {
   'device_profiles': [{'name': 'sriovdp', 'description': None, 'uuid': 'dd9d2759-eec3-4bfe-af95-24773d28e8f4', 'groups': [{'resources:CUSTOM_NIC': '1'}], 'created_at': '2020-08-18 
   05:50:48+00:00', 'updated_at': 'None', 'links': [{'href': 'http://10.238.153.121/accelerator/v2/device_profiles/dd9d2759-eec3-4bfe-af9
   5-24773d28e8f4', 'rel': 'self'}]}]}  
ARQ creation
   Aug 18 02:03:10 newbuy1217 devstack@cyborg-api.service[2243671]: 2020-08-18 02:03:10.052 2243674 INFO cyborg.api.controllers.v2.arqs [req-73c06ce1-b9df-4d94-8760- 
   e4ab5f595328 1f86481df3024d8bb74e213e23dcc2e4 7cd6c62783934a148605e271b4f6f922 - default default] [arq] post req = ({'device_profile_name': 'sriovdp'})
ARQ binding
   Aug 18 02:03:10 newbuy1217 devstack@cyborg-api.service[2243671]: 2020-08-18 02:03:10.118 2243675 INFO cyborg.api.controllers.v2.arqs [req-fba1cad3-bccc-4c
   4a-9a78-2cc145c4798b 1f86481df3024d8bb74e213e23dcc2e4 7cd6c62783934a148605e271b4f6f922 - default default] [arqs] patch. list=({'0fff41ad-487e-4a3d-8395-2c
   4d35142c1f': [{'path': '/hostname', 'op': 'add', 'value': 'newbuy1217'}, {'path': '/device_rp_uuid', 'op': 'add', 'value': 'fb328624-7775-3d1e-bb36-478200
   ea1a5a'}, {'path': '/instance_uuid', 'op': 'add', 'value': '92080153-a69a-4f1e-9ee7-34298673ad1e'}]})
Get bound ARQ
   Aug 18 02:03:10 newbuy1217 devstack@cyborg-api.service[2243671]: 2020-08-18 02:03:10.711 2243672 INFO cyborg.api.controllers.v2.arqs [req-bb8b6928-137e-4b
   87-aac0-5fe2cecc22d7 1f86481df3024d8bb74e213e23dcc2e4 7cd6c62783934a148605e271b4f6f922 - default default] [arqs:get_all] Returned: <cyborg.api.controllers
   .v2.arqs.ARQCollection object at 0x7f8c14002128>

Check the VM

Log in to the VM , run`lspci`

It will show a pci device which means the x710 NIC vf has been passthrough to the VM successfully.

   $ lspci
   08:00.1 Intel Corporation Device 158b