)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"b47d15d32c0530adc15f0c6121c03c731044856d","unresolved":true,"context_lines":[{"line_number":10,"context_line":"That means, first \"rate\" (max BW) can be set and in a second"},{"line_number":11,"context_line":"command \"min\" (min BW) (check LP bug description)."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"However Pyroute2 command to set the VF rates requires to set both."},{"line_number":14,"context_line":"If one value is missing (\"min_tx_rate\", \"max_tx_rate\"), the library"},{"line_number":15,"context_line":"sets this value to 0; in other words, the value is deleted."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patch reads first the existing rates (\"min_tx_rate\","},{"line_number":18,"context_line":"\"max_tx_rate\") and populates the command parameters accordingly."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"82a226a8_29bbcfa8","line":15,"range":{"start_line":13,"start_character":0,"end_line":15,"end_character":59},"updated":"2022-03-08 10:40:43.000000000","message":"For future\u0027s reference could you please point to where it is in pyrout2, to make life easier if it is changed again?\nI tried to find it but I am always lost in pyrout2 code, and perhaps somehwere here it is written as docstring/comment:\nhttps://github.com/svinota/pyroute2/blob/a9564dff8e53659f761d71bbee0dd68dd0db6ce8/pyroute2.core/pr2modules/netlink/__init__.py#L981-L983\n\nBut perhaps there\u0027s some higher level place where it is visible/written","commit_id":"2a139f47bb93ed215da20ef3f5f036e4ceac5a91"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"6c3b8e68bfe10f616dd8a17079d8504d885fe4b7","unresolved":false,"context_lines":[{"line_number":10,"context_line":"That means, first \"rate\" (max BW) can be set and in a second"},{"line_number":11,"context_line":"command \"min\" (min BW) (check LP bug description)."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"However Pyroute2 command to set the VF rates requires to set both."},{"line_number":14,"context_line":"If one value is missing (\"min_tx_rate\", \"max_tx_rate\"), the library"},{"line_number":15,"context_line":"sets this value to 0; in other words, the value is deleted."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patch reads first the existing rates (\"min_tx_rate\","},{"line_number":18,"context_line":"\"max_tx_rate\") and populates the command parameters accordingly."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"2b20c0f6_4965f5d7","line":15,"range":{"start_line":13,"start_character":0,"end_line":15,"end_character":59},"in_reply_to":"57c3672e_56bd007b","updated":"2022-03-08 17:52:27.000000000","message":"thanks, I feared it will be something like this :/","commit_id":"2a139f47bb93ed215da20ef3f5f036e4ceac5a91"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ff0abe289c49d32659b3b054f471e9c00f27a0e9","unresolved":true,"context_lines":[{"line_number":10,"context_line":"That means, first \"rate\" (max BW) can be set and in a second"},{"line_number":11,"context_line":"command \"min\" (min BW) (check LP bug description)."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"However Pyroute2 command to set the VF rates requires to set both."},{"line_number":14,"context_line":"If one value is missing (\"min_tx_rate\", \"max_tx_rate\"), the library"},{"line_number":15,"context_line":"sets this value to 0; in other words, the value is deleted."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patch reads first the existing rates (\"min_tx_rate\","},{"line_number":18,"context_line":"\"max_tx_rate\") and populates the command parameters accordingly."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"57c3672e_56bd007b","line":15,"range":{"start_line":13,"start_character":0,"end_line":15,"end_character":59},"in_reply_to":"82a226a8_29bbcfa8","updated":"2022-03-08 16:49:07.000000000","message":"This is not explicitly said in the code. That depends on how the \"iproute\" structures are built. When calling the \"iproute\" library, Pyroute2 builds the IFLA_VF_RATE structure that must be [1], and decoded in [2].\n\nIn Pyroute2, the structures are built depending on the parameter names. When passing \"vf\" and inside \"rate\", that will call [3].\n\nIf any of those keys (min_tx_rate, max_tx_rate) is not set, Pyroute2 will assign a 0 value. For example:\n  $ from neutron.plugins.ml2.drivers.mech_sriov.agent import pci_lib\n    pci\u003dpci_lib.PciDeviceIPWrapper(\"enp196s0f0\")\n    pci.set_vf_rate(15, {\u0027max_tx_rate\u0027: 10})\n\nThis code will generate a \"msg\" [4] like this: https://paste.opendev.org/show/b2FZBOebGOCHMrYhPr6X/. \"msg\" is the structure that is passed to the \"iproute\" library.\n\nI\u0027ll update the commit message with this information.\n\n[1]https://github.com/shemminger/iproute2/blob/c8d9d92544668922dc5aa06d2491f42b837b9361/ip/ipaddress.c#L454-L470\n[2]https://github.com/shemminger/iproute2/blob/c8d9d92544668922dc5aa06d2491f42b837b9361/ip/iplink.c#L457-L469\n[3]https://github.com/svinota/pyroute2/blob/a9564dff8e53659f761d71bbee0dd68dd0db6ce8/pyroute2.core/pr2modules/netlink/rtnl/ifinfmsg/__init__.py#L712-L717\n[4]https://github.com/svinota/pyroute2/blob/a9564dff8e53659f761d71bbee0dd68dd0db6ce8/pyroute2.core/pr2modules/iproute/linux.py#L1499","commit_id":"2a139f47bb93ed215da20ef3f5f036e4ceac5a91"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"6c3b8e68bfe10f616dd8a17079d8504d885fe4b7","unresolved":true,"context_lines":[{"line_number":14,"context_line":"If one value is missing (\"min_tx_rate\", \"max_tx_rate\"), the library"},{"line_number":15,"context_line":"sets this value to 0; in other words, the value is deleted."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The Pyroute2 structures are built depending on the parameter names."},{"line_number":18,"context_line":"In this case, {\u0027vf\u0027: {\u0027rate\u0027: ...}} will create a \"vf_rate\" [1]"},{"line_number":19,"context_line":"nla structure, that requires \"min_tx_rate\" and \"max_tx_rate\"."},{"line_number":20,"context_line":"This is part of the full structure passed to the \"iproute\" library"},{"line_number":21,"context_line":"[2]."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"This is an example of code that only sets the \"max_tx_rate\" for"},{"line_number":24,"context_line":"the 15th VF of \"enp196s0f0\":"},{"line_number":25,"context_line":"  $ from neutron.plugins.ml2.drivers.mech_sriov.agent import pci_lib"},{"line_number":26,"context_line":"    pci \u003d pci_lib.PciDeviceIPWrapper(\"enp196s0f0\")"},{"line_number":27,"context_line":"    pci.set_vf_rate(15, {\u0027max_tx_rate\u0027: 10})"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"The \"msg\" [3] (structure passed to \"iproute\" library) is this:"},{"line_number":30,"context_line":"https://paste.opendev.org/show/b2FZBOebGOCHMrYhPr6X/. The"},{"line_number":31,"context_line":"\"min_tx_rate\" is set to the default value 0."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"This patch reads first the existing rates (\"min_tx_rate\","},{"line_number":34,"context_line":"\"max_tx_rate\") and populates the command parameters accordingly."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"0c927bf3_a475c29e","line":31,"range":{"start_line":17,"start_character":0,"end_line":31,"end_character":44},"updated":"2022-03-08 17:52:27.000000000","message":"thanks","commit_id":"cdff281f642511ea3d0e077dbe885ec955208a7a"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"b47d15d32c0530adc15f0c6121c03c731044856d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"e966d05a_41421e6b","updated":"2022-03-08 10:40:43.000000000","message":"Thanks, could you please add some reference where this expectation is written in pyroute2?","commit_id":"2a139f47bb93ed215da20ef3f5f036e4ceac5a91"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a9b357a0343860f7dfb8423c11322f6b7afbf91b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"fb644b67_c1ac26b1","updated":"2022-03-09 00:44:34.000000000","message":"recheck","commit_id":"cdff281f642511ea3d0e077dbe885ec955208a7a"}],"neutron/plugins/ml2/drivers/mech_sriov/agent/eswitch_manager.py":[{"author":{"_account_id":13861,"name":"yatin","email":"ykarel@redhat.com","username":"yatinkarel"},"change_message_id":"0f03fd1d8eb450a103fed8175adc5ba090e33a7f","unresolved":true,"context_lines":[{"line_number":233,"context_line":"            \u0027rate_type\u0027: rate_type"},{"line_number":234,"context_line":"        }"},{"line_number":235,"context_line":"        if rate_kbps % 1000 !\u003d 0:"},{"line_number":236,"context_line":"            LOG.debug(\"\u0027%(rate_type)s\u0027 for SR-IOV ports is counted in Mbps; \""},{"line_number":237,"context_line":"                      \"setting %(rate_mbps)s Mbps limit for port %(vf_index)s \""},{"line_number":238,"context_line":"                      \"instead of %(rate_kbps)s kbps\","},{"line_number":239,"context_line":"                      log_dict)"},{"line_number":240,"context_line":"        else:"},{"line_number":241,"context_line":"            LOG.debug(\"Setting %(rate_mbps)s Mbps limit for port %(vf_index)s\","},{"line_number":242,"context_line":"                      log_dict)"}],"source_content_type":"text/x-python","patch_set":1,"id":"20804f31_e691a9f8","side":"PARENT","line":239,"range":{"start_line":236,"start_character":10,"end_line":239,"end_character":31},"updated":"2022-03-04 10:10:31.000000000","message":"is the debug message intentionally removed?","commit_id":"b072cbf05f079519e379b2bfebe27846ae612275"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d63e358a38c69494b94172daef8ade45319ce1ba","unresolved":true,"context_lines":[{"line_number":233,"context_line":"            \u0027rate_type\u0027: rate_type"},{"line_number":234,"context_line":"        }"},{"line_number":235,"context_line":"        if rate_kbps % 1000 !\u003d 0:"},{"line_number":236,"context_line":"            LOG.debug(\"\u0027%(rate_type)s\u0027 for SR-IOV ports is counted in Mbps; \""},{"line_number":237,"context_line":"                      \"setting %(rate_mbps)s Mbps limit for port %(vf_index)s \""},{"line_number":238,"context_line":"                      \"instead of %(rate_kbps)s kbps\","},{"line_number":239,"context_line":"                      log_dict)"},{"line_number":240,"context_line":"        else:"},{"line_number":241,"context_line":"            LOG.debug(\"Setting %(rate_mbps)s Mbps limit for port %(vf_index)s\","},{"line_number":242,"context_line":"                      log_dict)"}],"source_content_type":"text/x-python","patch_set":1,"id":"12a9c416_8ad00ec2","side":"PARENT","line":239,"range":{"start_line":236,"start_character":10,"end_line":239,"end_character":31},"in_reply_to":"20804f31_e691a9f8","updated":"2022-03-04 13:52:30.000000000","message":"This message is irrelevant, we already inform about the values set.","commit_id":"b072cbf05f079519e379b2bfebe27846ae612275"},{"author":{"_account_id":13861,"name":"yatin","email":"ykarel@redhat.com","username":"yatinkarel"},"change_message_id":"0f03fd1d8eb450a103fed8175adc5ba090e33a7f","unresolved":true,"context_lines":[{"line_number":213,"context_line":"        return self.pci_dev_wrapper.set_vf_state(vf_index, state,"},{"line_number":214,"context_line":"                                                 auto\u003dpropagate_uplink_state)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def set_device_rate(self, pci_slot, rates):"},{"line_number":217,"context_line":"        \"\"\"Set device rate: max_tx_rate, min_tx_rate"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        @param pci_slot: Virtual Function address"}],"source_content_type":"text/x-python","patch_set":1,"id":"9d38f5c6_5bc2ff00","line":216,"range":{"start_line":216,"start_character":4,"end_line":216,"end_character":47},"updated":"2022-03-04 10:10:31.000000000","message":"need to update unit tests at https://opendev.org/openstack/neutron/src/branch/master/neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/test_pci_lib.py as per change.","commit_id":"090b38d373992fda3f6a186d41fa6f9dc20899e1"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d63e358a38c69494b94172daef8ade45319ce1ba","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        return self.pci_dev_wrapper.set_vf_state(vf_index, state,"},{"line_number":214,"context_line":"                                                 auto\u003dpropagate_uplink_state)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def set_device_rate(self, pci_slot, rates):"},{"line_number":217,"context_line":"        \"\"\"Set device rate: max_tx_rate, min_tx_rate"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        @param pci_slot: Virtual Function address"}],"source_content_type":"text/x-python","patch_set":1,"id":"95da9e4f_b7f58cf2","line":216,"range":{"start_line":216,"start_character":4,"end_line":216,"end_character":47},"in_reply_to":"9d38f5c6_5bc2ff00","updated":"2022-03-04 13:52:30.000000000","message":"Done","commit_id":"090b38d373992fda3f6a186d41fa6f9dc20899e1"},{"author":{"_account_id":13861,"name":"yatin","email":"ykarel@redhat.com","username":"yatinkarel"},"change_message_id":"0f03fd1d8eb450a103fed8175adc5ba090e33a7f","unresolved":true,"context_lines":[{"line_number":217,"context_line":"        \"\"\"Set device rate: max_tx_rate, min_tx_rate"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        @param pci_slot: Virtual Function address"},{"line_number":220,"context_line":"        @param rates: dictionary with with rate type (str) and the value (int)"},{"line_number":221,"context_line":"                      in Kbps. Example:"},{"line_number":222,"context_line":"                        {\u0027max_tx_rate\u0027: 20000, \u0027min_tx_rate\u0027: 10000}"},{"line_number":223,"context_line":"                        {\u0027max_tx_rate\u0027: 30000}"}],"source_content_type":"text/x-python","patch_set":1,"id":"beaf98fa_b8c3949e","line":220,"range":{"start_line":220,"start_character":33,"end_line":220,"end_character":37},"updated":"2022-03-04 10:10:31.000000000","message":"extra","commit_id":"090b38d373992fda3f6a186d41fa6f9dc20899e1"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d63e358a38c69494b94172daef8ade45319ce1ba","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        \"\"\"Set device rate: max_tx_rate, min_tx_rate"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        @param pci_slot: Virtual Function address"},{"line_number":220,"context_line":"        @param rates: dictionary with with rate type (str) and the value (int)"},{"line_number":221,"context_line":"                      in Kbps. Example:"},{"line_number":222,"context_line":"                        {\u0027max_tx_rate\u0027: 20000, \u0027min_tx_rate\u0027: 10000}"},{"line_number":223,"context_line":"                        {\u0027max_tx_rate\u0027: 30000}"}],"source_content_type":"text/x-python","patch_set":1,"id":"180a2005_00367564","line":220,"range":{"start_line":220,"start_character":33,"end_line":220,"end_character":37},"in_reply_to":"beaf98fa_b8c3949e","updated":"2022-03-04 13:52:30.000000000","message":"Done","commit_id":"090b38d373992fda3f6a186d41fa6f9dc20899e1"},{"author":{"_account_id":13861,"name":"yatin","email":"ykarel@redhat.com","username":"yatinkarel"},"change_message_id":"b55b453f4a4e59362ba10f00c3121a63c7fbcaa1","unresolved":true,"context_lines":[{"line_number":246,"context_line":"            vf \u003d self._get_vfs()[int(vf_index)]"},{"line_number":247,"context_line":"            # Devices without \u0027min_tx_rate\u0027 support will return None in this"},{"line_number":248,"context_line":"            # value. If current value is 0, there is no need to set it again."},{"line_number":249,"context_line":"            for _type in (_type for _type in missing_rate_types if vf[_type]):"},{"line_number":250,"context_line":"                rates_mbps[_type] \u003d vf[_type]"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        LOG.debug(\u0027Setting %s limits (in Mbps) for port VF %s\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5354cc06_14d0a51b","line":249,"range":{"start_line":249,"start_character":12,"end_line":249,"end_character":78},"updated":"2022-03-07 05:37:36.000000000","message":"may be can avoid two loops? with:-\nfor _type in missing_rate_types:\n    if vf[_type]:\n       rates_mbps[_type] \u003d vf[_type]","commit_id":"2a139f47bb93ed215da20ef3f5f036e4ceac5a91"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"7229a70936d79f01992b1ed8bc7d0dcecf89fc7e","unresolved":true,"context_lines":[{"line_number":246,"context_line":"            vf \u003d self._get_vfs()[int(vf_index)]"},{"line_number":247,"context_line":"            # Devices without \u0027min_tx_rate\u0027 support will return None in this"},{"line_number":248,"context_line":"            # value. If current value is 0, there is no need to set it again."},{"line_number":249,"context_line":"            for _type in (_type for _type in missing_rate_types if vf[_type]):"},{"line_number":250,"context_line":"                rates_mbps[_type] \u003d vf[_type]"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        LOG.debug(\u0027Setting %s limits (in Mbps) for port VF %s\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5591b37f_7072c8ad","line":249,"range":{"start_line":249,"start_character":12,"end_line":249,"end_character":78},"in_reply_to":"5354cc06_14d0a51b","updated":"2022-03-07 06:28:44.000000000","message":"There no two loops but a generator with a condition, and a loop over it. This is more efficient than looping over the variable and then checking the condition.","commit_id":"2a139f47bb93ed215da20ef3f5f036e4ceac5a91"},{"author":{"_account_id":13861,"name":"yatin","email":"ykarel@redhat.com","username":"yatinkarel"},"change_message_id":"d41501c191329f1e05798af65e374e5089d7879c","unresolved":true,"context_lines":[{"line_number":246,"context_line":"            vf \u003d self._get_vfs()[int(vf_index)]"},{"line_number":247,"context_line":"            # Devices without \u0027min_tx_rate\u0027 support will return None in this"},{"line_number":248,"context_line":"            # value. If current value is 0, there is no need to set it again."},{"line_number":249,"context_line":"            for _type in (_type for _type in missing_rate_types if vf[_type]):"},{"line_number":250,"context_line":"                rates_mbps[_type] \u003d vf[_type]"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        LOG.debug(\u0027Setting %s limits (in Mbps) for port VF %s\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"67f12e7a_b145451c","line":249,"range":{"start_line":249,"start_character":12,"end_line":249,"end_character":78},"in_reply_to":"5591b37f_7072c8ad","updated":"2022-03-07 06:53:40.000000000","message":"ok makes sense then.","commit_id":"2a139f47bb93ed215da20ef3f5f036e4ceac5a91"}],"neutron/plugins/ml2/drivers/mech_sriov/agent/pci_lib.py":[{"author":{"_account_id":13861,"name":"yatin","email":"ykarel@redhat.com","username":"yatinkarel"},"change_message_id":"0f03fd1d8eb450a103fed8175adc5ba090e33a7f","unresolved":true,"context_lines":[{"line_number":94,"context_line":"    def set_vf_rate(self, vf_index, rates):"},{"line_number":95,"context_line":"        \"\"\"sets vf rates."},{"line_number":96,"context_line":"        @param vf_index: vf index"},{"line_number":97,"context_line":"        @param rates: dictionary with with rate type (str) and the value (int)"},{"line_number":98,"context_line":"                      in Mbps. Example:"},{"line_number":99,"context_line":"                        {\u0027max_tx_rate\u0027: 20, \u0027min_tx_rate\u0027: 10}"},{"line_number":100,"context_line":"                        {\u0027max_tx_rate\u0027: 30}"}],"source_content_type":"text/x-python","patch_set":1,"id":"9e31fb18_b27ad9dd","line":97,"range":{"start_line":97,"start_character":33,"end_line":97,"end_character":37},"updated":"2022-03-04 10:10:31.000000000","message":"extra","commit_id":"090b38d373992fda3f6a186d41fa6f9dc20899e1"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d63e358a38c69494b94172daef8ade45319ce1ba","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    def set_vf_rate(self, vf_index, rates):"},{"line_number":95,"context_line":"        \"\"\"sets vf rates."},{"line_number":96,"context_line":"        @param vf_index: vf index"},{"line_number":97,"context_line":"        @param rates: dictionary with with rate type (str) and the value (int)"},{"line_number":98,"context_line":"                      in Mbps. Example:"},{"line_number":99,"context_line":"                        {\u0027max_tx_rate\u0027: 20, \u0027min_tx_rate\u0027: 10}"},{"line_number":100,"context_line":"                        {\u0027max_tx_rate\u0027: 30}"}],"source_content_type":"text/x-python","patch_set":1,"id":"ef0a7fe7_37957d24","line":97,"range":{"start_line":97,"start_character":33,"end_line":97,"end_character":37},"in_reply_to":"9e31fb18_b27ad9dd","updated":"2022-03-04 13:52:30.000000000","message":"Done","commit_id":"090b38d373992fda3f6a186d41fa6f9dc20899e1"},{"author":{"_account_id":13861,"name":"yatin","email":"ykarel@redhat.com","username":"yatinkarel"},"change_message_id":"0f03fd1d8eb450a103fed8175adc5ba090e33a7f","unresolved":true,"context_lines":[{"line_number":103,"context_line":"        ip \u003d self.device(self.dev_name)"},{"line_number":104,"context_line":"        vf_config \u003d {\u0027vf\u0027: vf_index, \u0027rate\u0027: rates}"},{"line_number":105,"context_line":"        try:"},{"line_number":106,"context_line":"            ip.link.set_vf_feature(vf_config)"},{"line_number":107,"context_line":"        except ip_lib.InvalidArgument:"},{"line_number":108,"context_line":"            # NOTE(ralonsoh): some NICs do not support \"min_tx_rate\" parameter."},{"line_number":109,"context_line":"            # https://bugs.launchpad.net/neutron/+bug/1918464"}],"source_content_type":"text/x-python","patch_set":1,"id":"cc5d93bc_5d9eed62","line":106,"range":{"start_line":106,"start_character":19,"end_line":106,"end_character":45},"updated":"2022-03-04 10:10:31.000000000","message":"since now multiple property are set together, how would it be known which one failed? will it be logged that way.","commit_id":"090b38d373992fda3f6a186d41fa6f9dc20899e1"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"27f07cf5c6f15abf6d9a1a2eb882be06955a0bb0","unresolved":true,"context_lines":[{"line_number":103,"context_line":"        ip \u003d self.device(self.dev_name)"},{"line_number":104,"context_line":"        vf_config \u003d {\u0027vf\u0027: vf_index, \u0027rate\u0027: rates}"},{"line_number":105,"context_line":"        try:"},{"line_number":106,"context_line":"            ip.link.set_vf_feature(vf_config)"},{"line_number":107,"context_line":"        except ip_lib.InvalidArgument:"},{"line_number":108,"context_line":"            # NOTE(ralonsoh): some NICs do not support \"min_tx_rate\" parameter."},{"line_number":109,"context_line":"            # https://bugs.launchpad.net/neutron/+bug/1918464"}],"source_content_type":"text/x-python","patch_set":1,"id":"3df10958_ff21fc94","line":106,"range":{"start_line":106,"start_character":19,"end_line":106,"end_character":45},"in_reply_to":"14d95c59_541f8181","updated":"2022-03-08 10:35:29.000000000","message":"This is still valid. If we only set the min_tx_rate (and nothing is set in max_tx_rate), the only parameter passed will be min_tx_rate.\n\nAnd if we set both at the same time, this message will print \"rate\" variable but informs that \"min_tx_rate\" is not accepted by some NICs.","commit_id":"090b38d373992fda3f6a186d41fa6f9dc20899e1"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"53f5870ca38f9c20941d97fa090ca9d6375ead81","unresolved":true,"context_lines":[{"line_number":103,"context_line":"        ip \u003d self.device(self.dev_name)"},{"line_number":104,"context_line":"        vf_config \u003d {\u0027vf\u0027: vf_index, \u0027rate\u0027: rates}"},{"line_number":105,"context_line":"        try:"},{"line_number":106,"context_line":"            ip.link.set_vf_feature(vf_config)"},{"line_number":107,"context_line":"        except ip_lib.InvalidArgument:"},{"line_number":108,"context_line":"            # NOTE(ralonsoh): some NICs do not support \"min_tx_rate\" parameter."},{"line_number":109,"context_line":"            # https://bugs.launchpad.net/neutron/+bug/1918464"}],"source_content_type":"text/x-python","patch_set":1,"id":"14d95c59_541f8181","line":106,"range":{"start_line":106,"start_character":19,"end_line":106,"end_character":45},"in_reply_to":"83d90139_4faac6bb","updated":"2022-03-08 10:25:41.000000000","message":"+1. This log message below should be probably changed but this is nit which can be fixed in follow up patch.","commit_id":"090b38d373992fda3f6a186d41fa6f9dc20899e1"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d63e358a38c69494b94172daef8ade45319ce1ba","unresolved":true,"context_lines":[{"line_number":103,"context_line":"        ip \u003d self.device(self.dev_name)"},{"line_number":104,"context_line":"        vf_config \u003d {\u0027vf\u0027: vf_index, \u0027rate\u0027: rates}"},{"line_number":105,"context_line":"        try:"},{"line_number":106,"context_line":"            ip.link.set_vf_feature(vf_config)"},{"line_number":107,"context_line":"        except ip_lib.InvalidArgument:"},{"line_number":108,"context_line":"            # NOTE(ralonsoh): some NICs do not support \"min_tx_rate\" parameter."},{"line_number":109,"context_line":"            # https://bugs.launchpad.net/neutron/+bug/1918464"}],"source_content_type":"text/x-python","patch_set":1,"id":"83d90139_4faac6bb","line":106,"range":{"start_line":106,"start_character":19,"end_line":106,"end_character":45},"in_reply_to":"cc5d93bc_5d9eed62","updated":"2022-03-04 13:52:30.000000000","message":"This is, indeed, a good observation. I need to refactor this.","commit_id":"090b38d373992fda3f6a186d41fa6f9dc20899e1"},{"author":{"_account_id":13861,"name":"yatin","email":"ykarel@redhat.com","username":"yatinkarel"},"change_message_id":"0f03fd1d8eb450a103fed8175adc5ba090e33a7f","unresolved":true,"context_lines":[{"line_number":108,"context_line":"            # NOTE(ralonsoh): some NICs do not support \"min_tx_rate\" parameter."},{"line_number":109,"context_line":"            # https://bugs.launchpad.net/neutron/+bug/1918464"},{"line_number":110,"context_line":"            LOG.error(\u0027Device %(device)s does not support ip-link vf \u0027"},{"line_number":111,"context_line":"                      \u0027\"%(rate_type)s\" parameter.\u0027,"},{"line_number":112,"context_line":"                      {\u0027device\u0027: self.dev_name, \u0027rates\u0027: rates})"}],"source_content_type":"text/x-python","patch_set":1,"id":"db5a89a0_ddc4d5af","line":111,"range":{"start_line":111,"start_character":26,"end_line":111,"end_character":35},"updated":"2022-03-04 10:10:31.000000000","message":"rates","commit_id":"090b38d373992fda3f6a186d41fa6f9dc20899e1"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d63e358a38c69494b94172daef8ade45319ce1ba","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            # NOTE(ralonsoh): some NICs do not support \"min_tx_rate\" parameter."},{"line_number":109,"context_line":"            # https://bugs.launchpad.net/neutron/+bug/1918464"},{"line_number":110,"context_line":"            LOG.error(\u0027Device %(device)s does not support ip-link vf \u0027"},{"line_number":111,"context_line":"                      \u0027\"%(rate_type)s\" parameter.\u0027,"},{"line_number":112,"context_line":"                      {\u0027device\u0027: self.dev_name, \u0027rates\u0027: rates})"}],"source_content_type":"text/x-python","patch_set":1,"id":"1948f415_03e77a1c","line":111,"range":{"start_line":111,"start_character":26,"end_line":111,"end_character":35},"in_reply_to":"db5a89a0_ddc4d5af","updated":"2022-03-04 13:52:30.000000000","message":"Done","commit_id":"090b38d373992fda3f6a186d41fa6f9dc20899e1"}],"neutron/privileged/agent/linux/ip_lib.py":[{"author":{"_account_id":13861,"name":"yatin","email":"ykarel@redhat.com","username":"yatinkarel"},"change_message_id":"0f03fd1d8eb450a103fed8175adc5ba090e33a7f","unresolved":true,"context_lines":[{"line_number":354,"context_line":""},{"line_number":355,"context_line":"@privileged.link_cmd.entrypoint"},{"line_number":356,"context_line":"def set_link_vf_feature(device, namespace, vf_config):"},{"line_number":357,"context_line":"    return _run_iproute_link(\"set\", device, namespace\u003dnamespace, vf\u003dvf_config)"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"@privileged.link_cmd.entrypoint"}],"source_content_type":"text/x-python","patch_set":1,"id":"9de3a424_f61b93fc","line":357,"range":{"start_line":357,"start_character":30,"end_line":357,"end_character":33},"updated":"2022-03-04 10:10:31.000000000","message":"just wondering if any other command other than set can work for this use case? like update? i was not able to verify the vf settings locally as seems it needs some features enabled on nic.\nhttps://github.com/svinota/pyroute2/blob/master/pyroute2.core/pr2modules/iproute/linux.py#L1420","commit_id":"090b38d373992fda3f6a186d41fa6f9dc20899e1"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e82ae1c166211935495440318a4735d5f1f0832d","unresolved":true,"context_lines":[{"line_number":354,"context_line":""},{"line_number":355,"context_line":"@privileged.link_cmd.entrypoint"},{"line_number":356,"context_line":"def set_link_vf_feature(device, namespace, vf_config):"},{"line_number":357,"context_line":"    return _run_iproute_link(\"set\", device, namespace\u003dnamespace, vf\u003dvf_config)"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"@privileged.link_cmd.entrypoint"}],"source_content_type":"text/x-python","patch_set":1,"id":"5b86ecc2_7bacc78f","line":357,"range":{"start_line":357,"start_character":30,"end_line":357,"end_character":33},"in_reply_to":"3a95c06e_d65b5bc1","updated":"2022-03-04 16:02:14.000000000","message":"No, it doesn\u0027t work. \"set\" and \"update\" have the same behaviour.","commit_id":"090b38d373992fda3f6a186d41fa6f9dc20899e1"},{"author":{"_account_id":13861,"name":"yatin","email":"ykarel@redhat.com","username":"yatinkarel"},"change_message_id":"b55b453f4a4e59362ba10f00c3121a63c7fbcaa1","unresolved":true,"context_lines":[{"line_number":354,"context_line":""},{"line_number":355,"context_line":"@privileged.link_cmd.entrypoint"},{"line_number":356,"context_line":"def set_link_vf_feature(device, namespace, vf_config):"},{"line_number":357,"context_line":"    return _run_iproute_link(\"set\", device, namespace\u003dnamespace, vf\u003dvf_config)"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"@privileged.link_cmd.entrypoint"}],"source_content_type":"text/x-python","patch_set":1,"id":"e88040e5_266a398a","line":357,"range":{"start_line":357,"start_character":30,"end_line":357,"end_character":33},"in_reply_to":"5b86ecc2_7bacc78f","updated":"2022-03-07 05:37:36.000000000","message":"Thanks for checking.","commit_id":"090b38d373992fda3f6a186d41fa6f9dc20899e1"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d63e358a38c69494b94172daef8ade45319ce1ba","unresolved":true,"context_lines":[{"line_number":354,"context_line":""},{"line_number":355,"context_line":"@privileged.link_cmd.entrypoint"},{"line_number":356,"context_line":"def set_link_vf_feature(device, namespace, vf_config):"},{"line_number":357,"context_line":"    return _run_iproute_link(\"set\", device, namespace\u003dnamespace, vf\u003dvf_config)"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"@privileged.link_cmd.entrypoint"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a95c06e_d65b5bc1","line":357,"range":{"start_line":357,"start_character":30,"end_line":357,"end_character":33},"in_reply_to":"9de3a424_f61b93fc","updated":"2022-03-04 13:52:30.000000000","message":"I need to check this. If that works, that could simplify the code.","commit_id":"090b38d373992fda3f6a186d41fa6f9dc20899e1"}]}
