Re: [openstack-dev] [NOVA] pci alias device_type and numa_policy and device_type meanings

2018-11-06 Thread Sean Mooney
On Mon, Nov 5, 2018 at 11:02 PM Manuel Sopena Ballesteros
 wrote:
>
> Dear Openstack community.
>
>
>
> I am setting up pci passthrough for GPUs using aliases.
>
>
>
> I was wondering the meaning of the fields device_type and numa_policy and how 
> should I use them as I could not find much details in the official 
> documentation.
numa policy is used to configure the affinity policy for the passthrough device.
it was introduced by
https://specs.openstack.org/openstack/nova-specs/specs/queens/implemented/share-pci-between-numa-nodes.html#proposed-change
not that the flavor extra specs and image metadata also descibed by
that spec are stil outstanding and may be added in the future.

the device type is a legacy hack that was added when nova's pci
passthough support was extended to enable neutron sriov.
when using flavor based pci passthough using aliases the type should
always be set to Type-PCI
Type-PF and Type-VF in general should only be used for nics that will
be used with neutron sriov port types.

you technically can us the other device types in the alias but nova
will only record a device as  Type-PF or Type-VF
if physical_network is set in the pci whitelist which is used to
indicate the neutron physnet the device is attached too.

in the case of GPUs you can ignore Type-PF and Type-VF.
you should also know that Type-PCI can refer to either the full pci
device or a virtual function
allocated form a device.

an example alias is available in the code here
https://github.com/openstack/nova/blob/master/nova/pci/request.py#L18
| [pci]
| alias = '{
| "name": "QuickAssist",
| "product_id": "0443",
| "vendor_id": "8086",
| "device_type": "type-PCI",
| "numa_policy": "legacy"
| }'

in this case the alias consumes an entire QuickAssist (QAT) device
with the legacy numa policy.
if the  QAT device was subdivided using sriov VFs you could request
the VF instead of the PF by
simply changing the product_id to that corresponding to the VF.


>
>
>
> https://docs.openstack.org/nova/rocky/admin/pci-passthrough.html#configure-nova-api-controller
>
> https://docs.openstack.org/nova/rocky/configuration/config.html#pci
>
>
>
> thank you very much
>
>
>
> Manuel
>
>
>
> NOTICE
> Please consider the environment before printing this email. This message and 
> any attachments are intended for the addressee named and may contain legally 
> privileged/confidential/copyright information. If you are not the intended 
> recipient, you should not read, use, disclose, copy or distribute this 
> communication. If you have received this message in error please notify us at 
> once by return email and then delete both messages. We accept no liability 
> for the distribution of viruses or similar in electronic communications. This 
> notice should not be removed.
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [NOVA] pci alias device_type and numa_policy and device_type meanings

2018-11-05 Thread Manuel Sopena Ballesteros
Dear Openstack community.

I am setting up pci passthrough for GPUs using aliases.

I was wondering the meaning of the fields device_type and numa_policy and how 
should I use them as I could not find much details in the official 
documentation.

https://docs.openstack.org/nova/rocky/admin/pci-passthrough.html#configure-nova-api-controller
https://docs.openstack.org/nova/rocky/configuration/config.html#pci

thank you very much

Manuel

NOTICE
Please consider the environment before printing this email. This message and 
any attachments are intended for the addressee named and may contain legally 
privileged/confidential/copyright information. If you are not the intended 
recipient, you should not read, use, disclose, copy or distribute this 
communication. If you have received this message in error please notify us at 
once by return email and then delete both messages. We accept no liability for 
the distribution of viruses or similar in electronic communications. This 
notice should not be removed.
___
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openst...@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev