summaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorSimon Rettberg2025-10-29 18:05:00 +0100
committerSimon Rettberg2025-12-09 15:33:20 +0100
commit062df52ab9f3464ce79ca91d54fa3d2ad209a31b (patch)
tree2bb2c53a0e29a9691a77199fa631a007e4d96fa2 /inc
parent[SERVER] iscsi: Honor global _shutdown (diff)
downloaddnbd3-062df52ab9f3464ce79ca91d54fa3d2ad209a31b.tar.gz
dnbd3-062df52ab9f3464ce79ca91d54fa3d2ad209a31b.tar.xz
dnbd3-062df52ab9f3464ce79ca91d54fa3d2ad209a31b.zip
[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.
Diffstat (limited to 'inc')
-rw-r--r--inc/dnbd3/shared/sockhelper.h2
1 files changed, 1 insertions, 1 deletions
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_ */