On Wed, Aug 26, 2015 at 04:22:16PM +0300, Maxim Uvarov wrote:
> On 08/26/15 15:39, Stuart Haslam wrote:
> >>+   /* stop and check that we can not transmit*/
> >>>+  ret = odp_pktio_stop(pktio[0]);
> >>>+  CU_ASSERT(ret == 0);
> >>>+  odp_errno_zero();
> >>>+  ret = odp_queue_enq_multi(outq, tx_ev, 10);
> >>>+  /* return of enqueue function to stopped pktio undefined.
> >>>+   *  error might be returned, packets can be queued but not
> >>>+   * actually sent, no packets queued due to stopped pktio or
> >>>+   * queue is full.
> >>>+   * CU_ASSERT(ret == undefined);
> >>>+   */
> >We can't invoke undefined behaviour in the test suite, crashing would be
> >a valid thing for the implementation to do.
> 
> Ok. But crash where? Some packets might be already in queue and they
> will call pktio send.
> So crash in enqueue function will not work due to no reference to
> pktio. Crash inside pktio will
> not work due to packets might be in queue. Condition for crash in
> test is also unclear.
> 

It's undefined, but for example you could replace the current check and
return -1 in the linux-generic implementation with an ODP_ASSERT().

-- 
Stuart.
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to