)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"03dbc52b965e1e9e2bfced835c8f65b30b532d62","unresolved":true,"context_lines":[{"line_number":29,"context_line":"False."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Implements: blueprint integration-with-off-path-network-backends"},{"line_number":32,"context_line":"Depends-On: I83a128a260acdd8bf78fede566af6881b8b82a9c"},{"line_number":33,"context_line":"Change-Id: Ic44d5e206326827d00a751da3cea67afe3929a08"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"f6361ebf_34a4c900","line":32,"updated":"2022-01-25 02:08:51.000000000","message":"i have not explictly checked this but i assume this is the parent id if so it can be droped as noted in the previous patch.\nwhen respinning the patch below can you update the following patches to remove the depend on if they are not inter repo too.","commit_id":"19c42eea5fe4be53cc32627faffc4311bc9a51d7"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"2aea62f5b625d98b05dc59f771316c666190e333","unresolved":false,"context_lines":[{"line_number":29,"context_line":"False."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Implements: blueprint integration-with-off-path-network-backends"},{"line_number":32,"context_line":"Depends-On: I83a128a260acdd8bf78fede566af6881b8b82a9c"},{"line_number":33,"context_line":"Change-Id: Ic44d5e206326827d00a751da3cea67afe3929a08"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"568582c7_86840a3e","line":32,"in_reply_to":"f6361ebf_34a4c900","updated":"2022-01-26 18:56:16.000000000","message":"Ack, will do.","commit_id":"19c42eea5fe4be53cc32627faffc4311bc9a51d7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4730e05efa1874f30d34b5035887d4389659cc75","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"For compatibility, all devices not explicitly marked as remote_managed"},{"line_number":28,"context_line":"in the whitelist are assumed to have remote_managed attribute set to"},{"line_number":29,"context_line":"False."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Implements: blueprint integration-with-off-path-network-backends"},{"line_number":32,"context_line":"Change-Id: Ic44d5e206326827d00a751da3cea67afe3929a08"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"a4214ea4_f10c6e61","line":29,"updated":"2022-02-01 14:34:19.000000000","message":"+1","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"652742fc9525ca43f9bde52104f476fe3dcccc37","unresolved":true,"context_lines":[{"line_number":13,"context_line":"available device types in a pool, additional processing needs to be"},{"line_number":14,"context_line":"done:"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"* Filtering of devices marked as `remote_managed: \"true\"` in the"},{"line_number":17,"context_line":"  whitelist configuration so that they are not used in legacy SR-IOV"},{"line_number":18,"context_line":"  and hardware offload requests;"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"253785ec_26b04c67","line":16,"range":{"start_line":16,"start_character":34,"end_line":16,"end_character":48},"updated":"2022-02-03 11:57:11.000000000","message":"In the spec I focused on the DPU case where a host is separate and the implementation decouples VIF plugging from Nova for that reason.\n\nThe \"trivial\" case for remotely-managed devices is when they are programmed (both vif plugging and flows) by the networking agent on the same host. In other words, the current cross-project feature implementation allows networking agents to run remotely but does not mandate it.\n\nSo while the feature is focused on the remote management use-case we could also use this feature for non-DPU hardware-offload capable NICs with the switchdev capability which is an already supported feature (https://docs.openstack.org/neutron/latest/admin/config-ovs-offload.html). The difference would be that VFs would need to be marked as \"remote_managed: true\" in the passthrough_whitelist, VNIC_TYPE_SMARTNIC port type would need to be used and `--binding-profile \u0027{\"capabilities\": [\"switchdev\"]}\u0027` would not be needed during port creation.\n\nPractically, this case may be useful for testing the new code-path if DPUs are not available in a lab. While we\u0027ve been testing with a DPU, it allows more machines to be used for testing.\n\nThat does not make me want to change the tag name that much but I think it\u0027s worth calling out.","commit_id":"bc17626c75f8f8b7e6843f656fff716fac0e42bc"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0a53bda43c84c5bce6801f766ecbe15c1342de07","unresolved":true,"context_lines":[{"line_number":13,"context_line":"available device types in a pool, additional processing needs to be"},{"line_number":14,"context_line":"done:"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"* Filtering of devices marked as `remote_managed: \"true\"` in the"},{"line_number":17,"context_line":"  whitelist configuration so that they are not used in legacy SR-IOV"},{"line_number":18,"context_line":"  and hardware offload requests;"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"3a887675_1d489148","line":16,"range":{"start_line":16,"start_character":34,"end_line":16,"end_character":48},"in_reply_to":"253785ec_26b04c67","updated":"2022-02-03 13:58:55.000000000","message":"Yeah, probably needs a note in the doc but I\u0027m OK to keep the intention as managing \"remote\" devs.","commit_id":"bc17626c75f8f8b7e6843f656fff716fac0e42bc"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"62d888829978bdc06db413b1b601276f4518ea30","unresolved":false,"context_lines":[{"line_number":13,"context_line":"available device types in a pool, additional processing needs to be"},{"line_number":14,"context_line":"done:"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"* Filtering of devices marked as `remote_managed: \"true\"` in the"},{"line_number":17,"context_line":"  whitelist configuration so that they are not used in legacy SR-IOV"},{"line_number":18,"context_line":"  and hardware offload requests;"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"b9550d24_f7d0c1e3","line":16,"range":{"start_line":16,"start_character":34,"end_line":16,"end_character":48},"in_reply_to":"3a887675_1d489148","updated":"2022-02-03 19:38:21.000000000","message":"Ack","commit_id":"bc17626c75f8f8b7e6843f656fff716fac0e42bc"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"03dbc52b965e1e9e2bfced835c8f65b30b532d62","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"a26e5400_01414f93","updated":"2022-01-25 02:08:51.000000000","message":"over all i think this looks ok but i dont really like masking that the pci whitelist is invalid.\n\ni think we should likely move the detection of a pf with remote managed set where the vendor id and product id are absent or match the pf to agent startup so it never get to the point where its tracked in the db.","commit_id":"19c42eea5fe4be53cc32627faffc4311bc9a51d7"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"cb47acaad5b770f8448e71a8b5ed09afa202763f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"fd819ce3_4a6eba8f","updated":"2022-02-02 14:21:25.000000000","message":"Another test_tagged_attachment failure, looks unrelated.\n","commit_id":"bc17626c75f8f8b7e6843f656fff716fac0e42bc"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"25b87d8f46e55ee9d3e58b4b868bc66aa19f9049","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"14abb2d6_5d84aa75","updated":"2022-02-02 15:58:50.000000000","message":"recheck","commit_id":"bc17626c75f8f8b7e6843f656fff716fac0e42bc"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"dab245c013644713e321dfb55fe9da9fb3001c7d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"653059a0_12d6c7c7","updated":"2022-02-02 17:19:52.000000000","message":"recheck","commit_id":"bc17626c75f8f8b7e6843f656fff716fac0e42bc"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"89aee604101448bbd0ab2fb3854a74ffeede6158","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"88ae7eb8_862925b2","updated":"2022-02-02 14:21:31.000000000","message":"recheck","commit_id":"bc17626c75f8f8b7e6843f656fff716fac0e42bc"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"b2c8e32d814cfc822399f990db526be99309230b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"b0860336_fe0967b6","updated":"2022-02-03 07:12:26.000000000","message":"recheck","commit_id":"bc17626c75f8f8b7e6843f656fff716fac0e42bc"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"915c7d14beb14bb12bc5f385934aa1ab12318bd4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"fd58627d_05ee2a4b","updated":"2022-02-02 19:11:26.000000000","message":"recheck","commit_id":"bc17626c75f8f8b7e6843f656fff716fac0e42bc"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"64f8adae47a3f484f53628d3f1d8d30ec27905a1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"9f93b1b5_4f1eddd7","updated":"2022-02-07 16:04:44.000000000","message":"+1 for now\nmain question is regarding allowing VF using there parent adress which could be done in a followup.\nif you are ok with ath ill upgrade to +2 otherwise we should clearly document that this feature is not suported with remote managed ports and why so that operators dont get surprised.\n\nthat is the main issue i have and as i said could be a followup.","commit_id":"5e0d5f9752c62f7c8bb2f5693f407a23e16dac6c"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f78c135a6366579f29301a5fcf42e752d0feb74a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"56945a39_8a4770bc","updated":"2022-02-04 09:43:30.000000000","message":"Looks good. Open questions has been closed. I have one request about an additional code comment but that can be handled in a followup. So I\u0027m +2","commit_id":"5e0d5f9752c62f7c8bb2f5693f407a23e16dac6c"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"d89f490c49840d935de64dcb603f6526c49213f9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"a40a1e51_b78a6b89","updated":"2022-02-08 14:53:31.000000000","message":"The latest change https://review.opendev.org/c/openstack/nova/+/824834/10..11/nova/pci/devspec.py is to raise an exception in the following two cases:\n\npassthrough_whitelist \u003d {\"vendor_id\":\"*\",\"product_id\":\"*\", \"address\":\"0000:0a:00.0\", \"remote_managed\": \"true\"}\npassthrough_whitelist \u003d {\"vendor_id\":\"1234\",\"product_id\":\"*\", \"address\":\"0000:0a:00.0\", \"remote_managed\": \"true\"}\n\nIf both PFs and VFs can match and `\"remote_managed\": \"true\"` is there then that would mean remote-managed PFs would be allowed which is undesirable.","commit_id":"abf047a2dca32ce4ec32b22e3bd9bd981b2d623d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b7c80dfe9fa3a407c38d385c0b2fc377e6b39442","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"3fadca47_3e73bf45","updated":"2022-02-09 15:46:03.000000000","message":"Looks good even after the recent changes","commit_id":"0d5f8ffc2b279888af03e7983dcee9d1d267f980"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"042a3280be26f08a282a8e296a1a858c1587d974","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"5f8e98a6_e0b652fb","updated":"2022-02-09 10:50:35.000000000","message":"i strongly prefer this version to passing the flag  to the whitelist construction.\n","commit_id":"0d5f8ffc2b279888af03e7983dcee9d1d267f980"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"97a9edd85d4c9d6fdd0694fe8ab109d226442bec","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"10e67e01_b440aa34","updated":"2022-02-09 07:21:12.000000000","message":"recheck","commit_id":"0d5f8ffc2b279888af03e7983dcee9d1d267f980"}],"nova/conf/pci.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4730e05efa1874f30d34b5035887d4389659cc75","unresolved":true,"context_lines":[{"line_number":135,"context_line":"    - ``physical_network``"},{"line_number":136,"context_line":"    - ``trusted``"},{"line_number":137,"context_line":"    - ``remote_managed``"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"  Valid examples are::"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    passthrough_whitelist \u003d {\"devname\":\"eth0\","}],"source_content_type":"text/x-python","patch_set":5,"id":"ef0321fd_4733ce38","line":138,"updated":"2022-02-01 14:34:19.000000000","message":"I suggest to add a sentence about what remove_managed means. And also about what values it takes \"true\" and \"false\" only? Or we are supporting a wider range of values that can be converted to boolean?","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"e35fe1060732b1fda6f90148ce111dfe769fe1a1","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    - ``physical_network``"},{"line_number":136,"context_line":"    - ``trusted``"},{"line_number":137,"context_line":"    - ``remote_managed``"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"  Valid examples are::"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    passthrough_whitelist \u003d {\"devname\":\"eth0\","}],"source_content_type":"text/x-python","patch_set":5,"id":"95aad652_00ad8c9a","line":138,"in_reply_to":"ef0321fd_4733ce38","updated":"2022-02-01 19:18:46.000000000","message":"Ack, will add all supported values based on what the converter in strutils allows.","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4730e05efa1874f30d34b5035887d4389659cc75","unresolved":true,"context_lines":[{"line_number":175,"context_line":"                             \"address\":\"*:0a:00.*\"}"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"  The following example is invalid because it specifies the ``remote_managed``"},{"line_number":178,"context_line":"  tag for a PF::"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    passthrough_whitelist \u003d {\"address\": \"0000:82:00.0\","},{"line_number":181,"context_line":"                             \"product_id\": \"a2d6\","}],"source_content_type":"text/x-python","patch_set":5,"id":"949578f2_1e37e24b","line":178,"updated":"2022-02-01 14:34:19.000000000","message":"will such configuration rejected? or the problematic definition is just ignored?","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"e35fe1060732b1fda6f90148ce111dfe769fe1a1","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                             \"address\":\"*:0a:00.*\"}"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"  The following example is invalid because it specifies the ``remote_managed``"},{"line_number":178,"context_line":"  tag for a PF::"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    passthrough_whitelist \u003d {\"address\": \"0000:82:00.0\","},{"line_number":181,"context_line":"                             \"product_id\": \"a2d6\","}],"source_content_type":"text/x-python","patch_set":5,"id":"f0598424_2cc6bc24","line":178,"in_reply_to":"949578f2_1e37e24b","updated":"2022-02-01 19:18:46.000000000","message":"I\u0027ll document the behavior here.","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"64f8adae47a3f484f53628d3f1d8d30ec27905a1","unresolved":true,"context_lines":[{"line_number":136,"context_line":"    - ``trusted``"},{"line_number":137,"context_line":"    - ``remote_managed`` - a VF is managed remotely by an off-path networking"},{"line_number":138,"context_line":"      backend. May have boolean-like string values case-insensitive values:"},{"line_number":139,"context_line":"      \"true\", \"yes\", \"t\", \"y\", \"1\", \"on\", \"false\", \"no\", \"f\", \"n\", \"0\", \"off\"."},{"line_number":140,"context_line":"      By default, a false value is assumed for all devices. Using this option"},{"line_number":141,"context_line":"      requires a networking service backend capable of handling those devices."},{"line_number":142,"context_line":"      PCI devices are also required to have a PCI VPD capability with a"}],"source_content_type":"text/x-python","patch_set":9,"id":"14748c2d_e58a87e9","line":139,"range":{"start_line":139,"start_character":6,"end_line":139,"end_character":78},"updated":"2022-02-07 16:04:44.000000000","message":"nit while this is actually true i do not like documenting this in our options\n\nwe should just document that the values ``true`` or ``false`` should be used.\nthe rest is an implementation detail that should not really be part of the public contract of this config option.\n\nit does not bother me enough to -1 but i woudl prefer if this was updatled in a followup to only document the value we want people to use.\n\noslo coudl change/extend the allowed set in the future (unlikely) but i would not want to have to update this to reflect that.","commit_id":"5e0d5f9752c62f7c8bb2f5693f407a23e16dac6c"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"feeb7ad65e8f7645c4e1c72fc01900f3662ae9a2","unresolved":false,"context_lines":[{"line_number":136,"context_line":"    - ``trusted``"},{"line_number":137,"context_line":"    - ``remote_managed`` - a VF is managed remotely by an off-path networking"},{"line_number":138,"context_line":"      backend. May have boolean-like string values case-insensitive values:"},{"line_number":139,"context_line":"      \"true\", \"yes\", \"t\", \"y\", \"1\", \"on\", \"false\", \"no\", \"f\", \"n\", \"0\", \"off\"."},{"line_number":140,"context_line":"      By default, a false value is assumed for all devices. Using this option"},{"line_number":141,"context_line":"      requires a networking service backend capable of handling those devices."},{"line_number":142,"context_line":"      PCI devices are also required to have a PCI VPD capability with a"}],"source_content_type":"text/x-python","patch_set":9,"id":"8c098f69_130fd157","line":139,"range":{"start_line":139,"start_character":6,"end_line":139,"end_character":78},"in_reply_to":"14748c2d_e58a87e9","updated":"2022-02-08 11:34:07.000000000","message":"Ack, Gibi asked me to documented the additional supported values but I can just set it back to \"true\" and \"false\" if we have quorum on this.","commit_id":"5e0d5f9752c62f7c8bb2f5693f407a23e16dac6c"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b7c80dfe9fa3a407c38d385c0b2fc377e6b39442","unresolved":false,"context_lines":[{"line_number":136,"context_line":"    - ``trusted``"},{"line_number":137,"context_line":"    - ``remote_managed`` - a VF is managed remotely by an off-path networking"},{"line_number":138,"context_line":"      backend. May have boolean-like string values case-insensitive values:"},{"line_number":139,"context_line":"      \"true\", \"yes\", \"t\", \"y\", \"1\", \"on\", \"false\", \"no\", \"f\", \"n\", \"0\", \"off\"."},{"line_number":140,"context_line":"      By default, a false value is assumed for all devices. Using this option"},{"line_number":141,"context_line":"      requires a networking service backend capable of handling those devices."},{"line_number":142,"context_line":"      PCI devices are also required to have a PCI VPD capability with a"}],"source_content_type":"text/x-python","patch_set":9,"id":"c7b15730_f1a09b53","line":139,"range":{"start_line":139,"start_character":6,"end_line":139,"end_character":78},"in_reply_to":"8c098f69_130fd157","updated":"2022-02-09 15:46:03.000000000","message":"OK","commit_id":"5e0d5f9752c62f7c8bb2f5693f407a23e16dac6c"}],"nova/pci/devspec.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4730e05efa1874f30d34b5035887d4389659cc75","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from nova import exception"},{"line_number":20,"context_line":"from nova.i18n import _"},{"line_number":21,"context_line":"from nova import objects"},{"line_number":22,"context_line":"from nova.pci.request import PCI_REMOTE_MANAGED_TAG"},{"line_number":23,"context_line":"from nova.pci import utils"},{"line_number":24,"context_line":"from oslo_log import log as logging"},{"line_number":25,"context_line":"from oslo_utils import strutils"}],"source_content_type":"text/x-python","patch_set":5,"id":"76ccaf38_75429e89","line":22,"updated":"2022-02-01 14:34:19.000000000","message":"Most of the time we import only modules into scope not items directly inside a module. But importing the constant make sense so I\u0027m not against it.","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4730e05efa1874f30d34b5035887d4389659cc75","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        return all(conditions)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def __str__(self):"},{"line_number":119,"context_line":"        return f\u0027{self.domain}:{self.bus}:{self.slot}.{self.func}\u0027"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"class PciAddressGlobSpec(PciAddressSpec):"}],"source_content_type":"text/x-python","patch_set":5,"id":"802a3b39_c52ce624","line":119,"updated":"2022-02-01 14:34:19.000000000","message":"thank you!","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4730e05efa1874f30d34b5035887d4389659cc75","unresolved":true,"context_lines":[{"line_number":317,"context_line":"        if remote_managed and address_obj.is_physical_function:"},{"line_number":318,"context_line":"            LOG.warning(f\u0027A PF {address_obj.pci_address_spec} was\u0027"},{"line_number":319,"context_line":"                        \u0027 configured with the \"remote_managed\" tag which is\u0027"},{"line_number":320,"context_line":"                        \u0027 not supported: skipping.\u0027)"},{"line_number":321,"context_line":"            return False"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"        return all(["}],"source_content_type":"text/x-python","patch_set":5,"id":"d85ecff5_1d2b446a","line":320,"updated":"2022-02-01 14:34:19.000000000","message":"Can we instead reject the invalid configuration at service startup?","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"44320649bdb4edb79da853055b651cfcd7d66e98","unresolved":false,"context_lines":[{"line_number":317,"context_line":"        if remote_managed and address_obj.is_physical_function:"},{"line_number":318,"context_line":"            LOG.warning(f\u0027A PF {address_obj.pci_address_spec} was\u0027"},{"line_number":319,"context_line":"                        \u0027 configured with the \"remote_managed\" tag which is\u0027"},{"line_number":320,"context_line":"                        \u0027 not supported: skipping.\u0027)"},{"line_number":321,"context_line":"            return False"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"        return all(["}],"source_content_type":"text/x-python","patch_set":5,"id":"b4d941fc_7f2b4a45","line":320,"in_reply_to":"98f3d16b_8cf14c12","updated":"2022-02-01 19:22:51.000000000","message":"Ended up having to do some more checks than in the match function and having to raise an exception if a device is not present on a system but `remote_managed: \"true\"` is specified because the code-path that does a lookup by a netdev name relies on a sysfs entry to be present (uses get_function_by_ifname).","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0a53bda43c84c5bce6801f766ecbe15c1342de07","unresolved":false,"context_lines":[{"line_number":317,"context_line":"        if remote_managed and address_obj.is_physical_function:"},{"line_number":318,"context_line":"            LOG.warning(f\u0027A PF {address_obj.pci_address_spec} was\u0027"},{"line_number":319,"context_line":"                        \u0027 configured with the \"remote_managed\" tag which is\u0027"},{"line_number":320,"context_line":"                        \u0027 not supported: skipping.\u0027)"},{"line_number":321,"context_line":"            return False"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"        return all(["}],"source_content_type":"text/x-python","patch_set":5,"id":"7e0aa331_aa2fbcb4","line":320,"in_reply_to":"b4d941fc_7f2b4a45","updated":"2022-02-03 13:58:55.000000000","message":"Works for me :)","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"e35fe1060732b1fda6f90148ce111dfe769fe1a1","unresolved":false,"context_lines":[{"line_number":317,"context_line":"        if remote_managed and address_obj.is_physical_function:"},{"line_number":318,"context_line":"            LOG.warning(f\u0027A PF {address_obj.pci_address_spec} was\u0027"},{"line_number":319,"context_line":"                        \u0027 configured with the \"remote_managed\" tag which is\u0027"},{"line_number":320,"context_line":"                        \u0027 not supported: skipping.\u0027)"},{"line_number":321,"context_line":"            return False"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"        return all(["}],"source_content_type":"text/x-python","patch_set":5,"id":"98f3d16b_8cf14c12","line":320,"in_reply_to":"d85ecff5_1d2b446a","updated":"2022-02-01 19:18:46.000000000","message":"I can make it such that it does, however, it needs a runtime check to determine whether a device is a PF or not. This can only be done provided that the device is actually present on a system.","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0a53bda43c84c5bce6801f766ecbe15c1342de07","unresolved":true,"context_lines":[{"line_number":305,"context_line":"            self.address \u003d WhitelistPciAddress(address or \u0027*:*:*.*\u0027, False)"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        # PFs with remote_managed tags are explicitly not supported. If they"},{"line_number":308,"context_line":"        # are tagged as such by mistake in the whitelist Nova will should"},{"line_number":309,"context_line":"        # raise an exception. The reason for excluding PFs is the lack of a way"},{"line_number":310,"context_line":"        # for an instance to access the control plane at the remote side (e.g."},{"line_number":311,"context_line":"        # on a DPU) for managing the PF representor corresponding to the PF."}],"source_content_type":"text/x-python","patch_set":8,"id":"62685b35_611326d8","line":308,"range":{"start_line":308,"start_character":62,"end_line":308,"end_character":73},"updated":"2022-02-03 13:58:55.000000000","message":"nit: will","commit_id":"bc17626c75f8f8b7e6843f656fff716fac0e42bc"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"62d888829978bdc06db413b1b601276f4518ea30","unresolved":true,"context_lines":[{"line_number":305,"context_line":"            self.address \u003d WhitelistPciAddress(address or \u0027*:*:*.*\u0027, False)"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        # PFs with remote_managed tags are explicitly not supported. If they"},{"line_number":308,"context_line":"        # are tagged as such by mistake in the whitelist Nova will should"},{"line_number":309,"context_line":"        # raise an exception. The reason for excluding PFs is the lack of a way"},{"line_number":310,"context_line":"        # for an instance to access the control plane at the remote side (e.g."},{"line_number":311,"context_line":"        # on a DPU) for managing the PF representor corresponding to the PF."}],"source_content_type":"text/x-python","patch_set":8,"id":"bec0e659_2f6ff24b","line":308,"range":{"start_line":308,"start_character":62,"end_line":308,"end_character":73},"in_reply_to":"62685b35_611326d8","updated":"2022-02-03 19:38:21.000000000","message":"Ack, will fix in a respin.","commit_id":"bc17626c75f8f8b7e6843f656fff716fac0e42bc"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"2aa503f04cf183e27a7ecd78cbeb0f7d7665af17","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            self.address \u003d WhitelistPciAddress(address or \u0027*:*:*.*\u0027, False)"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        # PFs with remote_managed tags are explicitly not supported. If they"},{"line_number":308,"context_line":"        # are tagged as such by mistake in the whitelist Nova will should"},{"line_number":309,"context_line":"        # raise an exception. The reason for excluding PFs is the lack of a way"},{"line_number":310,"context_line":"        # for an instance to access the control plane at the remote side (e.g."},{"line_number":311,"context_line":"        # on a DPU) for managing the PF representor corresponding to the PF."}],"source_content_type":"text/x-python","patch_set":8,"id":"5f525d55_730360ef","line":308,"range":{"start_line":308,"start_character":62,"end_line":308,"end_character":73},"in_reply_to":"bec0e659_2f6ff24b","updated":"2022-02-03 20:49:10.000000000","message":"Done","commit_id":"bc17626c75f8f8b7e6843f656fff716fac0e42bc"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"77434b75f3e458d57c612da85352fa351a9da854","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                raise exception.PciDeviceInvalidPFRemoteManaged("},{"line_number":320,"context_line":"                    address_obj.pci_address_spec)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def _ensure_remote_managed_dev_vpd_serial("},{"line_number":323,"context_line":"        self, dev_dict: ty.Dict[str, ty.Any]) -\u003e bool:"},{"line_number":324,"context_line":"        \"\"\"Ensure the presence of a serial number field in PCI VPD."},{"line_number":325,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"46e1721c_17e7c6ad","line":322,"range":{"start_line":322,"start_character":0,"end_line":322,"end_character":46},"updated":"2022-02-02 12:44:19.000000000","message":"Note: added this in the latest upload since card serial number presence is the mandatory piece for Neutron to identify which remote chassis needs to handle a VIF plugging and flow programming. So instead of making operators check this by hand it\u0027s better if it\u0027s done automatically.\n\nEmpty strings are checked for in addition to the lack of presence of a serial whereas duplicates across the deployment are not. This was discussed in the spec as there can be situations like having a blade server with multiple compute modules but one DPU providing network services to both (which would allow multiple computes to see the same card serial and use it for remote managed ports without issue). So Nova only needs to worry about presence checks, not uniqueness checks.","commit_id":"bc17626c75f8f8b7e6843f656fff716fac0e42bc"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f78c135a6366579f29301a5fcf42e752d0feb74a","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                raise exception.PciDeviceInvalidPFRemoteManaged("},{"line_number":320,"context_line":"                    address_obj.pci_address_spec)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def _ensure_remote_managed_dev_vpd_serial("},{"line_number":323,"context_line":"        self, dev_dict: ty.Dict[str, ty.Any]) -\u003e bool:"},{"line_number":324,"context_line":"        \"\"\"Ensure the presence of a serial number field in PCI VPD."},{"line_number":325,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"d043b086_82da5c28","line":322,"range":{"start_line":322,"start_character":0,"end_line":322,"end_character":46},"in_reply_to":"094f2e7b_b16d60f5","updated":"2022-02-04 09:43:30.000000000","message":"I agree.","commit_id":"bc17626c75f8f8b7e6843f656fff716fac0e42bc"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0a53bda43c84c5bce6801f766ecbe15c1342de07","unresolved":true,"context_lines":[{"line_number":319,"context_line":"                raise exception.PciDeviceInvalidPFRemoteManaged("},{"line_number":320,"context_line":"                    address_obj.pci_address_spec)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def _ensure_remote_managed_dev_vpd_serial("},{"line_number":323,"context_line":"        self, dev_dict: ty.Dict[str, ty.Any]) -\u003e bool:"},{"line_number":324,"context_line":"        \"\"\"Ensure the presence of a serial number field in PCI VPD."},{"line_number":325,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"d547d340_ade29135","line":322,"range":{"start_line":322,"start_character":0,"end_line":322,"end_character":46},"in_reply_to":"46e1721c_17e7c6ad","updated":"2022-02-03 13:58:55.000000000","message":"So it is possible that a device,configured in the whitelist as remote managed, does not have serial and therefore ignored by nova. I think in we should catch this case already at startup as these devices will never be used. Similarly how remote_managed PFs are rejected at startup.","commit_id":"bc17626c75f8f8b7e6843f656fff716fac0e42bc"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"62d888829978bdc06db413b1b601276f4518ea30","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                raise exception.PciDeviceInvalidPFRemoteManaged("},{"line_number":320,"context_line":"                    address_obj.pci_address_spec)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def _ensure_remote_managed_dev_vpd_serial("},{"line_number":323,"context_line":"        self, dev_dict: ty.Dict[str, ty.Any]) -\u003e bool:"},{"line_number":324,"context_line":"        \"\"\"Ensure the presence of a serial number field in PCI VPD."},{"line_number":325,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"094f2e7b_b16d60f5","line":322,"range":{"start_line":322,"start_character":0,"end_line":322,"end_character":46},"in_reply_to":"d547d340_ade29135","updated":"2022-02-03 19:38:21.000000000","message":"Discussed on IRC, going to mark as resolved. Will add a debug log message though as agreed.\n\nhttps://meetings.opendev.org/irclogs/%23openstack-nova/%23openstack-nova.2022-02-03.log.html#t2022-02-03T15:22:54\n\"The problem here is that I cannot do a check during PciDeviceSpec object creation because it gets details from passthrough_whitelist in nova.conf, meanwhile during matching I have access to the device json dict which comes based on info from Libvirt. We need\t15:22\ndmitriis\tinfo from Libvirt because it parses the VPD binary and extracts all the fields. So I can\u0027t check the presence of a serial at the whitelist parsing time without having to parse VPD (which belongs in Libvirt as we agreed in the past).\"","commit_id":"bc17626c75f8f8b7e6843f656fff716fac0e42bc"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"64f8adae47a3f484f53628d3f1d8d30ec27905a1","unresolved":true,"context_lines":[{"line_number":309,"context_line":"        # raise an exception. The reason for excluding PFs is the lack of a way"},{"line_number":310,"context_line":"        # for an instance to access the control plane at the remote side (e.g."},{"line_number":311,"context_line":"        # on a DPU) for managing the PF representor corresponding to the PF."},{"line_number":312,"context_line":"        address_obj \u003d self._address_obj()"},{"line_number":313,"context_line":"        self._remote_managed \u003d strutils.bool_from_string("},{"line_number":314,"context_line":"            self.tags.get(PCI_REMOTE_MANAGED_TAG))"},{"line_number":315,"context_line":"        if self._remote_managed:"}],"source_content_type":"text/x-python","patch_set":9,"id":"134fc1d1_b8c1c188","line":312,"range":{"start_line":312,"start_character":7,"end_line":312,"end_character":41},"updated":"2022-02-07 16:04:44.000000000","message":"ah you pull it out so it can be reused here ok","commit_id":"5e0d5f9752c62f7c8bb2f5693f407a23e16dac6c"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"feeb7ad65e8f7645c4e1c72fc01900f3662ae9a2","unresolved":false,"context_lines":[{"line_number":309,"context_line":"        # raise an exception. The reason for excluding PFs is the lack of a way"},{"line_number":310,"context_line":"        # for an instance to access the control plane at the remote side (e.g."},{"line_number":311,"context_line":"        # on a DPU) for managing the PF representor corresponding to the PF."},{"line_number":312,"context_line":"        address_obj \u003d self._address_obj()"},{"line_number":313,"context_line":"        self._remote_managed \u003d strutils.bool_from_string("},{"line_number":314,"context_line":"            self.tags.get(PCI_REMOTE_MANAGED_TAG))"},{"line_number":315,"context_line":"        if self._remote_managed:"}],"source_content_type":"text/x-python","patch_set":9,"id":"8662037e_409dee3f","line":312,"range":{"start_line":312,"start_character":7,"end_line":312,"end_character":41},"in_reply_to":"134fc1d1_b8c1c188","updated":"2022-02-08 11:34:07.000000000","message":"Yes, some moving around to have it available early to then potentially raise in `__init__`.","commit_id":"5e0d5f9752c62f7c8bb2f5693f407a23e16dac6c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"64f8adae47a3f484f53628d3f1d8d30ec27905a1","unresolved":true,"context_lines":[{"line_number":313,"context_line":"        self._remote_managed \u003d strutils.bool_from_string("},{"line_number":314,"context_line":"            self.tags.get(PCI_REMOTE_MANAGED_TAG))"},{"line_number":315,"context_line":"        if self._remote_managed:"},{"line_number":316,"context_line":"            if address_obj is None:"},{"line_number":317,"context_line":"                raise exception.PciDeviceRemoteManagedNotPresent()"},{"line_number":318,"context_line":"            elif address_obj.is_physical_function:"},{"line_number":319,"context_line":"                raise exception.PciDeviceInvalidPFRemoteManaged("},{"line_number":320,"context_line":"                    address_obj.pci_address_spec)"}],"source_content_type":"text/x-python","patch_set":9,"id":"4d95630b_0f6f5062","line":317,"range":{"start_line":316,"start_character":10,"end_line":317,"end_character":66},"updated":"2022-02-07 16:04:44.000000000","message":"nit: im trying to think how we can get to this branch and if this is correct.\n\nwe are allowed to just specify the vendor id and product_id or devname\n\nnow the extracted fucntion does in fact cater for the devname lookup which can return None on line 278\n\nnow if only the vendor id and product id are set\nwe shoudl do self.address \u003d WhitelistPciAddress(address or \u0027*:*:*.*\u0027, False)\nso the adreess willbe the wildcarded \u0027*:*:*.*\u0027 string.\n\nso i guess this branch is to catch the case where you used devname but that devname does not exist?\n\nassuming that is right can you add a short comment to that effect.\nlooking at the code i belive that is what is happening in which case the code is correct but next time i look at this i would perfer to have comment remind me of that.\n\nperhaps add this to a follow up patch at the end of the series","commit_id":"5e0d5f9752c62f7c8bb2f5693f407a23e16dac6c"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"feeb7ad65e8f7645c4e1c72fc01900f3662ae9a2","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        self._remote_managed \u003d strutils.bool_from_string("},{"line_number":314,"context_line":"            self.tags.get(PCI_REMOTE_MANAGED_TAG))"},{"line_number":315,"context_line":"        if self._remote_managed:"},{"line_number":316,"context_line":"            if address_obj is None:"},{"line_number":317,"context_line":"                raise exception.PciDeviceRemoteManagedNotPresent()"},{"line_number":318,"context_line":"            elif address_obj.is_physical_function:"},{"line_number":319,"context_line":"                raise exception.PciDeviceInvalidPFRemoteManaged("},{"line_number":320,"context_line":"                    address_obj.pci_address_spec)"}],"source_content_type":"text/x-python","patch_set":9,"id":"4a8215c8_73da4d4c","line":317,"range":{"start_line":316,"start_character":10,"end_line":317,"end_character":66},"in_reply_to":"4d95630b_0f6f5062","updated":"2022-02-08 11:34:07.000000000","message":"\u003e so i guess this branch is to catch the case where you used devname but that devname does not exist?\n\nYep, I\u0027ll add a comment to that effect to make it clear but that\u0027s indeed to make sure that we handle the missing netdev case correctly here.","commit_id":"5e0d5f9752c62f7c8bb2f5693f407a23e16dac6c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"64f8adae47a3f484f53628d3f1d8d30ec27905a1","unresolved":true,"context_lines":[{"line_number":315,"context_line":"        if self._remote_managed:"},{"line_number":316,"context_line":"            if address_obj is None:"},{"line_number":317,"context_line":"                raise exception.PciDeviceRemoteManagedNotPresent()"},{"line_number":318,"context_line":"            elif address_obj.is_physical_function:"},{"line_number":319,"context_line":"                raise exception.PciDeviceInvalidPFRemoteManaged("},{"line_number":320,"context_line":"                    address_obj.pci_address_spec)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def _ensure_remote_managed_dev_vpd_serial("},{"line_number":323,"context_line":"        self, dev_dict: ty.Dict[str, ty.Any]) -\u003e bool:"}],"source_content_type":"text/x-python","patch_set":9,"id":"20b33cc4_c875bc2a","line":320,"range":{"start_line":318,"start_character":11,"end_line":320,"end_character":49},"updated":"2022-02-07 16:04:44.000000000","message":"so im not sure this is correct.\n\nwe shoudl allow pf\u0027s to be tagged as remote managed if the vendor id and product id match those used by the VFs.\n\n\nwe allow you to use the vendor id and product id of the vf with the adress of the pf to allow all VF on the pf\n\nso {address:\"pf address\", remote_managed\u003dtrue, product_id:\"vf product_id\"}\n\nin principal should be allowed.\n\nwe coudl add this as a followup to have feature parity with normal filtering i guess.","commit_id":"5e0d5f9752c62f7c8bb2f5693f407a23e16dac6c"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"feeb7ad65e8f7645c4e1c72fc01900f3662ae9a2","unresolved":true,"context_lines":[{"line_number":315,"context_line":"        if self._remote_managed:"},{"line_number":316,"context_line":"            if address_obj is None:"},{"line_number":317,"context_line":"                raise exception.PciDeviceRemoteManagedNotPresent()"},{"line_number":318,"context_line":"            elif address_obj.is_physical_function:"},{"line_number":319,"context_line":"                raise exception.PciDeviceInvalidPFRemoteManaged("},{"line_number":320,"context_line":"                    address_obj.pci_address_spec)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def _ensure_remote_managed_dev_vpd_serial("},{"line_number":323,"context_line":"        self, dev_dict: ty.Dict[str, ty.Any]) -\u003e bool:"}],"source_content_type":"text/x-python","patch_set":9,"id":"68e58e7a_03e808e0","line":320,"range":{"start_line":318,"start_character":11,"end_line":320,"end_character":49},"in_reply_to":"20b33cc4_c875bc2a","updated":"2022-02-08 11:34:07.000000000","message":"Made some changes to allow \u0026 test this. I have to inspect the PF attributes exposed via sysfs in order to do some validation.\n\nFortunately the SR-IOV spec (1.0+) defines \"VF Device ID\" that a PF has to provide and which has to be used for each VF and the product ID of a VF has to match the PF product ID. So we can validate a VF product ID and vendor ID just by looking at the PF attributes.\n\nMy earlier comment on IRC regarding a \"management VF\" was not correct: it\u0027s actually a management PF and it appears to be that only one VF product ID can be used per PF so we do not need an overly complex validation logic.\n\nhttps://meetings.opendev.org/irclogs/%23openstack-nova/%23openstack-nova.2022-02-07.log.html#t2022-02-07T13:47:45\n\n$ sudo lspci -s 0000:82:00.2 -v\n82:00.2 DMA controller: Mellanox Technologies MT42822 BlueField-2 SoC Management Interface (rev 01) (prog-if 00 [8237])\n# ...\n\n# No physfn symlink - it\u0027s a PF.\n$ stat /sys/bus/pci/devices/0000\\:82:00.2/physfn ; echo $?\nstat: cannot stat \u0027/sys/bus/pci/devices/0000:82:00.2/physfn\u0027: No such file or directory\n\n\n$ sudo lspci -s 0000:82:00.3 -v\n82:00.3 Ethernet controller: Mellanox Technologies ConnectX Family mlx5Gen Virtual Function (rev 01)\n# ...\n\n$ sudo lspci -s 0000:82:00.3 -vn\n82:00.3 0200: 15b3:101e (rev 01)\n# ...\n\n$ readlink /sys/bus/pci/devices/0000\\:82:00.3/physfn\n../0000:82:00.0\n\n$ cat /sys/bus/pci/devices/0000\\:82:00.0/sriov_vf_device\n101e","commit_id":"5e0d5f9752c62f7c8bb2f5693f407a23e16dac6c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"042a3280be26f08a282a8e296a1a858c1587d974","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        if self._remote_managed:"},{"line_number":316,"context_line":"            if address_obj is None:"},{"line_number":317,"context_line":"                raise exception.PciDeviceRemoteManagedNotPresent()"},{"line_number":318,"context_line":"            elif address_obj.is_physical_function:"},{"line_number":319,"context_line":"                raise exception.PciDeviceInvalidPFRemoteManaged("},{"line_number":320,"context_line":"                    address_obj.pci_address_spec)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def _ensure_remote_managed_dev_vpd_serial("},{"line_number":323,"context_line":"        self, dev_dict: ty.Dict[str, ty.Any]) -\u003e bool:"}],"source_content_type":"text/x-python","patch_set":9,"id":"13d2189b_dfbe5289","line":320,"range":{"start_line":318,"start_character":11,"end_line":320,"end_character":49},"in_reply_to":"68e58e7a_03e808e0","updated":"2022-02-09 10:50:35.000000000","message":"Ack","commit_id":"5e0d5f9752c62f7c8bb2f5693f407a23e16dac6c"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"2bf226feb18f9b444cbc9590a50448153823cfb6","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        if self._remote_managed:"},{"line_number":316,"context_line":"            if address_obj is None:"},{"line_number":317,"context_line":"                raise exception.PciDeviceRemoteManagedNotPresent()"},{"line_number":318,"context_line":"            elif address_obj.is_physical_function:"},{"line_number":319,"context_line":"                raise exception.PciDeviceInvalidPFRemoteManaged("},{"line_number":320,"context_line":"                    address_obj.pci_address_spec)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def _ensure_remote_managed_dev_vpd_serial("},{"line_number":323,"context_line":"        self, dev_dict: ty.Dict[str, ty.Any]) -\u003e bool:"}],"source_content_type":"text/x-python","patch_set":9,"id":"c45d4eb4_c4af8072","line":320,"range":{"start_line":318,"start_character":11,"end_line":320,"end_character":49},"in_reply_to":"68e58e7a_03e808e0","updated":"2022-02-08 16:49:58.000000000","message":"Done","commit_id":"5e0d5f9752c62f7c8bb2f5693f407a23e16dac6c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"64f8adae47a3f484f53628d3f1d8d30ec27905a1","unresolved":true,"context_lines":[{"line_number":335,"context_line":"        # None or empty card_serial_number should be filtered out. That would"},{"line_number":336,"context_line":"        # mean either no serial number in the VPD (if present at all) or SN is"},{"line_number":337,"context_line":"        # an empty string which is not useful for device identification."},{"line_number":338,"context_line":"        has_card_sn \u003d isinstance(card_sn, str) and len(card_sn) \u003e 0"},{"line_number":339,"context_line":"        return has_card_sn"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"    def match(self, dev_dict: ty.Dict[str, ty.Any]) -\u003e bool:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5dec0a42_6fe119f9","line":338,"range":{"start_line":338,"start_character":22,"end_line":338,"end_character":47},"updated":"2022-02-07 16:04:44.000000000","message":"nit: this works but i would generally prefer \"card_sn is not None and len(card_sn) \u003e 0\"\n\nalthough thinking about it None and \"\" are both false\n\nso you can remove the has_card_sn line and just do \n\nreturn bool(card_sn)\n\ni beleve and you will get the same effect \nbool is just required to get the types right","commit_id":"5e0d5f9752c62f7c8bb2f5693f407a23e16dac6c"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"feeb7ad65e8f7645c4e1c72fc01900f3662ae9a2","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        # None or empty card_serial_number should be filtered out. That would"},{"line_number":336,"context_line":"        # mean either no serial number in the VPD (if present at all) or SN is"},{"line_number":337,"context_line":"        # an empty string which is not useful for device identification."},{"line_number":338,"context_line":"        has_card_sn \u003d isinstance(card_sn, str) and len(card_sn) \u003e 0"},{"line_number":339,"context_line":"        return has_card_sn"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"    def match(self, dev_dict: ty.Dict[str, ty.Any]) -\u003e bool:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5bf59f15_835f11a2","line":338,"range":{"start_line":338,"start_character":22,"end_line":338,"end_character":47},"in_reply_to":"5dec0a42_6fe119f9","updated":"2022-02-08 11:34:07.000000000","message":"Done","commit_id":"5e0d5f9752c62f7c8bb2f5693f407a23e16dac6c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"042a3280be26f08a282a8e296a1a858c1587d974","unresolved":false,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def __str__(self):"},{"line_number":119,"context_line":"        return f\u0027{self.domain}:{self.bus}:{self.slot}.{self.func}\u0027"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"class PciAddressGlobSpec(PciAddressSpec):"},{"line_number":123,"context_line":"    \"\"\"Manages the address fields with glob style."}],"source_content_type":"text/x-python","patch_set":10,"id":"28f81b6b_6e41a1e9","line":120,"updated":"2022-02-09 10:50:35.000000000","message":"+1","commit_id":"33257a90a8e0dae1ddbf12b950fd49bc1db8f8cb"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"042a3280be26f08a282a8e296a1a858c1587d974","unresolved":false,"context_lines":[{"line_number":318,"context_line":"                # whitelist but it is not actually present on a system - in"},{"line_number":319,"context_line":"                # this case Nova is not able to look up an address by"},{"line_number":320,"context_line":"                # a netdev name."},{"line_number":321,"context_line":"                raise exception.PciDeviceRemoteManagedNotPresent()"},{"line_number":322,"context_line":"            elif address_obj.is_physical_function:"},{"line_number":323,"context_line":"                pf_addr \u003d str(address_obj.pci_address_spec)"},{"line_number":324,"context_line":"                vf_product_id \u003d utils.get_vf_product_id_by_pf_addr(pf_addr)"}],"source_content_type":"text/x-python","patch_set":10,"id":"c1c72fa8_b99e9df5","line":321,"updated":"2022-02-09 10:50:35.000000000","message":"+1","commit_id":"33257a90a8e0dae1ddbf12b950fd49bc1db8f8cb"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"042a3280be26f08a282a8e296a1a858c1587d974","unresolved":false,"context_lines":[{"line_number":366,"context_line":"        # None or empty card_serial_number should be filtered out. That would"},{"line_number":367,"context_line":"        # mean either no serial number in the VPD (if present at all) or SN is"},{"line_number":368,"context_line":"        # an empty string which is not useful for device identification."},{"line_number":369,"context_line":"        return bool(card_sn)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def match(self, dev_dict: ty.Dict[str, ty.Any]) -\u003e bool:"},{"line_number":372,"context_line":"        address_obj: ty.Optional[WhitelistPciAddress] \u003d self._address_obj()"}],"source_content_type":"text/x-python","patch_set":10,"id":"426f9f42_81c6fe16","line":369,"updated":"2022-02-09 10:50:35.000000000","message":"+1","commit_id":"33257a90a8e0dae1ddbf12b950fd49bc1db8f8cb"}],"nova/pci/stats.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"03dbc52b965e1e9e2bfced835c8f65b30b532d62","unresolved":true,"context_lines":[{"line_number":500,"context_line":"                     if not strutils.bool_from_string("},{"line_number":501,"context_line":"                         pool.get(\u0027remote_managed\u0027))]"},{"line_number":502,"context_line":"        return pools"},{"line_number":503,"context_line":""},{"line_number":504,"context_line":"    def _filter_pools_for_remote_managed_pf_devices("},{"line_number":505,"context_line":"        self, pools: ty.List[Pool], request: \u0027objects.InstancePCIRequest\u0027,"},{"line_number":506,"context_line":"    ) -\u003e ty.List[Pool]:"}],"source_content_type":"text/x-python","patch_set":1,"id":"a2b5a982_7a895ff0","line":503,"updated":"2022-01-25 02:08:51.000000000","message":"the double negitives always confuse me when i read these filters but its correct.\n\nif all the pci request specs have remote_managed\u003dFalse then this will filter out any pool that has remote managed \u003d true.","commit_id":"19c42eea5fe4be53cc32627faffc4311bc9a51d7"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"2aea62f5b625d98b05dc59f771316c666190e333","unresolved":false,"context_lines":[{"line_number":500,"context_line":"                     if not strutils.bool_from_string("},{"line_number":501,"context_line":"                         pool.get(\u0027remote_managed\u0027))]"},{"line_number":502,"context_line":"        return pools"},{"line_number":503,"context_line":""},{"line_number":504,"context_line":"    def _filter_pools_for_remote_managed_pf_devices("},{"line_number":505,"context_line":"        self, pools: ty.List[Pool], request: \u0027objects.InstancePCIRequest\u0027,"},{"line_number":506,"context_line":"    ) -\u003e ty.List[Pool]:"}],"source_content_type":"text/x-python","patch_set":1,"id":"52087554_9946356b","line":503,"in_reply_to":"a2b5a982_7a895ff0","updated":"2022-01-26 18:56:16.000000000","message":"Same here, not the easiest thing to read.","commit_id":"19c42eea5fe4be53cc32627faffc4311bc9a51d7"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"2aea62f5b625d98b05dc59f771316c666190e333","unresolved":true,"context_lines":[{"line_number":527,"context_line":"                    strutils.bool_from_string(pool.get(\u0027remote_managed\u0027)))"},{"line_number":528,"context_line":"        ]"},{"line_number":529,"context_line":"        return pools"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def _filter_pools("},{"line_number":532,"context_line":"        self,"},{"line_number":533,"context_line":"        pools: ty.List[Pool],"}],"source_content_type":"text/x-python","patch_set":1,"id":"116d5397_f5232195","line":530,"updated":"2022-01-26 18:56:16.000000000","message":"Trying to sum up the cases:\n\n1) Matching VFs of a specific PF only: PF PCI address is specified with a vendor and device IDs of a VF.\n   (***will work*** with the current code as we are matching a VF by a PF address at the compute node side during device discovery and dev_type\u003d\u003d\u0027type-VF\u0027 in the resulting pool send to the scheduler)\n\n  see the trace: https://paste.opendev.org/show/bRN19VBEW2cs6Wu2TOG3/\n\n  Example: passthrough_whitelist \u003d {\"address\": \"0000:82:00.0\", \"vendor_id\": \"15b3\", \"product_id\": \"101e\", \"physical_network\": null, \"remote_managed\": \"true\"}\n  where 0000:82:00.0 is an address of a PF.\n  AND \"101e\" is a product id of a VF.\n  \n2) PF PCI address is specified in the whitelist + remote_managed tag but the vendor and product ID belong to a PF.\n   (will be filtered with the current code)\n\n  Example: passthrough_whitelist \u003d {\"address\": \"0000:82:00.0\", \"physical_network\": null, \"remote_managed\": \"true\"}\n  \n  where \"a2d6\" is a product id of a PF.\n  \n3) (will be filtered with the current code) PF PCI address is specified along with PF vendor and product id in the whitelist + remote_managed tag;\n  (will be filtered with the current code)\n\n  Example: passthrough_whitelist \u003d {\"address\": \"0000:82:00.0\", \"vendor_id\": \"15b3\", \"product_id\": \"a2d6\", \"physical_network\": null, \"remote_managed\": \"true\"}\n  \n  where \"a2d6\" is a product id of a PF.\n\n\nIn cases (2) and (3) the PFs will end up being exposed in pools and need to be filtered for allocation purposes but they could be used, for example, to avoid filtering VFs that do not have the remote_managed tag specified in the pci_whitelist for which we automatically set it to false.\n\nSo when you say \"consider PF that are tagged as remote managed\" do you mean that I need to support cases (2) and (3)?\n\nDoes that seem sane or do I misunderstand it?","commit_id":"19c42eea5fe4be53cc32627faffc4311bc9a51d7"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"03dbc52b965e1e9e2bfced835c8f65b30b532d62","unresolved":true,"context_lines":[{"line_number":527,"context_line":"                    strutils.bool_from_string(pool.get(\u0027remote_managed\u0027)))"},{"line_number":528,"context_line":"        ]"},{"line_number":529,"context_line":"        return pools"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def _filter_pools("},{"line_number":532,"context_line":"        self,"},{"line_number":533,"context_line":"        pools: ty.List[Pool],"}],"source_content_type":"text/x-python","patch_set":1,"id":"c244d006_cae1d68a","line":530,"updated":"2022-01-25 02:08:51.000000000","message":"i guess we could consider PF that are tagged as remote managed as meaning\nthe VF assocated with the PF are remote managed.\n\nfor example we support using the PF address with the VF vendor id and product id to whitelist the vfs fo a give pf for use.\n\nin such a case a physical_network tag on the PF is used for the physical_network of the VF transitivly. it would be consitent to treath the remote_managed tag the same. in such a case the PF is not aviableble for schduling and typicaly it will not be repored in the db as a resouce but its adress will be used as the parent.\n\nthat is hte behavior i would expect form the remote managed flag too.\n\n\nthis check is still valid in the even that the PF has no vender id/product id defiend of the vendor id and product id match the PF. in such a case however instead of catching it here i would prefer if we rasised and error and prevent the agent form startign with the inlvalid config by raising an error as part of host instialisation/agent start up when we are parsign the whitelist and initalising the pci tracker.","commit_id":"19c42eea5fe4be53cc32627faffc4311bc9a51d7"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"39d057cdba2880b1a0532c65df8353a2e43e1d30","unresolved":false,"context_lines":[{"line_number":527,"context_line":"                    strutils.bool_from_string(pool.get(\u0027remote_managed\u0027)))"},{"line_number":528,"context_line":"        ]"},{"line_number":529,"context_line":"        return pools"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def _filter_pools("},{"line_number":532,"context_line":"        self,"},{"line_number":533,"context_line":"        pools: ty.List[Pool],"}],"source_content_type":"text/x-python","patch_set":1,"id":"90089c9b_98240c4e","line":530,"in_reply_to":"06814cc5_ddd9ce7c","updated":"2022-01-27 21:36:12.000000000","message":"Implemented a check in devspec.py:PciDeviceSpec.match. This will be called early on startup of Nova compute before data obtained from Libvirt is converted to pools:\n\n_setup_pci_tracker -\u003e pci_tracker.update_devices_from_hypervisor_resources(dev_json) -\u003e self.dev_filter.device_assignable(dev) -\u003e spec.match(dev)\n\ndevice_assignable will return `False` for PFs marked as `remote_managed` and a warning will be logged in the devspec code.\n\nAlso removed the pool check for remote_managed PFs from PCI stats and reworked unit tests.","commit_id":"19c42eea5fe4be53cc32627faffc4311bc9a51d7"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"80de763d842280ef13fb5cb9c51099cbb4d07c3c","unresolved":false,"context_lines":[{"line_number":527,"context_line":"                    strutils.bool_from_string(pool.get(\u0027remote_managed\u0027)))"},{"line_number":528,"context_line":"        ]"},{"line_number":529,"context_line":"        return pools"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def _filter_pools("},{"line_number":532,"context_line":"        self,"},{"line_number":533,"context_line":"        pools: ty.List[Pool],"}],"source_content_type":"text/x-python","patch_set":1,"id":"6641ae6f_f7131c4e","line":530,"in_reply_to":"116d5397_f5232195","updated":"2022-01-27 10:50:25.000000000","message":"Done","commit_id":"19c42eea5fe4be53cc32627faffc4311bc9a51d7"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"f9da53a4af298f0c2953408d7435aa0f3ec74db6","unresolved":true,"context_lines":[{"line_number":527,"context_line":"                    strutils.bool_from_string(pool.get(\u0027remote_managed\u0027)))"},{"line_number":528,"context_line":"        ]"},{"line_number":529,"context_line":"        return pools"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def _filter_pools("},{"line_number":532,"context_line":"        self,"},{"line_number":533,"context_line":"        pools: ty.List[Pool],"}],"source_content_type":"text/x-python","patch_set":1,"id":"06814cc5_ddd9ce7c","line":530,"in_reply_to":"273aa3f6_6d2d69d0","updated":"2022-01-27 11:42:16.000000000","message":"Another case in addition to the ones above:\n\n4) InstancePCIRequest may potentially request PFs with the remote_managed tag (operators have no control of that at the moment though as an InstancePCIRequest is generated by Nova and VFs are reqeusted). Pools with matching remote_managed PFs could be found first and then PF interface names could be used to filter remote_managed VFs.\n\nAlso note: not all VFs of PF devices are necessarily network devices. For example, in the BF2 case there is a VF for SoC management over PCIe (15b3:0061) so this behavior may have unnecessary side-effects.","commit_id":"19c42eea5fe4be53cc32627faffc4311bc9a51d7"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"c6491e5004a308602d7697103822e19ae894d1ea","unresolved":true,"context_lines":[{"line_number":527,"context_line":"                    strutils.bool_from_string(pool.get(\u0027remote_managed\u0027)))"},{"line_number":528,"context_line":"        ]"},{"line_number":529,"context_line":"        return pools"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def _filter_pools("},{"line_number":532,"context_line":"        self,"},{"line_number":533,"context_line":"        pools: ty.List[Pool],"}],"source_content_type":"text/x-python","patch_set":1,"id":"273aa3f6_6d2d69d0","line":530,"in_reply_to":"97002b17_a13d5e79","updated":"2022-01-27 10:54:26.000000000","message":"Regarding preventing an agent from starting with invalid config:\n\n* Nova compute then needs to do a runtime check to determine whether a device in `passthrough_whitelist` is a VF or a PF and then do validation based on that - this can only be done for devices that are actually present on a system;\n* So, for devices, that are present in config but are not available on the system (maybe they will be physically hot-plugged later) we\u0027ll have to skip the startup check which is not ideal in my view.","commit_id":"19c42eea5fe4be53cc32627faffc4311bc9a51d7"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"80de763d842280ef13fb5cb9c51099cbb4d07c3c","unresolved":true,"context_lines":[{"line_number":527,"context_line":"                    strutils.bool_from_string(pool.get(\u0027remote_managed\u0027)))"},{"line_number":528,"context_line":"        ]"},{"line_number":529,"context_line":"        return pools"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def _filter_pools("},{"line_number":532,"context_line":"        self,"},{"line_number":533,"context_line":"        pools: ty.List[Pool],"}],"source_content_type":"text/x-python","patch_set":1,"id":"97002b17_a13d5e79","line":530,"in_reply_to":"c244d006_cae1d68a","updated":"2022-01-27 10:50:25.000000000","message":"[copied from the comment below]\n\nTrying to sum up the cases:\n\n1) Matching VFs of a specific PF only: PF PCI address is specified with a vendor and device IDs of a VF.\n\n   (***will work*** with the current code as we are matching a VF by a PF address at the compute node side during device discovery and dev_type\u003d\u003d\u0027type-VF\u0027 in the resulting pool send to the scheduler)\n  see the trace: https://paste.opendev.org/show/bRN19VBEW2cs6Wu2TOG3/\n  Example: passthrough_whitelist \u003d {\"address\": \"0000:82:00.0\", \"vendor_id\": \"15b3\", \"product_id\": \"101e\", \"physical_network\": null, \"remote_managed\": \"true\"}\n  where 0000:82:00.0 is an address of a PF.\n  AND \"101e\" is a product id of a VF.\n  \n2) PF PCI address is specified in the whitelist + remote_managed tag but the vendor and product ID belong to a PF.\n   (will be filtered with the current code)\n  Example: passthrough_whitelist \u003d {\"address\": \"0000:82:00.0\", \"physical_network\": null, \"remote_managed\": \"true\"}\n  \n  where \"a2d6\" is a product id of a PF.\n  \n3) (will be filtered with the current code) PF PCI address is specified along with PF vendor and product id in the whitelist + remote_managed tag;\n  (will be filtered with the current code)\n  Example: passthrough_whitelist \u003d {\"address\": \"0000:82:00.0\", \"vendor_id\": \"15b3\", \"product_id\": \"a2d6\", \"physical_network\": null, \"remote_managed\": \"true\"}\n  \n  where \"a2d6\" is a product id of a PF.\nIn cases (2) and (3) the PFs will end up being exposed in pools and need to be filtered for allocation purposes but they could be used, for example, to avoid filtering VFs that do not have the remote_managed tag specified in the pci_whitelist for which we automatically set it to false.\n\nSo when you say \"consider PF that are tagged as remote managed\" do you mean that I need to support cases (2) and (3)?\n\nDoes that seem sane or do I misunderstand it?","commit_id":"19c42eea5fe4be53cc32627faffc4311bc9a51d7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4730e05efa1874f30d34b5035887d4389659cc75","unresolved":true,"context_lines":[{"line_number":98,"context_line":"        return None"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @staticmethod"},{"line_number":101,"context_line":"    def _maybe_add_remote_managed_tag("},{"line_number":102,"context_line":"            dev: \u0027objects.PciDevice\u0027, pool: Pool):"},{"line_number":103,"context_line":"        \"\"\"Add a remote_managed tag depending on a device type if needed."},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"0d3adac8_f1b7701c","line":101,"range":{"start_line":101,"start_character":8,"end_line":101,"end_character":37},"updated":"2022-02-01 14:34:19.000000000","message":"nit: ensure_remote_managed_tag(","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"e35fe1060732b1fda6f90148ce111dfe769fe1a1","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        return None"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @staticmethod"},{"line_number":101,"context_line":"    def _maybe_add_remote_managed_tag("},{"line_number":102,"context_line":"            dev: \u0027objects.PciDevice\u0027, pool: Pool):"},{"line_number":103,"context_line":"        \"\"\"Add a remote_managed tag depending on a device type if needed."},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"96b4298d_dc0500f7","line":101,"range":{"start_line":101,"start_character":8,"end_line":101,"end_character":37},"in_reply_to":"0d3adac8_f1b7701c","updated":"2022-02-01 19:18:46.000000000","message":"Done","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4730e05efa1874f30d34b5035887d4389659cc75","unresolved":true,"context_lines":[{"line_number":111,"context_line":"                                fields.PciDeviceType.VDPA):"},{"line_number":112,"context_line":"            return"},{"line_number":113,"context_line":"        if pool.get(PCI_REMOTE_MANAGED_TAG) is None:"},{"line_number":114,"context_line":"            # NOTE: tags are compared as strings case-insensitively, see"},{"line_number":115,"context_line":"            # pci_device_prop_match in nova/pci/utils.py."},{"line_number":116,"context_line":"            pool[PCI_REMOTE_MANAGED_TAG] \u003d \u0027false\u0027"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def _create_pool_keys_from_dev("},{"line_number":119,"context_line":"        self, dev: \u0027objects.PciDevice\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"e79ec20c_1cb3fbfe","line":116,"range":{"start_line":114,"start_character":0,"end_line":116,"end_character":50},"updated":"2022-02-01 14:34:19.000000000","message":"This feels hackish. Can we improve on this somehow? Maybe in a follow up refactoring pci/utils to do a comparison with normal equality?","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f78c135a6366579f29301a5fcf42e752d0feb74a","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                                fields.PciDeviceType.VDPA):"},{"line_number":112,"context_line":"            return"},{"line_number":113,"context_line":"        if pool.get(PCI_REMOTE_MANAGED_TAG) is None:"},{"line_number":114,"context_line":"            # NOTE: tags are compared as strings case-insensitively, see"},{"line_number":115,"context_line":"            # pci_device_prop_match in nova/pci/utils.py."},{"line_number":116,"context_line":"            pool[PCI_REMOTE_MANAGED_TAG] \u003d \u0027false\u0027"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def _create_pool_keys_from_dev("},{"line_number":119,"context_line":"        self, dev: \u0027objects.PciDevice\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"6443df23_2ac853eb","line":116,"range":{"start_line":114,"start_character":0,"end_line":116,"end_character":50},"in_reply_to":"16c33ab4_12c436ad","updated":"2022-02-04 09:43:30.000000000","message":"OK. That explains it. Let\u0027s keep this as is.","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0a53bda43c84c5bce6801f766ecbe15c1342de07","unresolved":true,"context_lines":[{"line_number":111,"context_line":"                                fields.PciDeviceType.VDPA):"},{"line_number":112,"context_line":"            return"},{"line_number":113,"context_line":"        if pool.get(PCI_REMOTE_MANAGED_TAG) is None:"},{"line_number":114,"context_line":"            # NOTE: tags are compared as strings case-insensitively, see"},{"line_number":115,"context_line":"            # pci_device_prop_match in nova/pci/utils.py."},{"line_number":116,"context_line":"            pool[PCI_REMOTE_MANAGED_TAG] \u003d \u0027false\u0027"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def _create_pool_keys_from_dev("},{"line_number":119,"context_line":"        self, dev: \u0027objects.PciDevice\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"76ffc607_4c61f5ea","line":116,"range":{"start_line":114,"start_character":0,"end_line":116,"end_character":50},"in_reply_to":"1febaa5f_48443a6c","updated":"2022-02-03 13:58:55.000000000","message":"Hm, as far as I understand the current matching code it actually calls __eq__() (or __neq__())  on the attribute of the dev to compare it to the field in the request. So I assume if both field contains a boolean the the comparison would work out of the box. I haven\u0027t tried it though. What I see that you set a string to the spec here in [1] and I think that forces you to set a sting also here for the dev to make it match.\n\nWhat I don\u0027t see if the spec model will enforce that only strings can be stored.\n\n[1] https://review.opendev.org/c/openstack/nova/+/824835/10/nova/network/neutron.py#2319","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"62d888829978bdc06db413b1b601276f4518ea30","unresolved":true,"context_lines":[{"line_number":111,"context_line":"                                fields.PciDeviceType.VDPA):"},{"line_number":112,"context_line":"            return"},{"line_number":113,"context_line":"        if pool.get(PCI_REMOTE_MANAGED_TAG) is None:"},{"line_number":114,"context_line":"            # NOTE: tags are compared as strings case-insensitively, see"},{"line_number":115,"context_line":"            # pci_device_prop_match in nova/pci/utils.py."},{"line_number":116,"context_line":"            pool[PCI_REMOTE_MANAGED_TAG] \u003d \u0027false\u0027"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def _create_pool_keys_from_dev("},{"line_number":119,"context_line":"        self, dev: \u0027objects.PciDevice\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"16c33ab4_12c436ad","line":116,"range":{"start_line":114,"start_character":0,"end_line":116,"end_character":50},"in_reply_to":"76ffc607_4c61f5ea","updated":"2022-02-03 19:38:21.000000000","message":"The string conversion is there because of the serialization of InstancePciRequest objects which come from Nova API:\n\nhttps://github.com/openstack/nova/blob/26ce7b30b2ea3ff921df3515f98669f1197caa47/nova/compute/api.py#L1083-L1086\n\nThe spec attribute is a `ListOfDictOfNullableStringsField`:\n\nhttps://github.com/openstack/nova/blob/26ce7b30b2ea3ff921df3515f98669f1197caa47/nova/objects/instance_pci_requests.py#L40\n        \u0027spec\u0027: fields.ListOfDictOfNullableStringsField(),\n\nSo, yes, that\u0027s why the string conversion is taking place.\n\nSo what comes in a request will definitely be a string forcing me to avoid using bool for pools in this function or when converting tags obtained from the devspec in `_create_pool_keys_from_dev`.\n\nIn this case a pool is a dict with any value type\n\nhttps://github.com/openstack/nova/blob/26ce7b30b2ea3ff921df3515f98669f1197caa47/nova/pci/stats.py#L37\nPool \u003d ty.Dict[str, ty.Any]\n\nbut the problem is with what comes in a request.","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"e35fe1060732b1fda6f90148ce111dfe769fe1a1","unresolved":true,"context_lines":[{"line_number":111,"context_line":"                                fields.PciDeviceType.VDPA):"},{"line_number":112,"context_line":"            return"},{"line_number":113,"context_line":"        if pool.get(PCI_REMOTE_MANAGED_TAG) is None:"},{"line_number":114,"context_line":"            # NOTE: tags are compared as strings case-insensitively, see"},{"line_number":115,"context_line":"            # pci_device_prop_match in nova/pci/utils.py."},{"line_number":116,"context_line":"            pool[PCI_REMOTE_MANAGED_TAG] \u003d \u0027false\u0027"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def _create_pool_keys_from_dev("},{"line_number":119,"context_line":"        self, dev: \u0027objects.PciDevice\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1febaa5f_48443a6c","line":116,"range":{"start_line":114,"start_character":0,"end_line":116,"end_character":50},"in_reply_to":"e79ec20c_1cb3fbfe","updated":"2022-02-01 19:18:46.000000000","message":"Possibly, I am open to discussing how pci_device_prop_match could be extended to take types into account but there\u0027s no type information associated with keys themselves yet. Maybe besides storing constants in nova/pci/request.py we can also store their respective types to be used for conversion in stats.py so that the comparison can be done normally.","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4730e05efa1874f30d34b5035887d4389659cc75","unresolved":false,"context_lines":[{"line_number":495,"context_line":"        :returns: A list of pools that can be used to support the request if"},{"line_number":496,"context_line":"            this is possible."},{"line_number":497,"context_line":"        \"\"\""},{"line_number":498,"context_line":"        if all(not strutils.bool_from_string(spec.get(PCI_REMOTE_MANAGED_TAG))"},{"line_number":499,"context_line":"               for spec in request.spec):"},{"line_number":500,"context_line":"            pools \u003d [pool for pool in pools"},{"line_number":501,"context_line":"                     if not strutils.bool_from_string("},{"line_number":502,"context_line":"                         pool.get(PCI_REMOTE_MANAGED_TAG))]"}],"source_content_type":"text/x-python","patch_set":5,"id":"bad399f7_6635cac5","line":499,"range":{"start_line":498,"start_character":11,"end_line":499,"end_character":40},"updated":"2022-02-01 14:34:19.000000000","message":"so this is True if all the specs in the request said nothing about remote_manged or said no remote_manged device","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4730e05efa1874f30d34b5035887d4389659cc75","unresolved":false,"context_lines":[{"line_number":497,"context_line":"        \"\"\""},{"line_number":498,"context_line":"        if all(not strutils.bool_from_string(spec.get(PCI_REMOTE_MANAGED_TAG))"},{"line_number":499,"context_line":"               for spec in request.spec):"},{"line_number":500,"context_line":"            pools \u003d [pool for pool in pools"},{"line_number":501,"context_line":"                     if not strutils.bool_from_string("},{"line_number":502,"context_line":"                         pool.get(PCI_REMOTE_MANAGED_TAG))]"},{"line_number":503,"context_line":"        return pools"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"    def _filter_pools("}],"source_content_type":"text/x-python","patch_set":5,"id":"7d6bcd83_d2646a05","line":502,"range":{"start_line":500,"start_character":12,"end_line":502,"end_character":59},"updated":"2022-02-01 14:34:19.000000000","message":"... and in this case we remove all pool that has a positive remote_managed tag","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4730e05efa1874f30d34b5035887d4389659cc75","unresolved":true,"context_lines":[{"line_number":500,"context_line":"            pools \u003d [pool for pool in pools"},{"line_number":501,"context_line":"                     if not strutils.bool_from_string("},{"line_number":502,"context_line":"                         pool.get(PCI_REMOTE_MANAGED_TAG))]"},{"line_number":503,"context_line":"        return pools"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"    def _filter_pools("},{"line_number":506,"context_line":"        self,"}],"source_content_type":"text/x-python","patch_set":5,"id":"6e60417f_0a32fb86","line":503,"updated":"2022-02-01 14:34:19.000000000","message":"so if no remote-managed device is requested then we remove those from the pools. \n\nHowever when remote-managed device is requested then we return all pools even those that has non remote-managed device. \n\nI agree with the first part, but I don\u0027t know why we keep non remote-managed device pools in the possibilities if the request wants a remote-managed device.","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0a53bda43c84c5bce6801f766ecbe15c1342de07","unresolved":true,"context_lines":[{"line_number":500,"context_line":"            pools \u003d [pool for pool in pools"},{"line_number":501,"context_line":"                     if not strutils.bool_from_string("},{"line_number":502,"context_line":"                         pool.get(PCI_REMOTE_MANAGED_TAG))]"},{"line_number":503,"context_line":"        return pools"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"    def _filter_pools("},{"line_number":506,"context_line":"        self,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a1b59e8_725eaffe","line":503,"in_reply_to":"06e3634a_cf73a317","updated":"2022-02-03 13:58:55.000000000","message":"Ohh I see now. Thanks for the explanation! Now I\u0027m wondering... would it be simpler to default the remote_managed tag to false in the request? Would that remove the need for the special case handling here? (probably yes) Would that cause any trouble for the non remote managed ports? (I don\u0027t know)","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"62d888829978bdc06db413b1b601276f4518ea30","unresolved":false,"context_lines":[{"line_number":500,"context_line":"            pools \u003d [pool for pool in pools"},{"line_number":501,"context_line":"                     if not strutils.bool_from_string("},{"line_number":502,"context_line":"                         pool.get(PCI_REMOTE_MANAGED_TAG))]"},{"line_number":503,"context_line":"        return pools"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"    def _filter_pools("},{"line_number":506,"context_line":"        self,"}],"source_content_type":"text/x-python","patch_set":5,"id":"528b07d2_d4a9f020","line":503,"in_reply_to":"1a1b59e8_725eaffe","updated":"2022-02-03 19:38:21.000000000","message":"I recall doing that initially, however, Sean asked me to move it here rather than keeping it at the \"client side\" because it would cause issues with existing state of device objects on upgrade because they will not have \"remote_managed\" tags:\n\nhttps://meetings.opendev.org/irclogs/%23openstack-nova/%23openstack-nova.2021-11-16.log.html#t2021-11-16T15:25:55","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f78c135a6366579f29301a5fcf42e752d0feb74a","unresolved":true,"context_lines":[{"line_number":500,"context_line":"            pools \u003d [pool for pool in pools"},{"line_number":501,"context_line":"                     if not strutils.bool_from_string("},{"line_number":502,"context_line":"                         pool.get(PCI_REMOTE_MANAGED_TAG))]"},{"line_number":503,"context_line":"        return pools"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"    def _filter_pools("},{"line_number":506,"context_line":"        self,"}],"source_content_type":"text/x-python","patch_set":5,"id":"abc8b6bc_38d46df1","line":503,"in_reply_to":"528b07d2_d4a9f020","updated":"2022-02-04 09:43:30.000000000","message":"Good point. Upgrade would be harder. I would add a note in the code about this reasoning.","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"e35fe1060732b1fda6f90148ce111dfe769fe1a1","unresolved":false,"context_lines":[{"line_number":500,"context_line":"            pools \u003d [pool for pool in pools"},{"line_number":501,"context_line":"                     if not strutils.bool_from_string("},{"line_number":502,"context_line":"                         pool.get(PCI_REMOTE_MANAGED_TAG))]"},{"line_number":503,"context_line":"        return pools"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"    def _filter_pools("},{"line_number":506,"context_line":"        self,"}],"source_content_type":"text/x-python","patch_set":5,"id":"06e3634a_cf73a317","line":503,"in_reply_to":"6e60417f_0a32fb86","updated":"2022-02-01 19:18:46.000000000","message":"That will be handled by _filter_pools_for_spec above which also calls pci_device_prop_match.\n\nThose pools where `remote_managed` is not present or `remote_managed \u003d\u003d \"false\"` will get filtered out if a request contains `remote_managed \u003d\u003d \"true\"`.\n\nIn other words, if specific tag values are not requested, they normally not used in matching. If they are, they must all be there with the requested value per the existing logic in `_filter_pools_for_spec-\u003epci_device_prop_match`\n\nSo, I basically got this working for free with the existing logic but needed to special-case the situation where `remote_managed \u003d\u003d \"true\"` in a pool but it is not in the request. That\u0027s the key behavior change compared to custom tags that are not special-cased.","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"277972efc5dd91e4103bf7e7ccec00774290d85d","unresolved":false,"context_lines":[{"line_number":500,"context_line":"            pools \u003d [pool for pool in pools"},{"line_number":501,"context_line":"                     if not strutils.bool_from_string("},{"line_number":502,"context_line":"                         pool.get(PCI_REMOTE_MANAGED_TAG))]"},{"line_number":503,"context_line":"        return pools"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"    def _filter_pools("},{"line_number":506,"context_line":"        self,"}],"source_content_type":"text/x-python","patch_set":5,"id":"29affb21_004b1635","line":503,"in_reply_to":"abc8b6bc_38d46df1","updated":"2022-02-04 11:22:06.000000000","message":"Added in:\n\nhttps://review.opendev.org/c/openstack/nova/+/827839/1/nova/pci/stats.py#119","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4730e05efa1874f30d34b5035887d4389659cc75","unresolved":true,"context_lines":[{"line_number":591,"context_line":"                before_count - after_count"},{"line_number":592,"context_line":"            )"},{"line_number":593,"context_line":""},{"line_number":594,"context_line":"        if after_count \u003c before_count:"},{"line_number":595,"context_line":"            LOG.debug("},{"line_number":596,"context_line":"                \u0027Dropped %d device(s) as they are remote-managed PFs which \u0027"},{"line_number":597,"context_line":"                \u0027 is not supported by design\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"488b4569_a5ffb9da","line":594,"updated":"2022-02-01 14:34:19.000000000","message":"how this \u0027if\u0027 is different from the one above it? Is something missing between these two ifs?","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"e35fe1060732b1fda6f90148ce111dfe769fe1a1","unresolved":false,"context_lines":[{"line_number":591,"context_line":"                before_count - after_count"},{"line_number":592,"context_line":"            )"},{"line_number":593,"context_line":""},{"line_number":594,"context_line":"        if after_count \u003c before_count:"},{"line_number":595,"context_line":"            LOG.debug("},{"line_number":596,"context_line":"                \u0027Dropped %d device(s) as they are remote-managed PFs which \u0027"},{"line_number":597,"context_line":"                \u0027 is not supported by design\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"568a4420_6bdeccc2","line":594,"in_reply_to":"488b4569_a5ffb9da","updated":"2022-02-01 19:18:46.000000000","message":"My bad, that was supposed to be removed after the logic of `_filter_pools_for_remote_managed_pf_devices` (https://review.opendev.org/c/openstack/nova/+/824834/2/nova/pci/stats.py#504) got moved closer to the whitelist validation.\n\nThanks a lot for noticing!","commit_id":"4a0c4de3a8f4b3e049cbb4390e2bf446eca74bdd"}],"nova/pci/utils.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"042a3280be26f08a282a8e296a1a858c1587d974","unresolved":true,"context_lines":[{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    It is available as of Linux kernel 4.15, commit"},{"line_number":226,"context_line":"    7dfca15276fc3f18411a2b2182704fa1222bcb60"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    :param pci_addr: A string of the form \"\u003cdomain\u003e:\u003cbus\u003e:\u003cslot\u003e.\u003cfunction\u003e\"."},{"line_number":229,"context_line":"    :return: A string containing a product ID of a VF corresponding to the PF."},{"line_number":230,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"2bed7caf_9b73a4d3","line":227,"updated":"2022-02-09 10:50:35.000000000","message":"ack\nwe dont normally need that level of detail but it does not hurt to include it","commit_id":"0d5f8ffc2b279888af03e7983dcee9d1d267f980"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"dd8908fd04f9bcad0b474324db55041505bc36a7","unresolved":false,"context_lines":[{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    It is available as of Linux kernel 4.15, commit"},{"line_number":226,"context_line":"    7dfca15276fc3f18411a2b2182704fa1222bcb60"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    :param pci_addr: A string of the form \"\u003cdomain\u003e:\u003cbus\u003e:\u003cslot\u003e.\u003cfunction\u003e\"."},{"line_number":229,"context_line":"    :return: A string containing a product ID of a VF corresponding to the PF."},{"line_number":230,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"08f56eb2_1b860375","line":227,"in_reply_to":"2bed7caf_9b73a4d3","updated":"2022-02-09 13:54:25.000000000","message":"I was surprised it wasn\u0027t added along with initial SR-IOV support commits circa 2009 https://lwn.net/Articles/319651/ while the 1.0 SR-IOV spec included that.\n\nIt was added much later in 2017 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id\u003d7dfca15276fc3f18411a2b2182704fa1222bcb60 which is not that recent anymore (time flies).\n\nConsidering we only call this in the `remote_managed: \"true\"` code path and that kernels usable with DPUs will be fairly recent I think it\u0027s quite safe to rely on this.\n\nJust wanted to make sure we have a solid reasoning here.","commit_id":"0d5f8ffc2b279888af03e7983dcee9d1d267f980"}]}
