-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue: 1792164 Socket error queue support #900
base: master
Are you sure you want to change the base?
Commits on Jun 4, 2020
-
issue: 1792164 Use NOTIFY_ON_EVENTS in all places
NOTIFY_ON_EVENTS should be used in all place to provide single way for passing any epoll events. Signed-off-by: Igor Ivanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cf5aae3 - Browse repository at this point
Copy the full SHA cf5aae3View commit details
Commits on Jun 15, 2020
-
issue: 1792164 Introduce socket error queue
Signed-off-by: Igor Ivanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e81bdb1 - Browse repository at this point
Copy the full SHA e81bdb1View commit details -
issue: 1792164 Change handle_cmsg() prototype
Added flags argument that comes from original recv() call. It is needed to return information from error queue that should be done if MSG_ERRQUEUE is passed. Signed-off-by: Igor Ivanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a458344 - Browse repository at this point
Copy the full SHA a458344View commit details -
issue: 1792164 Add MSG_ERRQUEUE handler
Signed-off-by: Igor Ivanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3b233a4 - Browse repository at this point
Copy the full SHA 3b233a4View commit details -
issue: 1792164 Add tx zcopy description into mem_buf_desc_t
Signed-off-by: Igor Ivanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 28b8b23 - Browse repository at this point
Copy the full SHA 28b8b23View commit details -
issue: 1792164 Define zero copy constants
zero copy was introduced at linux kernel 4.14 so prevoius versions do not have related options. Signed-off-by: Igor Ivanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 815376c - Browse repository at this point
Copy the full SHA 815376cView commit details -
issue: 1792164 Add SO_ZEROCOPY processing
Passing the MSG_ZEROCOPY flag is the most obvious step to enable copy avoidance, but not the only one. The kernel is permissive when applications pass undefined flags to the send system call. By default it simply ignores these. To avoid enabling copy avoidance mode for legacy processes that accidentally already pass this flag, a process must first signal intent by setting a socket option as SO_ZEROCOPY. Signed-off-by: Igor Ivanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 74de061 - Browse repository at this point
Copy the full SHA 74de061View commit details -
issue: 1792164 Add PBUF_ZEROCOPY type of allocated pbuf
Extend pbuf allocation functions with new parameter as pbuf_type to by pass requested type of memory to socket. Socket layer needs this information to manage different types of mem_buf_desc_t elements. Signed-off-by: Igor Ivanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3457d7d - Browse repository at this point
Copy the full SHA 3457d7dView commit details -
issue: 1792164 Introduce flags to process zero copy send
There flags are added: VMA_TX_PACKET_ZEROCOPY - to use on sockinfo/dst_entry layers TCP_WRITE_ZEROCOPY - to use inside lwip tcp_write TF_SEG_OPTS_ZEROCOPY - to mark tcp segment with zero copy attribute Signed-off-by: Igor Ivanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7aa343d - Browse repository at this point
Copy the full SHA 7aa343dView commit details
Commits on Oct 7, 2020
-
issue: 1792164 Add MSG_ZEROCOPY processing
These changes make workable MSG_ZEROCOPY send flow including notification mechanizm. It is needed to notify the process when it is safe to reuse a previously passed buffer. It queues completion notifications on the socket error queue. But copy avoidance internally is not done. So all data is copied in internal buffers as without MSG_ZEROCOPY. Full zcopy support will be implemented later. Signed-off-by: Igor Ivanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 969ade6 - Browse repository at this point
Copy the full SHA 969ade6View commit details -
issue: 1792164 Force tx completion for zerocopy buffers
ZCOPY packets should notify application as soon as possible to confirm one that user buffers are free to reuse. So force completion signal for such work requests. Signed-off-by: Igor Ivanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 94ffe80 - Browse repository at this point
Copy the full SHA 94ffe80View commit details -
issue: 1792164 Track last memory descriptor with identical zcopy counter
TCP write can create several memory descriptors for single write call with identical zcopy id. Notification should be done just in case last one is free. This change does not garantee correctness completelly when during the same write() call memory descriptor set current zcopy id after previous memory descriptor get tx completion and ack. zcopy operation should allocate memory buffer to track unique counter correctly. So tcp_write() should avoid adding portion of data to existing pbuf. Signed-off-by: Igor Ivanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c239eff - Browse repository at this point
Copy the full SHA c239effView commit details -
issue: 1792164 Do TX polling from internal thread
To effectively process TX completions VMA should polling TX from internal thread too otherwise tx memory descriptor can not be freed on time as far as there user application should call any write() operations to force it. Signed-off-by: Igor Ivanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b22e4e9 - Browse repository at this point
Copy the full SHA b22e4e9View commit details -
issue: 1792164 Extend VMA_INTERNAL_THREAD_ARM_CQ variable
Flexible tunning is added to control RX and TX polling. Signed-off-by: Igor Ivanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 306d312 - Browse repository at this point
Copy the full SHA 306d312View commit details -
issue: 1792164 Support MSG_ERRQUEUE in sockinfo::rx()
rx() processing should allow return information from error queue and income data in single call. Depending on user application it means that rx() logic should return: 1. only income data 2. only error queue data 3. income and error queue data Error processing logic is done accordingly. Signed-off-by: Igor Ivanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 50996ba - Browse repository at this point
Copy the full SHA 50996baView commit details -
issue: 1792164 Support checking POLLERR events by poll()
Signed-off-by: Igor Ivanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f808091 - Browse repository at this point
Copy the full SHA f808091View commit details -
issue: 1792164 Improve LSO send flow
LSO operation can not be done when payload data less than mss. This change allows to use LSO in right way. Signed-off-by: Igor Ivanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fc9acbe - Browse repository at this point
Copy the full SHA fc9acbeView commit details -
issue: 1792164 Fix race access to error queue
Signed-off-by: Igor Ivanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1392cb6 - Browse repository at this point
Copy the full SHA 1392cb6View commit details
Commits on Dec 30, 2020
-
issue: 1792164 Remove epoll event when it is consumed
Zcopy notification mechanism (error queue) adds an event EPOLLERR to respective epfd_info object and it is never removed. This leads to the issue that epoll_wait() returns EPOLLERR event endlessly and doesn't enter polling loops. Fix this by removing EPOLLERR event when socket becomes not "errorable". The fix avoids fake EPOLLERR events and allows epoll_wait_helper() to perform polling.
Configuration menu - View commit details
-
Copy full SHA for b0b5b52 - Browse repository at this point
Copy the full SHA b0b5b52View commit details -
issue: 1792164 Handle duplicate zcopy notifications
In retransmit scenario it is possible to get duplicate ids in the zcopy callback. In this case, ee_data is rewritten with a value which may be lower than previous value. This leads to missed notifications. As workaround, don't overwrite ee_data with lower value.
Configuration menu - View commit details
-
Copy full SHA for d2db645 - Browse repository at this point
Copy the full SHA d2db645View commit details
Commits on Feb 20, 2021
-
issue: 2439102 Fix issue with processing control msg in recvmsg()
Control message should be handled just in case an user passes a buffer for it. Error queue request must be processed first before data. Signed-off-by: Igor Ivanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 07a71ec - Browse repository at this point
Copy the full SHA 07a71ecView commit details