[ovs-dev] [PATCH 3/4] Add init/destroy funcs and handle Table Features msgs.

YAMAMOTO Takashi yamamoto at valinux.co.jp
Tue Nov 5 04:36:54 UTC 2013


thanks for working on this.

> +static void
> +table_oxm_init(struct ofputil_table_features *tf,
> +                enum ofputil_table_feature_prop_type type)
> +{
> +    int i = 0 ,olen = 0;
> +    const int OXM_NUM = get_oxm_num();
> +    uint32_t *oxm_ids = NULL;
> +
> +    olen = sizeof(uint32_t) * OXM_NUM;
> +    oxm_ids = xzalloc(olen);
> +
> +    tf->props[type].data = (uint8_t*)oxm_ids;
> +
> +    for (i = 0; i < OXM_NUM; i++) {
> +        oxm_ids[i] = oxm_variables[i].data;
> +    }
> +
> +    tf->props[type].length = olen + sizeof(struct ofp13_table_feature_prop_header);
> +    tf->props[type].type = type;
> +    tf->n_property++;
> +}

for OFPTFPT_MATCH, HASMASK bit should be set for types for which
a switch support masking.  (OpenFlow 1.3.2 p.83)

it's unclear (to me) what value oxm_length should be for these properties.
existing implementations seem to vary.  LINC always uses 0 and
ofsoftswitch13 uses "normal" value as your patch does. (eg. 6 for eth_dst)
another question is if it should be doubled for the above mentioned
HASMASK=1 case.  probably need to ask ONF members clarify.

YAMAMOTO Takashi



More information about the dev mailing list