From 2bc4b641220f4e5de88525a6bbe4b423b541317c Mon Sep 17 00:00:00 2001 From: PancakeTAS Date: Sat, 13 Jun 2026 19:52:25 +0200 Subject: perf(mpu): Remove zero-copy items See 'zerocopy' branch --- src/mpu.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/mpu.c b/src/mpu.c index 9659c50..1df1559 100644 --- a/src/mpu.c +++ b/src/mpu.c @@ -60,9 +60,6 @@ static inline uint64_t get_time_now(void) { + ((uint64_t) ts.tv_nsec / 1000000ULL); } -// TODO: Zero-copy send() requiring the user to reserve space for the header. -// Perhaps consider MSG_MORE for sending header & payload separately or sendmsg() - int mpu_send(mpu_ctx_t* ctx, const uint8_t* data, size_t len) { if (!ctx || !data || len == 0 || len > MPU_MTU - sizeof(mpu_hdr_t)) { errno = EINVAL; @@ -93,9 +90,6 @@ int mpu_send(mpu_ctx_t* ctx, const uint8_t* data, size_t len) { return 0; } -// TODO: Zero-copy recv() into reorder buffer slot, requiring the user to provide a callback -// for processing received packets, instead of copying into a user buffer. - ssize_t mpu_recv(mpu_ctx_t* ctx, uint8_t* data, size_t len) { if (!ctx || !data || !len) { errno = EINVAL; -- cgit v1.3.1