[dpdk-dev] [PATCH 19/39] event/octeontx: add support worker dequeue function

Jerin Jacob jerin.jacob at caviumnetworks.com
Fri Mar 24 12:16:49 CET 2017


On Thu, Mar 23, 2017 at 06:51:07PM +0000, Eads, Gage wrote:
> Hi Jerin,

Hi Gage,

> 
> <snip>
> 
> >  +force_inline uint16_t __hot
> >  +ssows_deq_timeout(void *port, struct rte_event *ev, uint64_t
> >  +timeout_ticks) {
> >  +	struct ssows *ws = port;
> >  +	uint64_t iter;
> >  +	uint16_t ret = 1;
> >  +
> >  +	ssows_swtag_wait(ws);
> >  +	if (ws->swtag_req) {
> >  +		ws->swtag_req = 0;
> >  +	} else {
> >  +		ret = ssows_get_work(ws, ev);
> >  +		for (iter = 1; iter < timeout_ticks && (ret == 0); iter++)
> >  +			ret = ssows_get_work(ws, ev);
> >  +	}
> >  +	return ret;
> >  +}
> 
> If I understand this correctly, each ssows_get_work() call will wait up to N ns, where N is the dequeue_timeout_ns value supplied to ssovf_mbox_getwork_tmo_set() in ssovf_configure().
> 
> So in ssows_deq_timeout, the wait time is (worst case) timeout_ticks * (N * (ns to tick conversion factor)) ticks, which depends on the user-supplied N at eventdev configuration time.
> 
> Perhaps in ssovf_configure, if the RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT flag is used, the getwork timeout should be set to 1 tick?

I agree. That will improve the timeout accuracy.I will change to
ssovf_mbox_getwork_tmo_set(conf->min_dequeue_timeout_ns) in
ssovf_configure if RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT flag is set.

Thanks

> Thanks,
> Gage


More information about the dev mailing list