Re: [PATCH 19/39] event/octeontx: add support worker dequeue function
From: Eads, Gage <hidden>
Date: 2017-03-23 18:51:09
From: Eads, Gage <hidden>
Date: 2017-03-23 18:51:09
Hi Jerin, <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? Thanks, Gage