)]}'
{"devstack/lib/pci_sim":[{"author":{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"},"tag":"autogenerated:zuul:automatic-ci","change_message_id":"f5f0d14ec288a6fa877b2d98c081ea7ab4aeee6a","unresolved":false,"context_lines":[{"line_number":231,"context_line":"    local mod_args\u003d\"num_pfs\u003d$PCI_SIM_NUM_PFS\""},{"line_number":232,"context_line":"    local pf_mode_str"},{"line_number":233,"context_line":"    pf_mode_str\u003d$(pci_sim_build_pf_mode_string)"},{"line_number":234,"context_line":"    if [[ \"$pf_mode_str\" \u003d~ ^(sriov[[:space:]]*)+$ ]]; then"},{"line_number":235,"context_line":"        : # all sriov, no pf_mode needed"},{"line_number":236,"context_line":"    else"},{"line_number":237,"context_line":"        mod_args+\u003d\" pf_mode\u003d$pf_mode_str\""}],"source_content_type":"application/octet-stream","patch_set":1,"id":"d039bb5d_7dcfa53c","line":234,"updated":"2026-07-24 11:35:54.000000000","message":"The regex used to detect whether all PFs are sriov (so pf_mode can be omitted from modprobe) does not account for the comma separators that pci_sim_build_pf_mode_string produces. As a result, the optimization never fires when there are 2+ PFs, including the default configuration.\n\n**Severity**: WARNING | **Confidence**: 0.9\n\n**Impact**: The all-sriov short-circuit never fires for multi-PF configurations (the default is 2 PFs). The module receives pf_mode\u003dsriov,sriov which is functionally harmless since the kernel defaults to sriov, but the intended optimization is silently broken and the logic is misleading to future maintainers.\n\n**Suggestion**:\nChange the regex to account for commas, e.g. \u0027^(sriov,)*sriov$\u0027 or use a simpler check such as verifying that every element of PCI_SIM_PF_MODES equals \u0027sriov\u0027 in a loop.","commit_id":"89776f318e8d60c79e81f26d9715dc7f9659cc91"},{"author":{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"},"tag":"autogenerated:zuul:automatic-ci","change_message_id":"f5f0d14ec288a6fa877b2d98c081ea7ab4aeee6a","unresolved":false,"context_lines":[{"line_number":399,"context_line":"            continue"},{"line_number":400,"context_line":"        fi"},{"line_number":401,"context_line":"        target\u003d$(pci_sim_pf_target \"$pci_index\")"},{"line_number":402,"context_line":"        if [[ $target \u003d\u003d \"$wanted_target\" \\"},{"line_number":403,"context_line":"              \u0026\u0026 $(pci_sim_pf_mode \"$index\") \u003d\u003d sriov ]]; then"},{"line_number":404,"context_line":"            mapfile -t pf_vfs \u003c \u003c(pci_sim_find_vfs_for_pf \"$pf\")"},{"line_number":405,"context_line":"            printf \u0027%s\\n\u0027 \"${pf_vfs[@]}\""}],"source_content_type":"application/octet-stream","patch_set":1,"id":"c0f41a0e_2a4d72d2","line":402,"updated":"2026-07-24 11:35:54.000000000","message":"The condition inside the sriov PF branch redundantly re-checks pci_sim_pf_mode when non-sriov PFs are already skipped by the continue guard at the top of the loop.\n\n**Severity**: SUGGESTION | **Confidence**: 0.9\n\n**Benefit**: The redundant condition adds noise and could confuse maintainers into thinking the guard is necessary. No functional impact since the check is always true at that point.\n\n**Recommendation**:\nRemove the \u0027\u0026\u0026 $(pci_sim_pf_mode \"$index\") \u003d\u003d sriov\u0027 clause from the condition since the continue guard above already ensures only sriov PFs reach this code.","commit_id":"89776f318e8d60c79e81f26d9715dc7f9659cc91"},{"author":{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"},"tag":"autogenerated:zuul:automatic-ci","change_message_id":"f0a053c8ea6b63f226a75d1f1842edc1090d8a0b","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        fi"},{"line_number":68,"context_line":"    fi"},{"line_number":69,"context_line":"    pci_sim_compute_pf_modes"},{"line_number":70,"context_line":"    local num_unique"},{"line_number":71,"context_line":"    num_unique\u003d$(printf \u0027%s\\n\u0027 \"${PCI_SIM_PF_MODES[@]}\" | sort -u | wc -l)"},{"line_number":72,"context_line":"    if [[ $PCI_SIM_NUM_PFS -lt $num_unique ]]; then"},{"line_number":73,"context_line":"        die $LINENO \"PCI_SIM_NUM_PFS\u003d$PCI_SIM_NUM_PFS is too small for $num_unique device types; need at least one PF per type\""}],"source_content_type":"application/octet-stream","patch_set":3,"id":"f99e1ed2_2fc577d1","line":70,"updated":"2026-07-24 13:35:07.000000000","message":"The check comparing PCI_SIM_NUM_PFS against the number of unique entries in PCI_SIM_PF_MODES can never fail. After pci_sim_compute_pf_modes runs, PCI_SIM_PF_MODES always contains exactly PCI_SIM_NUM_PFS entries, so the count of unique values can never exceed PCI_SIM_NUM_PFS. The condition PCI_SIM...\n\n**Severity**: SUGGESTION | **Confidence**: 0.9\n\n**Benefit**: Users who set PCI_SIM_ENABLE_MDEV\u003dTrue with only one PF will not receive the intended error message; the mdev toggle is silently ignored because the round-robin assigns only sriov to the single PF. The validation block creates a false sense of safety for this edge case.\n\n**Recommendation**:\nEither remove the num_unique check if the silent-fallback behavior is acceptable, or move the validation before pci_sim_compute_pf_modes to compare the number of enabled device types (e.g. 2 when mdev is enabled) against PCI_SIM_NUM_PFS. For example: if [[ $PCI_SIM_ENABLE_MDEV \u003d\u003d True \u0026\u0026 $PCI_SIM_NUM_PFS -lt 2 ]]; then die ...; fi","commit_id":"bc316e148aa9bfd06f6f8b78fbf010d7859ff9c3"}]}
