Commit ebca7d0
committed
issue: 4082058 Fixing return from rx_wait_helper without data
In case poll_and_process_element_rx polled packets without draining the CQ but m_n_rx_pkt_ready_list_count==0,
meaning no data bytes were received, we need to return positive return code, to make the caller call us again.
Returning EAGAIN without draining the CQ will make the caller return EGAIAN as well, and so up to the application,
although packets are still available in the CQ.
This can happen, for example, if the polling received only ACK packets. Returning EAGAIN in this case is incorrect.
Callers may decide falsly to go to sleep.
Signed-off-by: Alexander Grissik <[email protected]>1 parent 43a8115 commit ebca7d0
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5096 | 5096 | | |
5097 | 5097 | | |
5098 | 5098 | | |
| 5099 | + | |
5099 | 5100 | | |
5100 | | - | |
| 5101 | + | |
5101 | 5102 | | |
5102 | 5103 | | |
5103 | 5104 | | |
| |||
5106 | 5107 | | |
5107 | 5108 | | |
5108 | 5109 | | |
5109 | | - | |
| 5110 | + | |
5110 | 5111 | | |
5111 | 5112 | | |
5112 | 5113 | | |
5113 | 5114 | | |
5114 | 5115 | | |
5115 | | - | |
| 5116 | + | |
5116 | 5117 | | |
5117 | 5118 | | |
5118 | 5119 | | |
| |||
0 commit comments