From patchwork Thu May 15 12:00:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 23365 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 4CAE9C3220 for ; Thu, 15 May 2025 12:00:20 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C6A0668D6C; Thu, 15 May 2025 14:00:18 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="T0h93Vg5"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 89E3268B5D for ; Thu, 15 May 2025 14:00:16 +0200 (CEST) Received: from pb-laptop.local (185.221.142.248.nat.pool.zt.hu [185.221.142.248]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 37727886; Thu, 15 May 2025 13:59:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1747310399; bh=uyfrQs4ZREwfz5rgrXMMY4jHUZ5TwPQuKun/dVpd1Hc=; h=From:To:Cc:Subject:Date:From; b=T0h93Vg5ICSjpyAHvk8DCBERj5jT7Fh+quLm1afN1uAVIoaDLG+mtxg31WA2fSu7Q iG1HeVCsys6OTj/F3P4HsNWJr3ILaD/KddGmIjQ2GgwsxoDvBF1vxXo89pzrF1KBJZ hR23i/34R5+2JDe79dpzwHrAgqh4GNjb7UFislQw= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Cc: Paul Elder Subject: [RFC PATCH v1 0/8] utils: codegen: ipc: Simplify deserialization Date: Thu, 15 May 2025 14:00:04 +0200 Message-ID: <20250515120012.3127231-1-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Proof of concept to fix https://bugs.libcamera.org/show_bug.cgi?id=269. The first 7 are essentially non-functional changes, the main changes are in the 8th patch. See that patch for the details. Barnabás Pőcze (8): utils: codegen: ipc: Use `any()` instead of `len([]) > 0` utils: codegen: ipc: Remove `namespace` argument utils: codegen: ipc: Add `deserializer()` function utils: codegen: ipc: Log error code when remote call fails utils: codegen: ipc: Simplify `return` statements libcamera: ipa_data_serializer: Remove some vector `reserve()` calls libcamera: ipa_data_serializer: Add specialization for enums utils: codegen: ipc: Simplify deserialization .../libcamera/internal/ipa_data_serializer.h | 215 +++-------- include/libcamera/internal/ipc_pipe.h | 3 + include/libcamera/internal/serialization.h | 91 +++++ src/libcamera/ipa_data_serializer.cpp | 357 ++++-------------- src/libcamera/ipc_pipe.cpp | 5 + test/ipc/unixsocket_ipc.cpp | 18 +- .../generated_serializer_test.cpp | 17 +- .../ipa_data_serializer_test.cpp | 32 +- .../core_ipa_serializer.h.tmpl | 9 +- .../module_ipa_proxy.cpp.tmpl | 42 +-- .../module_ipa_proxy.h.tmpl | 5 +- .../module_ipa_proxy_worker.cpp.tmpl | 5 +- .../module_ipa_serializer.h.tmpl | 9 +- .../libcamera_templates/proxy_functions.tmpl | 128 +------ .../libcamera_templates/serializer.tmpl | 244 +----------- .../generators/mojom_libcamera_generator.py | 14 +- 16 files changed, 351 insertions(+), 843 deletions(-) create mode 100644 include/libcamera/internal/serialization.h --- 2.49.0