burst copy in ff_hook_epoll_wait.

This commit is contained in:
fengbojiang 2023-04-12 10:15:22 +08:00
parent 1d09ad5003
commit e58d683b24
1 changed files with 1 additions and 4 deletions

View File

@ -1277,15 +1277,12 @@ ff_hook_epoll_wait(int epfd, struct epoll_event *events,
rte_spinlock_unlock(&sc->lock);
if (ret > 0) {
int i;
if (unlikely(ret > maxevents)) {
ERR_LOG("return events:%d, maxevents:%d, set return events to maxevents, may be some error occur\n",
ret, maxevents);
ret = maxevents;
}
for (i = 0; i < ret; i++) {
rte_memcpy(&events[i], &sh_events[i], sizeof(struct epoll_event));
}
rte_memcpy(events, sh_events, sizeof(struct epoll_event) * ret);
}
if (sh_events) {