X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fflow.c;h=63efab1bc25238f940ee5eb7fea766e201e69f77;hb=13751fd88c4b7464f9453c03659201c10b3b87a0;hp=0dfd01f095d06ad878ea867629a9ec63f30310ee;hpb=52105b67878c83d16ef86f1b70fe8a076fdf69cb;p=sliver-openvswitch.git diff --git a/lib/flow.c b/lib/flow.c index 0dfd01f09..63efab1bc 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -1241,12 +1241,16 @@ miniflow_alloc_values(struct miniflow *flow, int n) /* Completes an initialization of 'dst' as a miniflow copy of 'src' begun by * the caller. The caller must have already initialized 'dst->map' properly - * to indicate the nonzero uint32_t elements of 'src'. 'n' must be the number - * of 1-bits in 'dst->map'. + * to indicate the significant uint32_t elements of 'src'. 'n' must be the + * number of 1-bits in 'dst->map'. + * + * Normally the significant elements are the ones that are non-zero. However, + * when a miniflow is initialized from a (mini)mask, the values can be zeroes, + * so that the flow and mask always have the same maps. * * This function initializes 'dst->values' (either inline if possible or with - * malloc() otherwise) and copies the nonzero uint32_t elements of 'src' into - * it. */ + * malloc() otherwise) and copies the uint32_t elements of 'src' indicated by + * 'dst->map' into it. */ static void miniflow_init__(struct miniflow *dst, const struct flow *src, int n) {