)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"699a8b019224e42cdd7b245b81a70b16e0c4afe1","unresolved":false,"context_lines":[{"line_number":11,"context_line":"In case of DPDK representor port, Nova will pass through the VF PCI"},{"line_number":12,"context_line":"as a hostdev and os-vif should pass the MAC to ovs as it would be"},{"line_number":13,"context_line":"responsible for setting its MAC."},{"line_number":14,"context_line":"Moreover, update the MAC with a random generated one for the port"},{"line_number":15,"context_line":"before deleting it"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I5368c318cc0cfd7b5644d3da0dccbce7a48d6a85"},{"line_number":18,"context_line":"Closes-Bug: #1829734"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3fa7e38b_fefbbe11","line":15,"range":{"start_line":14,"start_character":0,"end_line":15,"end_character":18},"updated":"2019-12-29 10:12:32.000000000","message":"Can you elaborate more on why this is needed.\n\nwhen not using dpdk, libvirt does the mac cleanup.\nsince the VF is managed by libvirt\n\nwhen using DPDK, libvirt does not manage the VF so we need to cleanup MAC address in os-vif.","commit_id":"84dcc43451e151125cd52a2163acdf5f6da6f2f4"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"a44a4cc3a1379b716cbb3bb4cfc39a43f9d8e381","unresolved":false,"context_lines":[{"line_number":11,"context_line":"In case of DPDK representor port, Nova will pass through the VF PCI"},{"line_number":12,"context_line":"as a hostdev and os-vif should pass the MAC to ovs as it would be"},{"line_number":13,"context_line":"responsible for setting its MAC."},{"line_number":14,"context_line":"Moreover, update the MAC with a random generated one for the port"},{"line_number":15,"context_line":"before deleting it"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I5368c318cc0cfd7b5644d3da0dccbce7a48d6a85"},{"line_number":18,"context_line":"Closes-Bug: #1829734"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3fa7e38b_cf4f2e67","line":15,"range":{"start_line":14,"start_character":0,"end_line":15,"end_character":18},"in_reply_to":"3fa7e38b_fefbbe11","updated":"2019-12-30 13:25:33.000000000","message":"Done","commit_id":"84dcc43451e151125cd52a2163acdf5f6da6f2f4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"943955187e485e68d5782092f3db115d515bc1f9","unresolved":false,"context_lines":[{"line_number":17,"context_line":"in os-vif."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I5368c318cc0cfd7b5644d3da0dccbce7a48d6a85"},{"line_number":20,"context_line":"Closes-Bug: #1829734"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"3fa7e38b_b3005f6b","line":20,"range":{"start_line":20,"start_character":0,"end_line":20,"end_character":11},"updated":"2020-01-16 12:06:55.000000000","message":"nit: this is already closed against neutorn and not filed against os-vif\n\nso this should proably be related bug but its fine.\n\ni think when this patch merges os-vif will automatically get added to the but and marked as fix released.","commit_id":"399e3550886d091dcf022051da578d5a2c219654"}],"os_vif/utils.py":[{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"02e2e1995b3e2270662319150d93df7120ed2d7f","unresolved":false,"context_lines":[{"line_number":14,"context_line":"import random"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"def eth_random_mac(num\u003d6):"},{"line_number":18,"context_line":"    rand_mac \u003d [random.randrange(256) for _ in range(num)]"},{"line_number":19,"context_line":"    # Clear multicast bit"},{"line_number":20,"context_line":"    rand_mac[0] \u003d rand_mac[0] \u0026 0xfe"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_0a3e6625","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":26},"updated":"2020-01-07 08:52:36.000000000","message":"Note to self: this nicely mirrors the kernel\u0027s way of setting a random MAC, ref: https://elixir.bootlin.com/linux/v5.4.8/source/include/linux/etherdevice.h#L223","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"af1bc35a844fc5ddaf0314674a66a0e479c9d6f6","unresolved":false,"context_lines":[{"line_number":14,"context_line":"import random"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"def eth_random_mac(num\u003d6):"},{"line_number":18,"context_line":"    rand_mac \u003d [random.randrange(256) for _ in range(num)]"},{"line_number":19,"context_line":"    # Clear multicast bit"},{"line_number":20,"context_line":"    rand_mac[0] \u003d rand_mac[0] \u0026 0xfe"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_f63f2faf","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":26},"in_reply_to":"3fa7e38b_004f258c","updated":"2020-01-07 14:58:19.000000000","message":"it nicely mirrors because it was copied from kernel implementation :)","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a738d54d666d88c03ebd70433f5e7216021373f9","unresolved":false,"context_lines":[{"line_number":14,"context_line":"import random"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"def eth_random_mac(num\u003d6):"},{"line_number":18,"context_line":"    rand_mac \u003d [random.randrange(256) for _ in range(num)]"},{"line_number":19,"context_line":"    # Clear multicast bit"},{"line_number":20,"context_line":"    rand_mac[0] \u003d rand_mac[0] \u0026 0xfe"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_004f258c","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":26},"in_reply_to":"3fa7e38b_0a3e6625","updated":"2020-01-07 12:06:36.000000000","message":"i have not looked at this closely yet either but this was actully something that was conserning to me. im not sure im ok with this.","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"01ba6350a2ca3bf36219048459318460df5d38fb","unresolved":false,"context_lines":[{"line_number":14,"context_line":"import random"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"def eth_random_mac(num\u003d6):"},{"line_number":18,"context_line":"    rand_mac \u003d [random.randrange(256) for _ in range(num)]"},{"line_number":19,"context_line":"    # Clear multicast bit"},{"line_number":20,"context_line":"    rand_mac[0] \u003d rand_mac[0] \u0026 0xfe"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_6e13206a","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":26},"in_reply_to":"3fa7e38b_0d9e39b7","updated":"2020-01-13 12:05:46.000000000","message":"i would prefer a config option but i would be ok with either.\n\nthe reason i would prefer the config item is there is a second mac prefix that is used by neutron  for dvr and we wont be able to discover it the same way.\n\nbut ill leave it to you to decide. i would guess most people will not alther the default so we could choose a prefix that does not collide and has the relevent bits set. we could also document that the local assignment bit should be set and multicast bit should be cleared in any prefix provided but skip enforcement as you said. if we wanted to enforce it we could do a check in the os_vif initialisation.","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8547833896983ec1e955f40f35fe15211939128e","unresolved":false,"context_lines":[{"line_number":14,"context_line":"import random"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"def eth_random_mac(num\u003d6):"},{"line_number":18,"context_line":"    rand_mac \u003d [random.randrange(256) for _ in range(num)]"},{"line_number":19,"context_line":"    # Clear multicast bit"},{"line_number":20,"context_line":"    rand_mac[0] \u003d rand_mac[0] \u0026 0xfe"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_caa100aa","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":26},"in_reply_to":"3fa7e38b_2204a27d","updated":"2020-01-09 17:33:33.000000000","message":"so can i make another suggestion.\n\nim still a little uncomfortable with this being completely random but i could live with it as a defualt.\n\nneutron has a base mac config option for it mac adresses\n\nhttps://github.com/openstack/neutron/blob/9de86ddc4858ef2ae048e19c3b7ba13d185c58f5/neutron/conf/common.py#L43-L47\n\ni would be more comfortable with this is we looked at how they generated there mac adresses and did something similar with a slight different base mac prefix so that we could not collide? what do you think?","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"8d8d7f125565bc0d313980974c6a8312588b9fd1","unresolved":false,"context_lines":[{"line_number":14,"context_line":"import random"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"def eth_random_mac(num\u003d6):"},{"line_number":18,"context_line":"    rand_mac \u003d [random.randrange(256) for _ in range(num)]"},{"line_number":19,"context_line":"    # Clear multicast bit"},{"line_number":20,"context_line":"    rand_mac[0] \u003d rand_mac[0] \u0026 0xfe"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_0d9e39b7","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":26},"in_reply_to":"3fa7e38b_2d5535fa","updated":"2020-01-12 12:47:07.000000000","message":"I am ok with changing implementation to use random.getrandbits().\n\nif we have the neutron mac prefix, to ensure we dont hit a valid neutron address we shall xor the first 3 bytes with the prefix then clear multicast bit and set local assignment bit.\n\nif we go with config opt for os-vif ovs plugin, only the lower 3 bytes will be randomized, the upper 3 bytes shall be taken from the provided configuration option. no enforcement for multicast and local assignment bits will be performed.","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"a2851d4d122a322f81f4397ac41da8fc78f5f748","unresolved":false,"context_lines":[{"line_number":14,"context_line":"import random"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"def eth_random_mac(num\u003d6):"},{"line_number":18,"context_line":"    rand_mac \u003d [random.randrange(256) for _ in range(num)]"},{"line_number":19,"context_line":"    # Clear multicast bit"},{"line_number":20,"context_line":"    rand_mac[0] \u003d rand_mac[0] \u0026 0xfe"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_2204a27d","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":26},"in_reply_to":"3fa7e38b_3fd4bb1e","updated":"2020-01-07 17:01:22.000000000","message":"yea, a more accurate statement would be \"inspired\" by kernel :)\n\nbasically creating a 6 byte random buffer then clearing multicast bit and setting the locally administered bit.","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"6d67f2d4ea5025d62444e96c8b0f7d4023640dc6","unresolved":false,"context_lines":[{"line_number":14,"context_line":"import random"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"def eth_random_mac(num\u003d6):"},{"line_number":18,"context_line":"    rand_mac \u003d [random.randrange(256) for _ in range(num)]"},{"line_number":19,"context_line":"    # Clear multicast bit"},{"line_number":20,"context_line":"    rand_mac[0] \u003d rand_mac[0] \u0026 0xfe"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_35e32fa3","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":26},"in_reply_to":"3fa7e38b_6e13206a","updated":"2020-01-13 17:11:37.000000000","message":"Config opt it is then, was not aware of other mac prefixes thanks.\n\nonly downside of having a fixed prefix is a reduced range for random mac generation.","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"db9d25b63e3f6db7ea195832c6e1ea4e9986b194","unresolved":false,"context_lines":[{"line_number":14,"context_line":"import random"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"def eth_random_mac(num\u003d6):"},{"line_number":18,"context_line":"    rand_mac \u003d [random.randrange(256) for _ in range(num)]"},{"line_number":19,"context_line":"    # Clear multicast bit"},{"line_number":20,"context_line":"    rand_mac[0] \u003d rand_mac[0] \u0026 0xfe"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_3fd4bb1e","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":26},"in_reply_to":"3fa7e38b_7f11d34f","updated":"2020-01-07 16:06:31.000000000","message":"The kernel code uses a different algorithm (this function returns a formatted string and grabs a random byte one at a time). However, barring random number weirdness, it should functionally do the same thing.","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"c345185babd971c74962124e35afafe4deafcaa4","unresolved":false,"context_lines":[{"line_number":14,"context_line":"import random"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"def eth_random_mac(num\u003d6):"},{"line_number":18,"context_line":"    rand_mac \u003d [random.randrange(256) for _ in range(num)]"},{"line_number":19,"context_line":"    # Clear multicast bit"},{"line_number":20,"context_line":"    rand_mac[0] \u003d rand_mac[0] \u0026 0xfe"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_2d5535fa","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":26},"in_reply_to":"3fa7e38b_caa100aa","updated":"2020-01-12 12:29:07.000000000","message":"mac addresses are generated by neutron-lib, see [1],[2].\n(as a side note, looking at the implementation of [2] its seems like the more you call this method its going to take longer to generate a mac which is unique but not related to our discussion)\n\nsince the base_mac neutron configuration is only available on the controller node, we could either:\n\n1. read mac address of the VIF that\u0027s going to be unplugged and ensure first 3 bytes dont collide when generating mac (or maybe, to determine the prefix, do this for the first VIF only assuming module is loaded once).\n\n2. define config opt e.g cleanup_mac_prefix\n\nI personally prefer 1 as its implicit and does not require extra configurations what do you think?\n\n[1]https://github.com/openstack/neutron-lib/blob/bcb9c90072717cd1a3db161583c9581f7d49c1ac/neutron_lib/utils/net.py#L31\n[2]https://github.com/openstack/neutron-lib/blob/bcb9c90072717cd1a3db161583c9581f7d49c1ac/neutron_lib/utils/net.py#L49","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"7ee9dcb6a5041c97b8cac5878c0e8c05720c83b4","unresolved":false,"context_lines":[{"line_number":14,"context_line":"import random"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"def eth_random_mac(num\u003d6):"},{"line_number":18,"context_line":"    rand_mac \u003d [random.randrange(256) for _ in range(num)]"},{"line_number":19,"context_line":"    # Clear multicast bit"},{"line_number":20,"context_line":"    rand_mac[0] \u003d rand_mac[0] \u0026 0xfe"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_7f11d34f","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":26},"in_reply_to":"3fa7e38b_f63f2faf","updated":"2020-01-07 15:28:56.000000000","message":"if its actully copied for the kernel impelamtnion then it cant be used. that would be a gpl violation.","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"30a108516f0bd7fd533146320cc8172e89f3f7ba","unresolved":false,"context_lines":[{"line_number":17,"context_line":"def get_random_mac(base_mac):"},{"line_number":18,"context_line":"    \"\"\"Get a random MAC address string of the specified base format."},{"line_number":19,"context_line":"    The first 3 octets will remain unchanged and the others will be"},{"line_number":20,"context_line":"    randomly generated."},{"line_number":21,"context_line":"    :param base_mac: Base MAC address represented by an array of 6 strings/int"},{"line_number":22,"context_line":"    :returns: The MAC address string."},{"line_number":23,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_f746e656","line":20,"updated":"2020-01-14 17:46:59.000000000","message":"nit: newline here?","commit_id":"ea07e2797db1a2e2fcff60525ea2eea5bb58f649"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"3bba1efb51bfa4bb559b9504964f5b3114baed3c","unresolved":false,"context_lines":[{"line_number":17,"context_line":"def get_random_mac(base_mac):"},{"line_number":18,"context_line":"    \"\"\"Get a random MAC address string of the specified base format."},{"line_number":19,"context_line":"    The first 3 octets will remain unchanged and the others will be"},{"line_number":20,"context_line":"    randomly generated."},{"line_number":21,"context_line":"    :param base_mac: Base MAC address represented by an array of 6 strings/int"},{"line_number":22,"context_line":"    :returns: The MAC address string."},{"line_number":23,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_1db5d9ed","line":20,"in_reply_to":"3fa7e38b_f746e656","updated":"2020-01-15 10:00:21.000000000","message":"Done","commit_id":"ea07e2797db1a2e2fcff60525ea2eea5bb58f649"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9b879b25b908f44b79e77b2b950e1fac03ce049b","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    :returns: The MAC address string."},{"line_number":23,"context_line":"    \"\"\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    mac \u003d [int(base_mac[0], 16), int(base_mac[1], 16),"},{"line_number":26,"context_line":"           int(base_mac[2], 16), random.getrandbits(8),"},{"line_number":27,"context_line":"           random.getrandbits(8), random.getrandbits(8)]"},{"line_number":28,"context_line":"    return \u0027:\u0027.join([\"%02x\" % x for x in mac])"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_c02a1196","line":27,"range":{"start_line":25,"start_character":1,"end_line":27,"end_character":56},"updated":"2020-01-14 13:47:08.000000000","message":"this is a little bit ugly but i guess its fine.","commit_id":"ea07e2797db1a2e2fcff60525ea2eea5bb58f649"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9b879b25b908f44b79e77b2b950e1fac03ce049b","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    mac \u003d [int(base_mac[0], 16), int(base_mac[1], 16),"},{"line_number":26,"context_line":"           int(base_mac[2], 16), random.getrandbits(8),"},{"line_number":27,"context_line":"           random.getrandbits(8), random.getrandbits(8)]"},{"line_number":28,"context_line":"    return \u0027:\u0027.join([\"%02x\" % x for x in mac])"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"def set_mask(data, mask):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_c0453174","line":28,"range":{"start_line":28,"start_character":30,"end_line":28,"end_character":44},"updated":"2020-01-14 13:47:08.000000000","message":"nit: byte for byte in mac\n\nwe shoudl use good variable names","commit_id":"ea07e2797db1a2e2fcff60525ea2eea5bb58f649"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"3bba1efb51bfa4bb559b9504964f5b3114baed3c","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    mac \u003d [int(base_mac[0], 16), int(base_mac[1], 16),"},{"line_number":26,"context_line":"           int(base_mac[2], 16), random.getrandbits(8),"},{"line_number":27,"context_line":"           random.getrandbits(8), random.getrandbits(8)]"},{"line_number":28,"context_line":"    return \u0027:\u0027.join([\"%02x\" % x for x in mac])"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"def set_mask(data, mask):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_bdc9257b","line":28,"range":{"start_line":28,"start_character":30,"end_line":28,"end_character":44},"in_reply_to":"3fa7e38b_c0453174","updated":"2020-01-15 10:00:21.000000000","message":"Done","commit_id":"ea07e2797db1a2e2fcff60525ea2eea5bb58f649"}],"vif_plug_ovs/ovs.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c83cee17640e45af50b755468f5a38a92df330ac","unresolved":false,"context_lines":[{"line_number":279,"context_line":"                linux_net.set_vf_mac_address("},{"line_number":280,"context_line":"                    pf_ifname, int(vf_num), vif.address)"},{"line_number":281,"context_line":"            except exception.PciDeviceNotFoundById:"},{"line_number":282,"context_line":"                # @TODO(hamdyk): set MAC address for non-bifurcated driver."},{"line_number":283,"context_line":"                # could not find net device for the PCI, skipped setting"},{"line_number":284,"context_line":"                # MAC address."},{"line_number":285,"context_line":"                pass"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        self._create_vif_port(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_84dc0575","line":284,"range":{"start_line":282,"start_character":12,"end_line":284,"end_character":30},"updated":"2019-07-08 19:11:55.000000000","message":"if you move this todo up to the top of the try and reword to \n\n\"use ovs-vsctl set interface \u003cvf\u003e mac\u003d\u003cvif.address\u003e\"\n\nor something simlar i fine to proceed with this assuming\na.) we actully follow up with ovs and dpdk to make\n\"ovs-vsctl set interface dpdk_rep_port mac\u003dX\" work and\nsecond the nova team are ok with the direction of\nhttps://review.opendev.org/#/c/658785/\n\nthis feature is growing to the point were it almost should require a spec but if they are ok with that patch im ok to proceed with this as a bug.","commit_id":"dfccaa37af7e3c33675697bda2185e6b39ffa068"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9b879b25b908f44b79e77b2b950e1fac03ce049b","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                    help\u003d\u0027Controls if VIF should be isolated when plugged \u0027"},{"line_number":84,"context_line":"                    \u0027to the ovs bridge. This should only be set to True \u0027"},{"line_number":85,"context_line":"                    \u0027when using the neutron ovs ml2 agent.\u0027),"},{"line_number":86,"context_line":"        cfg.StrOpt(\u0027cleanup_bas_mac\u0027,"},{"line_number":87,"context_line":"                   default\u003d\u0027aa:16:3f:00:00:00\u0027,"},{"line_number":88,"context_line":"                   help\u003d\u0027The cleanup base MAC address will used for removed \u0027"},{"line_number":89,"context_line":"                   \u0027DPDK representor ports. \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_e0614d12","line":86,"range":{"start_line":86,"start_character":20,"end_line":86,"end_character":35},"updated":"2020-01-14 13:47:08.000000000","message":"cleanup_base_mac or cleanup_mac_prefix","commit_id":"ea07e2797db1a2e2fcff60525ea2eea5bb58f649"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"3bba1efb51bfa4bb559b9504964f5b3114baed3c","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                    help\u003d\u0027Controls if VIF should be isolated when plugged \u0027"},{"line_number":84,"context_line":"                    \u0027to the ovs bridge. This should only be set to True \u0027"},{"line_number":85,"context_line":"                    \u0027when using the neutron ovs ml2 agent.\u0027),"},{"line_number":86,"context_line":"        cfg.StrOpt(\u0027cleanup_bas_mac\u0027,"},{"line_number":87,"context_line":"                   default\u003d\u0027aa:16:3f:00:00:00\u0027,"},{"line_number":88,"context_line":"                   help\u003d\u0027The cleanup base MAC address will used for removed \u0027"},{"line_number":89,"context_line":"                   \u0027DPDK representor ports. \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_e3a5be02","line":86,"range":{"start_line":86,"start_character":20,"end_line":86,"end_character":35},"in_reply_to":"3fa7e38b_e0614d12","updated":"2020-01-15 10:00:21.000000000","message":"Done","commit_id":"ea07e2797db1a2e2fcff60525ea2eea5bb58f649"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9b879b25b908f44b79e77b2b950e1fac03ce049b","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                    \u0027to the ovs bridge. This should only be set to True \u0027"},{"line_number":85,"context_line":"                    \u0027when using the neutron ovs ml2 agent.\u0027),"},{"line_number":86,"context_line":"        cfg.StrOpt(\u0027cleanup_bas_mac\u0027,"},{"line_number":87,"context_line":"                   default\u003d\u0027aa:16:3f:00:00:00\u0027,"},{"line_number":88,"context_line":"                   help\u003d\u0027The cleanup base MAC address will used for removed \u0027"},{"line_number":89,"context_line":"                   \u0027DPDK representor ports. \u0027"},{"line_number":90,"context_line":"                   \u0027The first 3 octets will remain unchanged and the others \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_4718731e","line":87,"range":{"start_line":87,"start_character":28,"end_line":87,"end_character":45},"updated":"2020-01-14 13:47:08.000000000","message":"based on https://www.iana.org/assignments/ethernet-numbers/ethernet-numbers.xhtml#table-ethernet-numbers-2 and  https://tools.ietf.org/html/rfc7042#section-2.1\n\nthis default appares to comply with the requirements for local unicast mac addresses.\n\nthis places the adressin in the final unallocated range\n90-11-00 to FF-FF-FF\n\nwe could expand this to a larger value and allow more octets to be random in the future if needed.","commit_id":"ea07e2797db1a2e2fcff60525ea2eea5bb58f649"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"30a108516f0bd7fd533146320cc8172e89f3f7ba","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                    \u0027to the ovs bridge. This should only be set to True \u0027"},{"line_number":85,"context_line":"                    \u0027when using the neutron ovs ml2 agent.\u0027),"},{"line_number":86,"context_line":"        cfg.StrOpt(\u0027cleanup_bas_mac\u0027,"},{"line_number":87,"context_line":"                   default\u003d\u0027aa:16:3f:00:00:00\u0027,"},{"line_number":88,"context_line":"                   help\u003d\u0027The cleanup base MAC address will used for removed \u0027"},{"line_number":89,"context_line":"                   \u0027DPDK representor ports. \u0027"},{"line_number":90,"context_line":"                   \u0027The first 3 octets will remain unchanged and the others \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_d7208a9d","line":87,"range":{"start_line":87,"start_character":28,"end_line":87,"end_character":45},"in_reply_to":"3fa7e38b_4718731e","updated":"2020-01-14 17:46:59.000000000","message":"+1","commit_id":"ea07e2797db1a2e2fcff60525ea2eea5bb58f649"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"30a108516f0bd7fd533146320cc8172e89f3f7ba","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                    \u0027when using the neutron ovs ml2 agent.\u0027),"},{"line_number":86,"context_line":"        cfg.StrOpt(\u0027cleanup_bas_mac\u0027,"},{"line_number":87,"context_line":"                   default\u003d\u0027aa:16:3f:00:00:00\u0027,"},{"line_number":88,"context_line":"                   help\u003d\u0027The cleanup base MAC address will used for removed \u0027"},{"line_number":89,"context_line":"                   \u0027DPDK representor ports. \u0027"},{"line_number":90,"context_line":"                   \u0027The first 3 octets will remain unchanged and the others \u0027"},{"line_number":91,"context_line":"                   \u0027will be randomly generated. \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_1c196986","line":88,"range":{"start_line":88,"start_character":54,"end_line":88,"end_character":58},"updated":"2020-01-14 17:46:59.000000000","message":"nit: to be","commit_id":"ea07e2797db1a2e2fcff60525ea2eea5bb58f649"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"3bba1efb51bfa4bb559b9504964f5b3114baed3c","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                    \u0027when using the neutron ovs ml2 agent.\u0027),"},{"line_number":86,"context_line":"        cfg.StrOpt(\u0027cleanup_bas_mac\u0027,"},{"line_number":87,"context_line":"                   default\u003d\u0027aa:16:3f:00:00:00\u0027,"},{"line_number":88,"context_line":"                   help\u003d\u0027The cleanup base MAC address will used for removed \u0027"},{"line_number":89,"context_line":"                   \u0027DPDK representor ports. \u0027"},{"line_number":90,"context_line":"                   \u0027The first 3 octets will remain unchanged and the others \u0027"},{"line_number":91,"context_line":"                   \u0027will be randomly generated. \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_63feae05","line":88,"range":{"start_line":88,"start_character":54,"end_line":88,"end_character":58},"in_reply_to":"3fa7e38b_1c196986","updated":"2020-01-15 10:00:21.000000000","message":"Done","commit_id":"ea07e2797db1a2e2fcff60525ea2eea5bb58f649"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"30a108516f0bd7fd533146320cc8172e89f3f7ba","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                   \u0027If the default is going to be changed, make sure to that \u0027"},{"line_number":93,"context_line":"                   \u0027local assignment bit should be set and multicast bit \u0027"},{"line_number":94,"context_line":"                   \u0027should be cleared in any prefix provided \u0027"},{"line_number":95,"context_line":"                   \u0027To clear multicast bit do \"mac[0] \u0026 0xfe\" .\u0027"},{"line_number":96,"context_line":"                   \u0027To set local assignment bit (IEEE802) do \"mac[0] | 0x02\".\u0027)"},{"line_number":97,"context_line":"    )"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def __init__(self, config):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_5c25a1be","line":96,"range":{"start_line":95,"start_character":20,"end_line":96,"end_character":78},"updated":"2020-01-14 17:46:59.000000000","message":"these can be removed IMO, mcast and local bits location is common knowledge.","commit_id":"ea07e2797db1a2e2fcff60525ea2eea5bb58f649"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"3bba1efb51bfa4bb559b9504964f5b3114baed3c","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                   \u0027If the default is going to be changed, make sure to that \u0027"},{"line_number":93,"context_line":"                   \u0027local assignment bit should be set and multicast bit \u0027"},{"line_number":94,"context_line":"                   \u0027should be cleared in any prefix provided \u0027"},{"line_number":95,"context_line":"                   \u0027To clear multicast bit do \"mac[0] \u0026 0xfe\" .\u0027"},{"line_number":96,"context_line":"                   \u0027To set local assignment bit (IEEE802) do \"mac[0] | 0x02\".\u0027)"},{"line_number":97,"context_line":"    )"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def __init__(self, config):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_63278eb7","line":96,"range":{"start_line":95,"start_character":20,"end_line":96,"end_character":78},"in_reply_to":"3fa7e38b_5c25a1be","updated":"2020-01-15 10:00:21.000000000","message":"Done","commit_id":"ea07e2797db1a2e2fcff60525ea2eea5bb58f649"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"e1c06439cdf614266b09d41e863a11bec58233d0","unresolved":false,"context_lines":[{"line_number":89,"context_line":"                   \u0027DPDK representor ports. \u0027"},{"line_number":90,"context_line":"                   \u0027The first 3 octets will remain unchanged and the others \u0027"},{"line_number":91,"context_line":"                   \u0027will be randomly generated. \u0027"},{"line_number":92,"context_line":"                   \u0027If the default is going to be changed, make sure to that \u0027"},{"line_number":93,"context_line":"                   \u0027local assignment bit should be set and multicast bit \u0027"},{"line_number":94,"context_line":"                   \u0027should be cleared in any prefix provided \u0027)"},{"line_number":95,"context_line":"    )"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def __init__(self, config):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa7e38b_219bcb79","line":94,"range":{"start_line":92,"start_character":20,"end_line":94,"end_character":61},"updated":"2020-01-15 14:54:54.000000000","message":"small nit,\nI would phrase this differently:\n\na valid base MAC must have local assignment bit set and multicast bit cleared in the first octet.","commit_id":"3b5ab8e936dae7cd09b08c067b16c4bcd423baf8"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"366ef88e51d1dad06e69477ed550be61f72f578c","unresolved":false,"context_lines":[{"line_number":89,"context_line":"                   \u0027DPDK representor ports. \u0027"},{"line_number":90,"context_line":"                   \u0027The first 3 octets will remain unchanged and the others \u0027"},{"line_number":91,"context_line":"                   \u0027will be randomly generated. \u0027"},{"line_number":92,"context_line":"                   \u0027If the default is going to be changed, make sure to that \u0027"},{"line_number":93,"context_line":"                   \u0027local assignment bit should be set and multicast bit \u0027"},{"line_number":94,"context_line":"                   \u0027should be cleared in any prefix provided \u0027)"},{"line_number":95,"context_line":"    )"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def __init__(self, config):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa7e38b_90d68354","line":94,"range":{"start_line":92,"start_character":20,"end_line":94,"end_character":61},"in_reply_to":"3fa7e38b_219bcb79","updated":"2020-01-15 18:41:03.000000000","message":"Done","commit_id":"3b5ab8e936dae7cd09b08c067b16c4bcd423baf8"}],"vif_plug_ovs/ovsdb/impl_vsctl.py":[{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"699a8b019224e42cdd7b245b81a70b16e0c4afe1","unresolved":false,"context_lines":[{"line_number":372,"context_line":"    # op. Will try to find a better way to default this op to \u0027\u003d\u0027"},{"line_number":373,"context_line":"    for entry in col_values:"},{"line_number":374,"context_line":"        if len(entry) \u003d\u003d 2:"},{"line_number":375,"context_line":"            # Escape colons for tha MAC since it tries to parse it as JSON"},{"line_number":376,"context_line":"            # and colons throw it off"},{"line_number":377,"context_line":"            if entry[0] \u003d\u003d \u0027mac\u0027:"},{"line_number":378,"context_line":"                col, op, val \u003d entry[0], \u0027\u003d\u0027, entry[1].replace(\u0027:\u0027, \u0027\\:\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_db11345e","line":375,"range":{"start_line":375,"start_character":32,"end_line":375,"end_character":39},"updated":"2019-12-29 10:12:32.000000000","message":"nit for mac keyword","commit_id":"84dcc43451e151125cd52a2163acdf5f6da6f2f4"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"699a8b019224e42cdd7b245b81a70b16e0c4afe1","unresolved":false,"context_lines":[{"line_number":372,"context_line":"    # op. Will try to find a better way to default this op to \u0027\u003d\u0027"},{"line_number":373,"context_line":"    for entry in col_values:"},{"line_number":374,"context_line":"        if len(entry) \u003d\u003d 2:"},{"line_number":375,"context_line":"            # Escape colons for tha MAC since it tries to parse it as JSON"},{"line_number":376,"context_line":"            # and colons throw it off"},{"line_number":377,"context_line":"            if entry[0] \u003d\u003d \u0027mac\u0027:"},{"line_number":378,"context_line":"                col, op, val \u003d entry[0], \u0027\u003d\u0027, entry[1].replace(\u0027:\u0027, \u0027\\:\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_bb0c7844","line":375,"range":{"start_line":375,"start_character":46,"end_line":375,"end_character":48},"updated":"2019-12-29 10:12:32.000000000","message":"nit: ovs-vsctl command","commit_id":"84dcc43451e151125cd52a2163acdf5f6da6f2f4"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"a44a4cc3a1379b716cbb3bb4cfc39a43f9d8e381","unresolved":false,"context_lines":[{"line_number":372,"context_line":"    # op. Will try to find a better way to default this op to \u0027\u003d\u0027"},{"line_number":373,"context_line":"    for entry in col_values:"},{"line_number":374,"context_line":"        if len(entry) \u003d\u003d 2:"},{"line_number":375,"context_line":"            # Escape colons for tha MAC since it tries to parse it as JSON"},{"line_number":376,"context_line":"            # and colons throw it off"},{"line_number":377,"context_line":"            if entry[0] \u003d\u003d \u0027mac\u0027:"},{"line_number":378,"context_line":"                col, op, val \u003d entry[0], \u0027\u003d\u0027, entry[1].replace(\u0027:\u0027, \u0027\\:\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_8f0ff62d","line":375,"range":{"start_line":375,"start_character":46,"end_line":375,"end_character":48},"in_reply_to":"3fa7e38b_bb0c7844","updated":"2019-12-30 13:25:33.000000000","message":"Done","commit_id":"84dcc43451e151125cd52a2163acdf5f6da6f2f4"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"a44a4cc3a1379b716cbb3bb4cfc39a43f9d8e381","unresolved":false,"context_lines":[{"line_number":372,"context_line":"    # op. Will try to find a better way to default this op to \u0027\u003d\u0027"},{"line_number":373,"context_line":"    for entry in col_values:"},{"line_number":374,"context_line":"        if len(entry) \u003d\u003d 2:"},{"line_number":375,"context_line":"            # Escape colons for tha MAC since it tries to parse it as JSON"},{"line_number":376,"context_line":"            # and colons throw it off"},{"line_number":377,"context_line":"            if entry[0] \u003d\u003d \u0027mac\u0027:"},{"line_number":378,"context_line":"                col, op, val \u003d entry[0], \u0027\u003d\u0027, entry[1].replace(\u0027:\u0027, \u0027\\:\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_af0c3239","line":375,"range":{"start_line":375,"start_character":32,"end_line":375,"end_character":39},"in_reply_to":"3fa7e38b_db11345e","updated":"2019-12-30 13:25:33.000000000","message":"Done","commit_id":"84dcc43451e151125cd52a2163acdf5f6da6f2f4"}],"vif_plug_ovs/ovsdb/ovsdb_lib.py":[{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"699a8b019224e42cdd7b245b81a70b16e0c4afe1","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def delete_ovs_vif_port(self, bridge, dev, delete_netdev\u003dTrue):"},{"line_number":118,"context_line":"        # Generate random MAC if the port is an ovs-dpdk representor port"},{"line_number":119,"context_line":"        options \u003d self._get_ovs_port_options(dev)"},{"line_number":120,"context_line":"        if options.get(\"dpdk-devargs\") and\\"},{"line_number":121,"context_line":"                \"representor\" in options.get(\"dpdk-devargs\"):"},{"line_number":122,"context_line":"            col_values \u003d [(\u0027mac\u0027, eth_random_mac())]"},{"line_number":123,"context_line":"            self.ovsdb.db_set(\u0027Interface\u0027, dev, *col_values).execute()"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_3b008803","line":121,"range":{"start_line":119,"start_character":8,"end_line":121,"end_character":61},"updated":"2019-12-29 10:12:32.000000000","message":"maybe move to helper method for clarity: is_dpdk_representor_port(dev)","commit_id":"84dcc43451e151125cd52a2163acdf5f6da6f2f4"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"a44a4cc3a1379b716cbb3bb4cfc39a43f9d8e381","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def delete_ovs_vif_port(self, bridge, dev, delete_netdev\u003dTrue):"},{"line_number":118,"context_line":"        # Generate random MAC if the port is an ovs-dpdk representor port"},{"line_number":119,"context_line":"        options \u003d self._get_ovs_port_options(dev)"},{"line_number":120,"context_line":"        if options.get(\"dpdk-devargs\") and\\"},{"line_number":121,"context_line":"                \"representor\" in options.get(\"dpdk-devargs\"):"},{"line_number":122,"context_line":"            col_values \u003d [(\u0027mac\u0027, eth_random_mac())]"},{"line_number":123,"context_line":"            self.ovsdb.db_set(\u0027Interface\u0027, dev, *col_values).execute()"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_ef06aa1b","line":121,"range":{"start_line":119,"start_character":8,"end_line":121,"end_character":61},"in_reply_to":"3fa7e38b_3b008803","updated":"2019-12-30 13:25:33.000000000","message":"Done","commit_id":"84dcc43451e151125cd52a2163acdf5f6da6f2f4"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"a25fa25a71c53742ed1dc6ffb1264373cb419baa","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from oslo_log import log as logging"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from os_vif.utils import eth_random_mac"},{"line_number":18,"context_line":"from vif_plug_ovs import constants"},{"line_number":19,"context_line":"from vif_plug_ovs import linux_net"},{"line_number":20,"context_line":"from vif_plug_ovs.ovsdb import api as ovsdb_api"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_251ce175","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":39},"updated":"2019-12-31 08:36:28.000000000","message":"as a personal preference i am no fan of importing specific methods from modules.\n\nan alternative here would be:\nfrom os_vif import utils as os_vif_utils\n\nthen use os_vif_utils.eth_random_mac()","commit_id":"661c55facc1031cb5d342df1760c64f617a41f37"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"45b8540fd0d3a1622597c85eb289185473c513e3","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from oslo_log import log as logging"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from os_vif.utils import eth_random_mac"},{"line_number":18,"context_line":"from vif_plug_ovs import constants"},{"line_number":19,"context_line":"from vif_plug_ovs import linux_net"},{"line_number":20,"context_line":"from vif_plug_ovs.ovsdb import api as ovsdb_api"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_6f7953c4","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":39},"in_reply_to":"3fa7e38b_251ce175","updated":"2020-01-02 09:58:59.000000000","message":"Done","commit_id":"661c55facc1031cb5d342df1760c64f617a41f37"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"a25fa25a71c53742ed1dc6ffb1264373cb419baa","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        self.interface \u003d config.ovsdb_interface"},{"line_number":32,"context_line":"        self.ovsdb \u003d ovsdb_api.get_instance(self)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def _gen_random_mac():"},{"line_number":35,"context_line":"        return eth_random_mac()"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def _is_dpdk_representor_port(self, dev):"},{"line_number":38,"context_line":"        options \u003d self.ovsdb.db_get(\u0027Interface\u0027, dev, \u0027options\u0027).execute()"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_c50ced45","line":35,"range":{"start_line":34,"start_character":2,"end_line":35,"end_character":31},"updated":"2019-12-31 08:36:28.000000000","message":"i dont think this is needed you can call the method directly","commit_id":"661c55facc1031cb5d342df1760c64f617a41f37"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"45b8540fd0d3a1622597c85eb289185473c513e3","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        self.interface \u003d config.ovsdb_interface"},{"line_number":32,"context_line":"        self.ovsdb \u003d ovsdb_api.get_instance(self)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def _gen_random_mac():"},{"line_number":35,"context_line":"        return eth_random_mac()"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def _is_dpdk_representor_port(self, dev):"},{"line_number":38,"context_line":"        options \u003d self.ovsdb.db_get(\u0027Interface\u0027, dev, \u0027options\u0027).execute()"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_0f445f72","line":35,"range":{"start_line":34,"start_character":2,"end_line":35,"end_character":31},"in_reply_to":"3fa7e38b_c50ced45","updated":"2020-01-02 09:58:59.000000000","message":"Done","commit_id":"661c55facc1031cb5d342df1760c64f617a41f37"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"a6055d04d851753e28250d9c9bfae29cf2f65c43","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                PF_PCI\u003dpf_pci, VF_NUM\u003dvf_num)"},{"line_number":113,"context_line":"            col_values.append((\u0027options\u0027,"},{"line_number":114,"context_line":"                              {\u0027dpdk-devargs\u0027: devargs_string}))"},{"line_number":115,"context_line":"            col_values.append((\u0027mac\u0027, mac))"},{"line_number":116,"context_line":"        with self.ovsdb.transaction() as txn:"},{"line_number":117,"context_line":"            txn.add(self.ovsdb.add_port(bridge, dev))"},{"line_number":118,"context_line":"            txn.add(self.ovsdb.db_set(\u0027Interface\u0027, dev, *col_values))"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_00fc330a","line":115,"range":{"start_line":115,"start_character":12,"end_line":115,"end_character":43},"updated":"2019-12-31 08:38:53.000000000","message":"are we checking this in unit tests ?","commit_id":"661c55facc1031cb5d342df1760c64f617a41f37"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"45b8540fd0d3a1622597c85eb289185473c513e3","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                PF_PCI\u003dpf_pci, VF_NUM\u003dvf_num)"},{"line_number":113,"context_line":"            col_values.append((\u0027options\u0027,"},{"line_number":114,"context_line":"                              {\u0027dpdk-devargs\u0027: devargs_string}))"},{"line_number":115,"context_line":"            col_values.append((\u0027mac\u0027, mac))"},{"line_number":116,"context_line":"        with self.ovsdb.transaction() as txn:"},{"line_number":117,"context_line":"            txn.add(self.ovsdb.add_port(bridge, dev))"},{"line_number":118,"context_line":"            txn.add(self.ovsdb.db_set(\u0027Interface\u0027, dev, *col_values))"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_2f2efbaa","line":115,"range":{"start_line":115,"start_character":12,"end_line":115,"end_character":43},"in_reply_to":"3fa7e38b_00fc330a","updated":"2020-01-02 09:58:59.000000000","message":"https://review.opendev.org/#/c/665965/5/vif_plug_ovs/tests/unit/ovsdb/test_ovsdb_lib.py L135","commit_id":"661c55facc1031cb5d342df1760c64f617a41f37"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"a25fa25a71c53742ed1dc6ffb1264373cb419baa","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def delete_ovs_vif_port(self, bridge, dev, delete_netdev\u003dTrue):"},{"line_number":128,"context_line":"        if self._is_dpdk_representor_port(dev):"},{"line_number":129,"context_line":"            # Cleanup dpdk representor MAC address with a random MAC"},{"line_number":130,"context_line":"            col_values \u003d [(\u0027mac\u0027, self._gen_random_mac())]"},{"line_number":131,"context_line":"            self.ovsdb.db_set(\u0027Interface\u0027, dev, *col_values).execute()"},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_e511e95d","line":129,"range":{"start_line":129,"start_character":51,"end_line":129,"end_character":68},"updated":"2019-12-31 08:36:28.000000000","message":"nit: by setting a random MAC","commit_id":"661c55facc1031cb5d342df1760c64f617a41f37"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"45b8540fd0d3a1622597c85eb289185473c513e3","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def delete_ovs_vif_port(self, bridge, dev, delete_netdev\u003dTrue):"},{"line_number":128,"context_line":"        if self._is_dpdk_representor_port(dev):"},{"line_number":129,"context_line":"            # Cleanup dpdk representor MAC address with a random MAC"},{"line_number":130,"context_line":"            col_values \u003d [(\u0027mac\u0027, self._gen_random_mac())]"},{"line_number":131,"context_line":"            self.ovsdb.db_set(\u0027Interface\u0027, dev, *col_values).execute()"},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_0f39bfef","line":129,"range":{"start_line":129,"start_character":51,"end_line":129,"end_character":68},"in_reply_to":"3fa7e38b_e511e95d","updated":"2020-01-02 09:58:59.000000000","message":"Done","commit_id":"661c55facc1031cb5d342df1760c64f617a41f37"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"02e2e1995b3e2270662319150d93df7120ed2d7f","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def delete_ovs_vif_port(self, bridge, dev, delete_netdev\u003dTrue):"},{"line_number":125,"context_line":"        if self._is_dpdk_representor_port(dev):"},{"line_number":126,"context_line":"            # Cleanup dpdk representor MAC address by setting a random MAC"},{"line_number":127,"context_line":"            col_values \u003d [(\u0027mac\u0027, os_vif_utils.eth_random_mac())]"},{"line_number":128,"context_line":"            self.ovsdb.db_set(\u0027Interface\u0027, dev, *col_values).execute()"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_6a06fa76","line":126,"range":{"start_line":126,"start_character":22,"end_line":126,"end_character":42},"updated":"2020-01-07 08:52:36.000000000","message":"nit: would this rather be VF MAC address? Unfortunately the difference between the representor MAC and the VF MAC, or even whether they should be different is confusing.","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"8e90b6afbc9885b0aba91a694a149679b692d930","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def delete_ovs_vif_port(self, bridge, dev, delete_netdev\u003dTrue):"},{"line_number":125,"context_line":"        if self._is_dpdk_representor_port(dev):"},{"line_number":126,"context_line":"            # Cleanup dpdk representor MAC address by setting a random MAC"},{"line_number":127,"context_line":"            col_values \u003d [(\u0027mac\u0027, os_vif_utils.eth_random_mac())]"},{"line_number":128,"context_line":"            self.ovsdb.db_set(\u0027Interface\u0027, dev, *col_values).execute()"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_457768a0","line":126,"range":{"start_line":126,"start_character":22,"end_line":126,"end_character":42},"in_reply_to":"3fa7e38b_3f383b9d","updated":"2020-01-07 17:42:39.000000000","message":"\u003e so my understanding is that the mac the kernel would set is not\n \u003e totally random. it would reset to the mac the vf originally had\n \u003e which would come from the the set of macs allocated to the network\n \u003e vendor.\n\nfrom what i saw in kernel code its random (or blocked altogether), can you provide some reference ?\n\n \u003e if i am reading this code correctly what you are doing is detecting\n \u003e if the port is a dpdk hardware offloaded port representor, if it is\n \u003e seting the representor to a random mac\n \u003e then deleting the interface.\n \u003e \n\ncorrect, this will set the VFs MAC in the embedded switch(in hardware)\n\n \u003e didn\u0027t you say that when you delete the interface it will delete\n \u003e the dpdk representor created by the pmd so setting the back is to\n \u003e ensure the VF is updated to the random mac.\n\nyes it is. so we set MAC then delete the port from OVS\n\n \u003e i dont think that is a safe operation given we dont ensure that mac\n \u003e is not in use already on the host. i think the kernel would protect\n \u003e form that.\n\nfrom what i saw there is no protection between different devices, can you provide some reference ?\n\n \u003e but given all nutron generated macs are confiend to a\n \u003e specifc range by default that is independent for any vendor mac\n \u003e range there should not be a conflict. a random mac however could\n \u003e conflict with neutron.\n\nSo we could impose some restrictions on the randomization\nto make sure the mac addresses generated dont collide with neutron mac address range.","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"db9d25b63e3f6db7ea195832c6e1ea4e9986b194","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def delete_ovs_vif_port(self, bridge, dev, delete_netdev\u003dTrue):"},{"line_number":125,"context_line":"        if self._is_dpdk_representor_port(dev):"},{"line_number":126,"context_line":"            # Cleanup dpdk representor MAC address by setting a random MAC"},{"line_number":127,"context_line":"            col_values \u003d [(\u0027mac\u0027, os_vif_utils.eth_random_mac())]"},{"line_number":128,"context_line":"            self.ovsdb.db_set(\u0027Interface\u0027, dev, *col_values).execute()"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_dff9e781","line":126,"range":{"start_line":126,"start_character":22,"end_line":126,"end_character":42},"in_reply_to":"3fa7e38b_3f383b9d","updated":"2020-01-07 16:06:31.000000000","message":"@Adrian: ack on VF vs representor MAC. However, a VF _might_ be rebound to a netdev (if it\u0027s a CX-3, it needs to be rebound for the whole port info thing) after unplugging.\n\nI think it would be cleaner having the VF\u0027s always remain bound to vfio, but I\u0027m not 100% sure all setups would function that way. No worries about trying to fix it if it\u0027s not a problem in my opinion though.","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ad9765e12f9e2fcbe42c05769466f5b5cd15fdb9","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def delete_ovs_vif_port(self, bridge, dev, delete_netdev\u003dTrue):"},{"line_number":125,"context_line":"        if self._is_dpdk_representor_port(dev):"},{"line_number":126,"context_line":"            # Cleanup dpdk representor MAC address by setting a random MAC"},{"line_number":127,"context_line":"            col_values \u003d [(\u0027mac\u0027, os_vif_utils.eth_random_mac())]"},{"line_number":128,"context_line":"            self.ovsdb.db_set(\u0027Interface\u0027, dev, *col_values).execute()"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_db425e3c","line":126,"range":{"start_line":126,"start_character":22,"end_line":126,"end_character":42},"in_reply_to":"3fa7e38b_401e7d74","updated":"2020-01-07 12:11:58.000000000","message":"can we set the mac back to the 0 mac adress.\ni seam to rememeber that that instruct the driver to reinitallise it?","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"af1bc35a844fc5ddaf0314674a66a0e479c9d6f6","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def delete_ovs_vif_port(self, bridge, dev, delete_netdev\u003dTrue):"},{"line_number":125,"context_line":"        if self._is_dpdk_representor_port(dev):"},{"line_number":126,"context_line":"            # Cleanup dpdk representor MAC address by setting a random MAC"},{"line_number":127,"context_line":"            col_values \u003d [(\u0027mac\u0027, os_vif_utils.eth_random_mac())]"},{"line_number":128,"context_line":"            self.ovsdb.db_set(\u0027Interface\u0027, dev, *col_values).execute()"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_56064376","line":126,"range":{"start_line":126,"start_character":22,"end_line":126,"end_character":42},"in_reply_to":"3fa7e38b_401e7d74","updated":"2020-01-07 14:58:19.000000000","message":"what is representor vf ?\nin DPDK there is only DPDK VF representor port, when its removed from OVS its deleted (am i wrong here ?).\n\nin legacy sriov case the administrative mac of the VF is zeroed which causes the kernel driver to randomize the mac on the next driver rebind. here we are taking the same approach.","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"af1bc35a844fc5ddaf0314674a66a0e479c9d6f6","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def delete_ovs_vif_port(self, bridge, dev, delete_netdev\u003dTrue):"},{"line_number":125,"context_line":"        if self._is_dpdk_representor_port(dev):"},{"line_number":126,"context_line":"            # Cleanup dpdk representor MAC address by setting a random MAC"},{"line_number":127,"context_line":"            col_values \u003d [(\u0027mac\u0027, os_vif_utils.eth_random_mac())]"},{"line_number":128,"context_line":"            self.ovsdb.db_set(\u0027Interface\u0027, dev, *col_values).execute()"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_56df230a","line":126,"range":{"start_line":126,"start_character":22,"end_line":126,"end_character":42},"in_reply_to":"3fa7e38b_6a06fa76","updated":"2020-01-07 14:58:19.000000000","message":"DPDK VF representor port MAC and VF MAC are the same.\n(actually to my understanding, one represents the other)\n\nplease remember that VF may not be binded to networking driver so it will not have a netdevice.","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a738d54d666d88c03ebd70433f5e7216021373f9","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def delete_ovs_vif_port(self, bridge, dev, delete_netdev\u003dTrue):"},{"line_number":125,"context_line":"        if self._is_dpdk_representor_port(dev):"},{"line_number":126,"context_line":"            # Cleanup dpdk representor MAC address by setting a random MAC"},{"line_number":127,"context_line":"            col_values \u003d [(\u0027mac\u0027, os_vif_utils.eth_random_mac())]"},{"line_number":128,"context_line":"            self.ovsdb.db_set(\u0027Interface\u0027, dev, *col_values).execute()"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_401e7d74","line":126,"range":{"start_line":126,"start_character":22,"end_line":126,"end_character":42},"in_reply_to":"3fa7e38b_6a06fa76","updated":"2020-01-07 12:06:36.000000000","message":"should we not delete the representor vf instead.\n\na random mac could result in a mac conflict and break network connectivity so with out a way to prevent that i think this is a non starter.\n\nwe have had cases in the past where failing to remove a mac from a vf lead to a netwrok partation in on migration so this is a security risk in my book.","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"7ee9dcb6a5041c97b8cac5878c0e8c05720c83b4","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def delete_ovs_vif_port(self, bridge, dev, delete_netdev\u003dTrue):"},{"line_number":125,"context_line":"        if self._is_dpdk_representor_port(dev):"},{"line_number":126,"context_line":"            # Cleanup dpdk representor MAC address by setting a random MAC"},{"line_number":127,"context_line":"            col_values \u003d [(\u0027mac\u0027, os_vif_utils.eth_random_mac())]"},{"line_number":128,"context_line":"            self.ovsdb.db_set(\u0027Interface\u0027, dev, *col_values).execute()"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_3f383b9d","line":126,"range":{"start_line":126,"start_character":22,"end_line":126,"end_character":42},"in_reply_to":"3fa7e38b_969d9b6d","updated":"2020-01-07 15:28:56.000000000","message":"so my understanding is that the mac the kernel would set is not totally random. it would reset to the mac the vf originally had which would come from the the set of macs allocated to the network vendor.\n\n\nwhat im concerned about is a network partition.\n\nif the mac that is generaged conflict with a mac in use by a guest (on a flat network) or in use by a vxlan tunnel enpoint on a ovs bridge on the same physnet then it could cause a network partition.\n\nwe have had cases in the past where the vf mac was not correctly reset when we migrated a vm. as a result there was a network partition between the souce host and the dest host as the source host still had a vf with the vms mac asigned.\n\nyou are try to us a random mac to prevent that form happening here but im not sure that is correct to do.\n\nif i am reading this code correctly what you are doing is detecting if the port is a dpdk hardware offloaded port representor, if it is seting the representor to a random mac\nthen deleting the interface.\n\ndidn\u0027t you say that when you delete the interface it will delete the dpdk representor created by the pmd so setting the back is to ensure the VF is updated to the random mac.\n\ni dont think that is a safe operation given we dont ensure that mac is not in use already on the host. i think the kernel would protect form that. The kernel could not ensure it would not conflict with other hosts but given all nutron generated macs are confiend to a specifc range by default that is independent for any vendor mac range there should not be a conflict. a random mac however could conflict with neutron.\n\ni have not looked at how you are generating it to be sure but that is why im not sure this is a good idea.","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"af1bc35a844fc5ddaf0314674a66a0e479c9d6f6","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def delete_ovs_vif_port(self, bridge, dev, delete_netdev\u003dTrue):"},{"line_number":125,"context_line":"        if self._is_dpdk_representor_port(dev):"},{"line_number":126,"context_line":"            # Cleanup dpdk representor MAC address by setting a random MAC"},{"line_number":127,"context_line":"            col_values \u003d [(\u0027mac\u0027, os_vif_utils.eth_random_mac())]"},{"line_number":128,"context_line":"            self.ovsdb.db_set(\u0027Interface\u0027, dev, *col_values).execute()"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_969d9b6d","line":126,"range":{"start_line":126,"start_character":22,"end_line":126,"end_character":42},"in_reply_to":"3fa7e38b_db133e01","updated":"2020-01-07 14:58:19.000000000","message":"unfortunately, it is not.\nsetting zero mac is blocked by DPDK.","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"af1bc35a844fc5ddaf0314674a66a0e479c9d6f6","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def delete_ovs_vif_port(self, bridge, dev, delete_netdev\u003dTrue):"},{"line_number":125,"context_line":"        if self._is_dpdk_representor_port(dev):"},{"line_number":126,"context_line":"            # Cleanup dpdk representor MAC address by setting a random MAC"},{"line_number":127,"context_line":"            col_values \u003d [(\u0027mac\u0027, os_vif_utils.eth_random_mac())]"},{"line_number":128,"context_line":"            self.ovsdb.db_set(\u0027Interface\u0027, dev, *col_values).execute()"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_36c94778","line":126,"range":{"start_line":126,"start_character":22,"end_line":126,"end_character":42},"in_reply_to":"3fa7e38b_db425e3c","updated":"2020-01-07 14:58:19.000000000","message":"In DPDK setting zero mac is blocked.\n(while Mellanox works in a bifurcated mode and VF can be managed via iproute, other vendors PMD\u0027s that are pure user-space cannot do the same)\n\nI had an internal discussion with our DPDK team on whether or not zero mac should be allowed like in kernel.\ntheir take was: if mac was set by the user, it should be cleaned by the user.\n\nThis PS proposes to clean mac address like its done today in kernel (randomize the mac).","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"e896222b8ec250fd78ab9c4b1c902d2d6cec5fa2","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def delete_ovs_vif_port(self, bridge, dev, delete_netdev\u003dTrue):"},{"line_number":125,"context_line":"        if self._is_dpdk_representor_port(dev):"},{"line_number":126,"context_line":"            # Cleanup dpdk representor MAC address by setting a random MAC"},{"line_number":127,"context_line":"            col_values \u003d [(\u0027mac\u0027, os_vif_utils.eth_random_mac())]"},{"line_number":128,"context_line":"            self.ovsdb.db_set(\u0027Interface\u0027, dev, *col_values).execute()"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_db133e01","line":126,"range":{"start_line":126,"start_character":22,"end_line":126,"end_character":42},"in_reply_to":"3fa7e38b_db425e3c","updated":"2020-01-07 12:38:54.000000000","message":"That would mirror the mechanism in the kernel. I\u0027m also in favour of that if the code exists upstream.","commit_id":"a8e765ee7f875f1d0d38f58c8bcbfb79b20d310f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9b879b25b908f44b79e77b2b950e1fac03ce049b","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        self.connection \u003d config.ovsdb_connection"},{"line_number":31,"context_line":"        self.interface \u003d config.ovsdb_interface"},{"line_number":32,"context_line":"        self.ovsdb \u003d ovsdb_api.get_instance(self)"},{"line_number":33,"context_line":"        self.cleanup_bas_mac \u003d config.cleanup_bas_mac"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def _is_dpdk_representor_port(self, dev):"},{"line_number":36,"context_line":"        options \u003d self.ovsdb.db_get(\u0027Interface\u0027, dev, \u0027options\u0027).execute()"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_87dbcb4c","line":33,"range":{"start_line":33,"start_character":13,"end_line":33,"end_character":28},"updated":"2020-01-14 13:47:08.000000000","message":"cleanup_base_mac","commit_id":"ea07e2797db1a2e2fcff60525ea2eea5bb58f649"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"3bba1efb51bfa4bb559b9504964f5b3114baed3c","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        self.connection \u003d config.ovsdb_connection"},{"line_number":31,"context_line":"        self.interface \u003d config.ovsdb_interface"},{"line_number":32,"context_line":"        self.ovsdb \u003d ovsdb_api.get_instance(self)"},{"line_number":33,"context_line":"        self.cleanup_bas_mac \u003d config.cleanup_bas_mac"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def _is_dpdk_representor_port(self, dev):"},{"line_number":36,"context_line":"        options \u003d self.ovsdb.db_get(\u0027Interface\u0027, dev, \u0027options\u0027).execute()"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_236f56c5","line":33,"range":{"start_line":33,"start_character":13,"end_line":33,"end_character":28},"in_reply_to":"3fa7e38b_87dbcb4c","updated":"2020-01-15 10:00:21.000000000","message":"Done","commit_id":"ea07e2797db1a2e2fcff60525ea2eea5bb58f649"}],"vif_plug_ovs/tests/unit/ovsdb/test_impl_vsctl.py":[{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"733167e5293b2b0a77b82d521194e7042c1f2882","unresolved":false,"context_lines":[{"line_number":14,"context_line":"from vif_plug_ovs.ovsdb import impl_vsctl"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"class Test_set_colval_args(base.TestCase):"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    def test_set_colval_args(self):"},{"line_number":20,"context_line":"        col_values \u003d [(\u0027mac\u0027, \"aa:aa:aa:aa:aa:aa\")]"}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa7e38b_ca77ee9e","line":17,"range":{"start_line":17,"start_character":6,"end_line":17,"end_character":26},"updated":"2020-01-07 08:02:12.000000000","message":"Not too sure about the naming here, perhaps TestModuleLevelMethods","commit_id":"6a5f98eb8c9a50946ec8073bfa6cc217d57912be"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"cc6c1d375b969f47bdb851eceffe2444e048ff34","unresolved":false,"context_lines":[{"line_number":14,"context_line":"from vif_plug_ovs.ovsdb import impl_vsctl"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"class Test_set_colval_args(base.TestCase):"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    def test_set_colval_args(self):"},{"line_number":20,"context_line":"        col_values \u003d [(\u0027mac\u0027, \"aa:aa:aa:aa:aa:aa\")]"}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa7e38b_0ad0a6f3","line":17,"range":{"start_line":17,"start_character":6,"end_line":17,"end_character":26},"in_reply_to":"3fa7e38b_ca77ee9e","updated":"2020-01-07 08:40:32.000000000","message":"Done","commit_id":"6a5f98eb8c9a50946ec8073bfa6cc217d57912be"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"733167e5293b2b0a77b82d521194e7042c1f2882","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"class Test_set_colval_args(base.TestCase):"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    def test_set_colval_args(self):"},{"line_number":20,"context_line":"        col_values \u003d [(\u0027mac\u0027, \"aa:aa:aa:aa:aa:aa\")]"},{"line_number":21,"context_line":"        args \u003d impl_vsctl._set_colval_args(*col_values)"},{"line_number":22,"context_line":"        self.assertEqual([\u0027mac\u003daa\\:aa\\:aa\\:aa\\:aa\\:aa\u0027], args)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa7e38b_2a66c2ef","line":19,"range":{"start_line":19,"start_character":8,"end_line":19,"end_character":28},"updated":"2020-01-07 08:02:12.000000000","message":"as the method is named _set_colval_args\n\nthis should be : test__set_colval_args","commit_id":"6a5f98eb8c9a50946ec8073bfa6cc217d57912be"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"cc6c1d375b969f47bdb851eceffe2444e048ff34","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"class Test_set_colval_args(base.TestCase):"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    def test_set_colval_args(self):"},{"line_number":20,"context_line":"        col_values \u003d [(\u0027mac\u0027, \"aa:aa:aa:aa:aa:aa\")]"},{"line_number":21,"context_line":"        args \u003d impl_vsctl._set_colval_args(*col_values)"},{"line_number":22,"context_line":"        self.assertEqual([\u0027mac\u003daa\\:aa\\:aa\\:aa\\:aa\\:aa\u0027], args)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa7e38b_aa02b270","line":19,"range":{"start_line":19,"start_character":8,"end_line":19,"end_character":28},"in_reply_to":"3fa7e38b_2a66c2ef","updated":"2020-01-07 08:40:32.000000000","message":"Done","commit_id":"6a5f98eb8c9a50946ec8073bfa6cc217d57912be"}],"vif_plug_ovs/tests/unit/ovsdb/test_ovsdb_lib.py":[{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"699a8b019224e42cdd7b245b81a70b16e0c4afe1","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                [mock.call("},{"line_number":158,"context_line":"                    \u0027device\u0027, 1500,"},{"line_number":159,"context_line":"                    interface_type\u003dconstants.OVS_VHOSTUSER_INTERFACE_TYPE)])"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    @mock.patch.object(linux_net, \u0027delete_net_dev\u0027)"},{"line_number":162,"context_line":"    def test_delete_ovs_vif_port(self, mock_delete_net_dev):"},{"line_number":163,"context_line":"        with mock.patch.object(self.br, \u0027_get_ovs_port_options\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_5bfd4407","line":160,"updated":"2019-12-29 10:12:32.000000000","message":"need to add a unit test for the mac generation on delete for dpdk representor port","commit_id":"84dcc43451e151125cd52a2163acdf5f6da6f2f4"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"a44a4cc3a1379b716cbb3bb4cfc39a43f9d8e381","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                [mock.call("},{"line_number":158,"context_line":"                    \u0027device\u0027, 1500,"},{"line_number":159,"context_line":"                    interface_type\u003dconstants.OVS_VHOSTUSER_INTERFACE_TYPE)])"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    @mock.patch.object(linux_net, \u0027delete_net_dev\u0027)"},{"line_number":162,"context_line":"    def test_delete_ovs_vif_port(self, mock_delete_net_dev):"},{"line_number":163,"context_line":"        with mock.patch.object(self.br, \u0027_get_ovs_port_options\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_cf016e05","line":160,"in_reply_to":"3fa7e38b_5bfd4407","updated":"2019-12-30 13:25:33.000000000","message":"Done","commit_id":"84dcc43451e151125cd52a2163acdf5f6da6f2f4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9b879b25b908f44b79e77b2b950e1fac03ce049b","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                          test_vif_plug_ovs_group)"},{"line_number":40,"context_line":"        CONF.register_opt(cfg.StrOpt(\u0027ovsdb_connection\u0027, default\u003dNone),"},{"line_number":41,"context_line":"                          test_vif_plug_ovs_group)"},{"line_number":42,"context_line":"        CONF.register_opt(cfg.StrOpt(\u0027cleanup_bas_mac\u0027,"},{"line_number":43,"context_line":"                                     default\u003d\u0027aa:16:3f:00:00:00\u0027),"},{"line_number":44,"context_line":"                                     test_vif_plug_ovs_group)"},{"line_number":45,"context_line":"        self.br \u003d ovsdb_lib.BaseOVS(cfg.CONF.test_vif_plug_ovs)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_e7e95fe4","line":42,"range":{"start_line":42,"start_character":38,"end_line":42,"end_character":53},"updated":"2020-01-14 13:47:08.000000000","message":"cleanup_base_mac","commit_id":"ea07e2797db1a2e2fcff60525ea2eea5bb58f649"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"3bba1efb51bfa4bb559b9504964f5b3114baed3c","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                          test_vif_plug_ovs_group)"},{"line_number":40,"context_line":"        CONF.register_opt(cfg.StrOpt(\u0027ovsdb_connection\u0027, default\u003dNone),"},{"line_number":41,"context_line":"                          test_vif_plug_ovs_group)"},{"line_number":42,"context_line":"        CONF.register_opt(cfg.StrOpt(\u0027cleanup_bas_mac\u0027,"},{"line_number":43,"context_line":"                                     default\u003d\u0027aa:16:3f:00:00:00\u0027),"},{"line_number":44,"context_line":"                                     test_vif_plug_ovs_group)"},{"line_number":45,"context_line":"        self.br \u003d ovsdb_lib.BaseOVS(cfg.CONF.test_vif_plug_ovs)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_639a2ec5","line":42,"range":{"start_line":42,"start_character":38,"end_line":42,"end_character":53},"in_reply_to":"3fa7e38b_e7e95fe4","updated":"2020-01-15 10:00:21.000000000","message":"Done","commit_id":"ea07e2797db1a2e2fcff60525ea2eea5bb58f649"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"e1c06439cdf614266b09d41e863a11bec58233d0","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from oslo_utils import uuidutils"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from os_vif import utils"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from vif_plug_ovs import constants"},{"line_number":23,"context_line":"from vif_plug_ovs import linux_net"},{"line_number":24,"context_line":"from vif_plug_ovs.ovsdb import ovsdb_lib"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa7e38b_816e3f62","line":21,"updated":"2020-01-15 14:54:54.000000000","message":"its the same project so i dont think you need a newline here","commit_id":"3b5ab8e936dae7cd09b08c067b16c4bcd423baf8"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"366ef88e51d1dad06e69477ed550be61f72f578c","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from oslo_utils import uuidutils"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from os_vif import utils"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from vif_plug_ovs import constants"},{"line_number":23,"context_line":"from vif_plug_ovs import linux_net"},{"line_number":24,"context_line":"from vif_plug_ovs.ovsdb import ovsdb_lib"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa7e38b_f0f1f701","line":21,"in_reply_to":"3fa7e38b_816e3f62","updated":"2020-01-15 18:41:03.000000000","message":"Done","commit_id":"3b5ab8e936dae7cd09b08c067b16c4bcd423baf8"}]}
