Hi Matteo,

Thanks for the patch. But I fail to understand why there is a memory leak.
In fact when I tested in my setup, the test ran without any leak.

The functions dp_execute_lb_output_action and dp_execute_output_action, both
return 'false' if current batch is non-empty.

   case OVS_ACTION_ATTR_LB_OUTPUT:
        if (dp_execute_lb_output_action(pmd, packets_, should_steal,
                                        nl_attr_get_u32(a))) {
            return;
        } else {
            COVERAGE_ADD(datapath_drop_invalid_port,
                         dp_packet_batch_size(packets_));
        }
        break;

And the caller to the function i.e. dp_execute_cb() will then execute
dp_packet_delete_batch(packets_, should_steal); which is last line of this
function.

   case OVS_ACTION_ATTR_DROP:
    case __OVS_ACTION_ATTR_MAX:
        OVS_NOT_REACHED();
    }

    dp_packet_delete_batch(packets_, should_steal);

If the should_steal is correctly set to true (for e.g. in case this is the
last action), then packet buffer will be freed. Am I missing something here?

Warm Regards,
Vishal Ajmera
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to