examples/zcrx: fix just allocated sock struct checks
PATCH 1/1 examples/zcrx: fix just allocated sock struct checks
The line in process_accept() checking sockfd is a leftover from times there was just one static socket. Now it's allocated, and we shouldn't be checking an uninitialised value, which fails the benchmark from time to time.
Signed-off-by Pavel Begunkov <[email protected]>
--- examples/zcrx.c | 2 -- 1 file changed, 2 deletions(-)
examples/zcrx.c +0 -2
@@ -356,8 +356,6 @@ static void process_accept(struct io_uring *ring, struct io_uring_cqe *cqe) conn =aligned_alloc (64 ,sizeof (*conn));if (!conn)t_error (1 ,0 ,"can't allocate conn structure" ); -if (conn->sockfd) -t_error (1 ,0 ,"Unexpected second connection" );memset (conn,0 ,sizeof (*conn)); conn->sockfd = cqe->res;
Signature · 1 line
2.53.0
Quoted 4 lines · Pavel Begunkov
The line in
process_accept()checking sockfd is a leftover from times there was just one static socket. Now it's allocated, and we shouldn't be checking an uninitialised value, which fails the benchmark from time to time.
Applied, thanks!
[1/1] examples/zcrx: fix just allocated sock struct checks
commit: 6dc578df309eb6958e7422ff7395e591c80ea7b9
Best regards,
Signature · 1 line
Jens Axboe