On 8/8/25 5:54 PM, Rosemarie O'Riorden wrote:

> +
> +    LIST_FOR_EACH_POP (op, list, &exist_virtual_ports) {
> +        const char *virtual_parents =
> +                    smap_get_def(&op->nbsp->options, "virtual-parents", "");
> +        char *tokstr = xstrdup(virtual_parents);
> +        char *save_ptr = NULL;
> +        char *vparent;
> +        for (vparent = strtok_r(tokstr, ",", &save_ptr); vparent != NULL;
> +             vparent = strtok_r(NULL, ",", &save_ptr)) {
> +            if (sset_find(&created_ports, vparent)) {
> +                add_op_to_northd_tracked_ports(&trk_lsps->updated, op);
> +                break;
> +            }
> +            if (sset_find(&deleted_ports, vparent)) {
> +                add_op_to_northd_tracked_ports(&trk_lsps->updated, op);
> +                break;
> +            }
> +        }
> +        free(tokstr);
> +    }

This was written badly. This is what I meant:

diff --git a/northd/northd.c b/northd/northd.c
index daaa89a3c..e3309ce2e 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -4709,11 +4709,8 @@ ls_handle_lsp_changes(struct ovsdb_idl_txn
*ovnsb_idl_txn,
         char *vparent;
         for (vparent = strtok_r(tokstr, ",", &save_ptr); vparent != NULL;
              vparent = strtok_r(NULL, ",", &save_ptr)) {
-            if (sset_find(&created_ports, vparent)) {
-                add_op_to_northd_tracked_ports(&trk_lsps->updated, op);
-                break;
-            }
-            if (sset_find(&deleted_ports, vparent)) {
+            if (sset_find(&created_ports, vparent) ||
+                sset_find(&deleted_ports, vparent)) {
                 add_op_to_northd_tracked_ports(&trk_lsps->updated, op);
                 break;
             }


If that's the only problem with my patch, maybe the committer can just
amend this. Or I can send a v4. Let me know what you think.


-- 
Rosemarie O'Riorden
[email protected]

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to