[ovs-dev] [PATCH 2/3] tests: Speed up classifier test.
Jesse Gross
jesse at nicira.com
Wed May 26 22:16:43 UTC 2010
On Wed, May 26, 2010 at 12:52 PM, Ben Pfaff <blp at nicira.com> wrote:
>
> @@ -352,17 +352,18 @@ lookup_with_include_bits(const struct classifier
> *cls,
> static void
> compare_classifiers(struct classifier *cls, struct tcls *tcls)
> {
> + static const int confidence = 500;
> unsigned int i;
>
> assert(classifier_count(cls) == tcls->n_rules);
> assert(classifier_count_exact(cls) == tcls_count_exact(tcls));
> - for (i = 0; i < N_FLOW_VALUES; i++) {
> + for (i = 0; i < confidence; i++) {
> struct cls_rule *cr0, *cr1;
> flow_t flow;
> unsigned int x;
> int include;
>
> - x = i;
> + x = rand () % confidence;
>
Should this be rand() % N_FLOW_VALUES?
Otherwise looks fine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20100526/d4a01a39/attachment-0003.html>
More information about the dev
mailing list