[{"id":34239,"web_url":"https://patchwork.libcamera.org/comment/34239/","msgid":"<174731191320.209691.13319699119887830738@calcite>","date":"2025-05-15T12:25:13","subject":"Re: [RFC PATCH v1 4/8] utils: codegen: ipc: Log error code when\n\tremote call fails","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Quoting Barnabás Pőcze (2025-05-15 14:00:08)\n> The error code can be useful in diagnosing the underlying issue,\n> so log that as well, not just the existence of the issue.\n> \n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  .../generators/libcamera_templates/module_ipa_proxy.cpp.tmpl    | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/utils/codegen/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/codegen/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> index 07165821e..effc8f7dd 100644\n> --- a/utils/codegen/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> +++ b/utils/codegen/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> @@ -206,7 +206,7 @@ void {{proxy_name}}::recvMessage(const IPCMessage &data)\n>  );\n>  {%- endif %}\n>         if (_ret < 0) {\n> -               LOG(IPAProxy, Error) << \"Failed to call {{method.mojom_name}}\";\n> +               LOG(IPAProxy, Error) << \"Failed to call {{method.mojom_name}}: \" << _ret;\n>  {%- if method|method_return_value != \"void\" %}\n>                 return static_cast<{{method|method_return_value}}>(_ret);\n>  {%- else %}\n> -- \n> 2.49.0\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 0685FC3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 15 May 2025 12:25:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AAEC968C92;\n\tThu, 15 May 2025 14:25:17 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AF80368B6C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 15 May 2025 14:25:16 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2a01:cb16:204c:4644:2597:989f:e013:9296])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 822BA836;\n\tThu, 15 May 2025 14:24:59 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"hdCz+BKo\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1747311899;\n\tbh=Hr6+RlzPPBLqSWo+8f11R6hl7J+pugXYPmBLYFQSjBw=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=hdCz+BKoKx6ieDfqh3dq7QSIkqHcFhdFt11xjvoxOnvqQBom01B3iSSc5FlMlkdML\n\tM3WpYck7GPi2fuEu4oq1HYTjSMZujjutVcvNtf4Pv6Q7losk64Rn/3QtXJwHVIdCRc\n\tvl+uLYQ262UTKeTL6lbSX1P9bhKkdCDabxknbtq8=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250515120012.3127231-5-barnabas.pocze@ideasonboard.com>","References":"<20250515120012.3127231-1-barnabas.pocze@ideasonboard.com>\n\t<20250515120012.3127231-5-barnabas.pocze@ideasonboard.com>","Subject":"Re: [RFC PATCH v1 4/8] utils: codegen: ipc: Log error code when\n\tremote call fails","From":"Paul Elder <paul.elder@ideasonboard.com>","Cc":"","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 15 May 2025 14:25:13 +0200","Message-ID":"<174731191320.209691.13319699119887830738@calcite>","User-Agent":"alot/0.10","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34292,"web_url":"https://patchwork.libcamera.org/comment/34292/","msgid":"<pxulbytagmuzvedudrnhknw55zq3kpivla6f43ztb6yekrszu2@eczcxuehv4b2>","date":"2025-05-20T11:48:46","subject":"Re: [RFC PATCH v1 4/8] utils: codegen: ipc: Log error code when\n\tremote call fails","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Barnabás\n\nOn Thu, May 15, 2025 at 02:00:08PM +0200, Barnabás Pőcze wrote:\n> The error code can be useful in diagnosing the underlying issue,\n> so log that as well, not just the existence of the issue.\n>\n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\n> ---\n>  .../generators/libcamera_templates/module_ipa_proxy.cpp.tmpl    | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/utils/codegen/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/codegen/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> index 07165821e..effc8f7dd 100644\n> --- a/utils/codegen/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> +++ b/utils/codegen/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> @@ -206,7 +206,7 @@ void {{proxy_name}}::recvMessage(const IPCMessage &data)\n>  );\n>  {%- endif %}\n>  \tif (_ret < 0) {\n> -\t\tLOG(IPAProxy, Error) << \"Failed to call {{method.mojom_name}}\";\n> +\t\tLOG(IPAProxy, Error) << \"Failed to call {{method.mojom_name}}: \" << _ret;\n>  {%- if method|method_return_value != \"void\" %}\n>  \t\treturn static_cast<{{method|method_return_value}}>(_ret);\n>  {%- else %}\n> --\n> 2.49.0\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 15B86C31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 20 May 2025 11:48:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C36A668D89;\n\tTue, 20 May 2025 13:48:50 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2C19B614DE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 20 May 2025 13:48:49 +0200 (CEST)","from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8EE73446;\n\tTue, 20 May 2025 13:48:28 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"tWGiOsdH\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1747741708;\n\tbh=6HXafvbViPhu100IYTUFPZ8pSXvsSHeh2SJx06FfJKI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=tWGiOsdHI4/ULG5xw5ogEroZJf1xBS14O5Mjn3MjL4H8PqPDhBAU8PMQj0sDau2IE\n\typbc+9DpXpvfhCZOU4ZKaN9eWXrWAEDVG69pYoM93xuqHRU0DXsZWMSCmsCLleJNik\n\tUH6UKG+y2hQhsXNmAqCBD96Q36tZeXoDfGv1uQrw=","Date":"Tue, 20 May 2025 13:48:46 +0200","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, \n\tPaul Elder <paul.elder@ideasonboard.com>","Subject":"Re: [RFC PATCH v1 4/8] utils: codegen: ipc: Log error code when\n\tremote call fails","Message-ID":"<pxulbytagmuzvedudrnhknw55zq3kpivla6f43ztb6yekrszu2@eczcxuehv4b2>","References":"<20250515120012.3127231-1-barnabas.pocze@ideasonboard.com>\n\t<20250515120012.3127231-5-barnabas.pocze@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20250515120012.3127231-5-barnabas.pocze@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]