ODP has two functions, odp_pktin_recv_tmo and odp_pktin_recv_mq_tmo that allow sleeping for a certain time. However, the sleep was not a genuine interruptible sleep (select/poll/epoll) but rather a busy loop. This resulted in high CPU use when this call was used. This functionality adds to two pktio mechanisms a way to allow sleeping using select() system call. The way is used if all used pktio mechanisms support it. Signed-off-by: Juha-Matti Tilli [email protected]
----------------github------------------------ /** Email created from pull request 341 (jmtilli:genuinesleep) ** https://github.com/Linaro/odp/pull/341 ** Patch: https://github.com/Linaro/odp/pull/341.patch ** Base sha: 4f2ebb270c30a46c97355da84587a2220281798c ** Merge commit sha: 778c806208ffacd9ea920d81437aec468241dd82 **/ ----------------/github------------------------ ----------------checkpatch.pl------------------------ CHECK: spaces preferred around that '*' (ctx:VxV) #45: FILE: platform/linux-generic/odp_packet_io.c:1583: + ts.tv_nsec = 1000*SLEEP_USEC; ^ ERROR: trailing whitespace #69: FILE: platform/linux-generic/odp_packet_io.c:1610: +^I$ ERROR: trailing whitespace #107: FILE: platform/linux-generic/odp_packet_io.c:1661: +^I$ ERROR: trailing whitespace #111: FILE: platform/linux-generic/odp_packet_io.c:1665: +^I$ total: 3 errors, 0 warnings, 1 checks, 100 lines checked NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or scripts/cleanfile to_send-p-000.patch has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. total: 0 errors, 0 warnings, 0 checks, 638 lines checked to_send-p-001.patch has no obvious style problems and is ready for submission. total: 0 errors, 0 warnings, 0 checks, 15 lines checked to_send-p-002.patch has no obvious style problems and is ready for submission. ----------------/checkpatch.pl------------------------
