Hi ychen,

We have been working on this problem and have a fully working patch that we 
will submit to the ML shortly.
We would be glad if you could give it a test and review.

Thanks, Jan

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of ychen
> Sent: Tuesday, 20 March, 2018 14:20
> To: [email protected]; [email protected]
> Subject: [ovs-dev] can not well distributed when use dp_hash for ovs group
> 
> hi,
>   I tested dp_hash for ovs group, and found that dp_hash can not well 
> distributed, some buckets even can not be selected.
>   In my testing environment, I have 11 buckets:
> group_id=131841,type=select,selection_method=dp_hash,
> bucket=bucket_id:51162,weight:100,actions=ct(commit,table=70,zone=2,exec(move:NXM_OF_ETH_SRC[]-
> >NXM_NX_CT_LABEL[0..47],nat(dst=10.204.8.29:80))),
> bucket=bucket_id:42099,weight:100,actions=ct(commit,table=70,zone=2,exec(move:NXM_OF_ETH_SRC[]-
> >NXM_NX_CT_LABEL[0..47],nat(dst=10.204.8.25:80))),
> bucket=bucket_id:53526,weight:100,actions=ct(commit,table=70,zone=2,exec(move:NXM_OF_ETH_SRC[]-
> >NXM_NX_CT_LABEL[0..47],nat(dst=10.204.8.27:80))),
> bucket=bucket_id:12221,weight:100,actions=ct(commit,table=70,zone=2,exec(move:NXM_OF_ETH_SRC[]-
> >NXM_NX_CT_LABEL[0..47],nat(dst=10.204.8.40:80))),
> bucket=bucket_id:2787,weight:100,actions=ct(commit,table=70,zone=2,exec(move:NXM_OF_ETH_SRC[]-
> >NXM_NX_CT_LABEL[0..47],nat(dst=10.204.8.26:80))),
> bucket=bucket_id:18951,weight:100,actions=ct(commit,table=70,zone=2,exec(move:NXM_OF_ETH_SRC[]-
> >NXM_NX_CT_LABEL[0..47],nat(dst=10.204.8.24:80))),
> bucket=bucket_id:32559,weight:100,actions=ct(commit,table=70,zone=2,exec(move:NXM_OF_ETH_SRC[]-
> >NXM_NX_CT_LABEL[0..47],nat(dst=10.204.8.62:80))),
> bucket=bucket_id:35550,weight:100,actions=ct(commit,table=70,zone=2,exec(move:NXM_OF_ETH_SRC[]-
> >NXM_NX_CT_LABEL[0..47],nat(dst=10.204.8.43:80))),
> bucket=bucket_id:9026,weight:100,actions=ct(commit,table=70,zone=2,exec(move:NXM_OF_ETH_SRC[]-
> >NXM_NX_CT_LABEL[0..47],nat(dst=10.204.8.57:80))),
> bucket=bucket_id:26811,weight:100,actions=ct(commit,table=70,zone=2,exec(move:NXM_OF_ETH_SRC[]-
> >NXM_NX_CT_LABEL[0..47],nat(dst=10.204.8.34:80)))
> 
> 
>  But about 3~5 buckets can not be selected always.
> 
> 
>   In the function xlate_dp_hash_select_group(), I found the code:
>   uint32_t mask = (1 << log_2_ceil(n_buckets)) - 1;
>   uint32_t basis = 0xc2b73583 * (ctx->xin->flow.dp_hash & mask);
> uint32_t score =  (hash_int(bucket->bucket_id, basis) & 0xffff) * 
> bucket->weight;
> 
> 
>  for the above formula, if n_buckets is 11, then there are totally 16 
> probabilities for basis.
> so how can we make sure the best score can well distributed in the 11 buckets?
> 
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to