From 062df52ab9f3464ce79ca91d54fa3d2ad209a31b Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 29 Oct 2025 18:05:00 +0100 Subject: [SERVER] iscsi: Refactor receive function and PDU handling - Fold header/data handling into one function This uncovered a few redundant checks and makes it easier to reason about control flow - Make all iscsi_pdu stack-allocated This greatly reduces the number of malloc and free calls during normal operation, lowers the risk of memory management bugs, and potentially increases performance in high concurrency scenarios. --- inc/dnbd3/shared/sockhelper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/dnbd3') diff --git a/inc/dnbd3/shared/sockhelper.h b/inc/dnbd3/shared/sockhelper.h index aa482fa..728ebfc 100644 --- a/inc/dnbd3/shared/sockhelper.h +++ b/inc/dnbd3/shared/sockhelper.h @@ -120,6 +120,6 @@ ssize_t sock_recv(const int sock, void *buffer, const size_t len); /** * Send a desired number of nullbytes to socket. */ -bool sock_sendPadding(int fd, uint32_t bytes); +bool sock_sendPadding(int fd, size_t bytes); #endif /* SOCKHELPER_H_ */ -- cgit v1.2.3-55-g7522