)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"984f14c1355a35a609488f70528237f6aacd0e2b","unresolved":false,"context_lines":[{"line_number":10,"context_line":"port on a netdev datapath is considered a DPDK representor port."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"[1] http://docs.openvswitch.org/en/latest/topics/dpdk/phy/#representors"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I78e7dadfa44ac7e0ba6c9f31b3070011e783589f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"dfbec78f_f8e3ab32","line":13,"updated":"2019-05-14 16:02:31.000000000","message":"can you also file a os-vif bug for this new feature.\nwe should also have a release note.\n\nalso is there a link to an approved blueprint/spec for this.\n\nfor os-vif we just use bugs to track new feature but this will need a blueprint in nova and an rfe bug in neturon to track them there if you ahve not already filed a spec fo this.","commit_id":"61ae06158d378eabada7a3a76f1ddec626a65522"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"d5122f3ba3b5b38202242a3151f14c8cb28341e6","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Adds support for OVS DPDK port representors[1], a direct"},{"line_number":10,"context_line":"port on a netdev datapath is considered a DPDK representor port."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Using VIFHostDevice object with netdev in it\u0027s profile means the port is"},{"line_number":13,"context_line":"a dpdk represetor port."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"[1] http://docs.openvswitch.org/en/latest/topics/dpdk/phy/#representors"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"bfb3d3c7_0dedeab5","line":12,"range":{"start_line":12,"start_character":42,"end_line":12,"end_character":46},"updated":"2019-05-31 09:23:35.000000000","message":"nit: its","commit_id":"86c9ed7333363bc559ca70577b1e801985cb5e1a"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"657ffc249c22ead9d74b993a99d912ab6004da33","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Adds support for OVS DPDK port representors[1], a direct"},{"line_number":10,"context_line":"port on a netdev datapath is considered a DPDK representor port."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Using VIFHostDevice object with netdev in it\u0027s profile means the port is"},{"line_number":13,"context_line":"a dpdk represetor port."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"[1] http://docs.openvswitch.org/en/latest/topics/dpdk/phy/#representors"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"9fb8cfa7_f93c23c9","line":12,"range":{"start_line":12,"start_character":42,"end_line":12,"end_character":46},"in_reply_to":"bfb3d3c7_0dedeab5","updated":"2019-06-11 13:18:16.000000000","message":"Done","commit_id":"86c9ed7333363bc559ca70577b1e801985cb5e1a"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"d5122f3ba3b5b38202242a3151f14c8cb28341e6","unresolved":false,"context_lines":[{"line_number":10,"context_line":"port on a netdev datapath is considered a DPDK representor port."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Using VIFHostDevice object with netdev in it\u0027s profile means the port is"},{"line_number":13,"context_line":"a dpdk represetor port."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"[1] http://docs.openvswitch.org/en/latest/topics/dpdk/phy/#representors"},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"bfb3d3c7_6d334663","line":13,"range":{"start_line":13,"start_character":2,"end_line":13,"end_character":17},"updated":"2019-05-31 09:23:35.000000000","message":"nit: DPDK representor\n(caps + spelling)","commit_id":"86c9ed7333363bc559ca70577b1e801985cb5e1a"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"657ffc249c22ead9d74b993a99d912ab6004da33","unresolved":false,"context_lines":[{"line_number":10,"context_line":"port on a netdev datapath is considered a DPDK representor port."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Using VIFHostDevice object with netdev in it\u0027s profile means the port is"},{"line_number":13,"context_line":"a dpdk represetor port."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"[1] http://docs.openvswitch.org/en/latest/topics/dpdk/phy/#representors"},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"9fb8cfa7_992e4790","line":13,"range":{"start_line":13,"start_character":2,"end_line":13,"end_character":17},"in_reply_to":"bfb3d3c7_6d334663","updated":"2019-06-11 13:18:16.000000000","message":"Done","commit_id":"86c9ed7333363bc559ca70577b1e801985cb5e1a"}],"vif_plug_ovs/constants.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a627440d94fe7c1e36051bf418446ed92c60de59","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"PLATFORM_LINUX \u003d \u0027linux2\u0027"},{"line_number":23,"context_line":"PLATFORM_WIN32 \u003d \u0027win32\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"OVS_DPDK \u003d \u0027dpdk\u0027"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"# Neutron dead VLAN."},{"line_number":28,"context_line":"DEAD_VLAN \u003d 4095"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_b87773a0","line":25,"range":{"start_line":24,"start_character":0,"end_line":25,"end_character":9},"updated":"2019-05-14 15:58:59.000000000","message":"this is confusing.\n\nwe shoudl either call it\nOVS_DPDK_INTERFACE_TYPE as we do for vhost user above or\njust use DPDK as the constant.","commit_id":"61ae06158d378eabada7a3a76f1ddec626a65522"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"76d3949cb96a7c990967d387e0b49881c5fc9f1e","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"PLATFORM_LINUX \u003d \u0027linux2\u0027"},{"line_number":23,"context_line":"PLATFORM_WIN32 \u003d \u0027win32\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"OVS_DPDK \u003d \u0027dpdk\u0027"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"# Neutron dead VLAN."},{"line_number":28,"context_line":"DEAD_VLAN \u003d 4095"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_2a50fb0a","line":25,"range":{"start_line":24,"start_character":0,"end_line":25,"end_character":9},"in_reply_to":"dfbec78f_b87773a0","updated":"2019-05-21 11:08:21.000000000","message":"Done","commit_id":"61ae06158d378eabada7a3a76f1ddec626a65522"}],"vif_plug_ovs/linux_net.py":[{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"28d9eb9ebd2cdef26d1db5373ee055798fcf5ee3","unresolved":false,"context_lines":[{"line_number":370,"context_line":"    if vf_num is None:"},{"line_number":371,"context_line":"        raise exception.PciDeviceNotFoundById(id\u003dpci_addr)"},{"line_number":372,"context_line":"    return vf_num"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"def get_dpdk_representor_port_name(pf_ifname, vf_num):"},{"line_number":376,"context_line":"    pf_func \u003d _get_pf_func(pf_ifname)"},{"line_number":377,"context_line":"    return \"dpdk_{PF_FUNC}_{VF_NUM}\".format("},{"line_number":378,"context_line":"        PF_FUNC\u003dpf_func, VF_NUM\u003dvf_num)"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfb3d3c7_4c9fe85e","line":378,"range":{"start_line":373,"start_character":0,"end_line":378,"end_character":39},"updated":"2019-05-23 08:52:48.000000000","message":"Unless there\u0027s a specific need to name the port on the switch something special, this is entirely unneeded.","commit_id":"9b76457cbd54ccd2dd9f6655fba965667a0665bd"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"3fdbb80df375720d8c8679f2e9f8413de4002372","unresolved":false,"context_lines":[{"line_number":370,"context_line":"    if vf_num is None:"},{"line_number":371,"context_line":"        raise exception.PciDeviceNotFoundById(id\u003dpci_addr)"},{"line_number":372,"context_line":"    return vf_num"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"def get_dpdk_representor_port_name(pf_ifname, vf_num):"},{"line_number":376,"context_line":"    pf_func \u003d _get_pf_func(pf_ifname)"},{"line_number":377,"context_line":"    return \"dpdk_{PF_FUNC}_{VF_NUM}\".format("},{"line_number":378,"context_line":"        PF_FUNC\u003dpf_func, VF_NUM\u003dvf_num)"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfb3d3c7_d8006e6a","line":378,"range":{"start_line":373,"start_character":0,"end_line":378,"end_character":39},"in_reply_to":"bfb3d3c7_0271b7e0","updated":"2019-05-23 11:51:53.000000000","message":"It could be re-created by something similar to:\nhttps://github.com/openstack/nova/blob/c7e9e667426a6d88d396a59cb40d30763a3265f9/nova/network/os_vif_util.py#L36\n\nthe prefix doesn\u0027t need to be \u0027nic\u0027, what about \u0027vfr\u0027?\nThis wil mean ports look like:  vfr123e4567-e8\n\nUsing the neutron port as a source of uniqueness helps a bit because I\u0027m not sure everything in the chain can handle OVS bridges with port names longer than 14 characters. Otherwise I\u0027d be happy with dpdk_0000_01_02_3 (the VF address).","commit_id":"9b76457cbd54ccd2dd9f6655fba965667a0665bd"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"3499de9df8985f2df4e052de94de3c24ad2621ed","unresolved":false,"context_lines":[{"line_number":370,"context_line":"    if vf_num is None:"},{"line_number":371,"context_line":"        raise exception.PciDeviceNotFoundById(id\u003dpci_addr)"},{"line_number":372,"context_line":"    return vf_num"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"def get_dpdk_representor_port_name(pf_ifname, vf_num):"},{"line_number":376,"context_line":"    pf_func \u003d _get_pf_func(pf_ifname)"},{"line_number":377,"context_line":"    return \"dpdk_{PF_FUNC}_{VF_NUM}\".format("},{"line_number":378,"context_line":"        PF_FUNC\u003dpf_func, VF_NUM\u003dvf_num)"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfb3d3c7_0271b7e0","line":378,"range":{"start_line":373,"start_character":0,"end_line":378,"end_character":39},"in_reply_to":"bfb3d3c7_4c9fe85e","updated":"2019-05-23 10:18:34.000000000","message":"Nova doesn\u0027t set vf_name for VIF VIFHostDevice we have to generate it here","commit_id":"9b76457cbd54ccd2dd9f6655fba965667a0665bd"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"e80ee861e42968895d5b842c4dc0ce0536eba65d","unresolved":false,"context_lines":[{"line_number":370,"context_line":"    if vf_num is None:"},{"line_number":371,"context_line":"        raise exception.PciDeviceNotFoundById(id\u003dpci_addr)"},{"line_number":372,"context_line":"    return vf_num"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"def get_dpdk_representor_port_name(pf_ifname, vf_num):"},{"line_number":376,"context_line":"    pf_func \u003d _get_pf_func(pf_ifname)"},{"line_number":377,"context_line":"    return \"dpdk_{PF_FUNC}_{VF_NUM}\".format("},{"line_number":378,"context_line":"        PF_FUNC\u003dpf_func, VF_NUM\u003dvf_num)"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfb3d3c7_b89eda51","line":378,"range":{"start_line":373,"start_character":0,"end_line":378,"end_character":39},"in_reply_to":"bfb3d3c7_4c9fe85e","updated":"2019-05-23 11:47:45.000000000","message":"same as tab device naming,\nhttps://github.com/openstack/nova/blob/master/nova/network/neutronv2/api.py#L2871","commit_id":"9b76457cbd54ccd2dd9f6655fba965667a0665bd"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"35e5568cb6b8341f0f5a0f974debb89168587de7","unresolved":false,"context_lines":[{"line_number":370,"context_line":"    if vf_num is None:"},{"line_number":371,"context_line":"        raise exception.PciDeviceNotFoundById(id\u003dpci_addr)"},{"line_number":372,"context_line":"    return vf_num"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"def get_dpdk_representor_port_name(pf_ifname, vf_num):"},{"line_number":376,"context_line":"    pf_func \u003d _get_pf_func(pf_ifname)"},{"line_number":377,"context_line":"    return \"dpdk_{PF_FUNC}_{VF_NUM}\".format("},{"line_number":378,"context_line":"        PF_FUNC\u003dpf_func, VF_NUM\u003dvf_num)"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfb3d3c7_1b5a5229","line":378,"range":{"start_line":373,"start_character":0,"end_line":378,"end_character":39},"in_reply_to":"bfb3d3c7_58febe37","updated":"2019-05-27 11:41:22.000000000","message":"i woudl prefer vfr\n\nolder versions of ovs-dpdk use ports which started\nwith dpdk to have  a special meaning.\n\ndpdk0 was the first ports in the array of dpdk physical ports\n\nso using a dpdk prefix for this type of port is not a good user experince as it break the name convention that was previously used in ovs.\n\n\nwe should not use the tap prefix in this case as it is misleading","commit_id":"9b76457cbd54ccd2dd9f6655fba965667a0665bd"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"80feb8a9e3c43cbefb158d1410824ee26e874f3b","unresolved":false,"context_lines":[{"line_number":370,"context_line":"    if vf_num is None:"},{"line_number":371,"context_line":"        raise exception.PciDeviceNotFoundById(id\u003dpci_addr)"},{"line_number":372,"context_line":"    return vf_num"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"def get_dpdk_representor_port_name(pf_ifname, vf_num):"},{"line_number":376,"context_line":"    pf_func \u003d _get_pf_func(pf_ifname)"},{"line_number":377,"context_line":"    return \"dpdk_{PF_FUNC}_{VF_NUM}\".format("},{"line_number":378,"context_line":"        PF_FUNC\u003dpf_func, VF_NUM\u003dvf_num)"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfb3d3c7_58febe37","line":378,"range":{"start_line":373,"start_character":0,"end_line":378,"end_character":39},"in_reply_to":"bfb3d3c7_d8006e6a","updated":"2019-05-26 09:19:10.000000000","message":"I think a good naming would be \"dpdk\"+port_id, then take the first 14 chars, \nhttps://review.opendev.org/#/c/658786/10/vif_plug_ovs/linux_\nnet.py@378","commit_id":"9b76457cbd54ccd2dd9f6655fba965667a0665bd"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e7e77b10ec762acf927ffe68c536bbea279832d0","unresolved":false,"context_lines":[{"line_number":374,"context_line":""},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"def get_dpdk_representor_port_name(port_id):"},{"line_number":377,"context_line":"    devname \u003d \"dpdk\" + port_id"},{"line_number":378,"context_line":"    return devname[:NIC_NAME_LEN]"}],"source_content_type":"text/x-python","patch_set":10,"id":"bfb3d3c7_1bf6d2fa","line":377,"range":{"start_line":377,"start_character":15,"end_line":377,"end_character":19},"updated":"2019-05-27 11:59:23.000000000","message":"i realised i started reving v9\n\nso ill start again. using dpdk as the prefix is confusing\nas dpdk+ a number was previously used in ovs-dpdk as an index into the list of dpdk phyical ports.\n\ni realise that this feature is reusing the dpdk interface type which is already a bad user experience but i dont want to compound that by implying that dpdk physical port will not be used by a vm by using the dpdk prefix\n\ni like jans previous suggestion of vfr.\ncan you update this to vfr.","commit_id":"bcd6bdf201ab89b3e2f73fa6cc2b41189148de1f"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"d5122f3ba3b5b38202242a3151f14c8cb28341e6","unresolved":false,"context_lines":[{"line_number":387,"context_line":"    :return: the PCI address of the PF"},{"line_number":388,"context_line":"    \"\"\""},{"line_number":389,"context_line":"    physfn_pci \u003d os.readlink(\"/sys/bus/pci/devices/%s/physfn\" % vf_pci)"},{"line_number":390,"context_line":"    t \u003d PCI_PATH_RE.search(physfn_pci)"},{"line_number":391,"context_line":"    pf_pci \u003d t.group(1)"},{"line_number":392,"context_line":"    return pf_pci"}],"source_content_type":"text/x-python","patch_set":12,"id":"bfb3d3c7_c8bd80b7","line":392,"range":{"start_line":390,"start_character":3,"end_line":392,"end_character":17},"updated":"2019-05-31 09:23:35.000000000","message":"while I applaud the gratuitous use of regular expressions everywhere, maybe this should be:\n\nreturn os.path.basename(physfn_pci)\n\n(would also prefer the variable to be called physfn_path)","commit_id":"86c9ed7333363bc559ca70577b1e801985cb5e1a"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"657ffc249c22ead9d74b993a99d912ab6004da33","unresolved":false,"context_lines":[{"line_number":387,"context_line":"    :return: the PCI address of the PF"},{"line_number":388,"context_line":"    \"\"\""},{"line_number":389,"context_line":"    physfn_pci \u003d os.readlink(\"/sys/bus/pci/devices/%s/physfn\" % vf_pci)"},{"line_number":390,"context_line":"    t \u003d PCI_PATH_RE.search(physfn_pci)"},{"line_number":391,"context_line":"    pf_pci \u003d t.group(1)"},{"line_number":392,"context_line":"    return pf_pci"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fb8cfa7_7c9ca1bf","line":392,"range":{"start_line":390,"start_character":3,"end_line":392,"end_character":17},"in_reply_to":"bfb3d3c7_c8bd80b7","updated":"2019-06-11 13:18:16.000000000","message":"Done","commit_id":"86c9ed7333363bc559ca70577b1e801985cb5e1a"}],"vif_plug_ovs/ovs.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a627440d94fe7c1e36051bf418446ed92c60de59","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def _plug_vf_dpdk(self, vif, instance_info):"},{"line_number":267,"context_line":"        self.ovsdb.ensure_ovs_bridge("},{"line_number":268,"context_line":"            vif.network.bridge, constants.OVS_DATAPATH_NETDEV)"},{"line_number":269,"context_line":"        pci_slot \u003d vif.dev_address"},{"line_number":270,"context_line":"        vf_num \u003d linux_net.get_vf_num_by_pci_address(pci_slot)"},{"line_number":271,"context_line":"        pf_ifname \u003d linux_net.get_ifname_by_pci_address("}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_fd45ddb4","line":268,"range":{"start_line":268,"start_character":32,"end_line":268,"end_character":61},"updated":"2019-05-14 15:58:59.000000000","message":"we shoudl call _get_vif_datapath_type and default to netdev rather then hard coding.\n\nwe should be doing that for _plug_vf_passthrough above too.","commit_id":"61ae06158d378eabada7a3a76f1ddec626a65522"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"76d3949cb96a7c990967d387e0b49881c5fc9f1e","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def _plug_vf_dpdk(self, vif, instance_info):"},{"line_number":267,"context_line":"        self.ovsdb.ensure_ovs_bridge("},{"line_number":268,"context_line":"            vif.network.bridge, constants.OVS_DATAPATH_NETDEV)"},{"line_number":269,"context_line":"        pci_slot \u003d vif.dev_address"},{"line_number":270,"context_line":"        vf_num \u003d linux_net.get_vf_num_by_pci_address(pci_slot)"},{"line_number":271,"context_line":"        pf_ifname \u003d linux_net.get_ifname_by_pci_address("}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_6a9113f1","line":268,"range":{"start_line":268,"start_character":32,"end_line":268,"end_character":61},"in_reply_to":"dfbec78f_fd45ddb4","updated":"2019-05-21 11:08:21.000000000","message":"Done","commit_id":"61ae06158d378eabada7a3a76f1ddec626a65522"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a627440d94fe7c1e36051bf418446ed92c60de59","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        self._create_vif_port(vif, representor, instance_info)"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def _plug_vf_dpdk(self, vif, instance_info):"},{"line_number":267,"context_line":"        self.ovsdb.ensure_ovs_bridge("},{"line_number":268,"context_line":"            vif.network.bridge, constants.OVS_DATAPATH_NETDEV)"},{"line_number":269,"context_line":"        pci_slot \u003d vif.dev_address"},{"line_number":270,"context_line":"        vf_num \u003d linux_net.get_vf_num_by_pci_address(pci_slot)"},{"line_number":271,"context_line":"        pf_ifname \u003d linux_net.get_ifname_by_pci_address("},{"line_number":272,"context_line":"            pci_slot, pf_interface\u003dTrue, switchdev\u003dTrue)"},{"line_number":273,"context_line":"        pf_pci, _ \u003d linux_net.get_function_by_ifname(pf_ifname)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"        self._create_vif_port("}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_ddf6d963","line":272,"range":{"start_line":267,"start_character":7,"end_line":272,"end_character":56},"updated":"2019-05-14 15:58:59.000000000","message":"a resonable amount of this is common with _plug_vf_passthough.\n\nwe might want to merge these instead like this\n\n\n    def _plug_vf(self, vif, instance_info):\n        datapath \u003d _get_vif_datapath_type(vif)\n\n        self.ovsdb.ensure_ovs_bridge(\n            vif.network.bridge, datapath)\n        pci_slot \u003d vif.dev_address\n        vf_num \u003d linux_net.get_vf_num_by_pci_address(pci_slot)\n        pf_ifname \u003d linux_net.get_ifname_by_pci_address(\n            pci_slot, pf_interface\u003dTrue, switchdev\u003dTrue)\n        if datapath \u003d\u003d constants.OVS_DATAPATH_NETDEV:\n            pf_pci, _ \u003d linux_net.get_function_by_ifname(pf_ifname)\n\n            self._create_vif_port(\n                vif,\n            \n          linux_net.get_dpdk_representor_port_name(pf_ifname, vf_num),\n                instance_info,\n                interface_type\u003dconstants.OVS_DPDK,\n                pf_pci\u003dpf_pci,\n                vf_num\u003dvf_num\n            )\n        else:\n            representor \u003d linux_net.get_representor_port(pf_ifname, vf_num)\n            linux_net.set_interface_state(representor, \u0027up\u0027)\n             self._create_vif_port(vif, representor, instance_info)\n\n\nyou can actully pull out more common code but you get the idea.\n\nthis is almost but not quite identical to the kernel representor ports.","commit_id":"61ae06158d378eabada7a3a76f1ddec626a65522"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"76d3949cb96a7c990967d387e0b49881c5fc9f1e","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        self._create_vif_port(vif, representor, instance_info)"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def _plug_vf_dpdk(self, vif, instance_info):"},{"line_number":267,"context_line":"        self.ovsdb.ensure_ovs_bridge("},{"line_number":268,"context_line":"            vif.network.bridge, constants.OVS_DATAPATH_NETDEV)"},{"line_number":269,"context_line":"        pci_slot \u003d vif.dev_address"},{"line_number":270,"context_line":"        vf_num \u003d linux_net.get_vf_num_by_pci_address(pci_slot)"},{"line_number":271,"context_line":"        pf_ifname \u003d linux_net.get_ifname_by_pci_address("},{"line_number":272,"context_line":"            pci_slot, pf_interface\u003dTrue, switchdev\u003dTrue)"},{"line_number":273,"context_line":"        pf_pci, _ \u003d linux_net.get_function_by_ifname(pf_ifname)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"        self._create_vif_port("}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_aa8b8bc0","line":272,"range":{"start_line":267,"start_character":7,"end_line":272,"end_character":56},"in_reply_to":"dfbec78f_ddf6d963","updated":"2019-05-21 11:08:21.000000000","message":"Done","commit_id":"61ae06158d378eabada7a3a76f1ddec626a65522"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a627440d94fe7c1e36051bf418446ed92c60de59","unresolved":false,"context_lines":[{"line_number":302,"context_line":"        elif isinstance(vif, objects.vif.VIFVHostUser):"},{"line_number":303,"context_line":"            self._plug_vhostuser(vif, instance_info)"},{"line_number":304,"context_line":"        elif isinstance(vif, objects.vif.VIFHostDevice):"},{"line_number":305,"context_line":"            if (\"datapath_type\" in vif.port_profile and"},{"line_number":306,"context_line":"                    vif.port_profile.datapath_type \u003d\u003d"},{"line_number":307,"context_line":"                    constants.OVS_DATAPATH_NETDEV):"},{"line_number":308,"context_line":"                self._plug_vf_dpdk(vif, instance_info)"},{"line_number":309,"context_line":"            else:"},{"line_number":310,"context_line":"                self._plug_vf_passthrough(vif, instance_info)"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_3d613506","line":307,"range":{"start_line":305,"start_character":16,"end_line":307,"end_character":50},"updated":"2019-05-14 15:58:59.000000000","message":"you could also do \nif(_get_vif_datapath_type(vif) \u003d\u003d constants.OVS_DATAPATH_NETDEV):\n\nwhich is a little cleaner.\n\nbut if you remve the new function and just extend the existing one this goes away entirely.","commit_id":"61ae06158d378eabada7a3a76f1ddec626a65522"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"76d3949cb96a7c990967d387e0b49881c5fc9f1e","unresolved":false,"context_lines":[{"line_number":302,"context_line":"        elif isinstance(vif, objects.vif.VIFVHostUser):"},{"line_number":303,"context_line":"            self._plug_vhostuser(vif, instance_info)"},{"line_number":304,"context_line":"        elif isinstance(vif, objects.vif.VIFHostDevice):"},{"line_number":305,"context_line":"            if (\"datapath_type\" in vif.port_profile and"},{"line_number":306,"context_line":"                    vif.port_profile.datapath_type \u003d\u003d"},{"line_number":307,"context_line":"                    constants.OVS_DATAPATH_NETDEV):"},{"line_number":308,"context_line":"                self._plug_vf_dpdk(vif, instance_info)"},{"line_number":309,"context_line":"            else:"},{"line_number":310,"context_line":"                self._plug_vf_passthrough(vif, instance_info)"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_2ac1dbe5","line":307,"range":{"start_line":305,"start_character":16,"end_line":307,"end_character":50},"in_reply_to":"dfbec78f_3d613506","updated":"2019-05-21 11:08:21.000000000","message":"Done","commit_id":"61ae06158d378eabada7a3a76f1ddec626a65522"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a627440d94fe7c1e36051bf418446ed92c60de59","unresolved":false,"context_lines":[{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    def _unplug_vf_dpdk(self, vif):"},{"line_number":358,"context_line":"        \"\"\"Remove port from OVS.\"\"\""},{"line_number":359,"context_line":"        pci_slot \u003d vif.dev_address"},{"line_number":360,"context_line":"        pf_ifname \u003d linux_net.get_ifname_by_pci_address("},{"line_number":361,"context_line":"            pci_slot, pf_interface\u003dTrue, switchdev\u003dTrue)"},{"line_number":362,"context_line":"        vf_num \u003d linux_net.get_vf_num_by_pci_address(pci_slot)"},{"line_number":363,"context_line":"        dev \u003d linux_net.get_dpdk_representor_port_name(pf_ifname, vf_num)"},{"line_number":364,"context_line":"        self.ovsdb.delete_ovs_vif_port("}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_9d162155","line":361,"range":{"start_line":359,"start_character":4,"end_line":361,"end_character":56},"updated":"2019-05-14 15:58:59.000000000","message":"again this is common to the kenel based approch so rather then add a new function its proably simpler to just just reuse _unplug_vf_passthrough and just brance on the datapath type.","commit_id":"61ae06158d378eabada7a3a76f1ddec626a65522"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"76d3949cb96a7c990967d387e0b49881c5fc9f1e","unresolved":false,"context_lines":[{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    def _unplug_vf_dpdk(self, vif):"},{"line_number":358,"context_line":"        \"\"\"Remove port from OVS.\"\"\""},{"line_number":359,"context_line":"        pci_slot \u003d vif.dev_address"},{"line_number":360,"context_line":"        pf_ifname \u003d linux_net.get_ifname_by_pci_address("},{"line_number":361,"context_line":"            pci_slot, pf_interface\u003dTrue, switchdev\u003dTrue)"},{"line_number":362,"context_line":"        vf_num \u003d linux_net.get_vf_num_by_pci_address(pci_slot)"},{"line_number":363,"context_line":"        dev \u003d linux_net.get_dpdk_representor_port_name(pf_ifname, vf_num)"},{"line_number":364,"context_line":"        self.ovsdb.delete_ovs_vif_port("}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_eab6638a","line":361,"range":{"start_line":359,"start_character":4,"end_line":361,"end_character":56},"in_reply_to":"dfbec78f_9d162155","updated":"2019-05-21 11:08:21.000000000","message":"Done","commit_id":"61ae06158d378eabada7a3a76f1ddec626a65522"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a627440d94fe7c1e36051bf418446ed92c60de59","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        elif isinstance(vif, objects.vif.VIFVHostUser):"},{"line_number":386,"context_line":"            self._unplug_vhostuser(vif, instance_info)"},{"line_number":387,"context_line":"        elif isinstance(vif, objects.vif.VIFHostDevice):"},{"line_number":388,"context_line":"            if (\"datapath_type\" in vif.port_profile and"},{"line_number":389,"context_line":"                    vif.port_profile.datapath_type \u003d\u003d"},{"line_number":390,"context_line":"                    constants.OVS_DATAPATH_NETDEV):"},{"line_number":391,"context_line":"                self._unplug_vf_dpdk(vif)"},{"line_number":392,"context_line":"            else:"},{"line_number":393,"context_line":"                self._unplug_vf_passthrough(vif, instance_info)"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_58119751","line":392,"range":{"start_line":388,"start_character":10,"end_line":392,"end_character":17},"updated":"2019-05-14 15:58:59.000000000","message":"same as above\ni would prefer that you either do \n\nif(_get_vif_datapath_type(vif) \u003d\u003d constants.OVS_DATAPATH_NETDEV):\n\nor merge the two unplug funtion in to one and remove this.","commit_id":"61ae06158d378eabada7a3a76f1ddec626a65522"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"76d3949cb96a7c990967d387e0b49881c5fc9f1e","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        elif isinstance(vif, objects.vif.VIFVHostUser):"},{"line_number":386,"context_line":"            self._unplug_vhostuser(vif, instance_info)"},{"line_number":387,"context_line":"        elif isinstance(vif, objects.vif.VIFHostDevice):"},{"line_number":388,"context_line":"            if (\"datapath_type\" in vif.port_profile and"},{"line_number":389,"context_line":"                    vif.port_profile.datapath_type \u003d\u003d"},{"line_number":390,"context_line":"                    constants.OVS_DATAPATH_NETDEV):"},{"line_number":391,"context_line":"                self._unplug_vf_dpdk(vif)"},{"line_number":392,"context_line":"            else:"},{"line_number":393,"context_line":"                self._unplug_vf_passthrough(vif, instance_info)"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_aab4eb80","line":392,"range":{"start_line":388,"start_character":10,"end_line":392,"end_character":17},"in_reply_to":"dfbec78f_58119751","updated":"2019-05-21 11:08:21.000000000","message":"Done","commit_id":"61ae06158d378eabada7a3a76f1ddec626a65522"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"373f138f7592a17a1e992ec02c0890dba7b9e428","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            representor \u003d linux_net.get_representor_port(pf_ifname, vf_num)"},{"line_number":265,"context_line":"            linux_net.set_interface_state(representor, \u0027up\u0027)"},{"line_number":266,"context_line":"            self._create_vif_port(vif, representor, instance_info)"},{"line_number":267,"context_line":"        else:"},{"line_number":268,"context_line":"            representor \u003d linux_net.get_dpdk_representor_port_name("},{"line_number":269,"context_line":"                pf_ifname, vf_num)"},{"line_number":270,"context_line":"            pf_pci, _ \u003d linux_net.get_function_by_ifname(pf_ifname)"},{"line_number":271,"context_line":"            self._create_vif_port("},{"line_number":272,"context_line":"                vif,"},{"line_number":273,"context_line":"                representor,"},{"line_number":274,"context_line":"                instance_info,"},{"line_number":275,"context_line":"                interface_type\u003dconstants.OVS_DPDK_INTERFACE_TYPE,"},{"line_number":276,"context_line":"                pf_pci\u003dpf_pci,"},{"line_number":277,"context_line":"                vf_num\u003dvf_num)"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    def plug(self, vif, instance_info):"},{"line_number":280,"context_line":"        if not hasattr(vif, \"port_profile\"):"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_b9138766","line":277,"range":{"start_line":267,"start_character":8,"end_line":277,"end_character":30},"updated":"2019-05-20 13:44:03.000000000","message":"elif datapath \u003d\u003d constants.OVS_DATAPATH_NETDEV:\n    ....\n    ....\nelse:\n    # Fail as its an unknown Datapath type ?\n\nfrom what i see, the datapath type is extracted from the osvif VIF profile (which in turn is derived from nova VIF...)\n\njust a thought, if a new datapath type is added in the future and os-vif does not support it, it may lead to incorrect plugging instead of just failing.","commit_id":"12665d820119641264d51dbd879ae3924d1f06de"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1f038852e0e2c7008a0482660e4f535b732b08b7","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            representor \u003d linux_net.get_representor_port(pf_ifname, vf_num)"},{"line_number":265,"context_line":"            linux_net.set_interface_state(representor, \u0027up\u0027)"},{"line_number":266,"context_line":"            self._create_vif_port(vif, representor, instance_info)"},{"line_number":267,"context_line":"        else:"},{"line_number":268,"context_line":"            representor \u003d linux_net.get_dpdk_representor_port_name("},{"line_number":269,"context_line":"                pf_ifname, vf_num)"},{"line_number":270,"context_line":"            pf_pci, _ \u003d linux_net.get_function_by_ifname(pf_ifname)"},{"line_number":271,"context_line":"            self._create_vif_port("},{"line_number":272,"context_line":"                vif,"},{"line_number":273,"context_line":"                representor,"},{"line_number":274,"context_line":"                instance_info,"},{"line_number":275,"context_line":"                interface_type\u003dconstants.OVS_DPDK_INTERFACE_TYPE,"},{"line_number":276,"context_line":"                pf_pci\u003dpf_pci,"},{"line_number":277,"context_line":"                vf_num\u003dvf_num)"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    def plug(self, vif, instance_info):"},{"line_number":280,"context_line":"        if not hasattr(vif, \"port_profile\"):"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_410db13c","line":277,"range":{"start_line":267,"start_character":8,"end_line":277,"end_character":30},"in_reply_to":"bfb3d3c7_b9138766","updated":"2019-05-20 14:53:01.000000000","message":"the datapath type originally comes from neutron and is then passed to nova and on the neutron side we restrict the possibel values\n\nhttps://github.com/openstack/neutron/blob/f2f5635e11a136980aa705de3f87f2eec562cd0a/neutron/conf/plugins/ml2/drivers/ovs_conf.py#L102-L107\n\nhowever before we had upstream support for vhost-user in ovs\novdk had userspce vhost whcih became vhost-cuse and we had a sperate dpdk datapath type so its not byond reason to assume that could happen again in the future.\n\nif upstream ovs was to add a new datapath type there would need to be other change in the ovs plugin and in the ovs ml2 driver to handel that.\n\novs on windows uses system by they way so we dont need to worry about that.\n\nim more or less neutral on this change.\ni will be fine with taking a more defensive approch and having an elif + explict fail on else but i also think it very unlikly that this will result in a bug in the future.\n\nor rather if a new datapath that supports vf represntors is added i expect that we will need to make change elsewhere too so we can fix all assumtion of only 2 datapath when we add support for the new one.","commit_id":"12665d820119641264d51dbd879ae3924d1f06de"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"373f138f7592a17a1e992ec02c0890dba7b9e428","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        datapath \u003d self._get_vif_datapath_type(vif)"},{"line_number":340,"context_line":"        if datapath \u003d\u003d constants.OVS_DATAPATH_SYSTEM:"},{"line_number":341,"context_line":"            representor \u003d linux_net.get_representor_port(pf_ifname, vf_num)"},{"line_number":342,"context_line":"        else:"},{"line_number":343,"context_line":"            representor \u003d linux_net.get_dpdk_representor_port_name("},{"line_number":344,"context_line":"                pf_ifname, vf_num)"},{"line_number":345,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_8b0e6ae3","line":342,"range":{"start_line":342,"start_character":8,"end_line":342,"end_character":13},"updated":"2019-05-20 13:44:03.000000000","message":"elif constants.OVS_DATAPATH_NETDEV:\n  ...\nelse:\n  # Fail ?\n\nis this a valid concern ? see my comment above","commit_id":"12665d820119641264d51dbd879ae3924d1f06de"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1f038852e0e2c7008a0482660e4f535b732b08b7","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        datapath \u003d self._get_vif_datapath_type(vif)"},{"line_number":340,"context_line":"        if datapath \u003d\u003d constants.OVS_DATAPATH_SYSTEM:"},{"line_number":341,"context_line":"            representor \u003d linux_net.get_representor_port(pf_ifname, vf_num)"},{"line_number":342,"context_line":"        else:"},{"line_number":343,"context_line":"            representor \u003d linux_net.get_dpdk_representor_port_name("},{"line_number":344,"context_line":"                pf_ifname, vf_num)"},{"line_number":345,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_44129f5a","line":342,"range":{"start_line":342,"start_character":8,"end_line":342,"end_character":13},"in_reply_to":"bfb3d3c7_8b0e6ae3","updated":"2019-05-20 14:53:01.000000000","message":"am its very unlikely but a new datapath could be intoduced.\n\nbut as i said if it was to happen there are several other places that would have to be updated so im not sure the more defensive approch is required.","commit_id":"12665d820119641264d51dbd879ae3924d1f06de"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"373f138f7592a17a1e992ec02c0890dba7b9e428","unresolved":false,"context_lines":[{"line_number":343,"context_line":"            representor \u003d linux_net.get_dpdk_representor_port_name("},{"line_number":344,"context_line":"                pf_ifname, vf_num)"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        # The representor interface can\u0027t be deleted because it bind the"},{"line_number":347,"context_line":"        # SR-IOV VF, therefore we just need to remove it from the ovs bridge"},{"line_number":348,"context_line":"        # and set the status to down"},{"line_number":349,"context_line":"        self.ovsdb.delete_ovs_vif_port("},{"line_number":350,"context_line":"            vif.network.bridge, representor, delete_netdev\u003dFalse)"},{"line_number":351,"context_line":"        if datapath \u003d\u003d constants.OVS_DATAPATH_SYSTEM:"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_8bdc2a47","line":348,"range":{"start_line":346,"start_character":7,"end_line":348,"end_character":36},"updated":"2019-05-20 13:44:03.000000000","message":"Today, if I understand correctly, this is relevant when datapath \u003d\u003d constants.OVS_DATAPATH_SYSTEM right ?\n\nthat is, in DPDK case, the representor is deleted when the port is deleted.\n\nid move the comment to be in the if block at L#351","commit_id":"12665d820119641264d51dbd879ae3924d1f06de"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"0d0d62b65836dd6d59ffa9f8554763a0a053f5d4","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                vif.port_profile.create_port):"},{"line_number":253,"context_line":"            self._create_vif_port(vif, vif.vif_name, instance_info)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    def _plug_vf(self, vif, instance_info):"},{"line_number":256,"context_line":"        datapath \u003d self._get_vif_datapath_type(vif)"},{"line_number":257,"context_line":"        self.ovsdb.ensure_ovs_bridge(vif.network.bridge, datapath)"},{"line_number":258,"context_line":"        pci_slot \u003d vif.dev_address"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_e9fd80b1","line":255,"range":{"start_line":255,"start_character":8,"end_line":255,"end_character":16},"updated":"2019-05-22 14:13:39.000000000","message":"note to self: _plug_vf_passthrough made sense at the time because only vfio passthrough plugging was supported by Nova. Since the os-vif plugin shouldn\u0027t really care about the Nova bit that much, this function rename makes sense.\n\nnote to other reviewers: there\u0027s talk on the OVS mailing list to bring virtio-forwarder into OVS dpdk. If that plug mode goes mainstream, then _plug_vf would be followed by _plug_virtio_forwarder for example.","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"0d0d62b65836dd6d59ffa9f8554763a0a053f5d4","unresolved":false,"context_lines":[{"line_number":255,"context_line":"    def _plug_vf(self, vif, instance_info):"},{"line_number":256,"context_line":"        datapath \u003d self._get_vif_datapath_type(vif)"},{"line_number":257,"context_line":"        self.ovsdb.ensure_ovs_bridge(vif.network.bridge, datapath)"},{"line_number":258,"context_line":"        pci_slot \u003d vif.dev_address"},{"line_number":259,"context_line":"        pf_ifname \u003d linux_net.get_ifname_by_pci_address("},{"line_number":260,"context_line":"            pci_slot, pf_interface\u003dTrue, switchdev\u003dTrue)"},{"line_number":261,"context_line":"        vf_num \u003d linux_net.get_vf_num_by_pci_address(pci_slot)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        if datapath \u003d\u003d constants.OVS_DATAPATH_SYSTEM:"},{"line_number":264,"context_line":"            representor \u003d linux_net.get_representor_port(pf_ifname, vf_num)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_89dde415","line":261,"range":{"start_line":258,"start_character":8,"end_line":261,"end_character":62},"updated":"2019-05-22 14:13:39.000000000","message":"note to self: clean up this section later - this lookup code needs to be in linux_net. It makes unit tests difficult being here.","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"247fe162575934957a9dfa0fe18ccf966549935d","unresolved":false,"context_lines":[{"line_number":255,"context_line":"    def _plug_vf(self, vif, instance_info):"},{"line_number":256,"context_line":"        datapath \u003d self._get_vif_datapath_type(vif)"},{"line_number":257,"context_line":"        self.ovsdb.ensure_ovs_bridge(vif.network.bridge, datapath)"},{"line_number":258,"context_line":"        pci_slot \u003d vif.dev_address"},{"line_number":259,"context_line":"        pf_ifname \u003d linux_net.get_ifname_by_pci_address("},{"line_number":260,"context_line":"            pci_slot, pf_interface\u003dTrue, switchdev\u003dTrue)"},{"line_number":261,"context_line":"        vf_num \u003d linux_net.get_vf_num_by_pci_address(pci_slot)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        if datapath \u003d\u003d constants.OVS_DATAPATH_SYSTEM:"},{"line_number":264,"context_line":"            representor \u003d linux_net.get_representor_port(pf_ifname, vf_num)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_692ade90","line":261,"range":{"start_line":258,"start_character":8,"end_line":261,"end_character":62},"in_reply_to":"bfb3d3c7_89dde415","updated":"2019-05-23 08:30:48.000000000","message":"pf_ifname is the netdev associated with the PF. This is because some NICs can have multiple netdevs generated by the same PF. get_ifname_by_pci_address called in this manner returns the the first netdev name of the PF device associated with the VF.\n\nFor example, this would be something like \u0027ens3\u0027, \u0027enp4s0\u0027 or \u0027p1p1\u0027 in some systems. If there is no netdev associated with the PF, a PciDeviceNotFoundById exception is raised.","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"247fe162575934957a9dfa0fe18ccf966549935d","unresolved":false,"context_lines":[{"line_number":265,"context_line":"            linux_net.set_interface_state(representor, \u0027up\u0027)"},{"line_number":266,"context_line":"            self._create_vif_port(vif, representor, instance_info)"},{"line_number":267,"context_line":"        else:"},{"line_number":268,"context_line":"            representor \u003d linux_net.get_dpdk_representor_port_name("},{"line_number":269,"context_line":"                pf_ifname, vf_num)"},{"line_number":270,"context_line":"            pf_pci, _ \u003d linux_net.get_function_by_ifname(pf_ifname)"},{"line_number":271,"context_line":"            self._create_vif_port("},{"line_number":272,"context_line":"                vif,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_acaa24cf","line":269,"range":{"start_line":268,"start_character":12,"end_line":269,"end_character":34},"updated":"2019-05-23 08:30:48.000000000","message":"At this point, the code will render \u0027dpdk_ens3_2\u0027 for ens3, VF2, for example.","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"3499de9df8985f2df4e052de94de3c24ad2621ed","unresolved":false,"context_lines":[{"line_number":265,"context_line":"            linux_net.set_interface_state(representor, \u0027up\u0027)"},{"line_number":266,"context_line":"            self._create_vif_port(vif, representor, instance_info)"},{"line_number":267,"context_line":"        else:"},{"line_number":268,"context_line":"            representor \u003d linux_net.get_dpdk_representor_port_name("},{"line_number":269,"context_line":"                pf_ifname, vf_num)"},{"line_number":270,"context_line":"            pf_pci, _ \u003d linux_net.get_function_by_ifname(pf_ifname)"},{"line_number":271,"context_line":"            self._create_vif_port("},{"line_number":272,"context_line":"                vif,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_625af34f","line":269,"range":{"start_line":268,"start_character":12,"end_line":269,"end_character":34},"in_reply_to":"bfb3d3c7_0c649021","updated":"2019-05-23 10:18:34.000000000","message":"that\u0027s true, what do you suggest for a naming convention?","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"1dbdc3a020a46a0e6d5a5c53bbf06f64b97f0e45","unresolved":false,"context_lines":[{"line_number":265,"context_line":"            linux_net.set_interface_state(representor, \u0027up\u0027)"},{"line_number":266,"context_line":"            self._create_vif_port(vif, representor, instance_info)"},{"line_number":267,"context_line":"        else:"},{"line_number":268,"context_line":"            representor \u003d linux_net.get_dpdk_representor_port_name("},{"line_number":269,"context_line":"                pf_ifname, vf_num)"},{"line_number":270,"context_line":"            pf_pci, _ \u003d linux_net.get_function_by_ifname(pf_ifname)"},{"line_number":271,"context_line":"            self._create_vif_port("},{"line_number":272,"context_line":"                vif,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_cc00b86a","line":269,"range":{"start_line":268,"start_character":12,"end_line":269,"end_character":34},"in_reply_to":"bfb3d3c7_acaa24cf","updated":"2019-05-23 08:46:15.000000000","message":"no, please see function get_dpdk_representor_port_name implementation[1].\n\nfirst thing we get function of ifname by calling _get_pf_func(pf_ifname)\nthen we put the function and the vm num into the required string format.\n\n[1] https://review.opendev.org/#/c/658786/8/vif_plug_ovs/linux_net.py@375","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"b39d65d0fe99561b86923bea13b22998e06c86aa","unresolved":false,"context_lines":[{"line_number":265,"context_line":"            linux_net.set_interface_state(representor, \u0027up\u0027)"},{"line_number":266,"context_line":"            self._create_vif_port(vif, representor, instance_info)"},{"line_number":267,"context_line":"        else:"},{"line_number":268,"context_line":"            representor \u003d linux_net.get_dpdk_representor_port_name("},{"line_number":269,"context_line":"                pf_ifname, vf_num)"},{"line_number":270,"context_line":"            pf_pci, _ \u003d linux_net.get_function_by_ifname(pf_ifname)"},{"line_number":271,"context_line":"            self._create_vif_port("},{"line_number":272,"context_line":"                vif,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_0c649021","line":269,"range":{"start_line":268,"start_character":12,"end_line":269,"end_character":34},"in_reply_to":"bfb3d3c7_cc00b86a","updated":"2019-05-23 08:53:51.000000000","message":"Yep, I see now, the coffee kicked in very late. However this would cause clashes when there are 2 or more NICs in the system, so it\u0027s not a good convention.","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"0d0d62b65836dd6d59ffa9f8554763a0a053f5d4","unresolved":false,"context_lines":[{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    def _unplug_vf(self, vif):"},{"line_number":334,"context_line":"        \"\"\"Remove port from OVS.\"\"\""},{"line_number":335,"context_line":"        pci_slot \u003d vif.dev_address"},{"line_number":336,"context_line":"        pf_ifname \u003d linux_net.get_ifname_by_pci_address(pci_slot,"},{"line_number":337,"context_line":"            pf_interface\u003dTrue, switchdev\u003dTrue)"},{"line_number":338,"context_line":"        vf_num \u003d linux_net.get_vf_num_by_pci_address(pci_slot)"},{"line_number":339,"context_line":"        datapath \u003d self._get_vif_datapath_type(vif)"},{"line_number":340,"context_line":"        if datapath \u003d\u003d constants.OVS_DATAPATH_SYSTEM:"},{"line_number":341,"context_line":"            representor \u003d linux_net.get_representor_port(pf_ifname, vf_num)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_29ccf85f","line":338,"range":{"start_line":335,"start_character":8,"end_line":338,"end_character":62},"updated":"2019-05-22 14:13:39.000000000","message":"note to self: cleanup this too.","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"28d9eb9ebd2cdef26d1db5373ee055798fcf5ee3","unresolved":false,"context_lines":[{"line_number":270,"context_line":"            pf_pci, _ \u003d linux_net.get_function_by_ifname(pf_ifname)"},{"line_number":271,"context_line":"            self._create_vif_port("},{"line_number":272,"context_line":"                vif,"},{"line_number":273,"context_line":"                representor,"},{"line_number":274,"context_line":"                instance_info,"},{"line_number":275,"context_line":"                interface_type\u003dconstants.OVS_DPDK_INTERFACE_TYPE,"},{"line_number":276,"context_line":"                pf_pci\u003dpf_pci,"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfb3d3c7_cc99986e","line":273,"range":{"start_line":273,"start_character":16,"end_line":273,"end_character":27},"updated":"2019-05-23 08:52:48.000000000","message":"This should be vif.vif_name","commit_id":"9b76457cbd54ccd2dd9f6655fba965667a0665bd"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"3499de9df8985f2df4e052de94de3c24ad2621ed","unresolved":false,"context_lines":[{"line_number":270,"context_line":"            pf_pci, _ \u003d linux_net.get_function_by_ifname(pf_ifname)"},{"line_number":271,"context_line":"            self._create_vif_port("},{"line_number":272,"context_line":"                vif,"},{"line_number":273,"context_line":"                representor,"},{"line_number":274,"context_line":"                instance_info,"},{"line_number":275,"context_line":"                interface_type\u003dconstants.OVS_DPDK_INTERFACE_TYPE,"},{"line_number":276,"context_line":"                pf_pci\u003dpf_pci,"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfb3d3c7_e2b82377","line":273,"range":{"start_line":273,"start_character":16,"end_line":273,"end_character":27},"in_reply_to":"bfb3d3c7_cc99986e","updated":"2019-05-23 10:18:34.000000000","message":"Nova doesn\u0027t set vf_name for VIF VIFHostDevice","commit_id":"9b76457cbd54ccd2dd9f6655fba965667a0665bd"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"28d9eb9ebd2cdef26d1db5373ee055798fcf5ee3","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                representor,"},{"line_number":274,"context_line":"                instance_info,"},{"line_number":275,"context_line":"                interface_type\u003dconstants.OVS_DPDK_INTERFACE_TYPE,"},{"line_number":276,"context_line":"                pf_pci\u003dpf_pci,"},{"line_number":277,"context_line":"                vf_num\u003dvf_num)"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    def plug(self, vif, instance_info):"},{"line_number":280,"context_line":"        if not hasattr(vif, \"port_profile\"):"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfb3d3c7_2cbcf4b9","line":277,"range":{"start_line":276,"start_character":16,"end_line":277,"end_character":29},"updated":"2019-05-23 08:52:48.000000000","message":"Since, the _actual_ representor info is passed through here.","commit_id":"9b76457cbd54ccd2dd9f6655fba965667a0665bd"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"28d9eb9ebd2cdef26d1db5373ee055798fcf5ee3","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        if datapath \u003d\u003d constants.OVS_DATAPATH_SYSTEM:"},{"line_number":341,"context_line":"            representor \u003d linux_net.get_representor_port(pf_ifname, vf_num)"},{"line_number":342,"context_line":"        else:"},{"line_number":343,"context_line":"            representor \u003d linux_net.get_dpdk_representor_port_name("},{"line_number":344,"context_line":"                pf_ifname, vf_num)"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        # The representor interface can\u0027t be deleted because it bind the"},{"line_number":347,"context_line":"        # SR-IOV VF, therefore we just need to remove it from the ovs bridge"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfb3d3c7_8cd160fe","line":344,"range":{"start_line":343,"start_character":26,"end_line":344,"end_character":34},"updated":"2019-05-23 08:52:48.000000000","message":"you can cheat by setting representor \u003d vif.vif_name here, but it\u0027ll probably be cleaner to slightly rework the logic.","commit_id":"9b76457cbd54ccd2dd9f6655fba965667a0665bd"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"3499de9df8985f2df4e052de94de3c24ad2621ed","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        if datapath \u003d\u003d constants.OVS_DATAPATH_SYSTEM:"},{"line_number":341,"context_line":"            representor \u003d linux_net.get_representor_port(pf_ifname, vf_num)"},{"line_number":342,"context_line":"        else:"},{"line_number":343,"context_line":"            representor \u003d linux_net.get_dpdk_representor_port_name("},{"line_number":344,"context_line":"                pf_ifname, vf_num)"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        # The representor interface can\u0027t be deleted because it bind the"},{"line_number":347,"context_line":"        # SR-IOV VF, therefore we just need to remove it from the ovs bridge"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfb3d3c7_c2addf31","line":344,"range":{"start_line":343,"start_character":26,"end_line":344,"end_character":34},"in_reply_to":"bfb3d3c7_8cd160fe","updated":"2019-05-23 10:18:34.000000000","message":"see comment above","commit_id":"9b76457cbd54ccd2dd9f6655fba965667a0665bd"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0965585fd11fcf808d4c8d2d3141d8cd3dd614c8","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        datapath \u003d self._get_vif_datapath_type(vif)"},{"line_number":257,"context_line":"        self.ovsdb.ensure_ovs_bridge(vif.network.bridge, datapath)"},{"line_number":258,"context_line":"        pci_slot \u003d vif.dev_address"},{"line_number":259,"context_line":"        pf_ifname \u003d linux_net.get_ifname_by_pci_address("},{"line_number":260,"context_line":"            pci_slot, pf_interface\u003dTrue, switchdev\u003dTrue)"},{"line_number":261,"context_line":"        vf_num \u003d linux_net.get_vf_num_by_pci_address(pci_slot)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        if datapath \u003d\u003d constants.OVS_DATAPATH_SYSTEM:"}],"source_content_type":"text/x-python","patch_set":10,"id":"bfb3d3c7_8d6f1391","line":260,"range":{"start_line":259,"start_character":8,"end_line":260,"end_character":56},"updated":"2019-05-23 16:36:29.000000000","message":"nit: this should be inside the if below as it is only used in the system case","commit_id":"bcd6bdf201ab89b3e2f73fa6cc2b41189148de1f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8439514dd93e9605ead5af286e256a8d0d20e8e3","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        datapath \u003d self._get_vif_datapath_type(vif)"},{"line_number":257,"context_line":"        self.ovsdb.ensure_ovs_bridge(vif.network.bridge, datapath)"},{"line_number":258,"context_line":"        pci_slot \u003d vif.dev_address"},{"line_number":259,"context_line":"        pf_ifname \u003d linux_net.get_ifname_by_pci_address("},{"line_number":260,"context_line":"            pci_slot, pf_interface\u003dTrue, switchdev\u003dTrue)"},{"line_number":261,"context_line":"        vf_num \u003d linux_net.get_vf_num_by_pci_address(pci_slot)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        if datapath \u003d\u003d constants.OVS_DATAPATH_SYSTEM:"}],"source_content_type":"text/x-python","patch_set":10,"id":"bfb3d3c7_fbe73eab","line":260,"range":{"start_line":259,"start_character":8,"end_line":260,"end_character":56},"in_reply_to":"bfb3d3c7_5b0c4aec","updated":"2019-05-27 12:31:29.000000000","message":"so reading the documentation \nhttp://docs.openvswitch.org/en/latest/topics/dpdk/phy/#representors\n\nit appears that at least based on the examples the intel nics would not require the pf to have a netdev.\ninfact since the examples show that the pf is bound to dpdk\nit would not have a netdev since they do not provide a biforcated driver.\n\ndoes melonox require the pf to still be bound to the kernel?","commit_id":"bcd6bdf201ab89b3e2f73fa6cc2b41189148de1f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"08fa8f46aedbdef3bb71aa12a62b4c5e5a520e4e","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        datapath \u003d self._get_vif_datapath_type(vif)"},{"line_number":257,"context_line":"        self.ovsdb.ensure_ovs_bridge(vif.network.bridge, datapath)"},{"line_number":258,"context_line":"        pci_slot \u003d vif.dev_address"},{"line_number":259,"context_line":"        pf_ifname \u003d linux_net.get_ifname_by_pci_address("},{"line_number":260,"context_line":"            pci_slot, pf_interface\u003dTrue, switchdev\u003dTrue)"},{"line_number":261,"context_line":"        vf_num \u003d linux_net.get_vf_num_by_pci_address(pci_slot)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        if datapath \u003d\u003d constants.OVS_DATAPATH_SYSTEM:"}],"source_content_type":"text/x-python","patch_set":10,"id":"bfb3d3c7_5aa17df7","line":260,"range":{"start_line":259,"start_character":8,"end_line":260,"end_character":56},"in_reply_to":"bfb3d3c7_74e57837","updated":"2019-05-29 14:38:22.000000000","message":"to get the VF index we can use: /sys/bus/pci/devices/\u003cpf_addr\u003e/virtfn\u003cN\u003e\n\nhttps://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-pci","commit_id":"bcd6bdf201ab89b3e2f73fa6cc2b41189148de1f"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"59cf97c463251a9535aa96630e50f94eea07dd68","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        datapath \u003d self._get_vif_datapath_type(vif)"},{"line_number":257,"context_line":"        self.ovsdb.ensure_ovs_bridge(vif.network.bridge, datapath)"},{"line_number":258,"context_line":"        pci_slot \u003d vif.dev_address"},{"line_number":259,"context_line":"        pf_ifname \u003d linux_net.get_ifname_by_pci_address("},{"line_number":260,"context_line":"            pci_slot, pf_interface\u003dTrue, switchdev\u003dTrue)"},{"line_number":261,"context_line":"        vf_num \u003d linux_net.get_vf_num_by_pci_address(pci_slot)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        if datapath \u003d\u003d constants.OVS_DATAPATH_SYSTEM:"}],"source_content_type":"text/x-python","patch_set":10,"id":"bfb3d3c7_f910b1aa","line":260,"range":{"start_line":259,"start_character":8,"end_line":260,"end_character":56},"in_reply_to":"bfb3d3c7_8d6f1391","updated":"2019-05-26 09:31:11.000000000","message":"no, it\u0027s being used in netdev @ line 270","commit_id":"bcd6bdf201ab89b3e2f73fa6cc2b41189148de1f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e7e77b10ec762acf927ffe68c536bbea279832d0","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        datapath \u003d self._get_vif_datapath_type(vif)"},{"line_number":257,"context_line":"        self.ovsdb.ensure_ovs_bridge(vif.network.bridge, datapath)"},{"line_number":258,"context_line":"        pci_slot \u003d vif.dev_address"},{"line_number":259,"context_line":"        pf_ifname \u003d linux_net.get_ifname_by_pci_address("},{"line_number":260,"context_line":"            pci_slot, pf_interface\u003dTrue, switchdev\u003dTrue)"},{"line_number":261,"context_line":"        vf_num \u003d linux_net.get_vf_num_by_pci_address(pci_slot)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        if datapath \u003d\u003d constants.OVS_DATAPATH_SYSTEM:"}],"source_content_type":"text/x-python","patch_set":10,"id":"bfb3d3c7_5b0c4aec","line":260,"range":{"start_line":259,"start_character":8,"end_line":260,"end_character":56},"in_reply_to":"bfb3d3c7_f910b1aa","updated":"2019-05-27 11:59:23.000000000","message":"oh to lookup the parent pci adress from its netdev name.\n\nthinking about this a little more will this work reliably?\n\ni was expecting the PF to be bound to a dpdk driver and added to ovs-dpdk directly so that vms that dont request harware offload can use the pf and vhost-user.\n\ni would also have expected the pf to be added so that it can be used when you need to fall back to the dpdk dataplane because an offload was not supported in hardware.\n\nin both cases you will want the pf to be added to the the br-ex and to do that correctly it will have to be added as a dpdk phyical port meaning it will be boundf to vfio-pci and will not have a kernel netdev associated with it.","commit_id":"bcd6bdf201ab89b3e2f73fa6cc2b41189148de1f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"4a2e859ace99e33ad730159098a906738896d983","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        datapath \u003d self._get_vif_datapath_type(vif)"},{"line_number":257,"context_line":"        self.ovsdb.ensure_ovs_bridge(vif.network.bridge, datapath)"},{"line_number":258,"context_line":"        pci_slot \u003d vif.dev_address"},{"line_number":259,"context_line":"        pf_ifname \u003d linux_net.get_ifname_by_pci_address("},{"line_number":260,"context_line":"            pci_slot, pf_interface\u003dTrue, switchdev\u003dTrue)"},{"line_number":261,"context_line":"        vf_num \u003d linux_net.get_vf_num_by_pci_address(pci_slot)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        if datapath \u003d\u003d constants.OVS_DATAPATH_SYSTEM:"}],"source_content_type":"text/x-python","patch_set":10,"id":"bfb3d3c7_74e57837","line":260,"range":{"start_line":259,"start_character":8,"end_line":260,"end_character":56},"in_reply_to":"bfb3d3c7_fbe73eab","updated":"2019-05-29 13:30:29.000000000","message":"This is a very good point.\nTo use mellanox NIC, PF needs to be bound to kernel as it works in a bifurcated driver model.[1]\n\nHowever the code should not assume this and extract the required information from another source (e.g /sys/bus/pci/devices/\u003cvf_addr\u003e/physfn  for VFs)\n\n[1]https://doc.dpdk.org/guides/linux_gsg/linux_drivers.html#bifurcated-driver","commit_id":"bcd6bdf201ab89b3e2f73fa6cc2b41189148de1f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e7e77b10ec762acf927ffe68c536bbea279832d0","unresolved":false,"context_lines":[{"line_number":272,"context_line":"                vif,"},{"line_number":273,"context_line":"                representor,"},{"line_number":274,"context_line":"                instance_info,"},{"line_number":275,"context_line":"                interface_type\u003dconstants.OVS_DPDK_INTERFACE_TYPE,"},{"line_number":276,"context_line":"                pf_pci\u003dpf_pci,"},{"line_number":277,"context_line":"                vf_num\u003dvf_num)"},{"line_number":278,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"bfb3d3c7_db203a4b","line":275,"range":{"start_line":275,"start_character":16,"end_line":275,"end_character":65},"updated":"2019-05-27 11:59:23.000000000","message":"do dpdk type interfaces still consume an entry in the vdev\u0027s array when created? im asking as that array defaults to 32 entries when ovs-dpdk is compiled and that will like cause issue if people try to scale this with multiple nics on the same host. that is not a problem with this patch but its a proablem that will need to be documented and we shoudl really be scudling on if that limit still exists and applies to these ports","commit_id":"bcd6bdf201ab89b3e2f73fa6cc2b41189148de1f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"08fa8f46aedbdef3bb71aa12a62b4c5e5a520e4e","unresolved":false,"context_lines":[{"line_number":272,"context_line":"                vif,"},{"line_number":273,"context_line":"                representor,"},{"line_number":274,"context_line":"                instance_info,"},{"line_number":275,"context_line":"                interface_type\u003dconstants.OVS_DPDK_INTERFACE_TYPE,"},{"line_number":276,"context_line":"                pf_pci\u003dpf_pci,"},{"line_number":277,"context_line":"                vf_num\u003dvf_num)"},{"line_number":278,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"bfb3d3c7_1a2465ae","line":275,"range":{"start_line":275,"start_character":16,"end_line":275,"end_character":65},"in_reply_to":"bfb3d3c7_db203a4b","updated":"2019-05-29 14:38:22.000000000","message":"did some digging on this, the limitation still exists.\nto support more that 32 entries, one will need to compile ovs-dpdk with a different CONFIG_RTE_MAX_ETHPORTS value.\n\nthis should be mentioned in release notes together with the minimal ovs-dpdk version that supports dpdk port representor.","commit_id":"bcd6bdf201ab89b3e2f73fa6cc2b41189148de1f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0965585fd11fcf808d4c8d2d3141d8cd3dd614c8","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        vf_num \u003d linux_net.get_vf_num_by_pci_address(pci_slot)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        if datapath \u003d\u003d constants.OVS_DATAPATH_SYSTEM:"},{"line_number":264,"context_line":"            representor \u003d linux_net.get_representor_port(pf_ifname, vf_num)"},{"line_number":265,"context_line":"            linux_net.set_interface_state(representor, \u0027up\u0027)"},{"line_number":266,"context_line":"            self._create_vif_port(vif, representor, instance_info)"},{"line_number":267,"context_line":"        else:"},{"line_number":268,"context_line":"            representor \u003d linux_net.get_dpdk_representor_port_name("},{"line_number":269,"context_line":"                vif.id)"},{"line_number":270,"context_line":"            pf_pci, _ \u003d linux_net.get_function_by_ifname(pf_ifname)"},{"line_number":271,"context_line":"            self._create_vif_port("},{"line_number":272,"context_line":"                vif,"},{"line_number":273,"context_line":"                representor,"},{"line_number":274,"context_line":"                instance_info,"},{"line_number":275,"context_line":"                interface_type\u003dconstants.OVS_DPDK_INTERFACE_TYPE,"},{"line_number":276,"context_line":"                pf_pci\u003dpf_pci,"},{"line_number":277,"context_line":"                vf_num\u003dvf_num)"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    def plug(self, vif, instance_info):"},{"line_number":280,"context_line":"        if not hasattr(vif, \"port_profile\"):"}],"source_content_type":"text/x-python","patch_set":10,"id":"bfb3d3c7_ad84570d","line":277,"range":{"start_line":264,"start_character":8,"end_line":277,"end_character":30},"updated":"2019-05-23 16:36:29.000000000","message":"nit: as a follow up i woudl be tempted to converg this more\n\nargs \u003d []\nkwargs \u003d {}\n\nif datapath \u003d\u003d constants.OVS_DATAPATH_SYSTEM:\n            pf_ifname \u003d linux_net.get_ifname_by_pci_address(\n            pci_slot, pf_interface\u003dTrue, switchdev\u003dTrue)\n            representor \u003d linux_net.get_representor_port(pf_ifname, vf_num)\n            linux_net.set_interface_state(representor, \u0027up\u0027)\n            args \u003d [vif, representor, instance_info]\n        else:\n            representor \u003d linux_net.get_dpdk_representor_port_name(\n                vif.id)\n            pf_pci, _ \u003d linux_net.get_function_by_ifname(pf_ifname)\n            args \u003d [vif, representor, instance_info]\n            kwargs \u003d  {\u0027interface_type\u0027: constants.OVS_DPDK_INTERFACE_TYPE,\u0027pf_pci\u0027: pf_pci, \u0027vf_num\u0027: vf_num}\nself._create_vif_port(*args, **kwargs)\n\nthat said at that point the if is basicaly two functions and i originally wanted to avoid that but we could make them two private fucntions that.","commit_id":"bcd6bdf201ab89b3e2f73fa6cc2b41189148de1f"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"d5122f3ba3b5b38202242a3151f14c8cb28341e6","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        # so this is not removed."},{"line_number":330,"context_line":"        self.ovsdb.delete_ovs_vif_port(vif.network.bridge, vif.vif_name)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def _unplug_vf(self, vif):"},{"line_number":333,"context_line":"        \"\"\"Remove port from OVS.\"\"\""},{"line_number":334,"context_line":"        datapath \u003d self._get_vif_datapath_type(vif)"},{"line_number":335,"context_line":"        if datapath \u003d\u003d constants.OVS_DATAPATH_SYSTEM:"}],"source_content_type":"text/x-python","patch_set":12,"id":"bfb3d3c7_880f8886","line":332,"range":{"start_line":332,"start_character":8,"end_line":332,"end_character":29},"updated":"2019-05-31 09:23:35.000000000","message":"sean-k-mooney: I just noticed that this method passed instance_info in the past (and ignored it...) Will this be an issue?","commit_id":"86c9ed7333363bc559ca70577b1e801985cb5e1a"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"854f2ea6b4bd39620342925d8ee7c1d49bc92681","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        # so this is not removed."},{"line_number":330,"context_line":"        self.ovsdb.delete_ovs_vif_port(vif.network.bridge, vif.vif_name)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def _unplug_vf(self, vif):"},{"line_number":333,"context_line":"        \"\"\"Remove port from OVS.\"\"\""},{"line_number":334,"context_line":"        datapath \u003d self._get_vif_datapath_type(vif)"},{"line_number":335,"context_line":"        if datapath \u003d\u003d constants.OVS_DATAPATH_SYSTEM:"}],"source_content_type":"text/x-python","patch_set":12,"id":"bfb3d3c7_ce2ca9ad","line":332,"range":{"start_line":332,"start_character":8,"end_line":332,"end_character":29},"in_reply_to":"bfb3d3c7_0ea5e1a1","updated":"2019-05-31 10:30:18.000000000","message":"ack, no objections from me either","commit_id":"86c9ed7333363bc559ca70577b1e801985cb5e1a"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6475c8c55012b4d71c0f55087063bd4e4916ad38","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        # so this is not removed."},{"line_number":330,"context_line":"        self.ovsdb.delete_ovs_vif_port(vif.network.bridge, vif.vif_name)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def _unplug_vf(self, vif):"},{"line_number":333,"context_line":"        \"\"\"Remove port from OVS.\"\"\""},{"line_number":334,"context_line":"        datapath \u003d self._get_vif_datapath_type(vif)"},{"line_number":335,"context_line":"        if datapath \u003d\u003d constants.OVS_DATAPATH_SYSTEM:"}],"source_content_type":"text/x-python","patch_set":12,"id":"bfb3d3c7_0ea5e1a1","line":332,"range":{"start_line":332,"start_character":8,"end_line":332,"end_character":29},"in_reply_to":"bfb3d3c7_880f8886","updated":"2019-05-31 09:58:43.000000000","message":"no this is a private function that is only called from within unplug so the external signature has not changed.\n\nif instnace_info is not needed we dont need to pass it.\nno one can inhrit form the the plugins so we can break people that way and all call sites to this internally have been updated so this is safe.","commit_id":"86c9ed7333363bc559ca70577b1e801985cb5e1a"}],"vif_plug_ovs/ovsdb/ovsdb_lib.py":[{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"373f138f7592a17a1e992ec02c0890dba7b9e428","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        return self.ovsdb.add_br(bridge, may_exist\u003dTrue,"},{"line_number":61,"context_line":"                                 datapath_type\u003ddatapath_type).execute()"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def create_ovs_vif_port(self, bridge, dev, iface_id, mac, instance_id,"},{"line_number":64,"context_line":"                            mtu\u003dNone, interface_type\u003dNone,"},{"line_number":65,"context_line":"                            vhost_server_path\u003dNone, tag\u003dNone,"},{"line_number":66,"context_line":"                            pf_pci\u003dNone, vf_num\u003dNone):"},{"line_number":67,"context_line":"        external_ids \u003d {\u0027iface-id\u0027: iface_id,"},{"line_number":68,"context_line":"                        \u0027iface-status\u0027: \u0027active\u0027,"},{"line_number":69,"context_line":"                        \u0027attached-mac\u0027: mac,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_4b7632db","line":66,"range":{"start_line":63,"start_character":0,"end_line":66,"end_character":54},"updated":"2019-05-20 13:44:03.000000000","message":"any chance to add a docstring ?, i think it\u0027s pretty much impossible at this point to use the method without being familiar with the implementation.\n\nalso some of the parameters cannot really co-exist right ? (e.g vhost-server-path and the DPDK repr port.)\nShould we separate the flows between OVS_DATAPATH_SYSTEM and OVS_DATAPATH_NETDEV ?","commit_id":"12665d820119641264d51dbd879ae3924d1f06de"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"76d3949cb96a7c990967d387e0b49881c5fc9f1e","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        return self.ovsdb.add_br(bridge, may_exist\u003dTrue,"},{"line_number":61,"context_line":"                                 datapath_type\u003ddatapath_type).execute()"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def create_ovs_vif_port(self, bridge, dev, iface_id, mac, instance_id,"},{"line_number":64,"context_line":"                            mtu\u003dNone, interface_type\u003dNone,"},{"line_number":65,"context_line":"                            vhost_server_path\u003dNone, tag\u003dNone,"},{"line_number":66,"context_line":"                            pf_pci\u003dNone, vf_num\u003dNone):"},{"line_number":67,"context_line":"        external_ids \u003d {\u0027iface-id\u0027: iface_id,"},{"line_number":68,"context_line":"                        \u0027iface-status\u0027: \u0027active\u0027,"},{"line_number":69,"context_line":"                        \u0027attached-mac\u0027: mac,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_8c942e46","line":66,"range":{"start_line":63,"start_character":0,"end_line":66,"end_character":54},"in_reply_to":"bfb3d3c7_4b7632db","updated":"2019-05-21 11:08:21.000000000","message":"doc string added.","commit_id":"12665d820119641264d51dbd879ae3924d1f06de"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1f038852e0e2c7008a0482660e4f535b732b08b7","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        return self.ovsdb.add_br(bridge, may_exist\u003dTrue,"},{"line_number":61,"context_line":"                                 datapath_type\u003ddatapath_type).execute()"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def create_ovs_vif_port(self, bridge, dev, iface_id, mac, instance_id,"},{"line_number":64,"context_line":"                            mtu\u003dNone, interface_type\u003dNone,"},{"line_number":65,"context_line":"                            vhost_server_path\u003dNone, tag\u003dNone,"},{"line_number":66,"context_line":"                            pf_pci\u003dNone, vf_num\u003dNone):"},{"line_number":67,"context_line":"        external_ids \u003d {\u0027iface-id\u0027: iface_id,"},{"line_number":68,"context_line":"                        \u0027iface-status\u0027: \u0027active\u0027,"},{"line_number":69,"context_line":"                        \u0027attached-mac\u0027: mac,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_6466c3f0","line":66,"range":{"start_line":63,"start_character":0,"end_line":66,"end_character":54},"in_reply_to":"bfb3d3c7_4b7632db","updated":"2019-05-20 14:53:01.000000000","message":"no i want to have a singel function for createing port across all datapaths.\n\nas for having a repsentor and vhost user path i think this is the wrong level to have that validation.\n\ni would prefer to keep this fucntion generic and push the validation to the client.","commit_id":"12665d820119641264d51dbd879ae3924d1f06de"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"2b39a052572ba9e600745281cd64de4fcf3f7083","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        return self.ovsdb.add_br(bridge, may_exist\u003dTrue,"},{"line_number":61,"context_line":"                                 datapath_type\u003ddatapath_type).execute()"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def create_ovs_vif_port(self, bridge, dev, iface_id, mac, instance_id,"},{"line_number":64,"context_line":"                            mtu\u003dNone, interface_type\u003dNone,"},{"line_number":65,"context_line":"                            vhost_server_path\u003dNone, tag\u003dNone,"},{"line_number":66,"context_line":"                            pf_pci\u003dNone, vf_num\u003dNone):"},{"line_number":67,"context_line":"        external_ids \u003d {\u0027iface-id\u0027: iface_id,"},{"line_number":68,"context_line":"                        \u0027iface-status\u0027: \u0027active\u0027,"},{"line_number":69,"context_line":"                        \u0027attached-mac\u0027: mac,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_d0896526","line":66,"range":{"start_line":63,"start_character":0,"end_line":66,"end_character":54},"in_reply_to":"bfb3d3c7_6466c3f0","updated":"2019-05-20 17:50:11.000000000","message":"in regards to separate flows i meant something like: \n\nsome common code\nif not dpdk:\n  do stuff\nelse\n  do other stuff\nsome more common code\n\nunder the same method.\n\nin any case with so many arguments id at least add a docstring.","commit_id":"12665d820119641264d51dbd879ae3924d1f06de"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"0d0d62b65836dd6d59ffa9f8554763a0a053f5d4","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        :param iface_id: port ID."},{"line_number":72,"context_line":"        :param mac: port MAC."},{"line_number":73,"context_line":"        :param instance_id: VM ID on which the port is attached to."},{"line_number":74,"context_line":"        :param mtu: transfer unit."},{"line_number":75,"context_line":"        :param interface_type: OVS interface type."},{"line_number":76,"context_line":"        if interface type is not dpdk then pf_pci and vf_num values are"},{"line_number":77,"context_line":"        ignored."}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_e91ca0c2","line":74,"range":{"start_line":74,"start_character":20,"end_line":74,"end_character":34},"updated":"2019-05-22 14:13:39.000000000","message":"This should possibly be \"port MTU.\"","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"d1a0957866ec6495d121be465bd330c3beb9a46d","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        :param iface_id: port ID."},{"line_number":72,"context_line":"        :param mac: port MAC."},{"line_number":73,"context_line":"        :param instance_id: VM ID on which the port is attached to."},{"line_number":74,"context_line":"        :param mtu: transfer unit."},{"line_number":75,"context_line":"        :param interface_type: OVS interface type."},{"line_number":76,"context_line":"        if interface type is not dpdk then pf_pci and vf_num values are"},{"line_number":77,"context_line":"        ignored."}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_f6030972","line":74,"range":{"start_line":74,"start_character":20,"end_line":74,"end_character":34},"in_reply_to":"bfb3d3c7_e91ca0c2","updated":"2019-05-23 07:34:21.000000000","message":"Done","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"0d0d62b65836dd6d59ffa9f8554763a0a053f5d4","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        :param instance_id: VM ID on which the port is attached to."},{"line_number":74,"context_line":"        :param mtu: transfer unit."},{"line_number":75,"context_line":"        :param interface_type: OVS interface type."},{"line_number":76,"context_line":"        if interface type is not dpdk then pf_pci and vf_num values are"},{"line_number":77,"context_line":"        ignored."},{"line_number":78,"context_line":"        :param vhost_server_path: path to socket file of vhost server."},{"line_number":79,"context_line":"        :param tag: OVS interface tag."}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_e9dfc0d3","line":76,"range":{"start_line":76,"start_character":33,"end_line":76,"end_character":37},"updated":"2019-05-22 14:13:39.000000000","message":"I\u0027d prefer styling this `\u0027dpdk\u0027` or `OVS_DPDK_INTERFACE_TYPE`\n\nAlso, I think `pf_pci` and `vf_num`","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"d1a0957866ec6495d121be465bd330c3beb9a46d","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        :param instance_id: VM ID on which the port is attached to."},{"line_number":74,"context_line":"        :param mtu: transfer unit."},{"line_number":75,"context_line":"        :param interface_type: OVS interface type."},{"line_number":76,"context_line":"        if interface type is not dpdk then pf_pci and vf_num values are"},{"line_number":77,"context_line":"        ignored."},{"line_number":78,"context_line":"        :param vhost_server_path: path to socket file of vhost server."},{"line_number":79,"context_line":"        :param tag: OVS interface tag."}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_162c9d00","line":76,"range":{"start_line":76,"start_character":33,"end_line":76,"end_character":37},"in_reply_to":"bfb3d3c7_e9dfc0d3","updated":"2019-05-23 07:34:21.000000000","message":"Done","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"0d0d62b65836dd6d59ffa9f8554763a0a053f5d4","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                               {\u0027vhost-server-path\u0027: vhost_server_path}))"},{"line_number":93,"context_line":"        if tag:"},{"line_number":94,"context_line":"            col_values.append((\u0027tag\u0027, tag))"},{"line_number":95,"context_line":"        if (interface_type \u003d\u003d constants.OVS_DPDK_INTERFACE_TYPE and"},{"line_number":96,"context_line":"                pf_pci and vf_num):"},{"line_number":97,"context_line":"            devargs_string \u003d \"{PF_PCI},representor\u003d[{VF_NUM}]\".format("},{"line_number":98,"context_line":"                PF_PCI\u003dpf_pci, VF_NUM\u003dvf_num)"},{"line_number":99,"context_line":"            col_values.append((\u0027options\u0027,"},{"line_number":100,"context_line":"                              {\u0027dpdk-devargs\u0027: devargs_string}))"},{"line_number":101,"context_line":"        with self.ovsdb.transaction() as txn:"},{"line_number":102,"context_line":"            txn.add(self.ovsdb.add_port(bridge, dev))"},{"line_number":103,"context_line":"            txn.add(self.ovsdb.db_set(\u0027Interface\u0027, dev, *col_values))"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_6ca8beda","line":100,"range":{"start_line":95,"start_character":8,"end_line":100,"end_character":64},"updated":"2019-05-22 14:13:39.000000000","message":"this specific code path doesn\u0027t have a unit test...\n\nWould you mind putting one in, similar to vif_plug_ovs/tests/unit/ovsdb/test_ovsdb_lib.py:test_create_ovs_vif_port ?\n\nMostly this is for illustrating the difference in how the two types of create-port calls would look. Currently, vhost-server-path and dpdk-devargs can be set, but it doesn\u0027t make sense to use them together.","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"d1a0957866ec6495d121be465bd330c3beb9a46d","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                               {\u0027vhost-server-path\u0027: vhost_server_path}))"},{"line_number":93,"context_line":"        if tag:"},{"line_number":94,"context_line":"            col_values.append((\u0027tag\u0027, tag))"},{"line_number":95,"context_line":"        if (interface_type \u003d\u003d constants.OVS_DPDK_INTERFACE_TYPE and"},{"line_number":96,"context_line":"                pf_pci and vf_num):"},{"line_number":97,"context_line":"            devargs_string \u003d \"{PF_PCI},representor\u003d[{VF_NUM}]\".format("},{"line_number":98,"context_line":"                PF_PCI\u003dpf_pci, VF_NUM\u003dvf_num)"},{"line_number":99,"context_line":"            col_values.append((\u0027options\u0027,"},{"line_number":100,"context_line":"                              {\u0027dpdk-devargs\u0027: devargs_string}))"},{"line_number":101,"context_line":"        with self.ovsdb.transaction() as txn:"},{"line_number":102,"context_line":"            txn.add(self.ovsdb.add_port(bridge, dev))"},{"line_number":103,"context_line":"            txn.add(self.ovsdb.db_set(\u0027Interface\u0027, dev, *col_values))"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_69b41e36","line":100,"range":{"start_line":95,"start_character":8,"end_line":100,"end_character":64},"in_reply_to":"bfb3d3c7_6ca8beda","updated":"2019-05-23 07:34:21.000000000","message":"Done","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"d5122f3ba3b5b38202242a3151f14c8cb28341e6","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        :param instance_id: VM ID on which the port is attached to."},{"line_number":74,"context_line":"        :param mtu: port MTU."},{"line_number":75,"context_line":"        :param interface_type: OVS interface type."},{"line_number":76,"context_line":"        if interface type is not `OVS_DPDK_INTERFACE_TYPE` then `pf_pci`"},{"line_number":77,"context_line":"        and `vf_num` values are ignored."},{"line_number":78,"context_line":"        :param vhost_server_path: path to socket file of vhost server."},{"line_number":79,"context_line":"        :param tag: OVS interface tag."},{"line_number":80,"context_line":"        :param pf_pci: PCI address of PF for dpdk representor port."}],"source_content_type":"text/x-python","patch_set":12,"id":"bfb3d3c7_2858dc85","line":77,"range":{"start_line":76,"start_character":8,"end_line":77,"end_character":40},"updated":"2019-05-31 09:23:35.000000000","message":"nit: Maybe this needs to be changed to a note. The logic in this function is that \"all three needs to be set otherwise the values are ignored\".","commit_id":"86c9ed7333363bc559ca70577b1e801985cb5e1a"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"657ffc249c22ead9d74b993a99d912ab6004da33","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        :param instance_id: VM ID on which the port is attached to."},{"line_number":74,"context_line":"        :param mtu: port MTU."},{"line_number":75,"context_line":"        :param interface_type: OVS interface type."},{"line_number":76,"context_line":"        if interface type is not `OVS_DPDK_INTERFACE_TYPE` then `pf_pci`"},{"line_number":77,"context_line":"        and `vf_num` values are ignored."},{"line_number":78,"context_line":"        :param vhost_server_path: path to socket file of vhost server."},{"line_number":79,"context_line":"        :param tag: OVS interface tag."},{"line_number":80,"context_line":"        :param pf_pci: PCI address of PF for dpdk representor port."}],"source_content_type":"text/x-python","patch_set":12,"id":"9fb8cfa7_824ed06c","line":77,"range":{"start_line":76,"start_character":8,"end_line":77,"end_character":40},"in_reply_to":"bfb3d3c7_2858dc85","updated":"2019-06-11 13:18:16.000000000","message":"Done","commit_id":"86c9ed7333363bc559ca70577b1e801985cb5e1a"}],"vif_plug_ovs/tests/unit/ovsdb/test_ovsdb_lib.py":[{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"28d9eb9ebd2cdef26d1db5373ee055798fcf5ee3","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        values \u003d [(\u0027external_ids\u0027, external_ids),"},{"line_number":133,"context_line":"                  (\u0027type\u0027, interface_type),"},{"line_number":134,"context_line":"                  (\u0027options\u0027, {\u0027dpdk-devargs\u0027:"},{"line_number":135,"context_line":"                               \u00270000:02:00.1,representor\u003d[0]\u0027})]"},{"line_number":136,"context_line":"        with mock.patch.object(self.br, \u0027update_device_mtu\u0027,"},{"line_number":137,"context_line":"                               return_value\u003dTrue) as mock_update_device_mtu, \\"},{"line_number":138,"context_line":"                mock.patch.object(self.br, \u0027_ovs_supports_mtu_requests\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfb3d3c7_6c442cb8","line":135,"range":{"start_line":135,"start_character":58,"end_line":135,"end_character":59},"updated":"2019-05-23 08:52:48.000000000","message":"note to self: This corresponds to pf_pci,representor\u003d[vf_num]","commit_id":"9b76457cbd54ccd2dd9f6655fba965667a0665bd"}],"vif_plug_ovs/tests/unit/test_linux_net.py":[{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"9e225b8cbe4cc4196e0f0ea0e55af1be1462a55e","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    @mock.patch.object(os.path, \u0027exists\u0027, return_value\u003dTrue)"},{"line_number":83,"context_line":"    @mock.patch.object(builtins, \u0027open\u0027)"},{"line_number":84,"context_line":"    def test__arp_filtering(self, mock_open, *args):"},{"line_number":85,"context_line":"        mock_open.side_effect \u003d mock.mock_open(read_data\u003dmock.Mock())"},{"line_number":86,"context_line":"        linux_net._arp_filtering(\"br0\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        mock_open.assert_has_calls(["}],"source_content_type":"text/x-python","patch_set":7,"id":"bfb3d3c7_8d5dfeea","side":"PARENT","line":85,"range":{"start_line":85,"start_character":47,"end_line":85,"end_character":68},"updated":"2019-05-21 21:05:03.000000000","message":"not sure why but assigning a Mock object to read_data produces a TypeError: \"initial_value must be str or None, not Mock\"[1]\n\n[1] http://logs.openstack.org/86/658786/6/check/openstack-tox-py27/ab0d3b4/testr_results.html.gz","commit_id":"983bfdee5024afc9fb3e7979b1219a58669bd401"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"0d0d62b65836dd6d59ffa9f8554763a0a053f5d4","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    @mock.patch.object(os.path, \u0027exists\u0027, return_value\u003dTrue)"},{"line_number":83,"context_line":"    @mock.patch.object(builtins, \u0027open\u0027)"},{"line_number":84,"context_line":"    def test__arp_filtering(self, mock_open, *args):"},{"line_number":85,"context_line":"        mock_open.side_effect \u003d mock.mock_open()"},{"line_number":86,"context_line":"        linux_net._arp_filtering(\"br0\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        mock_open.assert_has_calls(["}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_8963a41a","line":85,"range":{"start_line":85,"start_character":8,"end_line":85,"end_character":48},"updated":"2019-05-22 14:13:39.000000000","message":"I\u0027m confused where this slipped in....","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"785c5e1574015843c8739f9a912af2a933004c92","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    @mock.patch.object(os.path, \u0027exists\u0027, return_value\u003dTrue)"},{"line_number":83,"context_line":"    @mock.patch.object(builtins, \u0027open\u0027)"},{"line_number":84,"context_line":"    def test__arp_filtering(self, mock_open, *args):"},{"line_number":85,"context_line":"        mock_open.side_effect \u003d mock.mock_open()"},{"line_number":86,"context_line":"        linux_net._arp_filtering(\"br0\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        mock_open.assert_has_calls(["}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_8c95f2e6","line":85,"range":{"start_line":85,"start_character":8,"end_line":85,"end_character":48},"in_reply_to":"bfb3d3c7_8963a41a","updated":"2019-05-22 14:19:18.000000000","message":"If this is an issue on master this should be broken out into a separate patch...","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"d1a0957866ec6495d121be465bd330c3beb9a46d","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    @mock.patch.object(os.path, \u0027exists\u0027, return_value\u003dTrue)"},{"line_number":83,"context_line":"    @mock.patch.object(builtins, \u0027open\u0027)"},{"line_number":84,"context_line":"    def test__arp_filtering(self, mock_open, *args):"},{"line_number":85,"context_line":"        mock_open.side_effect \u003d mock.mock_open()"},{"line_number":86,"context_line":"        linux_net._arp_filtering(\"br0\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        mock_open.assert_has_calls(["}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_3699a11e","line":85,"range":{"start_line":85,"start_character":8,"end_line":85,"end_character":48},"in_reply_to":"bfb3d3c7_8c95f2e6","updated":"2019-05-23 07:34:21.000000000","message":"I see this issue on master when running unit tests locally but there are patches[1][2] that did pass on master which is strange.\n\n[1] https://review.opendev.org/#/c/656492/\n[2] https://review.opendev.org/#/c/655068/","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3b40a8f7915ddad89d7c9e51605fcb93349fb49f","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        mock_open.assert_called_once_with(exists_path, \u0027w\u0027)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    @mock.patch.object(os.path, \u0027exists\u0027, return_value\u003dTrue)"},{"line_number":83,"context_line":"    @mock.patch.object(builtins, \u0027open\u0027)"},{"line_number":84,"context_line":"    def test__arp_filtering(self, mock_open, *args):"},{"line_number":85,"context_line":"        mock_open.side_effect \u003d mock.mock_open()"},{"line_number":86,"context_line":"        linux_net._arp_filtering(\"br0\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"bfb3d3c7_fccdbcb6","line":83,"range":{"start_line":83,"start_character":4,"end_line":83,"end_character":40},"updated":"2019-05-30 11:08:04.000000000","message":"nit: the direct mocking of open has been raised as an anti pattern on irc recently.\n\nsince you are  modifying this it would be nice to clean it up while you are here. if you respin can you refactor it to use mock.mock_open as a context manager internally.","commit_id":"fd649ad5255cbb44270a5c75b4c5982121144d1b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3b40a8f7915ddad89d7c9e51605fcb93349fb49f","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    @mock.patch.object(os.path, \u0027exists\u0027, return_value\u003dTrue)"},{"line_number":83,"context_line":"    @mock.patch.object(builtins, \u0027open\u0027)"},{"line_number":84,"context_line":"    def test__arp_filtering(self, mock_open, *args):"},{"line_number":85,"context_line":"        mock_open.side_effect \u003d mock.mock_open()"},{"line_number":86,"context_line":"        linux_net._arp_filtering(\"br0\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        mock_open.assert_has_calls(["},{"line_number":89,"context_line":"            mock.call(\u0027/proc/sys/net/ipv4/conf/br0/arp_ignore\u0027, \u0027w\u0027),"},{"line_number":90,"context_line":"            mock.call(\u0027/proc/sys/net/ipv4/conf/br0/arp_announce\u0027, \u0027w\u0027)])"},{"line_number":91,"context_line":"        mock_open.side_effect.return_value.write.assert_has_calls(["},{"line_number":92,"context_line":"            mock.call(\u00271\u0027),"},{"line_number":93,"context_line":"            mock.call(\u00272\u0027)])"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    @mock.patch.object(ip_lib, \"delete\")"},{"line_number":96,"context_line":"    @mock.patch.object(ip_lib, \"exists\", return_value\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bfb3d3c7_5cbe48ff","line":93,"range":{"start_line":85,"start_character":8,"end_line":93,"end_character":28},"updated":"2019-05-30 11:08:04.000000000","message":"e.g. \n\nwith mock.mock_open() as mock_open:\n    linux_net._arp_filtering(\"br0\")\n    mock_open.assert_has_calls([\n            mock.call(\u0027/proc/sys/net/ipv4/conf/br0/arp_ignore\u0027, \u0027w\u0027),\n            mock.call(\u0027/proc/sys/net/ipv4/conf/br0/arp_announce\u0027, \u0027w\u0027)])\n    mock_open.side_effect.return_value.write.assert_has_calls([\n            mock.call(\u00271\u0027),\n            mock.call(\u00272\u0027)])","commit_id":"fd649ad5255cbb44270a5c75b4c5982121144d1b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"19109e8d6eae8ea5605b6cb9ca29c52126c25281","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    @mock.patch.object(os.path, \u0027exists\u0027, return_value\u003dTrue)"},{"line_number":83,"context_line":"    @mock.patch.object(builtins, \u0027open\u0027)"},{"line_number":84,"context_line":"    def test__arp_filtering(self, mock_open, *args):"},{"line_number":85,"context_line":"        mock_open.side_effect \u003d mock.mock_open()"},{"line_number":86,"context_line":"        linux_net._arp_filtering(\"br0\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        mock_open.assert_has_calls(["},{"line_number":89,"context_line":"            mock.call(\u0027/proc/sys/net/ipv4/conf/br0/arp_ignore\u0027, \u0027w\u0027),"},{"line_number":90,"context_line":"            mock.call(\u0027/proc/sys/net/ipv4/conf/br0/arp_announce\u0027, \u0027w\u0027)])"},{"line_number":91,"context_line":"        mock_open.side_effect.return_value.write.assert_has_calls(["},{"line_number":92,"context_line":"            mock.call(\u00271\u0027),"},{"line_number":93,"context_line":"            mock.call(\u00272\u0027)])"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    @mock.patch.object(ip_lib, \"delete\")"},{"line_number":96,"context_line":"    @mock.patch.object(ip_lib, \"exists\", return_value\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bfb3d3c7_6f44b047","line":93,"range":{"start_line":85,"start_character":8,"end_line":93,"end_character":28},"in_reply_to":"bfb3d3c7_5cbe48ff","updated":"2019-05-30 12:04:13.000000000","message":"we chatted a bit on irc and this does not actully work so im fine with is as it is.","commit_id":"fd649ad5255cbb44270a5c75b4c5982121144d1b"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"d5122f3ba3b5b38202242a3151f14c8cb28341e6","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    @mock.patch.object(os.path, \u0027exists\u0027, return_value\u003dTrue)"},{"line_number":83,"context_line":"    @mock.patch.object(builtins, \u0027open\u0027)"},{"line_number":84,"context_line":"    def test__arp_filtering(self, mock_open, *args):"},{"line_number":85,"context_line":"        mock_open.side_effect \u003d mock.mock_open()"},{"line_number":86,"context_line":"        linux_net._arp_filtering(\"br0\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        mock_open.assert_has_calls(["}],"source_content_type":"text/x-python","patch_set":12,"id":"bfb3d3c7_e8e2c49f","line":85,"range":{"start_line":85,"start_character":8,"end_line":85,"end_character":48},"updated":"2019-05-31 09:23:35.000000000","message":"this needs to be broken out in a separate patch.","commit_id":"86c9ed7333363bc559ca70577b1e801985cb5e1a"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"657ffc249c22ead9d74b993a99d912ab6004da33","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    @mock.patch.object(os.path, \u0027exists\u0027, return_value\u003dTrue)"},{"line_number":83,"context_line":"    @mock.patch.object(builtins, \u0027open\u0027)"},{"line_number":84,"context_line":"    def test__arp_filtering(self, mock_open, *args):"},{"line_number":85,"context_line":"        mock_open.side_effect \u003d mock.mock_open()"},{"line_number":86,"context_line":"        linux_net._arp_filtering(\"br0\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        mock_open.assert_has_calls(["}],"source_content_type":"text/x-python","patch_set":12,"id":"9fb8cfa7_9c8ab567","line":85,"range":{"start_line":85,"start_character":8,"end_line":85,"end_character":48},"in_reply_to":"bfb3d3c7_e8e2c49f","updated":"2019-06-11 13:18:16.000000000","message":"Done","commit_id":"86c9ed7333363bc559ca70577b1e801985cb5e1a"}],"vif_plug_ovs/tests/unit/test_plugin.py":[{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"373f138f7592a17a1e992ec02c0890dba7b9e428","unresolved":false,"context_lines":[{"line_number":499,"context_line":""},{"line_number":500,"context_line":"        get_ifname_by_pci_address.return_value \u003d \u0027eth0\u0027"},{"line_number":501,"context_line":"        get_vf_num_by_pci_address.return_value \u003d \u00272\u0027"},{"line_number":502,"context_line":"        get_function_by_ifname.return_value \u003d (\u00273\u0027, True)"},{"line_number":503,"context_line":"        get_dpdk_representor_port_name.return_value \u003d \u0027dpdk_3_2\u0027"},{"line_number":504,"context_line":"        calls \u003d {"},{"line_number":505,"context_line":"            \u0027ensure_ovs_bridge\u0027: [mock.call(\u0027br0\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_2e518cd9","line":502,"range":{"start_line":502,"start_character":48,"end_line":502,"end_character":49},"updated":"2019-05-20 13:44:03.000000000","message":"this should be a PCI address.","commit_id":"12665d820119641264d51dbd879ae3924d1f06de"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"76d3949cb96a7c990967d387e0b49881c5fc9f1e","unresolved":false,"context_lines":[{"line_number":499,"context_line":""},{"line_number":500,"context_line":"        get_ifname_by_pci_address.return_value \u003d \u0027eth0\u0027"},{"line_number":501,"context_line":"        get_vf_num_by_pci_address.return_value \u003d \u00272\u0027"},{"line_number":502,"context_line":"        get_function_by_ifname.return_value \u003d (\u00273\u0027, True)"},{"line_number":503,"context_line":"        get_dpdk_representor_port_name.return_value \u003d \u0027dpdk_3_2\u0027"},{"line_number":504,"context_line":"        calls \u003d {"},{"line_number":505,"context_line":"            \u0027ensure_ovs_bridge\u0027: [mock.call(\u0027br0\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_6ca9ba79","line":502,"range":{"start_line":502,"start_character":48,"end_line":502,"end_character":49},"in_reply_to":"bfb3d3c7_2e518cd9","updated":"2019-05-21 11:08:21.000000000","message":"no it is the function number,\nif PCI is 0000:02:00.1 then function is 1.","commit_id":"12665d820119641264d51dbd879ae3924d1f06de"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"5385fd02161b9cb46689337e9c94c51ff3a1e267","unresolved":false,"context_lines":[{"line_number":499,"context_line":""},{"line_number":500,"context_line":"        get_ifname_by_pci_address.return_value \u003d \u0027eth0\u0027"},{"line_number":501,"context_line":"        get_vf_num_by_pci_address.return_value \u003d \u00272\u0027"},{"line_number":502,"context_line":"        get_function_by_ifname.return_value \u003d (\u00273\u0027, True)"},{"line_number":503,"context_line":"        get_dpdk_representor_port_name.return_value \u003d \u0027dpdk_3_2\u0027"},{"line_number":504,"context_line":"        calls \u003d {"},{"line_number":505,"context_line":"            \u0027ensure_ovs_bridge\u0027: [mock.call(\u0027br0\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_7cbb8fc3","line":502,"range":{"start_line":502,"start_character":48,"end_line":502,"end_character":49},"in_reply_to":"bfb3d3c7_6ca9ba79","updated":"2019-05-22 12:04:06.000000000","message":"I was confusing this function with _get_pf_func.","commit_id":"12665d820119641264d51dbd879ae3924d1f06de"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"373f138f7592a17a1e992ec02c0890dba7b9e428","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        get_ifname_by_pci_address.return_value \u003d \u0027eth0\u0027"},{"line_number":501,"context_line":"        get_vf_num_by_pci_address.return_value \u003d \u00272\u0027"},{"line_number":502,"context_line":"        get_function_by_ifname.return_value \u003d (\u00273\u0027, True)"},{"line_number":503,"context_line":"        get_dpdk_representor_port_name.return_value \u003d \u0027dpdk_3_2\u0027"},{"line_number":504,"context_line":"        calls \u003d {"},{"line_number":505,"context_line":"            \u0027ensure_ovs_bridge\u0027: [mock.call(\u0027br0\u0027,"},{"line_number":506,"context_line":"                                  constants.OVS_DATAPATH_NETDEV)],"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_8e5998ff","line":503,"range":{"start_line":503,"start_character":55,"end_line":503,"end_character":64},"updated":"2019-05-20 13:44:03.000000000","message":"same as above, can we have a real life example ?","commit_id":"12665d820119641264d51dbd879ae3924d1f06de"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"76d3949cb96a7c990967d387e0b49881c5fc9f1e","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        get_ifname_by_pci_address.return_value \u003d \u0027eth0\u0027"},{"line_number":501,"context_line":"        get_vf_num_by_pci_address.return_value \u003d \u00272\u0027"},{"line_number":502,"context_line":"        get_function_by_ifname.return_value \u003d (\u00273\u0027, True)"},{"line_number":503,"context_line":"        get_dpdk_representor_port_name.return_value \u003d \u0027dpdk_3_2\u0027"},{"line_number":504,"context_line":"        calls \u003d {"},{"line_number":505,"context_line":"            \u0027ensure_ovs_bridge\u0027: [mock.call(\u0027br0\u0027,"},{"line_number":506,"context_line":"                                  constants.OVS_DATAPATH_NETDEV)],"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_acc81255","line":503,"range":{"start_line":503,"start_character":55,"end_line":503,"end_character":64},"in_reply_to":"bfb3d3c7_8e5998ff","updated":"2019-05-21 11:08:21.000000000","message":"this is a real life example.","commit_id":"12665d820119641264d51dbd879ae3924d1f06de"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"373f138f7592a17a1e992ec02c0890dba7b9e428","unresolved":false,"context_lines":[{"line_number":540,"context_line":"                                   get_dpdk_representor_port_name):"},{"line_number":541,"context_line":""},{"line_number":542,"context_line":"        get_ifname_by_pci_address.return_value \u003d \u0027eth0\u0027"},{"line_number":543,"context_line":"        get_vf_num_by_pci_address.return_value \u003d \u00272\u0027"},{"line_number":544,"context_line":"        get_dpdk_representor_port_name.return_value \u003d \u0027dpdk_3_2\u0027"},{"line_number":545,"context_line":"        calls \u003d {"},{"line_number":546,"context_line":"            \u0027get_ifname_by_pci_address\u0027: [mock.call(\u00270002:24:12.3\u0027,"},{"line_number":547,"context_line":"                                          pf_interface\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_8e275865","line":544,"range":{"start_line":543,"start_character":49,"end_line":544,"end_character":64},"updated":"2019-05-20 13:44:03.000000000","message":"lets have a real life example as unit tests have an additional role of documenting expected input/output of a method.","commit_id":"12665d820119641264d51dbd879ae3924d1f06de"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"f24551cf9f6377fa312e28b0f038d9f7903c039b","unresolved":false,"context_lines":[{"line_number":499,"context_line":""},{"line_number":500,"context_line":"        get_ifname_by_pci_address.return_value \u003d \u0027eth0\u0027"},{"line_number":501,"context_line":"        get_vf_num_by_pci_address.return_value \u003d \u00272\u0027"},{"line_number":502,"context_line":"        get_function_by_ifname.return_value \u003d (\u00270002:24:12.3\u0027, True)"},{"line_number":503,"context_line":"        get_dpdk_representor_port_name.return_value \u003d \u0027dpdk_3_2\u0027"},{"line_number":504,"context_line":"        calls \u003d {"},{"line_number":505,"context_line":"            \u0027ensure_ovs_bridge\u0027: [mock.call(\u0027br0\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_6c698c89","line":502,"range":{"start_line":502,"start_character":47,"end_line":502,"end_character":61},"updated":"2019-05-23 08:34:29.000000000","message":"Side note: I\u0027ve never seen a PF with a B:D:F where the function is non-zero.","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"1dbdc3a020a46a0e6d5a5c53bbf06f64b97f0e45","unresolved":false,"context_lines":[{"line_number":499,"context_line":""},{"line_number":500,"context_line":"        get_ifname_by_pci_address.return_value \u003d \u0027eth0\u0027"},{"line_number":501,"context_line":"        get_vf_num_by_pci_address.return_value \u003d \u00272\u0027"},{"line_number":502,"context_line":"        get_function_by_ifname.return_value \u003d (\u00270002:24:12.3\u0027, True)"},{"line_number":503,"context_line":"        get_dpdk_representor_port_name.return_value \u003d \u0027dpdk_3_2\u0027"},{"line_number":504,"context_line":"        calls \u003d {"},{"line_number":505,"context_line":"            \u0027ensure_ovs_bridge\u0027: [mock.call(\u0027br0\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_0cbd70d7","line":502,"range":{"start_line":502,"start_character":47,"end_line":502,"end_character":61},"in_reply_to":"bfb3d3c7_6c698c89","updated":"2019-05-23 08:46:15.000000000","message":"dual ports Mellanox NICs have a none zero function for its second port,\n# lspci | grep nox\n02:00.0 Ethernet controller: Mellanox Technologies MT27710 Family [ConnectX-4 Lx]\n02:00.1 Ethernet controller: Mellanox Technologies MT27710 Family [ConnectX-4 Lx]","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"0d0d62b65836dd6d59ffa9f8554763a0a053f5d4","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        get_ifname_by_pci_address.return_value \u003d \u0027eth0\u0027"},{"line_number":501,"context_line":"        get_vf_num_by_pci_address.return_value \u003d \u00272\u0027"},{"line_number":502,"context_line":"        get_function_by_ifname.return_value \u003d (\u00270002:24:12.3\u0027, True)"},{"line_number":503,"context_line":"        get_dpdk_representor_port_name.return_value \u003d \u0027dpdk_3_2\u0027"},{"line_number":504,"context_line":"        calls \u003d {"},{"line_number":505,"context_line":"            \u0027ensure_ovs_bridge\u0027: [mock.call(\u0027br0\u0027,"},{"line_number":506,"context_line":"                                  constants.OVS_DATAPATH_NETDEV)],"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_ccc9aa78","line":503,"range":{"start_line":503,"start_character":60,"end_line":503,"end_character":61},"updated":"2019-05-22 14:13:39.000000000","message":"This should also be the PCI address?","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"247fe162575934957a9dfa0fe18ccf966549935d","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        get_ifname_by_pci_address.return_value \u003d \u0027eth0\u0027"},{"line_number":501,"context_line":"        get_vf_num_by_pci_address.return_value \u003d \u00272\u0027"},{"line_number":502,"context_line":"        get_function_by_ifname.return_value \u003d (\u00270002:24:12.3\u0027, True)"},{"line_number":503,"context_line":"        get_dpdk_representor_port_name.return_value \u003d \u0027dpdk_3_2\u0027"},{"line_number":504,"context_line":"        calls \u003d {"},{"line_number":505,"context_line":"            \u0027ensure_ovs_bridge\u0027: [mock.call(\u0027br0\u0027,"},{"line_number":506,"context_line":"                                  constants.OVS_DATAPATH_NETDEV)],"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_2cd63451","line":503,"range":{"start_line":503,"start_character":60,"end_line":503,"end_character":61},"in_reply_to":"bfb3d3c7_56ac5533","updated":"2019-05-23 08:30:48.000000000","message":"Then this should be eth0? See my other note....","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"d1a0957866ec6495d121be465bd330c3beb9a46d","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        get_ifname_by_pci_address.return_value \u003d \u0027eth0\u0027"},{"line_number":501,"context_line":"        get_vf_num_by_pci_address.return_value \u003d \u00272\u0027"},{"line_number":502,"context_line":"        get_function_by_ifname.return_value \u003d (\u00270002:24:12.3\u0027, True)"},{"line_number":503,"context_line":"        get_dpdk_representor_port_name.return_value \u003d \u0027dpdk_3_2\u0027"},{"line_number":504,"context_line":"        calls \u003d {"},{"line_number":505,"context_line":"            \u0027ensure_ovs_bridge\u0027: [mock.call(\u0027br0\u0027,"},{"line_number":506,"context_line":"                                  constants.OVS_DATAPATH_NETDEV)],"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfb3d3c7_56ac5533","line":503,"range":{"start_line":503,"start_character":60,"end_line":503,"end_character":61},"in_reply_to":"bfb3d3c7_ccc9aa78","updated":"2019-05-23 07:34:21.000000000","message":"no, it is as it should be, the function of the pci, see https://review.opendev.org/#/c/658786/8/vif_plug_ovs/linux_net.py@375","commit_id":"daabeb0448fc8803a5334261e9c944fc25b37691"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3b40a8f7915ddad89d7c9e51605fcb93349fb49f","unresolved":false,"context_lines":[{"line_number":495,"context_line":"                                   get_dpdk_representor_port_name):"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"        pf_pci \u003d self.vif_ovs_vf_dpdk.dev_address"},{"line_number":498,"context_line":"        devname \u003d \u0027vfr1234\u0027"},{"line_number":499,"context_line":"        get_vf_num_by_pci_address.return_value \u003d \u00272\u0027"},{"line_number":500,"context_line":"        get_pf_pci_of_vf.return_value \u003d pf_pci"},{"line_number":501,"context_line":"        get_dpdk_representor_port_name.return_value \u003d devname"}],"source_content_type":"text/x-python","patch_set":11,"id":"bfb3d3c7_7cb22c4b","line":498,"range":{"start_line":498,"start_character":8,"end_line":498,"end_character":27},"updated":"2019-05-30 11:08:04.000000000","message":"nit: this isnt actully the format that will be produced\nso if you have to respin can you change this to an actual\nexample.\n\nit wont change the logic of this test but its nice to use real examples in tests.","commit_id":"fd649ad5255cbb44270a5c75b4c5982121144d1b"},{"author":{"_account_id":22948,"name":"Hamdy Khader","email":"hamdyk@mellanox.com","username":"hamdyk"},"change_message_id":"657ffc249c22ead9d74b993a99d912ab6004da33","unresolved":false,"context_lines":[{"line_number":495,"context_line":"                                   get_dpdk_representor_port_name):"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"        pf_pci \u003d self.vif_ovs_vf_dpdk.dev_address"},{"line_number":498,"context_line":"        devname \u003d \u0027vfr1234\u0027"},{"line_number":499,"context_line":"        get_vf_num_by_pci_address.return_value \u003d \u00272\u0027"},{"line_number":500,"context_line":"        get_pf_pci_of_vf.return_value \u003d pf_pci"},{"line_number":501,"context_line":"        get_dpdk_representor_port_name.return_value \u003d devname"}],"source_content_type":"text/x-python","patch_set":11,"id":"bfb3d3c7_7c1b0cc9","line":498,"range":{"start_line":498,"start_character":8,"end_line":498,"end_character":27},"in_reply_to":"bfb3d3c7_7cb22c4b","updated":"2019-06-11 13:18:16.000000000","message":"Done","commit_id":"fd649ad5255cbb44270a5c75b4c5982121144d1b"}]}
