ovn/controller/lflow.c
static struct logical_datapath *
ldp_create(const struct sbrec_datapath_binding *binding)
{
    struct logical_datapath *ldp;

    ldp = xmalloc(sizeof *ldp);
    hmap_insert(&logical_datapaths, &ldp->hmap_node,
                uuid_hash(&binding->header_.uuid));
    ldp->uuid = binding->header_.uuid;
    ldp->tunnel_key = binding->tunnel_key;
    const char *ls = smap_get(&binding->external_ids, "logical-switch");
    ldp->type = ls ? LDP_TYPE_SWITCH : LDP_TYPE_ROUTER;
    simap_init(&ldp->ports);
    return ldp;
}
/* Creates a new logical_datapath for the given 'binding'. */
Creates a new logical_datapath for the given 'binding'.
Creates a new logical_datapath for the given ' binding ' .
static struct logical_datapath *
ldp_create(const struct sbrec_datapath_binding *binding)
{
    struct logical_datapath *ldp;
    ldp = xmalloc(sizeof *ldp);
    hmap_insert(&logical_datapaths, &ldp->hmap_node,
                uuid_hash(&binding->header_.uuid));
    ldp->uuid = binding->header_.uuid;
    ldp->tunnel_key = binding->tunnel_key;
    const char *ls = smap_get(&binding->external_ids, "logical-switch");
    ldp->type = ls ? LDP_TYPE_SWITCH : LDP_TYPE_ROUTER;
    simap_init(&ldp->ports);
    return ldp;
}
static struct logical_datapath * ldp_create ( const struct sbrec_datapath_binding * binding ) { struct logical_datapath * ldp ; ldp = xmalloc ( sizeof * ldp ) ; hmap_insert ( & logical_datapaths , & ldp -> hmap_node , uuid_hash ( & binding -> header_ . uuid ) ) ; ldp -> uuid = binding -> header_ . uuid ; ldp -> tunnel_key = binding -> tunnel_key ; const char * ls = smap_get ( & binding -> external_ids , " " ) ; ldp -> type = ls ? LDP_TYPE_SWITCH : LDP_TYPE_ROUTER ; simap_init ( & ldp -> ports ) ; return ldp ; }
Creates a new logical_datapath for the given 'binding'.
Creates a new logical_datapath for the given ' binding ' .