예제 #1
0
void
bundle_execute_load(const struct nx_action_bundle *nab, struct flow *flow,
                    bool (*slave_enabled)(uint16_t ofp_port, void *aux),
                    void *aux)
{
    nxm_reg_load(nab->dst, nab->ofs_nbits,
                 bundle_execute(nab, flow, slave_enabled, aux), flow);
}
예제 #2
0
파일: multipath.c 프로젝트: iwaseyusuke/ovs
/* Executes 'mp' based on the current contents of 'flow', writing the results
 * back into 'flow'.  Sets fields in 'wc' that were used to calculate
 * the result. */
void
multipath_execute(const struct ofpact_multipath *mp, struct flow *flow,
                  struct flow_wildcards *wc)
{
    /* Calculate value to store. */
    uint32_t hash = flow_hash_fields(flow, mp->fields, mp->basis);
    uint16_t link = multipath_algorithm(hash, mp->algorithm,
                                        mp->max_link + 1, mp->arg);

    flow_mask_hash_fields(flow, wc, mp->fields);
    nxm_reg_load(&mp->dst, link, flow, wc);
}