)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"440e6bb1b415c9bb2d139ccefa0c4adc2ebf4f50","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Wei Hui \u003chuiweics@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-11-22 09:58:40 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"bugfix device_type\u003dtype-PCI passthrough failed"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Closes-Bug: #1853445"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3fa7e38b_6431d1ed","line":7,"updated":"2019-11-29 16:18:26.000000000","message":"Let\u0027s go with something a bit more helpful. How about:\n\n  Don\u0027t treat PCI devices as PFs when no VFs are enabled\n\n  When nova detects that a PCI device has SR-IOV PF capabilities,\n  it special cases it. Among other things, it means it will not\n  be possible to attach the PCI device to an instance using a\n  PCI alias *unless* \"\u0027device_type\u0027: \u0027type-PF\u0027\" is configured\n  in the \u0027[pci] alias\u0027 config option [1]. This behavior is\n  intended to prevent users attaching the PF of a PCI device\n  when they actually intended to attach one of the many VFs.\n  However, there isn\u0027t really a reason to do this if the PCI\n  device in question doesn\u0027t have an VFs enabled. Stop doing\n  this by checking if the device has VFs enabled before marking\n  it as a special \u0027type-PF\u0027 device.\n\n  [1] https://review.opendev.org/#/c/694522/","commit_id":"dbc273fe62be9b9a49ad69c3480f94597d873a07"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"440e6bb1b415c9bb2d139ccefa0c4adc2ebf4f50","unresolved":false,"context_lines":[{"line_number":6559,"context_line":"            hypervisor."},{"line_number":6560,"context_line":"            \"\"\""},{"line_number":6561,"context_line":"            for fun_cap in cfgdev.pci_capability.fun_capability:"},{"line_number":6562,"context_line":"                if fun_cap.type \u003d\u003d \u0027virt_functions\u0027:"},{"line_number":6563,"context_line":"                    if len(fun_cap.device_addrs) !\u003d 0:"},{"line_number":6564,"context_line":"                        return {"},{"line_number":6565,"context_line":"                            \u0027dev_type\u0027: fields.PciDeviceType.SRIOV_PF,"},{"line_number":6566,"context_line":"                        }"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_612a2392","line":6563,"range":{"start_line":6562,"start_character":0,"end_line":6563,"end_character":54},"updated":"2019-11-29 16:18:26.000000000","message":"Can you make this\n\n  if (fun_cap.type \u003d\u003d \u0027virt_functions\u0027 and\n          len(fun_cap.device_addrs) !\u003d 0):\n\nwhich is exactly what we do below","commit_id":"dbc273fe62be9b9a49ad69c3480f94597d873a07"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4dc68b5eaadb08d6178bbb9a058573c804b60418","unresolved":false,"context_lines":[{"line_number":6560,"context_line":"            \"\"\""},{"line_number":6561,"context_line":"            for fun_cap in cfgdev.pci_capability.fun_capability:"},{"line_number":6562,"context_line":"                if fun_cap.type \u003d\u003d \u0027virt_functions\u0027:"},{"line_number":6563,"context_line":"                    if len(fun_cap.device_addrs) !\u003d 0:"},{"line_number":6564,"context_line":"                        return {"},{"line_number":6565,"context_line":"                            \u0027dev_type\u0027: fields.PciDeviceType.SRIOV_PF,"},{"line_number":6566,"context_line":"                        }"},{"line_number":6567,"context_line":"                    else:"},{"line_number":6568,"context_line":"                        return {\u0027dev_type\u0027: fields.PciDeviceType.STANDARD}"},{"line_number":6569,"context_line":"                if (fun_cap.type \u003d\u003d \u0027phys_function\u0027 and"},{"line_number":6570,"context_line":"                    len(fun_cap.device_addrs) !\u003d 0):"},{"line_number":6571,"context_line":"                    phys_address \u003d \"%04x:%02x:%02x.%01x\" % ("}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_04581d2f","line":6568,"range":{"start_line":6563,"start_character":15,"end_line":6568,"end_character":74},"updated":"2019-11-29 16:18:58.000000000","message":"the device type shoudl not change based on if VF are allocated. so i do not think this is correct.\n\nif a device is capably of allcoating virtual funcitons it shoudl be reported as a PF even if none are allocated as we do not want the device type to change at runtime if you alter the vf allcoations via sysfs","commit_id":"dbc273fe62be9b9a49ad69c3480f94597d873a07"}]}
