You changed select groups to choose random buckets.  This caused tests
that rely on correct behavior of select groups to fail.  This should not
be a surprise, so ignore the test failures or delete those tests.

On Sat, Dec 15, 2018 at 04:18:54PM +0530, ha Fa wrote:
> Subject: [openvswitch 2.7.0] testsuite: 419 1003 1006 1007 1008 1009 1010
> failed
> To: <[email protected]>
> Cc: <[email protected]>
> 
> 
> hi,
> 
> kindly,
> i request your help Please my situation issue is so critical, i had tried
> for two months to understand what is the error , that am facing during
> implementing Stochastic Switching in ovs 2.7 to implement select group type in
> OVS 2.7 randomly selects a bucket from among the live buckets, to apply
> partitioning for the same traffic flow pass through multiple paths to the
> flow from source to destination.
> 
> the code modification i done is  below
> 
> #include <stdlib.h>
> #include <time.h>
> 
> static bool is_srand_initialized = false;
> 
> static void
> xlate_default_select_group(struct xlate_ctx *ctx, struct group_dpif *group)
> {
>       struct flow_wildcards *wc = ctx->wc;
>       struct ofputil_bucket *bucket;
>       uint32_t basis;
>     ctx_>xout_>slow |= SLOW_CONTROLLER;
>     basis = flow_hash_symmetric_l4(&ctx->xin->flow, 0);
>     flow_mask_hash_fields(&ctx->xin->flow, wc,
>     NX_HASH_FIELDS_SYMMETRIC_L4);
>     bucket = group_best_live_bucket(ctx, group, basis);
>     if (bucket) {
>         xlate_group_bucket(ctx, bucket);
>         xlate_group_stats(ctx, group, bucket);
>     }
>     else if (ctx->xin->xcache)
>              {
>                ofproto_group_unref(&group_>up);
>              }
> }
> 
> static void
> xlate_select_group(struct xlate_ctx *ctx, struct group_dpif *group)
> {
>     const char *selection_method = group->up.props.selection_method;
> 
>     if (ctx->was_mpls)
>   {
>      ctx_trigger_freeze(ctx);
>    }
> 
>    ctx->xout->slow |= SLOW_CONTROLLER;
>     xlate_commit_actions(ctx);
>     xlate_default_select_group(ctx, group);
> }
> 
> static struct ofputil_bucket *
> group_best_live_bucket(const struct xlate_ctx *ctx,
>                        const struct group_dpif *group,
>                        uint32_t basis)
> {
>     if (!is_srand_initialized) {
>          srand((unsigned int)time(NULL));
>          is_srand_initialized = true;
>     }
>     struct ofputil_bucket *bucket;
>     uint32_t total_weight = 0;
> 
>     LIST_FOR_EACH (bucket, list_node, &group->up.buckets) {
>           if (bucket_is_alive(ctx, bucket, 0)) {
>               total_weight += bucket->weight;
>           }
>     }
>     uint32_t rand_num = rand() % total_weight + 1;
>     struct ofputil_bucket *best_bucket = NULL;
>     uint32_t summed_weight =0;
>     LIST_FOR_EACH (bucket, list_node, &group->up.buckets) {
>           if (bucket_is_alive(ctx, bucket, 0)) {
>               summed_weight += bucket->weight;
>               if (rand_num <= summed_weight) {
>                   return bucket; // return this bucket
>                }
>           }
>      }
>     return best_bucket; // return NULL
> }
> 
> >>>>>>>>>>>>>>> after that i rebuild and install OVS 2.7.
> 
> #cd openvswitch-2.7.0/
> #apt-get install build-essential fakeroot
> #apt-get install debhelper autoconf automake libssl-dev pkg-config bzip2
> openssl python-all procps python-qt4 python-zopeinterface
> python-twisted-conch dh-autoreconf
> #fakeroot debian/rules binary
> 
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>I received an error.
> ## ------------- ##
> ## Test results. ##
> ## ------------- ##
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> *ERROR: All 7 tests were run,7 failed unexpectedly.Makefile:6264: recipe
> for target 'check-local' failedmake[5]: *** [check-local] Error 1make[5]:
> Leaving directory '/root/openvswitch-2.7.0'Makefile:5402: recipe for target
> 'check-am' failedmake[4]: *** [check-am] Error 2make[4]: Leaving directory
> '/root/openvswitch-2.7.0'Makefile:5111: recipe for target 'check-recursive'
> failedmake[3]: *** [check-recursive] Error 1make[3]: Leaving directory
> '/root/openvswitch-2.7.0'Makefile:5406: recipe for target 'check'
> failedmake[2]: *** [check] Error 2make[2]: Leaving directory
> '/root/openvswitch-2.7.0'*# ----------------------------- ##
> ## openvswitch 2.7.0 test suite. ##
> ## ----------------------------- ##
> 
> 
> 
> 
> 
> 
> 
> 
> 
> *mpls-xlate419: MPLS xlate action                               FAILED
> (mpls-xlate.at:70 <http://mpls-xlate.at:70>)ofproto-dpif1003: ofproto-dpif
> - group actions have no effect afterwards FAILED (ofproto-dpif.at:341
> <http://ofproto-dpif.at:341>)1006: ofproto-dpif - select
> group                     FAILED (ofproto-dpif.at:387
> <http://ofproto-dpif.at:387>)1007: ofproto-dpif - select group with watch
> port     FAILED (ofproto-dpif.at:400 <http://ofproto-dpif.at:400>)1008:
> ofproto-dpif - select group with weight         FAILED (ofproto-dpif.at:412
> <http://ofproto-dpif.at:412>)1009: ofproto-dpif - select group with hash
> selection method FAILED (ofproto-dpif.at:435
> <http://ofproto-dpif.at:435>)1010: ofproto-dpif - select group with dp_hash
> selection method FAILED (ofproto-dpif.at:478 <http://ofproto-dpif.at:478>)*
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>then at the end it said
> debian/rules:37: recipe for target 'override_dh_auto_test' failed
> make[1]: *** [override_dh_auto_test] Error 1
> make[1]: Leaving directory '/root/openvswitch-2.7.0'
> debian/rules:25: recipe for target 'binary' failed
> make: *** [binary] Error 2
> 
> 
> the test results is in the attachment file.
> 
> your help is greatly appreciated
> thank you.

> ## ------------- ##
> ## Test results. ##
> ## ------------- ##
> 
> ERROR: All 7 tests were run,
> 7 failed unexpectedly.
> 
> Makefile:6264: recipe for target 'check-local' failed
> make[5]: *** [check-local] Error 1
> make[5]: Leaving directory '/root/openvswitch-2.7.0'
> Makefile:5402: recipe for target 'check-am' failed
> make[4]: *** [check-am] Error 2
> make[4]: Leaving directory '/root/openvswitch-2.7.0'
> Makefile:5111: recipe for target 'check-recursive' failed
> make[3]: *** [check-recursive] Error 1
> make[3]: Leaving directory '/root/openvswitch-2.7.0'
> Makefile:5406: recipe for target 'check' failed
> make[2]: *** [check] Error 2
> make[2]: Leaving directory '/root/openvswitch-2.7.0'
> 
> 
> 
> # ----------------------------- ##
> ## openvswitch 2.7.0 test suite. ##
> ## ----------------------------- ##
> 
> mpls-xlate
> 
> 419: MPLS xlate action                               FAILED (mpls-xlate.at:70)
> 
> ofproto-dpif
> 
> 1003: ofproto-dpif - group actions have no effect afterwards FAILED 
> (ofproto-dpif.at:341)
> 1006: ofproto-dpif - select group                     FAILED 
> (ofproto-dpif.at:387)
> 1007: ofproto-dpif - select group with watch port     FAILED 
> (ofproto-dpif.at:400)
> 1008: ofproto-dpif - select group with weight         FAILED 
> (ofproto-dpif.at:412)
> 1009: ofproto-dpif - select group with hash selection method FAILED 
> (ofproto-dpif.at:435)
> 1010: ofproto-dpif - select group with dp_hash selection method FAILED 
> (ofproto-dpif.at:478)
> 
> 
> 
> debian/rules:37: recipe for target 'override_dh_auto_test' failed
> make[1]: *** [override_dh_auto_test] Error 1
> make[1]: Leaving directory '/root/openvswitch-2.7.0'
> debian/rules:25: recipe for target 'binary' failed
> make: *** [binary] Error 2

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to