static int of_dpa_cmd_flow_add(OfDpa *of_dpa, uint64_t cookie,

                               RockerTlv **flow_tlvs)

{

    OfDpaFlow *flow = of_dpa_flow_find(of_dpa, cookie);

    int err = ROCKER_OK;



    if (flow) {

        return -ROCKER_EEXIST;

    }



    flow = of_dpa_flow_alloc(cookie);

    if (!flow) {

        return -ROCKER_ENOMEM;

    }



    err = of_dpa_cmd_flow_add_mod(of_dpa, flow, flow_tlvs);

    if (err) {

        g_free(flow);

        return err;

    }



    return of_dpa_flow_add(of_dpa, flow);

}

static int of_dpa_cmd_flow_add(OfDpa *of_dpa, uint64_t cookie,

                               RockerTlv **flow_tlvs)

{

    OfDpaFlow *flow = of_dpa_flow_find(of_dpa, cookie);

    int err = ROCKER_OK;



    if (flow) {

        return -ROCKER_EEXIST;

    }



    flow = of_dpa_flow_alloc(cookie);

    if (!flow) {

        return -ROCKER_ENOMEM;

    }



    err = of_dpa_cmd_flow_add_mod(of_dpa, flow, flow_tlvs);

    if (err) {

        g_free(flow);

        return err;

    }



    return of_dpa_flow_add(of_dpa, flow);

}

    if (!flow) {     if (!flow) {         return -ROCKER_ENOMEM;         return -ROCKER_ENOMEM;         return -ROCKER_ENOMEM;
static int FUNC_0(OfDpa *VAR_0, uint64_t VAR_1,

                               RockerTlv **VAR_2)

{

    OfDpaFlow *flow = of_dpa_flow_find(VAR_0, VAR_1);

    int VAR_3 = ROCKER_OK;



    if (flow) {

        return -ROCKER_EEXIST;

    }



    flow = of_dpa_flow_alloc(VAR_1);

    if (!flow) {

        return -ROCKER_ENOMEM;

    }



    VAR_3 = of_dpa_cmd_flow_add_mod(VAR_0, flow, VAR_2);

    if (VAR_3) {

        g_free(flow);

        return VAR_3;

    }



    return of_dpa_flow_add(VAR_0, flow);

}

static int FUNC_0(OfDpa *VAR_0, uint64_t VAR_1,
RockerTlv **VAR_2)
{ OfDpaFlow *flow = of_dpa_flow_find(VAR_0, VAR_1); int VAR_3 = ROCKER_OK; if (flow) { return -ROCKER_EEXIST; } flow = of_dpa_flow_alloc(VAR_1); if (!flow) { return -ROCKER_ENOMEM; } VAR_3 = of_dpa_cmd_flow_add_mod(VAR_0, flow, VAR_2); if (VAR_3) { g_free(flow); return VAR_3; } return of_dpa_flow_add(VAR_0, flow); }