<snip>

> 
> > > > +static int
> > > > +test_worker_prcs(void *arg)
> > > > +{
> > > > +       int32_t rc;
> > > > +       uint32_t lc, n, num;
> > > minor, lcore instead of lc would be better
> > >
> > > > +       uint64_t cl, tm0, tm1;
> > > > +       struct lcore_arg *la;
> > > > +       struct ring_elem def_elm, loc_elm;
> > > > +       struct ring_elem *obj[2 * BULK_NUM];
> > > > +
> > > > +       la = arg;
> > > > +       lc = rte_lcore_id();
> > > > +
> > > > +       fill_ring_elm(&def_elm, UINT32_MAX);
> > > > +       fill_ring_elm(&loc_elm, lc);
> > > > +
> > > > +       while (wrk_cmd != WRK_CMD_RUN) {
> > > > +               rte_smp_rmb();
> > > > +               rte_pause();
> > > > +       }
> > > > +
> > > > +       cl = rte_rdtsc_precise();
> > > > +
> > > > +       do {
> > > > +               /* num in interval [7/8, 11/8] of BULK_NUM */
> > > > +               num = 7 * BULK_NUM / 8 + rte_rand() % (BULK_NUM / 2);
> > > > +
> > > > +               /* reset all pointer values */
> > > > +               memset(obj, 0, sizeof(obj));
> > > > +
> > > > +               /* dequeue num elems */
> > > > +               tm0 = rte_rdtsc_precise();
> > > > +               n = _st_ring_dequeue_bulk(la->rng, (void **)obj, num, 
> > > > NULL);
> > > > +               tm0 = rte_rdtsc_precise() - tm0;
> > > > +
> > > > +               /* check return value and objects */
> > > > +               rc = check_ring_op(num, n, lc, __func__,
> > > > +                       RTE_STR(_st_ring_dequeue_bulk));
> > > > +               if (rc == 0)
> > > > +                       rc = check_updt_elem(obj, num, &def_elm,
> > > > &loc_elm);
> > > > +               if (rc != 0)
> > > > +                       break;
> > > Since this seems like a performance test, should we skip validating the
> objects?
> 
> I think it is good to have test doing validation too.
> It shouldn't affect measurements, but brings extra confidentiality that our
> ring implementation works properly and doesn't introduce any races.
Ok, I am fine here as the cycles for validation are not counted in the cycles 
for ring APIs.
IMO, this test is enough and do not need the average cycles test.

> 
> > > Did these tests run on Travis CI?
> 
> AFAIK, no but people can still run it manually.
> 
> >> I believe Travis CI has trouble running stress/performance tests if they 
> >> take
> too much time.
> > > The RTS and HTS tests should be added to functional tests.
> 
> Ok, I'll try to add some extra functional tests in v4.

Reply via email to